Z_sendmany for T>Z without specifying 'fromaddress'?

I’ve read that fromaddress is required with z_sendmany: https://zcash-rpc.github.io/z_sendmany.html

However, I’d like to perform shielding transactions that automatically pick from any available UTXOs across multiple T-addresses, making it hard to specify a fromaddress.

Can this be done without, say, having to regularly sweep UTXOs to a singular T-address?

Thanks!

z_mergetoaddress ?

You can give it an option to merge all taddrs, ie :-

zcash-cli z_mergetoaddress [“ANY_TADDR”] zs1chilebobsecretbeerfund

1 Like

Thanks, @ChileBob. That will come in handy in the future. Though for now, I don’t want to sweep the funds.

Rather, I’ll need to send outgoing transactions from time to time of varying amounts (less than the wallet balance), sometimes to a Z-address.

Like most wallets of other coins do, I don’t want it to care which addresses the funds are on. Do you know if that’s possible?

You can feed z_mergetoaddress an array of from-addresses, but it takes the entire balance. Not sure if that helps?

Pretty sure you’ll have to do this in two steps, z_mergetoaddress then z_sendmany.

All the lite wallets in the Zecwallet family do this, but it sounds like you want to do it from a full node wallet.

1 Like

Yes! Should have specified that. Directly from a zcashd full node.

1 Like

I’ve seen several requests for this in short succession, and had some time today:

7 Likes

Woah! Thanks a bunch, @str4d! :clap: You rock.

I see it’s marked for the next sprint. I’ll keep a watch. :eyeglasses:

2 Likes

And thanks for the PR review, @daira! :raised_hands:

2 Likes