Post
Topic
Board Bitcoin Technical Support
Merits 5 from 3 users
Re: How to write raw taproot transaction and apply an RBF flag?
by
TheArchaeologist
on 15/11/2021, 19:40:39 UTC
⭐ Merited by NeuroticFish (2) ,ETFbitcoin (2) ,nc50lc (1)
Hi all,
I have 2 unrelated questions, but both about how to properly formulate a transaction template.

1. I'd like to know how to add an RBF indicator to the transaction (and any relevant details).

Here's my current standard raw transaction template I use;

Code:

 createrawtransaction \
'[{"txid": "txid1", "vout": vout1},
{"txid": "txid2", "vout": vout2},
{"txid": "txid3", "vout": vout3},
{"txid": "txid4", "vout": vout4}]' \
'{"address1": Amount1,
"address2": Amount2,
"address3": Amount3,
"address4": Amount4}'

The software I am using to create, sign, and send transactions is Bitcoin Core QT (console)
In createrawtransaction, there's an optional sequence field that you can set when specifying the inputs. To set a transaction to Opt into RBF, you need to set the sequence for at least one input to be 4294967293 or lower.