Pick divisible coins for amount
Get spendable inputs from a specific amount and asset.

Example

1
const params = {
2
asset: 'xamdfH5Uk+alv3le0pEA01qSsfZjycyMsqaqHtycJ1M=',
3
addresses: ['ULQA63NGEZACP4N7ZMBUBISH6ZTCUS2Q'],
4
last_ball_mci: 1000000000,
5
amount: 10000,
6
spend_unconfirmed: 'own',
7
};
8
9
client.api.pickDivisibleCoinsForAmount(params, function(err, result) {
10
if (err) return console.error(err);
11
console.log(result);
12
});
Copied!

Returns

1
{
2
inputs_with_proofs: [
3
{
4
input: {
5
unit: "06ni8/eDzmcxwtWeQyuSXhqGsqmVN3I1fsR+5NAj4Sw=",
6
message_index: 1,
7
output_index: 1
8
}
9
}
10
],
11
total_amount: 985000
12
}
Copied!
Last modified 6mo ago
Copy link