MultiversX Tracker is Live!

[HowTo] Create and use a Taproot wallet on Testnet in Bitcoin Core v22.0

Bitcoin Reddit

More / Bitcoin Reddit 197 Views

Disclaimer: This guide describes a Windows-10 setup, uses the Testnet network and requires an external tool to generate a BIP32 extended private key \"xprv" / "tprv"). If you know a good way to generate a "tprv" in v22.0, please let me know.)

With the activation of Taproot, it is likely a good time to get familiar with the taproot addresses and wallets. Since the surfacing of taproot in the bitcoin-core GUI is still in the early stages, some of this how-to will feel a bit kludgey. Things will get simpler in subsequent releases I'm sure.

The basic goal of this walkthrough will be to create a Taproot wallet using the descriptor wallet feature and the bech32m config option. This is in no way "required", it is simply a way to familiarize yourself with the new features released this year in bitcoin core.

Here are the general steps. Feel free to skip ahead as needed:


[0] TLDR; This got longer than I intended

  1. Install bitcoin v22
  2. Launch in testnet
  3. Create a new descriptor wallet
  4. Use importdescriptors to make a Taproot descriptor
  5. Profit

If that makes perfect sense, your done, if not, read the detailed steps.


I. Download Bitcoin-Core v22.0

If you are already at version 22.0 or v0.21 you can skip this step. This will layout the steps for Window-10. Obviously you shouldn't trust my links, but I'll provide them anyway. The installer hash should be: 9169989d649937c0f9ebccd3ab088501328aa319fe9e91fc7ea8e8cf0fcccede

  1. Download Bitcoin-Core version 22.0 Installer \Onion link for UK folks))
  2. Download the v22.0 checksum file \Onion link for UK folks))
  3. Download the v22.0 checksum signature file \Onion link for UK folks))
  4. Verify the installer download \Onion link for UK folks))

II. Install Bitcoin-Core v22.0

The Authenticode thumbprint on the installer should be: 47cda868c6e7c97b54963041922cfd283c2c961d

  1. If this is an upgrade, close any existing copy of bitcoin in execution.
  2. Launch bitcoin-22.0-win64-setup.exe downloaded previously
  3. On the installer UAC verification warning click Show more details
  4. In the expanded details click Show information about publisher's certificate
  5. In the certificate page, click the Details tab
  6. In the details list, click Thumbprint near the bottom
  7. Verify the Thumbprint matches 47cda868c6e7c97b54963041922cfd283c2c961d
  8. Close the certificate window and accept the warning to start the install

III. Launch Bitcoin-Core v22.0 on Testnet

We will run and configure on testnet since the coins have no cost. In step #5, you will need to add the following lines to the bitcoin.conf file:

test.addresstype=bech32m test.changetype=bech32m 
  1. On the start menu, search or run "Bitcoin Core (testnet, 64-bit)"
  2. Once loaded, select Options from the Settings menu
  3. Click Open Configuration File and accept the warning
  4. A text editor should open with a blank file called bitcoin.conf.
  5. In the bitcoin.conf file, add the two lines mentioned above, save, and close the file
  6. Exit, close and and restart "Bitcoin Core (testnet, 64-bit)"

If you are stuck downloading testnet blocks, you can still proceed through step IV and step V


IV. Generate a testnet tprv to use in Bitcoin Core v22.0

You can make a tprv any way you want, this is one of the easier ways I know of. For this section, open a blank text file and copy the following three lines to it, we will edit it as we progress.

your_mnemonic: __mnemo__ getdescriptorinfo "tr(__tprv__/86'/1'/0'/0/*)" importdescriptors "[{\"desc\":\"tr(__tprv__/86'/1'/0'/0/*)#__chksum__\",\"active\":true,\"timestamp\":\"now\",\"range\":[0,1000],\"next_index\":1}]" 
  1. Go to Ian's BIP39 site
  2. Change the "Words" selection from 15 to 12 and click Generate
  3. Change the "Coin" selector to BTC - Bitcoin Testnet
  4. In your text file replace __mnemo__ with the text in "BIP39 Mnemonic"
  5. In your text file replace both instances of __tprv__ with the text in "BIP32 Root Key"

V. Create a Taproot Wallet

We will make one final edit to your text file so keep it open...

  1. Back in Bitcoin-Core, pick Create Wallet from the File menu
  2. Name your wallet descwallet
  3. Select the "Make Blank Wallet" and "Make Descriptor Wallet" checkboxes, then click Create
  4. Pick Console from the Window menu
  5. At the top of the console window, set the wallet selector to descwallet
  6. From your text file copy the completed getdescriptorinfo command (second line) and paste it in the console (hit enter)
  7. You'll get an 8 character checksum from the command, use it to replace the __chksum__ tag in your text file
  8. From your text file copy the completed importdescriptors command (third line) and paste it in the console (hit enter)
  9. If you get a "success": true response, it worked, you can close your console window.

For reference, your final importdescriptors command should look something like this, though the __tprv__, and __chksum__ fields will be different, obviously.

importdescriptors "[{\"desc\":\"tr(tprv8ZgxMBicQKsPdD3rvZEHuMSXTFGG399p6rMxnqyqFnDuNbMLc7xCfLUryJnLqYUHUiRFJKhDpGXJyz5nVsgkidh65PDC5AVWoNEKA2XLSLf/86'/1'/0'/0/*)#czml648s\",\"active\":true,\"timestamp\":\"now\",\"range\":[0,1000],\"next_index\":1}]" 

VI. Get some Testnet coins from a faucet

You will need to have completed your testnet block download, so if it is still downloading, go to bed and resume this in the morning. If you don't like sketchy faucet sites, just post a testnet-bech32 or testnet-bech32m address and maybe someone on thread will send you some.

  1. From the main Bitcoin-core wallet screen, set the wallet selector (in top right) to descwallet
  2. Click the Receive tab on the main wallet screen
  3. Make sure to UNCHECK Generate native segwit (Bech32) address
  4. Click Create new receiving address to get a taproot bech32m address (starts with tb1p)
  5. Visit https://testnet-faucet.mempool.co/ and answer the captcha (hint: the "plus" sign often looks like "x")
  6. Use the tb1p address you just generated to receive coins from the faucet

Conclusion

This was as thorough and simple an explanation as I could manage for using the importdescriptors command to make a Taproot wallet. Ultimately you will likely want to generate some change-addresses and possibly do a keypoolrefill, but if you got this far you can likely figure the rest out. Credit for all of this goes to u/pwuille and bitcoin-dev mailing list for pointing me in the right direction on my previous thread.

submitted by /u/brianddk
[link] [comments]
Get BONUS $200 for FREE!

You can get bonuses upto $100 FREE BONUS when you:
πŸ’° Install these recommended apps:
πŸ’² SocialGood - 100% Crypto Back on Everyday Shopping
πŸ’² xPortal - The DeFi For The Next Billion
πŸ’² CryptoTab Browser - Lightweight, fast, and ready to mine!
πŸ’° Register on these recommended exchanges:
🟑 Binance🟑 Bitfinex🟑 Bitmart🟑 Bittrex🟑 Bitget
🟑 CoinEx🟑 Crypto.com🟑 Gate.io🟑 Huobi🟑 Kucoin.



Comments