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
646 stars 331 forks source link

Is `MultiSend` method suppored? #1605

Closed ikeda-minden closed 2 weeks ago

ikeda-minden commented 1 month ago

Is MultiSend method suppored? Or do I need to create some custom interface for MultiSend?

DavideSegullo commented 3 weeks ago

Seems like it's supported: https://github.com/cosmos/cosmjs/blob/main/packages/stargate/src/modules/bank/messages.ts#L4

You can use cosmjs-types to build a msg:

import { MsgMultiSend, MsgSend } from "cosmjs-types/cosmos/bank/v1beta1/tx";

MsgMultiSend.fromPartial({
  ...
})

Or you can also use other lib like osmojs:

import { cosmos } from "osmojs";

cosmos.bank.v1beta1.MessageComposer.withTypeUrl.multiSend({
  ...
})
DavideSegullo commented 2 weeks ago

@ikeda-minden If it's fine, can you close this issue?