Multi

Broadcast multiple messages in a single unit.

Returns

Returns the unit hash.

Example

const params = [
    {
        app: "payment",
        payload: {
            asset: "CUSTOM_ASSET_ID",
            outputs: [
                { address: "AA_ADDRESS", amount: 1 }
            ]
        }
    },
    {
        app: "payment",
        payload: {
            asset: "base",
            outputs: [
                { address: "AA_ADDRESS", amount: 10000 }
            ]
        }
    },
    {
        app: "data",
        payload: {
            key: "value",
            another_key: {
                subkey: "other value",
                another_subkey: 232
            }
        }
    }
];

client.post.multi(params, wif, function(err, result) {
  if (err) return console.error(err);
  console.log(err, result);
});

Last updated