Post
Topic
Board Bitcoin Technical Support
Merits 3 from 1 user
Re: Trying to import a multi signature wallet in Bitcoin core
by
nc50lc
on 23/11/2024, 04:28:53 UTC
⭐ Merited by ABCbits (3)
The information I have is:

The BTC address where the BTC is stored
The public key
The passphrase I used as a first password
The second password which was hidden under a hologram on a physical Bitcoin coin
Can anyone guide me as to how to do it?
Importation is rather simple actually; Short version: Create a new wallet in Bitcoin Core, Open the console window, import it as a sh(multi()) descriptor.
The complication here is if you can't remember the setup if the public keys are specifically arranged and how many consigners are there and required signature.
As well as the reliability of those information, specifically, you need "private keys" and "public keys", no passwords needed.
Please describe those information like starting characters and how many characters each has.

Here're the instructions if you can identify which is which:
  • Before that, create a MultiSig descriptor based from your public keys, refer to this documentation: https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md
    Fror example, your "10 year old MultiSig Address" should be a P2SH MultiSig descriptor which should be in this format: sh(sortedmulti(2,publicKey1,publicKey2))
    Note: refer to the documentation for the full example with public keys, the "2" in the descriptor indicates how many signature it requires and the number of public keys on it indicates how many cosigners it has; yours should be set according to your original setup.

  • To import: Create a watch-only wallet in Bitcoin Core with "File->Create Wallet..." and tick "Make Blank Wallet" in the advanced options, set a wallet encryption passphrase via "Encrypt Wallet".
  • Open the console in "Window->Console" and enter the command getdescriptorinfo "<your MultiSig descriptor>" and take note of the checksum, e.g.: "sc8q9v0f"
  • Then import it to the newly created wallet (the correct wallet should be selected in the console's drop-down menu above it if you have more than one wallet),
    Use the command importdescriptors "[{\"desc\": \"<your MultiSig descriptor>#its_checksum\",\"label\": \"your_label\",\"timestamp\": \"0\"}]"
  • Open "Window->Receiving Addresses" and see if the address with that label is correct, then let Bitcoin Core rescan (sync of not synced) and see if your bitcoins will appear.

If the address is wrong, the MultiSig setup is incorrect with either wrong public keys arrangement (use "multi" instead of "sortedmulti" to specify specific arrangement),
Or the number of signature required (2) isn't correct
Or you're missing some more public keys.

On the other hand, if the correct address is restore and the transactions appeared, do the same steps on an Air-Gap (offline) machine but use your WIF private keys instead of public keys in the descriptor.
Then, use the menu (you can easily see the buttons): Create an unsigned transaction in the watch-only Bitcoin Core using "Send", Save that PSBT (Partially Signed Bitcoin Transaction) file/txt, import the PSBT to the offline Bitcoin Core, Sign it there, export the Signed PSBT file back to the watch-only wallet, then Broadcast.