Post
Topic
Board Bitcoin Technical Support
Merits 9 from 2 users
Re: How can one make a Paper Wallet from a Descriptor Wallet ?
by
nc50lc
on 09/03/2024, 10:57:43 UTC
⭐ Merited by ABCbits (5) ,LoyceV (4)
I used to have a Public/Private paper wallet that I was printing from an offline html.
From the site bitaddress.org I downloaded the html file and ran it on an offline computer.
-snip-
Now that the new standard became Descriptor Wallet, the Private Key functionality is no longer easely available.
Now I have to find another convenient way to keep a paper backup Descriptor Wallet, idealy with QR code, as was previously available.
By saying "as was previously available"?
Do you mean creating the keys somewhere else (bitaddress) and importing them to bitcoin Core when needed?

As for QR Code, Bitcoin Core doesn't have this feature to import WIF private keys even before descriptors.

Quote from: FredCailloux
How can I make a paper wallet from a Descriptor Wallet ?
If in the same way that you've been using, create a new privKey (from elsewhere) and create descriptors based from it.
It's as simple as this for each common addresses; pkh(WIF_PrivKey) for Legacy, wpkh(WIF_PrivKey) for SegWit, sh(wpkh(WIF_PrivKey)) for NestedSegWit.
The trick is to use the correct script type that matches the address' format.

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)

You can also include the descriptor's checksum so that it will be easier to import. Use getdescriptorinfo "descriptor" command to get its checksum:
Example:
Code:
getdesciptorinfo "pkh(L2z9j4wf9TVkJy7XGxNAYzjBChPCXCoqYJz69Y5xQ98sJo38sA2c)"
Result: "checksum": "cgd983qg",
Append to the descriptor to be written on paper: pkh(L2z9j4wf9TVkJy7XGxNAYzjBChPCXCoqYJz69Y5xQ98sJo38sA2c)#cgd983qg

Then, the harder counterpart of the previous importprivkey command, when you need to import to Bitcoin Core, use importdescriptors command:
For example:
Code:
importdescriptors "[{\"desc\": \"pkh(L2z9j4wf9TVkJy7XGxNAYzjBChPCXCoqYJz69Y5xQ98sJo38sA2c)#cgd983qg\",\"timestamp\": \"0\",\"label\": \"paper_wallet01\"}]"
The advantage of this over importprivkey is you can import multiple descriptors in one command.