My goal
Learn how to send a taproot output via bitcoin core's bitcoin-cli.
What I've tried
I imported a WIF utxo containing a v1 segwit utxo.
After: createrawtransaction
then fundrawtransaction
, I will attempt to sign with: signrawtransactionwithwallet
but will get:
{
"hex": "hex_from_fund_command",
"complete": false,
"errors": [
{
"txid": "from_v1_taproot_txid",
"vout": n,
"witness": [
],
"scriptSig": "",
"sequence": seq_num_not_sure_if_this_is_sensitive,
"error": "Witness program was passed an empty witness"
}
]
}
Note: witness and scriptSig are blank. I've tried not providing and not providing the prevtxs with no difference.
I'm unsure if I need to provide redeemScript
or witnessScript
, I'm unsure how to construct/find these.
"txid": "hex", (string, required) The transaction id
"vout": n, (numeric, required) The output number
"scriptPubKey": "hex", (string, required) script key
"redeemScript": "hex", (string, optional) (required for P2SH) redeem script
"witnessScript": "hex", (string, optional) (required for P2WSH or P2SH-P2WSH) witness script
"amount": amount, (numeric or string, optional) (required for Segwit inputs) the amount spent
Question
- What are the methodical steps starting with an imported WIF/taproot utxo and ending with a signed tx?