elements icon indicating copy to clipboard operation
elements copied to clipboard

Can sendmany be used to send assets?

Open maximusmaximalistus opened this issue 1 year ago • 2 comments

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.

maximusmaximalistus avatar Jan 05 '24 17:01 maximusmaximalistus

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.
 }
     ```

delta1 avatar Jan 09 '24 09:01 delta1

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"}

delta1 avatar Jan 09 '24 09:01 delta1