Post
Topic
Board Bitcoin Technical Support
Re: How can one make a Paper Wallet from a Descriptor Wallet ?
by
Forsyth Jones
on 09/03/2024, 13:08:33 UTC
For example:
  • If you're creating a paper wallet of the address 1HDzfsVrFDPSsMEm9jD5TmY6rMFsXJi2Wf,
    Its descriptor should look like this: pkh(L2z9j4wf9TVkJy7XGxNAYzjBChPCXCoqYJz69Y5xQ98sJo38sA2c)
  • If you're creating a paper wallet of the address bc1q539ttc3f9htqnvff4g0fapw80ltjkpqhxy79fd,
    Its descriptor should look like this: wpkh(L2Wpw378mMCvTtzonL42QpDkxj8CHbJGD671XwDkWHc4EGmc2Y1M)

A complement to your post, the OP can also import these three address scripts all at once with the "combo(wif_privkey)#checksum" parameter

Testing with the private key you used in your example, combo generates the same addresses in a single command, of course the checksum is not the same and before typing this command, a new checksum must be obtained:

Code:
getdescriptorinfo "combo(L2z9j4wf9TVkJy7XGxNAYzjBChPCXCoqYJz69Y5xQ98sJo38sA2c)"

#Result:

{
  "descriptor": "combo(03093a7c6942855c98c6715a3301d7efba07f407cc06bca3ec7c726a11f0440e9d)#jfkvllza",
  "checksum": "z3vl5qv9",
  "isrange": false,
  "issolvable": true,
  "hasprivatekeys": true
}

Code:
importdescriptors '[{"desc":"combo(L2z9j4wf9TVkJy7XGxNAYzjBChPCXCoqYJz69Y5xQ98sJo38sA2c)#z3vl5qv9","timestamp":"now","label":"paperwallet"}]'

Interestingly, the bech32 address he generated here is different from the address used in @nc50lc's example, I believe he used another private key to generate this bech32 address, as the legacy address generated by me is the same as his, a specific private key will always generate the same addresses as that specific private key.

Below we can see the legacy, p2sh-segwit and bech32 addresses generated by this private key:

Code:
deriveaddresses "combo(L2z9j4wf9TVkJy7XGxNAYzjBChPCXCoqYJz69Y5xQ98sJo38sA2c)#z3vl5qv9"

#Result:

[
  "1HDzfsVrFDPSsMEm9jD5TmY6rMFsXJi2Wf",
  "bc1qk8mj2rxsdkxwl9290u0mk37rp0xnz704f6esd9",
  "366bbMythgzQyyLpvpVmLUEAtuZpig96VR"
]

When using the combo command, the user must understand that combo is used to import the 3 types of scripts from known addresses at once, while: pkh(legacy-script), wpkh(native-segwit-script), sh(wpkh(nested -segwit-script)) and tr(taproot) will make the core recreate the address only for the specified script.