Coldcard firmware v4.1.3+ supports wallet export via descriptors:
- https://github.com/Coldcard/firmware/commit/3151369e67951f68e86ba993ef1e7dfaaa39c13f
- Using Coldcard with Bitcoin Core
This PR adds a new command importfromcoldcard for the bitcoin-wallet tool which creates a new wallet and fills it with the provided descriptors.
Usage example:
0$ src/bitcoin-wallet -wallet=MyNewShinyCC -dumpfile=/home/hebasto/Coldcard/bitcoin-core.txt importfromcoldcard
To point to the “bitcoin-core.txt” file, the -dumpfile option is re-used.
Also the created wallet is forced for rescanning, to guarantee the access to all transactions even for wallets that were previously used some time before being imported into Bitcoin Core.
TODO (not here):
-  add tests for the importfromcoldcardcommand to thetool_wallet.pyfunctional test
- add the same functionality to the GUI
Based on bitcoin/bitcoin#23349.