<p>There is the step-by-step example of spending from the  <code>tb1p8wpt9v4frpf3tkn0srd97pksgsxc5hs52lafxwru9kgeephvs7rqlqt9zj</code>
Taproot address to the other Taproot one: <code>tb1p90h6z3p36n9hrzy7580h5l429uwchyg8uc9sz4jwzhdtuhqdl5eqmpwq6n</code>.</p>
<pre><code>$ ./bitcoin-cli.exe -testnet createrawtransaction '[{&quot;txid&quot;:&quot;8cdf19ed3ade4af038314ef58b116a523f99aa1c585ca3c157ce5386f9df6421&quot;,&quot;vout&quot;:0}]' '[{&quot;tb1p90h6z3p36n9hrzy7580h5l429uwchyg8uc9sz4jwzhdtuhqdl5eqmpwq6n&quot;:0.00001000}]'
$ ./bitcoin-cli.exe -testnet importdescriptors '[ { &quot;desc&quot; : &quot;tr(cV628xvqToz45dwdPmTcJ9RgEVnWMwP8dpZBGzb9LfTk3sBHFNwc)#8skcj28y&quot;, &quot;timestamp&quot; : &quot;now&quot; } ]'
$ ./bitcoin-cli.exe -testnet signrawtransactionwithwallet &quot;02000000012164dff98653ce57c1a35c581caa993f526a118bf54e3138f04ade3aed19df8c0000000000fdffffff01e8030000000000002251202befa14431d4cb71889ea1df7a7eaa2f1d8b9107e60b01564e15dabe5c0dfd3200000000&quot; '[{&quot;txid&quot;: &quot;8cdf19ed3ade4af038314ef58b116a523f99aa1c585ca3c157ce5386f9df6421&quot;, &quot;vout&quot;: 0, &quot;scriptPubKey&quot;: &quot;5120c38859777bc9c3294d3587035fc3823a146dabaab1fa250bc04e92f16887a065&quot;, &quot;amount&quot;: 0.00000000}]' &quot;DEFAULT&quot;
$ ./bitcoin-cli.exe -testnet sendrawtransaction 020000000001012164dff98653ce57c1a35c581caa993f526a118bf54e3138f04ade3aed19df8c0000000000fdffffff01e8030000000000002251202befa14431d4cb71889ea1df7a7eaa2f1d8b9107e60b01564e15dabe5c0dfd320140f10fc6bb1d414d4c888838fb6b1699c3e538331d32b64b5baf85c1cc34e2c43eb7bdd7a14fd4a4a07341d1b0390ad977be711bc49df786982243c6564a33f6b400000000
</code></pre>
<p>Note that the commands with arguments may not work from PowerShell. There is the Bash used in the example above.</p>

CC BY-SA 4.0
2023-02-02T13:19:56.583Z
2023-02-02T13:19:56.583Z
Greg Tonoski
<p>Can you give a simple step-by-step example for a taproot transaction with bitcoin-cli on Testnet?</p>

<bitcoin-core><testnet><bitcoin-cli><taproot><output-script-descriptors>
How to make a taproot transaction with bitcoin-cli?
RobinLinus
# How to make a taproot transaction with bitcoin-cli?

(Asked by: username_0 on 2021-08-10)

Can you give a simple step-by-step example for a taproot transaction with bitcoin-cli on Testnet?

**Tags:** bitcoin-core, testnet, bitcoin-cli, taproot, output-script-descriptors


---

## 1 answers

### Answer by username_1 on 2023-02-02. Score: 0

There is the step-by-step example of spending from the `tb1p8wpt9v4frpf3tkn0srd97pksgsxc5hs52lafxwru9kgeephvs7rqlqt9zj`
Taproot address to the other Taproot one: `tb1p90h6z3p36n9hrzy7580h5l429uwchyg8uc9sz4jwzhdtuhqdl5eqmpwq6n`.

```
$ ./bitcoin-cli.exe -testnet createrawtransaction '[{"txid":"8cdf19ed3ade4af038314ef58b116a523f99aa1c585ca3c157ce5386f9df6421","vout":0}]' '[{"tb1p90h6z3p36n9hrzy7580h5l429uwchyg8uc9sz4jwzhdtuhqdl5eqmpwq6n":0.00001000}]'
$ ./bitcoin-cli.exe -testnet importdescriptors '[ { "desc" : "tr(cV628xvqToz45dwdPmTcJ9RgEVnWMwP8dpZBGzb9LfTk3sBHFNwc)#8skcj28y", "timestamp" : "now" } ]'
$ ./bitcoin-cli.exe -testnet signrawtransactionwithwallet "02000000012164dff98653ce57c1a35c581caa993f526a118bf54e3138f04ade3aed19df8c0000000000fdffffff01e8030000000000002251202befa14431d4cb71889ea1df7a7eaa2f1d8b9107e60b01564e15dabe5c0dfd3200000000" '[{"txid": "8cdf19ed3ade4af038314ef58b116a523f99aa1c585ca3c157ce5386f9df6421", "vout": 0, "scriptPubKey": "5120c38859777bc9c3294d3587035fc3823a146dabaab1fa250bc04e92f16887a065", "amount": 0.00000000}]' "DEFAULT"
$ ./bitcoin-cli.exe -testnet sendrawtransaction 020000000001012164dff98653ce57c1a35c581caa993f526a118bf54e3138f04ade3aed19df8c0000000000fdffffff01e8030000000000002251202befa14431d4cb71889ea1df7a7eaa2f1d8b9107e60b01564e15dabe5c0dfd320140f10fc6bb1d414d4c888838fb6b1699c3e538331d32b64b5baf85c1cc34e2c43eb7bdd7a14fd4a4a07341d1b0390ad977be711bc49df786982243c6564a33f6b400000000

```

Note that the commands with arguments may not work from PowerShell. There is the Bash used in the example above.


---

