cosmos / cosmjs

The Swiss Army knife to power JavaScript based client solutions ranging from Web apps/explorers over browser extensions to server-side clients like faucets/scrapers.
https://cosmos.github.io/cosmjs/
Apache License 2.0
645 stars 330 forks source link

MsgTransfer memo support #1493

Closed webmaster128 closed 10 months ago

webmaster128 commented 10 months ago

There is currently various sort of trouble around support for the memo field in MsgTransfer. This meta issue should provide an overview.

Protobuf support

The Telesope-generated proto types support the memo field for a long time. cosmjs-types 0.7.0 has it and earlier versions don't.

Amino JSON support

The MsgTransfer can be signed using sign mode direct. However, Amino JSON signing support was lacking for some time.

SigningStargateClient.sendIbcTokens

This was brought up in https://github.com/cosmos/cosmjs/issues/1413. Right now the memo argument in sendIbcTokens belongs to the transaction, not MsgTransfer. Designing an API with two different memos is a mess. Given that CosmJS will move away from opinionated methods like sendIbcTokens it is more sustainable if users compose their messages manually and then use signAndBroadcast with an MsgTransferEncodeObject input. The methods on SigningStargateClient will die eventually. So this part is a wontfix.

Edit: #1504 deprecates SigningStargateClient.sendIbcTokens