obyte.js
0.1.19
Search
K
Links

Multi

Broadcast multiple messages in a single unit.

Returns

Returns the unit hash.

Example

const params = [
{
app: "payment",
payload: {
outputs: [
{ address: "AA_ADDRESS", amount: 10000 }
]
}
},
{
app: "payment",
payload: {
asset: "CUSTOM_ASSET_ID",
outputs: [
{ address: "AA_ADDRESS", amount: 1 }
]
}
},
{
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);
});