diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a363537..229adeb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,18 @@ and this project adheres to - @cosmjs/socket: Upgrade dependency "ws" to version 7 to avoid potential security problems. +## [0.25.5] - 2021-06-23 + +### Added + +- @cosmjs/tendermint-rpc: `Tendermint34Client.blockSearch` and + `Tendermint34Client.blockSearchAll` were added to allow searching blocks in + Tendermint 0.34.9+ backends. This is a backport of [#815]. Note: Decoding + blocks of height 1 is unsupported. This is fixed in [#815] and will be + released as part of CosmJS 0.26. + +[#815]: https://github.com/cosmos/cosmjs/pull/815 + ## [0.25.4] - 2021-05-31 ### Fixed @@ -525,6 +537,7 @@ CHANGELOG entries missing. Please see [the diff][0.24.1]. - @cosmjs/sdk38: Rename package to @cosmjs/launchpad. [unreleased]: https://github.com/cosmos/cosmjs/compare/v0.25.3...HEAD +[0.25.5]: https://github.com/cosmos/cosmjs/compare/v0.25.4...v0.25.5 [0.25.4]: https://github.com/cosmos/cosmjs/compare/v0.25.3...v0.25.4 [0.25.3]: https://github.com/cosmos/cosmjs/compare/v0.25.2...v0.25.3 [0.25.2]: https://github.com/cosmos/cosmjs/compare/v0.25.1...v0.25.2 diff --git a/README.md b/README.md index 9fee28cb..51356e3e 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,13 @@ discussion please reach out to the team. ## Known limitations +### 0.25 + +1. Decoding blocks of height 1 is unsupported. This is fixed in [#815] and will + be released as part of CosmJS 0.26. + +[#815]: https://github.com/cosmos/cosmjs/pull/815 + ### 0.24 1. `AuthExtension` and all higher level Stargate clients only support diff --git a/packages/amino/nonces/1624462460 b/packages/amino/nonces/1624462460 new file mode 100644 index 00000000..e69de29b diff --git a/packages/amino/package.json b/packages/amino/package.json index 741837d8..71ea4b23 100644 --- a/packages/amino/package.json +++ b/packages/amino/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/amino", - "version": "0.25.4", + "version": "0.25.5", "description": "Helpers for Amino based signing which are shared between @cosmjs/launchpad and @cosmjs/stargate.", "contributors": [ "Simon Warta " diff --git a/packages/cli/nonces/1624462460 b/packages/cli/nonces/1624462460 new file mode 100644 index 00000000..e69de29b diff --git a/packages/cli/package.json b/packages/cli/package.json index bd69bcee..e314745e 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/cli", - "version": "0.25.4", + "version": "0.25.5", "description": "Command line interface", "contributors": [ "IOV SAS ", diff --git a/packages/cosmwasm-launchpad/nonces/1624462460 b/packages/cosmwasm-launchpad/nonces/1624462460 new file mode 100644 index 00000000..e69de29b diff --git a/packages/cosmwasm-launchpad/package.json b/packages/cosmwasm-launchpad/package.json index 7a091473..43c9b972 100644 --- a/packages/cosmwasm-launchpad/package.json +++ b/packages/cosmwasm-launchpad/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/cosmwasm-launchpad", - "version": "0.25.4", + "version": "0.25.5", "description": "CosmWasm SDK for Launchpad", "contributors": [ "Ethan Frey ", diff --git a/packages/cosmwasm-stargate/nonces/1624462460 b/packages/cosmwasm-stargate/nonces/1624462460 new file mode 100644 index 00000000..e69de29b diff --git a/packages/cosmwasm-stargate/package.json b/packages/cosmwasm-stargate/package.json index 4b3c2292..e9adce68 100644 --- a/packages/cosmwasm-stargate/package.json +++ b/packages/cosmwasm-stargate/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/cosmwasm-stargate", - "version": "0.25.4", + "version": "0.25.5", "description": "CosmWasm SDK", "contributors": [ "Will Clark " diff --git a/packages/cosmwasm/nonces/1624462460 b/packages/cosmwasm/nonces/1624462460 new file mode 100644 index 00000000..e69de29b diff --git a/packages/cosmwasm/package.json b/packages/cosmwasm/package.json index f0bb4317..0028c8dd 100644 --- a/packages/cosmwasm/package.json +++ b/packages/cosmwasm/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/cosmwasm", - "version": "0.25.4", + "version": "0.25.5", "description": "CosmWasm SDK", "contributors": [ "Ethan Frey ", diff --git a/packages/crypto/nonces/1624462460 b/packages/crypto/nonces/1624462460 new file mode 100644 index 00000000..e69de29b diff --git a/packages/crypto/package.json b/packages/crypto/package.json index 225aeb38..962fd2be 100644 --- a/packages/crypto/package.json +++ b/packages/crypto/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/crypto", - "version": "0.25.4", + "version": "0.25.5", "description": "Cryptography resources for blockchain projects", "contributors": [ "IOV SAS ", diff --git a/packages/encoding/nonces/1624462460 b/packages/encoding/nonces/1624462460 new file mode 100644 index 00000000..e69de29b diff --git a/packages/encoding/package.json b/packages/encoding/package.json index 0fe80ecc..6935a7f5 100644 --- a/packages/encoding/package.json +++ b/packages/encoding/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/encoding", - "version": "0.25.4", + "version": "0.25.5", "description": "Encoding helpers for blockchain projects", "contributors": [ "IOV SAS " diff --git a/packages/faucet-client/nonces/1624462460 b/packages/faucet-client/nonces/1624462460 new file mode 100644 index 00000000..e69de29b diff --git a/packages/faucet-client/package.json b/packages/faucet-client/package.json index d684c403..424ab15c 100644 --- a/packages/faucet-client/package.json +++ b/packages/faucet-client/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/faucet-client", - "version": "0.25.4", + "version": "0.25.5", "description": "The faucet client", "contributors": [ "Will Clark " diff --git a/packages/faucet/nonces/1624462460 b/packages/faucet/nonces/1624462460 new file mode 100644 index 00000000..e69de29b diff --git a/packages/faucet/package.json b/packages/faucet/package.json index 56352c90..f5f21f0b 100644 --- a/packages/faucet/package.json +++ b/packages/faucet/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/faucet", - "version": "0.25.4", + "version": "0.25.5", "description": "The faucet", "contributors": [ "Ethan Frey ", diff --git a/packages/json-rpc/nonces/1624462460 b/packages/json-rpc/nonces/1624462460 new file mode 100644 index 00000000..e69de29b diff --git a/packages/json-rpc/package.json b/packages/json-rpc/package.json index fc1d7a5c..a5cb9db7 100644 --- a/packages/json-rpc/package.json +++ b/packages/json-rpc/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/json-rpc", - "version": "0.25.4", + "version": "0.25.5", "description": "Framework for implementing a JSON-RPC 2.0 API", "contributors": [ "IOV SAS ", diff --git a/packages/launchpad/nonces/1624462460 b/packages/launchpad/nonces/1624462460 new file mode 100644 index 00000000..e69de29b diff --git a/packages/launchpad/package.json b/packages/launchpad/package.json index aa95ec42..b9ae4143 100644 --- a/packages/launchpad/package.json +++ b/packages/launchpad/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/launchpad", - "version": "0.25.4", + "version": "0.25.5", "description": "A client library for the Cosmos SDK 0.37 (cosmoshub-3), 0.38 and 0.39 (Launchpad)", "contributors": [ "Ethan Frey ", diff --git a/packages/ledger-amino/nonces/1624462460 b/packages/ledger-amino/nonces/1624462460 new file mode 100644 index 00000000..e69de29b diff --git a/packages/ledger-amino/package.json b/packages/ledger-amino/package.json index e098ce5e..b4d8cbb1 100644 --- a/packages/ledger-amino/package.json +++ b/packages/ledger-amino/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/ledger-amino", - "version": "0.25.4", + "version": "0.25.5", "description": "A library for signing Amino-encoded transactions using Ledger devices", "contributors": [ "Will Clark " diff --git a/packages/math/nonces/1624462460 b/packages/math/nonces/1624462460 new file mode 100644 index 00000000..e69de29b diff --git a/packages/math/package.json b/packages/math/package.json index 4c80dcb3..1ee65959 100644 --- a/packages/math/package.json +++ b/packages/math/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/math", - "version": "0.25.4", + "version": "0.25.5", "description": "Math helpers for blockchain projects", "contributors": [ "IOV SAS " diff --git a/packages/proto-signing/nonces/1624462460 b/packages/proto-signing/nonces/1624462460 new file mode 100644 index 00000000..e69de29b diff --git a/packages/proto-signing/package.json b/packages/proto-signing/package.json index 67a5db10..8bf98011 100644 --- a/packages/proto-signing/package.json +++ b/packages/proto-signing/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/proto-signing", - "version": "0.25.4", + "version": "0.25.5", "description": "Utilities for protobuf based signing (Cosmos SDK 0.40+)", "contributors": [ "Will Clark ", diff --git a/packages/socket/nonces/1624462460 b/packages/socket/nonces/1624462460 new file mode 100644 index 00000000..e69de29b diff --git a/packages/socket/package.json b/packages/socket/package.json index 91cc54e2..b916d3d9 100644 --- a/packages/socket/package.json +++ b/packages/socket/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/socket", - "version": "0.25.4", + "version": "0.25.5", "description": "Utility functions for working with WebSockets", "contributors": [ "IOV SAS ", diff --git a/packages/stargate/nonces/1624462460 b/packages/stargate/nonces/1624462460 new file mode 100644 index 00000000..e69de29b diff --git a/packages/stargate/package.json b/packages/stargate/package.json index d4d60454..b871a2b8 100644 --- a/packages/stargate/package.json +++ b/packages/stargate/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/stargate", - "version": "0.25.4", + "version": "0.25.5", "description": "Utilities for Cosmos SDK 0.40", "contributors": [ "Simon Warta " diff --git a/packages/stream/nonces/1624462460 b/packages/stream/nonces/1624462460 new file mode 100644 index 00000000..e69de29b diff --git a/packages/stream/package.json b/packages/stream/package.json index 3c7b82ba..ab33f14d 100644 --- a/packages/stream/package.json +++ b/packages/stream/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/stream", - "version": "0.25.4", + "version": "0.25.5", "description": "Utility functions for producing and consuming streams", "contributors": [ "IOV SAS ", diff --git a/packages/tendermint-rpc/nonces/1624462460 b/packages/tendermint-rpc/nonces/1624462460 new file mode 100644 index 00000000..e69de29b diff --git a/packages/tendermint-rpc/package.json b/packages/tendermint-rpc/package.json index cd2dde1f..8c82d520 100644 --- a/packages/tendermint-rpc/package.json +++ b/packages/tendermint-rpc/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/tendermint-rpc", - "version": "0.25.4", + "version": "0.25.5", "description": "Tendermint RPC clients", "contributors": [ "IOV SAS ", diff --git a/packages/tendermint-rpc/src/tendermint33/adaptor/requests.ts b/packages/tendermint-rpc/src/tendermint33/adaptor/requests.ts index beb4b97c..89a15fce 100644 --- a/packages/tendermint-rpc/src/tendermint33/adaptor/requests.ts +++ b/packages/tendermint-rpc/src/tendermint33/adaptor/requests.ts @@ -30,6 +30,21 @@ function encodeBlockchainRequestParams(param: requests.BlockchainRequestParams): }; } +interface RpcBlockSearchParams { + readonly query: string; + readonly page?: string; + readonly per_page?: string; + readonly order_by?: string; +} +function encodeBlockSearchParams(params: requests.BlockSearchParams): RpcBlockSearchParams { + return { + query: params.query, + page: may(Integer.encode, params.page), + per_page: may(Integer.encode, params.per_page), + order_by: params.order_by, + }; +} + interface RpcAbciQueryParams { readonly path: string; /** hex encoded */ @@ -120,6 +135,10 @@ export class Params { return createJsonRpcRequest(req.method, encodeHeightParam(req.params)); } + public static encodeBlockSearch(req: requests.BlockSearchRequest): JsonRpcRequest { + return createJsonRpcRequest(req.method, encodeBlockSearchParams(req.params)); + } + public static encodeBroadcastTx(req: requests.BroadcastTxRequest): JsonRpcRequest { return createJsonRpcRequest(req.method, encodeBroadcastTxParams(req.params)); } diff --git a/packages/utils/nonces/1624462460 b/packages/utils/nonces/1624462460 new file mode 100644 index 00000000..e69de29b diff --git a/packages/utils/package.json b/packages/utils/package.json index 07b815c6..3894d5f2 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/utils", - "version": "0.25.4", + "version": "0.25.5", "description": "Utility tools, primarily for testing code", "contributors": [ "IOV SAS "