mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00
Merge branch '0.31'
This commit is contained in:
commit
6a877027f6
12
CHANGELOG.md
12
CHANGELOG.md
@ -27,6 +27,15 @@ and this project adheres to
|
|||||||
- @cosmjs/tendermint-rpc: `CometClient` should be used instead of
|
- @cosmjs/tendermint-rpc: `CometClient` should be used instead of
|
||||||
`TendermintClient`.
|
`TendermintClient`.
|
||||||
|
|
||||||
|
## [0.31.3] - 2023-10-25
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- @cosmjs/stargate: Add missing memo field to `fromAmino` implementation for
|
||||||
|
`MsgTransfer`. ([#1493])
|
||||||
|
|
||||||
|
[#1493]: https://github.com/cosmos/cosmjs/issues/1493
|
||||||
|
|
||||||
## [0.31.2] - 2023-10-24
|
## [0.31.2] - 2023-10-24
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
@ -1325,7 +1334,8 @@ CHANGELOG entries missing. Please see [the diff][0.24.1].
|
|||||||
`FeeTable`. @cosmjs/cosmwasm has its own `FeeTable` with those properties.
|
`FeeTable`. @cosmjs/cosmwasm has its own `FeeTable` with those properties.
|
||||||
- @cosmjs/sdk38: Rename package to @cosmjs/launchpad.
|
- @cosmjs/sdk38: Rename package to @cosmjs/launchpad.
|
||||||
|
|
||||||
[unreleased]: https://github.com/cosmos/cosmjs/compare/v0.31.2...HEAD
|
[unreleased]: https://github.com/cosmos/cosmjs/compare/v0.31.3...HEAD
|
||||||
|
[0.31.3]: https://github.com/cosmos/cosmjs/compare/v0.31.2...v0.31.3
|
||||||
[0.31.2]: https://github.com/cosmos/cosmjs/compare/v0.31.1...v0.31.2
|
[0.31.2]: https://github.com/cosmos/cosmjs/compare/v0.31.1...v0.31.2
|
||||||
[0.31.1]: https://github.com/cosmos/cosmjs/compare/v0.31.0...v0.31.1
|
[0.31.1]: https://github.com/cosmos/cosmjs/compare/v0.31.0...v0.31.1
|
||||||
[0.31.0]: https://github.com/cosmos/cosmjs/compare/v0.30.1...v0.31.0
|
[0.31.0]: https://github.com/cosmos/cosmjs/compare/v0.30.1...v0.31.0
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@cosmjs/amino",
|
"name": "@cosmjs/amino",
|
||||||
"version": "0.31.2",
|
"version": "0.31.3",
|
||||||
"description": "Helpers for Amino based signing.",
|
"description": "Helpers for Amino based signing.",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"Simon Warta <webmaster128@users.noreply.github.com>"
|
"Simon Warta <webmaster128@users.noreply.github.com>"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@cosmjs/cli",
|
"name": "@cosmjs/cli",
|
||||||
"version": "0.31.2",
|
"version": "0.31.3",
|
||||||
"description": "Command line interface",
|
"description": "Command line interface",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"IOV SAS <admin@iov.one>",
|
"IOV SAS <admin@iov.one>",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@cosmjs/cosmwasm-stargate",
|
"name": "@cosmjs/cosmwasm-stargate",
|
||||||
"version": "0.31.2",
|
"version": "0.31.3",
|
||||||
"description": "CosmWasm SDK",
|
"description": "CosmWasm SDK",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"Will Clark <willclarktech@users.noreply.github.com>"
|
"Will Clark <willclarktech@users.noreply.github.com>"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@cosmjs/crypto",
|
"name": "@cosmjs/crypto",
|
||||||
"version": "0.31.2",
|
"version": "0.31.3",
|
||||||
"description": "Cryptography resources for blockchain projects",
|
"description": "Cryptography resources for blockchain projects",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"IOV SAS <admin@iov.one>",
|
"IOV SAS <admin@iov.one>",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@cosmjs/encoding",
|
"name": "@cosmjs/encoding",
|
||||||
"version": "0.31.2",
|
"version": "0.31.3",
|
||||||
"description": "Encoding helpers for blockchain projects",
|
"description": "Encoding helpers for blockchain projects",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"IOV SAS <admin@iov.one>"
|
"IOV SAS <admin@iov.one>"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@cosmjs/faucet-client",
|
"name": "@cosmjs/faucet-client",
|
||||||
"version": "0.31.2",
|
"version": "0.31.3",
|
||||||
"description": "The faucet client",
|
"description": "The faucet client",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"Will Clark <willclarktech@users.noreply.github.com>"
|
"Will Clark <willclarktech@users.noreply.github.com>"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@cosmjs/faucet",
|
"name": "@cosmjs/faucet",
|
||||||
"version": "0.31.2",
|
"version": "0.31.3",
|
||||||
"description": "The faucet",
|
"description": "The faucet",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"Ethan Frey <ethanfrey@users.noreply.github.com>",
|
"Ethan Frey <ethanfrey@users.noreply.github.com>",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@cosmjs/json-rpc",
|
"name": "@cosmjs/json-rpc",
|
||||||
"version": "0.31.2",
|
"version": "0.31.3",
|
||||||
"description": "Framework for implementing a JSON-RPC 2.0 API",
|
"description": "Framework for implementing a JSON-RPC 2.0 API",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"IOV SAS <admin@iov.one>",
|
"IOV SAS <admin@iov.one>",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@cosmjs/ledger-amino",
|
"name": "@cosmjs/ledger-amino",
|
||||||
"version": "0.31.2",
|
"version": "0.31.3",
|
||||||
"description": "A library for signing Amino-encoded transactions using Ledger devices",
|
"description": "A library for signing Amino-encoded transactions using Ledger devices",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"Will Clark <willclarktech@users.noreply.github.com>"
|
"Will Clark <willclarktech@users.noreply.github.com>"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@cosmjs/math",
|
"name": "@cosmjs/math",
|
||||||
"version": "0.31.2",
|
"version": "0.31.3",
|
||||||
"description": "Math helpers for blockchain projects",
|
"description": "Math helpers for blockchain projects",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"IOV SAS <admin@iov.one>"
|
"IOV SAS <admin@iov.one>"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@cosmjs/proto-signing",
|
"name": "@cosmjs/proto-signing",
|
||||||
"version": "0.31.2",
|
"version": "0.31.3",
|
||||||
"description": "Utilities for protobuf based signing (Cosmos SDK 0.40+)",
|
"description": "Utilities for protobuf based signing (Cosmos SDK 0.40+)",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"Will Clark <willclarktech@users.noreply.github.com>",
|
"Will Clark <willclarktech@users.noreply.github.com>",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@cosmjs/socket",
|
"name": "@cosmjs/socket",
|
||||||
"version": "0.31.2",
|
"version": "0.31.3",
|
||||||
"description": "Utility functions for working with WebSockets",
|
"description": "Utility functions for working with WebSockets",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"IOV SAS <admin@iov.one>",
|
"IOV SAS <admin@iov.one>",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@cosmjs/stargate",
|
"name": "@cosmjs/stargate",
|
||||||
"version": "0.31.2",
|
"version": "0.31.3",
|
||||||
"description": "Utilities for Cosmos SDK 0.40",
|
"description": "Utilities for Cosmos SDK 0.40",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"Simon Warta <webmaster128@users.noreply.github.com>"
|
"Simon Warta <webmaster128@users.noreply.github.com>"
|
||||||
|
@ -155,6 +155,43 @@ describe("AminoTypes", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("works for MsgTransfer with memo", () => {
|
||||||
|
const aminoMsg: AminoMsgTransfer = {
|
||||||
|
type: "cosmos-sdk/MsgTransfer",
|
||||||
|
value: {
|
||||||
|
source_port: "testport",
|
||||||
|
source_channel: "testchannel",
|
||||||
|
token: coin(1234, "utest"),
|
||||||
|
sender: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
|
||||||
|
receiver: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5",
|
||||||
|
timeout_height: {
|
||||||
|
revision_height: "123",
|
||||||
|
revision_number: "456",
|
||||||
|
},
|
||||||
|
timeout_timestamp: "789",
|
||||||
|
memo: "Hack me",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
const msg = new AminoTypes(createIbcAminoConverters()).fromAmino(aminoMsg);
|
||||||
|
const expectedValue: MsgTransfer = {
|
||||||
|
sourcePort: "testport",
|
||||||
|
sourceChannel: "testchannel",
|
||||||
|
token: coin(1234, "utest"),
|
||||||
|
sender: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
|
||||||
|
receiver: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5",
|
||||||
|
timeoutHeight: {
|
||||||
|
revisionHeight: BigInt("123"),
|
||||||
|
revisionNumber: BigInt("456"),
|
||||||
|
},
|
||||||
|
timeoutTimestamp: BigInt("789"),
|
||||||
|
memo: "Hack me",
|
||||||
|
};
|
||||||
|
expect(msg).toEqual({
|
||||||
|
typeUrl: "/ibc.applications.transfer.v1.MsgTransfer",
|
||||||
|
value: expectedValue,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it("works for MsgTransfer with default values", () => {
|
it("works for MsgTransfer with default values", () => {
|
||||||
const aminoMsg: AminoMsgTransfer = {
|
const aminoMsg: AminoMsgTransfer = {
|
||||||
type: "cosmos-sdk/MsgTransfer",
|
type: "cosmos-sdk/MsgTransfer",
|
||||||
@ -169,6 +206,7 @@ describe("AminoTypes", () => {
|
|||||||
// revision_number omitted
|
// revision_number omitted
|
||||||
},
|
},
|
||||||
// timeout_timestamp omitted
|
// timeout_timestamp omitted
|
||||||
|
// memo omitted
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
const msg = new AminoTypes(createIbcAminoConverters()).fromAmino(aminoMsg);
|
const msg = new AminoTypes(createIbcAminoConverters()).fromAmino(aminoMsg);
|
||||||
|
@ -97,6 +97,7 @@ export function createIbcAminoConverters(): AminoConverters {
|
|||||||
receiver,
|
receiver,
|
||||||
timeout_height,
|
timeout_height,
|
||||||
timeout_timestamp,
|
timeout_timestamp,
|
||||||
|
memo,
|
||||||
}: AminoMsgTransfer["value"]): MsgTransfer =>
|
}: AminoMsgTransfer["value"]): MsgTransfer =>
|
||||||
MsgTransfer.fromPartial({
|
MsgTransfer.fromPartial({
|
||||||
sourcePort: source_port,
|
sourcePort: source_port,
|
||||||
@ -111,6 +112,7 @@ export function createIbcAminoConverters(): AminoConverters {
|
|||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
timeoutTimestamp: BigInt(timeout_timestamp || "0"),
|
timeoutTimestamp: BigInt(timeout_timestamp || "0"),
|
||||||
|
memo: memo ?? "",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@cosmjs/stream",
|
"name": "@cosmjs/stream",
|
||||||
"version": "0.31.2",
|
"version": "0.31.3",
|
||||||
"description": "Utility functions for producing and consuming streams",
|
"description": "Utility functions for producing and consuming streams",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"IOV SAS <admin@iov.one>",
|
"IOV SAS <admin@iov.one>",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@cosmjs/tendermint-rpc",
|
"name": "@cosmjs/tendermint-rpc",
|
||||||
"version": "0.31.2",
|
"version": "0.31.3",
|
||||||
"description": "Tendermint RPC clients",
|
"description": "Tendermint RPC clients",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"IOV SAS <admin@iov.one>",
|
"IOV SAS <admin@iov.one>",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@cosmjs/utils",
|
"name": "@cosmjs/utils",
|
||||||
"version": "0.31.2",
|
"version": "0.31.3",
|
||||||
"description": "Utility tools, primarily for testing code",
|
"description": "Utility tools, primarily for testing code",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"IOV SAS <admin@iov.one>"
|
"IOV SAS <admin@iov.one>"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user