z_mergetoaddress - Pastel RPC
z_mergetoaddress ["fromaddress", ... ] "toaddress" ( fee ) ( transparent_limit ) ( shielded_limit ) ( memo ) WARNING: z_mergetoaddress is disabled. To enable it, restart pasteld with the -experimentalfeatures and -zmergetoaddress commandline options, or add these two lines to the pastel.conf file: experimentalfeatures=1 zmergetoaddress=1 Merge multiple UTXOs and notes into a single UTXO or note. Coinbase UTXOs are ignored; use `z_shieldcoinbase` to combine those into a single note. This is an asynchronous operation, and UTXOs selected for merging will be locked. If there is an error, they are unlocked. The RPC call `listlockunspent` can be used to return a list of locked UTXOs. The number of UTXOs and notes selected for merging can be limited by the caller. If the transparent limit parameter is set to zero it means limit the number of UTXOs based on the size of the transaction. Any limit is constrained by the consensus rule defining a maximum transaction size of 2000000 bytes. Arguments: 1. fromaddresses (array, required) A JSON array with addresses. The following special strings are accepted inside the array: - "ANY_TADDR": Merge UTXOs from any taddrs belonging to the wallet. - "ANY_SAPLING": Merge notes from any Sapling zaddrs belonging to the wallet. If a special string is given, any given addresses of that type will be counted as duplicates and cause an error. [ address" (string) Can be a taddr or a zaddr ,... ] 2. "toaddress" (string, required) The taddr or zaddr to send the funds to. 3. fee (numeric, optional, default=0.10) The fee amount to attach to this transaction. 4. transparent_limit (numeric, optional, default=50) Limit on the maximum number of UTXOs to merge. Set to 0 to use as many as will fit in the transaction (after Overwinter). 5. shielded_limit (numeric, optional, default=200 Sapling Notes) Limit on the maximum number of notes to merge. Set to 0 to merge as many as will fit in the transaction. 6. "memo" (string, optional) Encoded as hex. When toaddress is a zaddr, this will be stored in the memo field of the new note. Result: { "remainingUTXOs": xxx (numeric) Number of UTXOs still available for merging. "remainingTransparentValue": xxx (numeric) Value of UTXOs still available for merging. "remainingNotes": xxx (numeric) Number of notes still available for merging. "remainingShieldedValue": xxx (numeric) Value of notes still available for merging. "mergingUTXOs": xxx (numeric) Number of UTXOs being merged. "mergingTransparentValue": xxx (numeric) Value of UTXOs being merged. "mergingNotes": xxx (numeric) Number of notes being merged. "mergingShieldedValue": xxx (numeric) Value of notes being merged. "opid": xxx (string) An operationid to pass to z_getoperationstatus to get the result of the operation. } Examples: > pastel-cli z_mergetoaddress '["ANY_SAPLING", "PtczsZ91Bt3oDPDQotzUsrx1wjmsFVgf28n"]' ptestsapling1zlgc9r90eqapx0vxc00hv3gunpgtm4wj3w9u29ehs4n5dgtdmg406dsemzl5rc7602ravnt3zr6 > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "z_mergetoaddress", "params": [["ANY_SAPLING", "PtczsZ91Bt3oDPDQotzUsrx1wjmsFVgf28n"], "ptestsapling1zlgc9r90eqapx0vxc00hv3gunpgtm4wj3w9u29ehs4n5dgtdmg406dsemzl5rc7602ravnt3zr6"] }' -H 'content-type: text/plain;' http://127.0.0.1:9932/
Maintained by Pastel Network; license of the docs is MIT (see pastel repo)
Generated from a mainnet node
Addressindex
Blockchain
Control
Generating
Mining
Mnode
Network
Rawtransactions
Wallet
addmultisigaddress
backupwallet
dumpprivkey
dumpwallet
encryptwallet
fixmissingtxs
getaccount
getaccountaddress
getaddressesbyaccount
getbalance
getnewaddress
getrawchangeaddress
getreceivedbyaccount
getreceivedbyaddress
gettransaction
gettxfee
getunconfirmedbalance
getwalletinfo
importaddress
importprivkey
importwallet
keypoolrefill
listaccounts
listaddressamounts
listaddressgroupings
listlockunspent
listreceivedbyaccount
listreceivedbyaddress
listsinceblock
listtransactions
listunspent
lockunspent
move
scanburntransactions
scanformissingtxs
sendfrom
sendmany
sendtoaddress
setaccount
settxfee
signmessage
z_exportkey
z_exportviewingkey
z_exportwallet
z_getbalance
z_getnewaddress(type)
z_getnotescount
z_getoperationresult
z_getoperationstatus
z_gettotalbalance
z_importkey
z_importviewingkey
z_importwallet
z_listaddresses
z_listoperationids
z_listreceivedbyaddress
z_listunspent
z_mergetoaddress
z_sendmany
z_sendmanywithchangetosender
z_shieldcoinbase
z_viewtransaction
zcbenchmark