Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
312 changes: 168 additions & 144 deletions .pnp.cjs

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ and this project adheres to
- @cosmjs/crypto: Make
`Secp256k1.verifySignature`/`.createSignature`/`.makeKeypair` synchonous and
let them not return a Promise.
- @cosmjs/cosmwasm-stargate: Rename package to @cosmjs/cosmwasm. ([#1903])

[#1883]: https://github.com/cosmos/cosmjs/issues/1883
[#1866]: https://github.com/cosmos/cosmjs/issues/1866
[#1903]: https://github.com/cosmos/cosmjs/pull/1903

## [0.37.0] - 2025-10-29

Expand Down
30 changes: 15 additions & 15 deletions HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,18 @@ In the `scripts/` folder, a bunch of blockchains and other backend systems are
started for testing purposes. Some ports need to be changed from the default in
order to avoid conflicts. Here is an overview of the ports used:

| Port | Application | Usage |
| ----- | ------------------------------ | ------------------------------- |
| 1318 | simapp LCD API | Manual Stargate debugging |
| 1319 | wasmd LCD API | Manual Stargate debugging |
| 1320 | simapp slow LCD API | Manual Stargate debugging |
| 4444 | socketserver | @cosmjs/sockets tests |
| 4445 | socketserver slow | @cosmjs/sockets tests |
| 5555 | httpserver | @cosmjs/tendermint-rpc tests |
| 9090 | simapp gRPC | Manual Stargate debugging |
| 11101 | Standalone CometBFT 1.x RPC | @cosmjs/tendermint-rpc tests |
| 11137 | Standalone Tendermint 0.37 RPC | @cosmjs/tendermint-rpc tests |
| 11138 | Standalone CometBFT 0.38 RPC | @cosmjs/tendermint-rpc tests |
| 26658 | simapp Tendermint RPC | Stargate client tests |
| 26659 | wasmd Tendermint RPC | @cosmjs/cosmwasm-stargate tests |
| 26660 | simapp slow Tendermint RPC | Stargate client tests |
| Port | Application | Usage |
| ----- | ------------------------------ | ---------------------------- |
| 1318 | simapp LCD API | Manual Stargate debugging |
| 1319 | wasmd LCD API | Manual Stargate debugging |
| 1320 | simapp slow LCD API | Manual Stargate debugging |
| 4444 | socketserver | @cosmjs/sockets tests |
| 4445 | socketserver slow | @cosmjs/sockets tests |
| 5555 | httpserver | @cosmjs/tendermint-rpc tests |
| 9090 | simapp gRPC | Manual Stargate debugging |
| 11101 | Standalone CometBFT 1.x RPC | @cosmjs/tendermint-rpc tests |
| 11137 | Standalone Tendermint 0.37 RPC | @cosmjs/tendermint-rpc tests |
| 11138 | Standalone CometBFT 0.38 RPC | @cosmjs/tendermint-rpc tests |
| 26658 | simapp Tendermint RPC | Stargate client tests |
| 26659 | wasmd Tendermint RPC | @cosmjs/cosmwasm tests |
| 26660 | simapp slow Tendermint RPC | Stargate client tests |
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ CosmJS is a library that consists of many smaller npm packages within the
[@cosmjs namespace](https://www.npmjs.com/org/cosmjs), a so-called monorepo.
Here are some of them to get an idea:

| Package | Description | Latest |
| ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| [@cosmjs/stargate](packages/stargate) | A client library for the Cosmos SDK 0.40+ (Stargate) | [![npm version](https://img.shields.io/npm/v/@cosmjs/stargate.svg)](https://www.npmjs.com/package/@cosmjs/stargate) |
| [@cosmjs/faucet](packages/faucet) | A faucet application for node.js | [![npm version](https://img.shields.io/npm/v/@cosmjs/faucet.svg)](https://www.npmjs.com/package/@cosmjs/faucet) |
| [@cosmjs/cosmwasm-stargate](packages/cosmwasm-stargate) | Client for Stargate chains with the CosmWasm module enabled | [![npm version](https://img.shields.io/npm/v/@cosmjs/cosmwasm-stargate.svg)](https://www.npmjs.com/package/@cosmjs/cosmwasm-stargate) |
| [@cosmjs/crypto](packages/crypto) | Cryptography for blockchain projects, e.g. hashing (SHA-2, Keccak256, Ripemd160), signing (secp256k1, ed25519), HD key derivation (BIP-39, SLIP-0010), KDFs and symmetric encryption for key storage (PBKDF2, Argon2, XChaCha20Poly1305) | [![npm version](https://img.shields.io/npm/v/@cosmjs/crypto.svg)](https://www.npmjs.com/package/@cosmjs/crypto) |
| [@cosmjs/encoding](packages/encoding) | Encoding helpers for blockchain projects | [![npm version](https://img.shields.io/npm/v/@cosmjs/encoding.svg)](https://www.npmjs.com/package/@cosmjs/encoding) |
| [@cosmjs/math](packages/math) | Safe integers; decimals for handling financial amounts | [![npm version](https://img.shields.io/npm/v/@cosmjs/math.svg)](https://www.npmjs.com/package/@cosmjs/math) |
| Package | Description | Latest |
| ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| [@cosmjs/stargate](packages/stargate) | A client library for the Cosmos SDK 0.40+ (Stargate) | [![npm version](https://img.shields.io/npm/v/@cosmjs/stargate.svg)](https://www.npmjs.com/package/@cosmjs/stargate) |
| [@cosmjs/faucet](packages/faucet) | A faucet application for node.js | [![npm version](https://img.shields.io/npm/v/@cosmjs/faucet.svg)](https://www.npmjs.com/package/@cosmjs/faucet) |
| [@cosmjs/cosmwasm](packages/cosmwasm) | Client for Stargate chains with the CosmWasm module enabled | [![npm version](https://img.shields.io/npm/v/@cosmjs/cosmwasm.svg)](https://www.npmjs.com/package/@cosmjs/cosmwasm) |
| [@cosmjs/crypto](packages/crypto) | Cryptography for blockchain projects, e.g. hashing (SHA-2, Keccak256, Ripemd160), signing (secp256k1, ed25519), HD key derivation (BIP-39, SLIP-0010), KDFs and symmetric encryption for key storage (PBKDF2, Argon2, XChaCha20Poly1305) | [![npm version](https://img.shields.io/npm/v/@cosmjs/crypto.svg)](https://www.npmjs.com/package/@cosmjs/crypto) |
| [@cosmjs/encoding](packages/encoding) | Encoding helpers for blockchain projects | [![npm version](https://img.shields.io/npm/v/@cosmjs/encoding.svg)](https://www.npmjs.com/package/@cosmjs/encoding) |
| [@cosmjs/math](packages/math) | Safe integers; decimals for handling financial amounts | [![npm version](https://img.shields.io/npm/v/@cosmjs/math.svg)](https://www.npmjs.com/package/@cosmjs/math) |

### Modularity

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"devDependencies": {
"@cosmjs/amino": "workspace:^",
"@cosmjs/cosmwasm-stargate": "workspace:^",
"@cosmjs/cosmwasm": "workspace:^",
"@cosmjs/crypto": "workspace:^",
"@cosmjs/encoding": "workspace:^",
"@cosmjs/proto-signing": "workspace:^",
Expand Down
29 changes: 2 additions & 27 deletions packages/cosmwasm-stargate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,5 @@
![minified size](https://img.shields.io/bundlephobia/min/@cosmjs/cosmwasm-stargate.svg)
![monthly downloads](https://img.shields.io/npm/dm/@cosmjs/cosmwasm-stargate.svg)

An SDK to build CosmWasm clients.

## Compatibility

| CosmWasm | x/wasm | @cosmjs/cosmwasm-stargate |
| --------------- | --------- | ------------------------- |
| 0.16-1.0.0-beta | 0.21-0.23 | `^0.28.0` |
| 0.16-1.0.0-beta | 0.21-0.23 | `^0.27.0` |
| 0.16-1.0.0-beta | 0.18-0.20 | `^0.26.0` |
| 0.14 | 0.16 | `^0.25.0` |
| 0.13 | 0.14-0.15 | `^0.24.0` |

## Development

Updating Hackatom development contract in `src/testdata/contract.json`:

```sh
cd packages/cosmwasm-stargate
export HACKATOM_URL=https://github.com/CosmWasm/cosmwasm/releases/download/v1.0.0-beta/hackatom.wasm
echo "{\"// source\": \"$HACKATOM_URL\", \"data\": \"$(curl -sS --location $HACKATOM_URL | base64 | tr -d '[:space:]')\" }" | jq > src/testdata/contract.json
```

## License

This package is part of the cosmjs repository, licensed under the Apache License
2.0 (see [NOTICE](https://github.com/cosmos/cosmjs/blob/main/NOTICE) and
[LICENSE](https://github.com/cosmos/cosmjs/blob/main/LICENSE)).
@cosmjs/cosmwasm-stargate was renamed to @cosmjs/cosmwasm in CosmJS 0.38. Use
@cosmjs/cosmwasm instead.
45 changes: 9 additions & 36 deletions packages/cosmwasm-stargate/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@cosmjs/cosmwasm-stargate",
"version": "0.37.0",
"description": "CosmWasm SDK",
"version": "0.38.0",
"description": "Old name of @cosmjs/cosmwasm. Use @cosmjs/cosmwasm instead.",
"contributors": [
"Will Clark <willclarktech@users.noreply.github.com>"
"Simon Warta <webmaster128@users.noreply.github.com>"
],
"license": "Apache-2.0",
"exports": {
Expand Down Expand Up @@ -32,47 +32,20 @@
"format-text": "prettier --write \"./*.md\"",
"build": "rm -rf ./build && tsc",
"build-or-skip": "[ -n \"${SKIP_BUILD:-}\" ] || yarn build",
"test-node": "yarn node jasmine-testrunner.cjs",
"test-firefox": "yarn pack-web && karma start --single-run --browsers Firefox karma.conf.cjs",
"test-chrome": "yarn pack-web && karma start --single-run --browsers ChromeHeadless karma.conf.cjs",
"test-node": "exit 0",
"test-firefox": "exit 0",
"test-chrome": "exit 0",
"test": "yarn build-or-skip && yarn test-node",
"coverage": "nyc --reporter=text --reporter=lcov yarn test --quiet",
"pack-web": "yarn build-or-skip && webpack --mode development --config webpack.web.config.cjs"
"coverage": "exit 0"
},
"dependencies": {
"@cosmjs/amino": "workspace:^",
"@cosmjs/crypto": "workspace:^",
"@cosmjs/encoding": "workspace:^",
"@cosmjs/math": "workspace:^",
"@cosmjs/proto-signing": "workspace:^",
"@cosmjs/stargate": "workspace:^",
"@cosmjs/tendermint-rpc": "workspace:^",
"@cosmjs/utils": "workspace:^",
"cosmjs-types": "^0.10.1"
"@cosmjs/cosmwasm": "workspace:^"
},
"devDependencies": {
"@istanbuljs/nyc-config-typescript": "^1.0.1",
"@types/jasmine": "^4",
"@types/karma-firefox-launcher": "^2",
"@types/karma-jasmine": "^4",
"@types/karma-jasmine-html-reporter": "^1",
"@types/node": "*",
"glob": "^11",
"jasmine": "^4",
"jasmine-spec-reporter": "^6",
"karma": "^6.3.14",
"karma-chrome-launcher": "^3.1.0",
"karma-firefox-launcher": "^2.1.0",
"karma-jasmine": "^5",
"karma-jasmine-html-reporter": "^1.5.4",
"nyc": "^17.1.0",
"prettier": "^3.6.2",
"readonly-date": "^1.0.0",
"ses": "^1.13.0",
"source-map-support": "^0.5.19",
"typedoc": "^0.28",
"typescript": "~5.9",
"webpack": "^5.76.0",
"webpack-cli": "^4.6.0"
"typescript": "~5.9"
}
}
43 changes: 1 addition & 42 deletions packages/cosmwasm-stargate/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,42 +1 @@
export type { Code, CodeDetails, Contract, ContractCodeHistoryEntry } from "./cosmwasmclient";
export { CosmWasmClient } from "./cosmwasmclient";
export { fromBinary, toBinary } from "./encoding";
export { _instantiate2AddressIntermediate, instantiate2Address } from "./instantiate2";
export type {
JsonObject,
MsgClearAdminEncodeObject,
MsgExecuteContractEncodeObject,
MsgInstantiateContract2EncodeObject,
MsgInstantiateContractEncodeObject,
MsgMigrateContractEncodeObject,
MsgStoreCodeEncodeObject,
MsgUpdateAdminEncodeObject,
WasmExtension,
} from "./modules";
export {
createWasmAminoConverters,
isMsgClearAdminEncodeObject,
isMsgExecuteEncodeObject,
isMsgInstantiateContract2EncodeObject,
isMsgInstantiateContractEncodeObject,
isMsgMigrateEncodeObject,
isMsgStoreCodeEncodeObject,
isMsgUpdateAdminEncodeObject,
setupWasmExtension,
wasmTypes,
} from "./modules";
export type {
ChangeAdminResult,
ExecuteInstruction,
ExecuteResult,
InstantiateOptions,
InstantiateResult,
MigrateResult,
SigningCosmWasmClientOptions,
UploadResult,
} from "./signingcosmwasmclient";
export { SigningCosmWasmClient } from "./signingcosmwasmclient";

// Re-exported because this is part of the CosmWasmClient/SigningCosmWasmClient APIs
export type { Attribute, DeliverTxResponse, Event, IndexedTx } from "@cosmjs/stargate";
export type { HttpEndpoint } from "@cosmjs/tendermint-rpc";
export * from "@cosmjs/cosmwasm";
4 changes: 4 additions & 0 deletions packages/cosmwasm/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build/
dist/
docs/
tmp/
File renamed without changes.
36 changes: 36 additions & 0 deletions packages/cosmwasm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# @cosmjs/cosmwasm-stargate

![typescript](https://img.shields.io/npm/types/@cosmjs/cosmwasm-stargate.svg)
[![npm version](https://img.shields.io/npm/v/@cosmjs/cosmwasm-stargate.svg)](https://www.npmjs.com/package/@cosmjs/cosmwasm-stargate)
[![license](https://img.shields.io/npm/l/@cosmjs/cosmwasm-stargate.svg)](https://github.com/cosmos/cosmjs/blob/v0.35.0/LICENSE)
![minimum node version](https://img.shields.io/node/v/@cosmjs/cosmwasm-stargate.svg)
![minified size](https://img.shields.io/bundlephobia/min/@cosmjs/cosmwasm-stargate.svg)
![monthly downloads](https://img.shields.io/npm/dm/@cosmjs/cosmwasm-stargate.svg)

An SDK to build CosmWasm clients.

## Compatibility

| CosmWasm | x/wasm | @cosmjs/cosmwasm-stargate |
| --------------- | --------- | ------------------------- |
| 0.16-1.0.0-beta | 0.21-0.23 | `^0.28.0` |
| 0.16-1.0.0-beta | 0.21-0.23 | `^0.27.0` |
| 0.16-1.0.0-beta | 0.18-0.20 | `^0.26.0` |
| 0.14 | 0.16 | `^0.25.0` |
| 0.13 | 0.14-0.15 | `^0.24.0` |

## Development

Updating Hackatom development contract in `src/testdata/contract.json`:

```sh
cd packages/cosmwasm-stargate
export HACKATOM_URL=https://github.com/CosmWasm/cosmwasm/releases/download/v1.0.0-beta/hackatom.wasm
echo "{\"// source\": \"$HACKATOM_URL\", \"data\": \"$(curl -sS --location $HACKATOM_URL | base64 | tr -d '[:space:]')\" }" | jq > src/testdata/contract.json
```

## License

This package is part of the cosmjs repository, licensed under the Apache License
2.0 (see [NOTICE](https://github.com/cosmos/cosmjs/blob/main/NOTICE) and
[LICENSE](https://github.com/cosmos/cosmjs/blob/main/LICENSE)).
79 changes: 79 additions & 0 deletions packages/cosmwasm/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"name": "@cosmjs/cosmwasm",
"version": "0.37.0",
"description": "CosmWasm SDK",
"contributors": [
"Will Clark <willclarktech@users.noreply.github.com>",
"Simon Warta <webmaster128@users.noreply.github.com>"
],
"license": "Apache-2.0",
"exports": {
"types": "./build/index.d.ts",
"default": "./build/index.js"
},
"files": [
"build/",
"*.md",
"!*.spec.*",
"!*testutils.*",
"!**/karma-bundle/",
"!**/testdata/"
],
"repository": {
"type": "git",
"url": "https://github.com/cosmos/cosmjs/tree/main/packages/cosmwasm"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org"
},
"scripts": {
"docs": "typedoc",
"format": "prettier --write --log-level warn \"./src/**/*.ts\"",
"format-text": "prettier --write \"./*.md\"",
"build": "rm -rf ./build && tsc",
"build-or-skip": "[ -n \"${SKIP_BUILD:-}\" ] || yarn build",
"test-node": "yarn node jasmine-testrunner.cjs",
"test-firefox": "yarn pack-web && karma start --single-run --browsers Firefox karma.conf.cjs",
"test-chrome": "yarn pack-web && karma start --single-run --browsers ChromeHeadless karma.conf.cjs",
"test": "yarn build-or-skip && yarn test-node",
"coverage": "nyc --reporter=text --reporter=lcov yarn test --quiet",
"pack-web": "yarn build-or-skip && webpack --mode development --config webpack.web.config.cjs"
},
"dependencies": {
"@cosmjs/amino": "workspace:^",
"@cosmjs/crypto": "workspace:^",
"@cosmjs/encoding": "workspace:^",
"@cosmjs/math": "workspace:^",
"@cosmjs/proto-signing": "workspace:^",
"@cosmjs/stargate": "workspace:^",
"@cosmjs/tendermint-rpc": "workspace:^",
"@cosmjs/utils": "workspace:^",
"cosmjs-types": "^0.10.1"
},
"devDependencies": {
"@istanbuljs/nyc-config-typescript": "^1.0.1",
"@types/jasmine": "^4",
"@types/karma-firefox-launcher": "^2",
"@types/karma-jasmine": "^4",
"@types/karma-jasmine-html-reporter": "^1",
"@types/node": "*",
"glob": "^11",
"jasmine": "^4",
"jasmine-spec-reporter": "^6",
"karma": "^6.3.14",
"karma-chrome-launcher": "^3.1.0",
"karma-firefox-launcher": "^2.1.0",
"karma-jasmine": "^5",
"karma-jasmine-html-reporter": "^1.5.4",
"nyc": "^17.1.0",
"prettier": "^3.6.2",
"readonly-date": "^1.0.0",
"ses": "^1.13.0",
"source-map-support": "^0.5.19",
"typedoc": "^0.28",
"typescript": "~5.9",
"webpack": "^5.76.0",
"webpack-cli": "^4.6.0"
}
}
Loading
Loading