Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

No cookies to display.

bitcoin cli – Unable to generate handle after importing Taproot multisig descriptor

I’ve 3 wallets that I take advantage of to create a Taproot multisig pockets. All my work is predicated on this https://github.com/bitcoin/bitcoin/blob/grasp/doc/multisig-tutorial.md. Listed below are the exterior and inside xpubs for every one:

Pockets 1 (exterior + inside xpubs)

[11776e3b/86h/1h/0h]tpubDCTp9moNmiVHK9KS6j6HEyU9duvomZrE87wTNQMkcZktDu89f3yJFATEQovpsT8KwUDWhut5YYd3zNsUYuv6sGHLozsub1AHPoyL7uGW2LT/0/*
[11776e3b/86h/1h/0h]tpubDCTp9moNmiVHK9KS6j6HEyU9duvomZrE87wTNQMkcZktDu89f3yJFATEQovpsT8KwUDWhut5YYd3zNsUYuv6sGHLozsub1AHPoyL7uGW2LT/1/*

Pockets 2 (exterior + inside xpubs)

[fe5187e5/86h/1h/0h]tpubDCqr5GVKeptzMG5QKLu1aQKXFXgF6kMy9dYDQ6Nap6emZ3iziMCeVX1pPjEzA7nTmyZS9NP2KjUsGtEs8jNqFcUTpKxAwXPB3yfbee4RthM/0/*
[fe5187e5/86h/1h/0h]tpubDCqr5GVKeptzMG5QKLu1aQKXFXgF6kMy9dYDQ6Nap6emZ3iziMCeVX1pPjEzA7nTmyZS9NP2KjUsGtEs8jNqFcUTpKxAwXPB3yfbee4RthM/1/*

Pockets 3 (exterior + inside xpubs)

[9f5cbc68/86h/1h/0h]tpubDDQbi15GQjXYxhAysxdEC6VsSFacJ6hgDAJ7oQy4wUs9sfwMQWtcLqLx7GUbBfWyVwUYMEEJtWmxFXmpmjQL8X4cRdgAJ7BcaazuCYq4iCp/0/*
[9f5cbc68/86h/1h/0h]tpubDDQbi15GQjXYxhAysxdEC6VsSFacJ6hgDAJ7oQy4wUs9sfwMQWtcLqLx7GUbBfWyVwUYMEEJtWmxFXmpmjQL8X4cRdgAJ7BcaazuCYq4iCp/1/*

Right here is my descriptor:

external_desc="tr(tpubDCTp9moNmiVHK9KS6j6HEyU9duvomZrE87wTNQMkcZktDu89f3yJFATEQovpsT8KwUDWhut5YYd3zNsUYuv6sGHLozsub1AHPoyL7uGW2LT/1/*,sortedmulti_a(2,tpubDCTp9moNmiVHK9KS6j6HEyU9duvomZrE87wTNQMkcZktDu89f3yJFATEQovpsT8KwUDWhut5YYd3zNsUYuv6sGHLozsub1AHPoyL7uGW2LT/0/*,tpubDCqr5GVKeptzMG5QKLu1aQKXFXgF6kMy9dYDQ6Nap6emZ3iziMCeVX1pPjEzA7nTmyZS9NP2KjUsGtEs8jNqFcUTpKxAwXPB3yfbee4RthM/0/*,tpubDDQbi15GQjXYxhAysxdEC6VsSFacJ6hgDAJ7oQy4wUs9sfwMQWtcLqLx7GUbBfWyVwUYMEEJtWmxFXmpmjQL8X4cRdgAJ7BcaazuCYq4iCp/0/*))#546p4cqh"

For the primary argument of tr I take advantage of the interior xpub of pockets 1, and I take advantage of sortedmulti_a to configure my 2-3 utilizing the exterior ones. The I name the getdescriptorinfo command:

 ./construct/src/bitcoin-cli -signet getdescriptorinfo $external_desc
{
  "descriptor": "tr(tpubDCTp9moNmiVHK9KS6j6HEyU9duvomZrE87wTNQMkcZktDu89f3yJFATEQovpsT8KwUDWhut5YYd3zNsUYuv6sGHLozsub1AHPoyL7uGW2LT/1/*,sortedmulti_a(2,tpubDCTp9moNmiVHK9KS6j6HEyU9duvomZrE87wTNQMkcZktDu89f3yJFATEQovpsT8KwUDWhut5YYd3zNsUYuv6sGHLozsub1AHPoyL7uGW2LT/0/*,tpubDCqr5GVKeptzMG5QKLu1aQKXFXgF6kMy9dYDQ6Nap6emZ3iziMCeVX1pPjEzA7nTmyZS9NP2KjUsGtEs8jNqFcUTpKxAwXPB3yfbee4RthM/0/*,tpubDDQbi15GQjXYxhAysxdEC6VsSFacJ6hgDAJ7oQy4wUs9sfwMQWtcLqLx7GUbBfWyVwUYMEEJtWmxFXmpmjQL8X4cRdgAJ7BcaazuCYq4iCp/0/*))#546p4cqh",
  "checksum": "546p4cqh",
  "isrange": true,
  "issolvable": true,
  "hasprivatekeys": false
}

And I take advantage of that descriptor to construct the descriptor JSON used to import it into my pockets.
That is what I used to create the json:

external_desc_sum=$(./construct/src/bitcoin-cli -signet getdescriptorinfo $external_desc | jq '.descriptor')
multisig_ext_desc="[{"desc": $external_desc_sum, "timestamp": "now"}]"

After that, I name the importdescriptors technique on a brand new clean pockets:

./construct/src/bitcoin-cli -signet -named createwallet wallet_name="multi_tr" disable_private_keys=true clean=true
./construct/src/bitcoin-cli -signet -rpcwallet="multi_tr" importdescriptors "$multisig_ext_desc"
./construct/src/bitcoin-cli -signet -rpcwallet="multi_tr" getwalletinfo

The response of the import descriptors is:

{
  "identify": "multi_tr"
}
[
  {
    "success": true,
    "warnings": [
      "Range not given, using default keypool range"
    ]
  }
]

And the output of get pockets information is:

{
  "walletname": "multi_tr",
  "walletversion": 169900,
  "format": "sqlite",
  "steadiness": 0.00000000,
  "unconfirmed_balance": 0.00000000,
  "immature_balance": 0.00000000,
  "txcount": 0,
  "keypoolsize": 0,
  "keypoolsize_hd_internal": 0,
  "paytxfee": 0.00000000,
  "private_keys_enabled": false,
  "avoid_reuse": false,
  "scanning": false,
  "descriptors": true,
  "external_signer": false,
  "clean": true,
  "birthtime": 1739107662,
  "lastprocessedblock": {
    "hash": "0000005ba71046c3e13011955cf5a65c09fc7e945030a3d623dbfef8e7b3dce6",
    "top": 234655
  }
}

After seeing this output I used to be excited and I needed to generate a brand new handle to funds my multisig pockets, however I bought an error:

./construct/src/bitcoin-cli  -signet -rpcwallet="multi_tr" getnewaddress
error code: -4
error message:
Error: This pockets has no obtainable keys

After on the lookout for options, I discovered that the deriveaddresses technique works for my use case and I used to be in a position to retrieve some addresses:

./construct/src/bitcoin-cli  -signet deriveaddresses "tr(tpubDCTp9moNmiVHK9KS6j6HEyU9duvomZrE87wTNQMkcZktDu89f3yJFATEQovpsT8KwUDWhut5YYd3zNsUYuv6sGHLozsub1AHPoyL7uGW2LT/1/*,sortedmulti_a(2,tpubDCTp9moNmiVHK9KS6j6HEyU9duvomZrE87wTNQMkcZktDu89f3yJFATEQovpsT8KwUDWhut5YYd3zNsUYuv6sGHLozsub1AHPoyL7uGW2LT/0/*,tpubDCqr5GVKeptzMG5QKLu1aQKXFXgF6kMy9dYDQ6Nap6emZ3iziMCeVX1pPjEzA7nTmyZS9NP2KjUsGtEs8jNqFcUTpKxAwXPB3yfbee4RthM/0/*,tpubDDQbi15GQjXYxhAysxdEC6VsSFacJ6hgDAJ7oQy4wUs9sfwMQWtcLqLx7GUbBfWyVwUYMEEJtWmxFXmpmjQL8X4cRdgAJ7BcaazuCYq4iCp/0/*))#546p4cqh" "[0,2]"
[
  "tb1pg0p5p2vfqn3stjrrz0ga33m4wudcxmsl4qsuv4csnq5lxfnws3zss5xcvh",
  "tb1p4z6n9hlt2rs9arlaxwkcgpp79803rmle6wty946zwce74u4wnmas4r8etx",
  "tb1pk3nj9xt2aempeys63etmw3zfkj8pya0sr2lcl2spf6xqtjev8zfqkfzg5p"
]

my questions are:

  • Why the primary technique to generatenewaddress is just not working?
  • Is the deriveaddresses technique really helpful for normal use? If that’s the case, I believe I might want to save the used vary to generate new addresses each time (as a result of utilizing the identical vary twice generates the identical addresses). So if I take advantage of the vary [0,0], the following time I might want to use [1,1] and so forth.

Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *