elements
elements copied to clipboard
Can sendmany be used to send assets?
I was checking the documentation and wondering if sendmany
could be used to send assets too.
https://elementsproject.org/en/doc/23.2.1/rpc/wallet/sendmany/
But there is no reference to the asset in the documentation of the sendmany
command.
hi @maximusmaximalistus, thanks for raising this, after checking again I see that there is also an option to specify the asset for each address
9. output_assets (json object) A json object of addresses to assets.
{
"address": "str", (string, required) A key-value pair where the key is the address used and the value is an asset label or hex asset ID.
}
```
so as an example to send 2 different assets:
sendmany "" {"addr1":1.0, "addr2":2.0} 0 "comment" [] true 1 "unset" {"addr1":"asset1", "addr2":"asset2"}