Post
Topic
Board Development & Technical Discussion
Merits 7 from 3 users
Re: Bitcoin Taproot transaction STEP BY STEP on bitcoin-cli...
by
nc50lc
on 05/10/2023, 07:36:22 UTC
⭐ Merited by ETFbitcoin (3) ,DaveF (2) ,pooya87 (2)
Use PSBT instead of raw transaction:

First import the necessary descriptor to the wallet (command already provided).
Secondly, create a transaction:
Code:
createpsbt "[{\"txid\":\"<TXID>\",\"vout\":<N>}]" "[{\"<address1>\":<amount1>},{\"<address2>\":<amount2>}]"
Thirdly, process the psbt (update, sign):
Code:
walletprocesspsbt "<PSBT from above command>"
Fourthly, finalize it:
Code:
finalizepsbt "<processed PSBT from above command>"
Lastly, send it to mempool:
Code:
sendrawtransaction "<signed raw transaction from above command>"