Steps that I followed to do a transaction which creates a P2TR output:
- Copy XPUB from test vectors mentioned in BIP 86
xpub6BgBgsespWvERF3LHQu6CnqdvfEvtMcQjYrcRzx53QJjSxarj2afYWcLteoGVky7D3UKDP9QyrLprQ3VCECoY49yfdDEHGCtMMj92pReUsQ
- Convert XPUB (mainnet) to TPUB (testnet) using Bitcoin Extended Public Key Converter
tpubDC3pD7UZXnsgh3EBjbtBQiB1FnLask7UHBSunZ1DPK4dCFFZoFRkgxHB8gt42FvLzx1DpxfHWxAsYaY6b643RVcGjDxXxns7wKKYnnfEcbB
- Create a blank descriptor wallet with private keys disabled:
bitcoin-cli -named createwallet wallet_name=taproot_wallet blank=true disable_private_keys=true descriptors=true
- Save the descriptor info in a text file for TPUB we got from step 2 (descriptor.txt):
[
{
"desc": "tr([8868ab13/86'/1'/0']tpubDC3pD7UZXnsgh3EBjbtBQiB1FnLask7UHBSunZ1DPK4dCFFZoFRkgxHB8gt42FvLzx1DpxfHWxAsYaY6b643RVcGjDxXxns7wKKYnnfEcbB/0/*)#06sjusfa",
"timestamp": "now",
"active": true,
"internal": false,
"range": [
0,
999
],
"next": 0
}
]
I have copied this format from listdescriptors
output for a new descriptor wallet that had private keys enabled.
- Import this descriptor in wallet we created in step 3:
bitcoin-cli -rpcwallet=taproot_wallet importdescriptors "$(cat descriptor.txt)"
- This is a watch only wallet with a taproot descriptor TPUB that can be used to create new bech32m address:
bitcoin-cli -rpcwallet=taproot_wallet getnewaddress "" "bech32m"
tb1p5cyxnuxmeuwuvkwfem96lqzszd02n6xdcjrs20cac6yqjjwudpxqp3mvzv
- Send some bitcoin from another wallet:
https://blockstream.info/testnet/tx/2035ead4a9d0c8e2da1184924abc9034d26f2a7093371183ef12891623b235d1
I had compiled bitcoind with branch used by Sjors Provoost in PR #2260