Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MsgMultiSend

If you have multiple senders and/or multiple recipients, you can use MsgMultiSend, which can batch together the senders and recipients in one message to save on gas fees.

Specify the senders and recipients and their corresponding deposit contribution / receiving amounts with MsgMultiSend.Input or MsgMultiSend.Output.

Example:

import { MsgMultiSend } from "@terra-money/terra.js";

const inputs: MsgMultiSend.Input[] = [
new MsgMultiSend.Input(
'terra105rz2q5a4w7nv7239tl9c4px5cjy7axx3axf6p',
{
ukrw: 123123,
})
),
new MsgMultiSend.Input('terra105rz2q5a4w7nv7239tl9c4px5cjy7axx3axfad', [
new Coin('uluna', 123123),
]),
];
const outputs: MsgMultiSend.Output[] = [
new MsgMultiSend.Output(
'terra105rz2q5a4w7nv7239tl9c4px5cjy7axx3axfad',
{
ukrw: 123123,
}
),
new MsgMultiSend.Output('terra105rz2q5a4w7nv7239tl9c4px5cjy7axx3axfga',
{
uluna: 123123,
}
),
];
const multisend = new MsgMultiSend(inputs, outputs);

Hierarchy

Index

Constructors

Properties

outputs: MsgMultiSend.Output[]

Methods

  • packAny(isClassic?: boolean): Any
  • toAminoJSON(isClassic?: boolean): string
  • Parameters

    • Optional isClassic: boolean

    Returns string

  • toJSON(isClassic?: boolean): string
  • Parameters

    • Optional isClassic: boolean

    Returns string

  • toProto(_?: boolean): MsgMultiSend