Multiple transactions in a single transaction command?

How do I send varying amounts of chia to multiple receive addresses from a single cli chia transfer command?

I have been trying to figure this out for a while. I expect the answer is that you can’t. If you can’t then chia will never be on an exchange that allows withdraw of chia because having to wait for every individual transfer to settle before invoking the next makes it impossible to use on an exchange.

I have wondered the same thing. I have found NO information on this at all. So I tagged it as not possible.

Someone willing to prove me wrong?

You need some chialisp and transaction serialization knowledge… You can find these @ 1 - CLVM Basics | Chialisp. Basically you are creating a transaction that solves your wallet so values can be spent and delegates a spend that creates a list of create_coin opcode (51) for all 3. The create_coin opcode takes a receive address and amount. You can find more help on Chia’s Keybase.

1 Like
1 Like

The CLI and GUI do not yet support sending to multiple addresses at once, but it is possible. Version 1.2.0 from 2021-07-07 added a send_transaction_multi RPC method to the wallet, which sends a payment with multiple payees

@BadgerStork provided a good programmatic example using send_transaction_multi. This is also how a Chia pool pays pool members.

The chia-blockchain code has a send_transaction_multi test covering sending to multiple addresses. This is also a good Python example similar to BadgerStork’s.

Undoubtedly, this functionality will eventually be available from the CLI and GUI.