You can use the importdescriptors
RPC command of Bitcoin Core, given you can find the derivation path(s) used by this wallet.
Start by creating a descriptor-enabled wallet on bitcoind
(unfortunately not yet the default, you have to set descriptors
to true
in the createwallet
call).
For example if you were looking for native segwit v0 outputs you would import a wpkh
descriptor: wpkh(yourxpriv/deriv/path/*)
.
Here is a concrete example with xpriv xprv9s21ZrQH143K2CewR4LfKvC1Liw16RxrUMSUAiiHs4eqyMPE6UNxKmtKKTG7jFWSUhzDP2YT45ej8ratyi2TjL9UVKDVSCj5BDZiBiP91ew
and derivation path m/0/1/*
:
wpkh(xprv9s21ZrQH143K2CewR4LfKvC1Liw16RxrUMSUAiiHs4eqyMPE6UNxKmtKKTG7jFWSUhzDP2YT45ej8ratyi2TjL9UVKDVSCj5BDZiBiP91ew/0/1/*)
Now, bitcoind
mandates the use of a checksum for the import. Therefore if you don't already have one, you can request it using the getdescriptorinfo
command (keeping the same dummy values as above):
getdescriptorinfo "wpkh(xprv9s21ZrQH143K2CewR4LfKvC1Liw16RxrUMSUAiiHs4eqyMPE6UNxKmtKKTG7jFWSUhzDP2YT45ej8ratyi2TjL9UVKDVSCj5BDZiBiP91ew/0/1/*)"
You will get a desc#checksum
out of it.
For this call it was wpkh(xpub661MyMwAqRbcEgjQX5sfh48jtkmVVtghqaN4y77uRQBpr9iNe1hCsaCoAkV14nksbcNSWWXH8tr9eKrPTLBpGifS8TMG8toqgtVRP6NWZpT/0/1/*)#78f39hv7
.
Finally, you can import the descriptor to bitcoind
and rescan the block chain from the timestamp at which you created your wallet (here again an instance with the above dummy values):
importdescriptors '[{"desc":"wpkh(xprv9s21ZrQH143K2CewR4LfKvC1Liw16RxrUMSUAiiHs4eqyMPE6UNxKmtKKTG7jFWSUhzDP2YT45ej8ratyi2TjL9UVKDVSCj5BDZiBiP91ew/0/1/*)","range":1000,"next_index":0,"timestamp":1630308659}]'
The same goes for other scriptPubKey types, you can find a reference of the syntax to use here.