When creating a new dust spend transaction:
- check for any existing unconfirmed transactions that have a single
OP_RETURN output and one or more inputs with the SIGHASH_ALL|ANYONECANPAY signature type. The OP_RETURN can be empty (if original transaction was >= 65 bytes, ie. for single input P2WPKH) or contain the string ash.
- add the new dust spend input(s) to the existing transaction.
- verify the new fee rate is at least 1 sat/vb greater than the original transaction, if not don't combine.
- create a new PSBT with the existing signed input(s) and new unsigned input(s).
- sign and broadcast the new combined dust spend transaction.
This idea was suggested on delvingbitcoin by @ajtowns.
When creating a new dust spend transaction:
OP_RETURNoutput and one or more inputs with theSIGHASH_ALL|ANYONECANPAYsignature type. TheOP_RETURNcan be empty (if original transaction was >= 65 bytes, ie. for single input P2WPKH) or contain the stringash.This idea was suggested on delvingbitcoin by @ajtowns.