Multi
Broadcast multiple messages in a single unit.

Returns

Returns the unit hash.

Example

1
const params = [
2
{
3
app: "payment",
4
payload: {
5
outputs: [
6
{ address: "AA_ADDRESS", amount: 10000 }
7
]
8
}
9
},
10
{
11
app: "payment",
12
payload: {
13
asset: "CUSTOM_ASSET_ID",
14
outputs: [
15
{ address: "AA_ADDRESS", amount: 1 }
16
]
17
}
18
},
19
{
20
app: "data",
21
payload: {
22
key: "value",
23
another_key: {
24
subkey: "other value",
25
another_subkey: 232
26
}
27
}
28
}
29
];
30
31
client.post.multi(params, wif, function(err, result) {
32
if (err) return console.error(err);
33
console.log(err, result);
34
});
Copied!

Last modified 4mo ago
Copy link