cryptoadvance / specter-diy

DIY airgapped hardware wallet that uses QR codes for communication with the host
MIT License
440 stars 73 forks source link

Add compatibility app to parse arbitrary files / jsons #174

Closed stepansnigirev closed 2 years ago

stepansnigirev commented 2 years ago

This app introduces a compatibility layer between different standards used in industry and Specter-DIY command format. The first format I added here is "Export to wallet software" format used in Specter-Desktop, Blue Wallet and a few other software wallets. Specter-DIY can now understand QR codes / json files containing wallets in the form similar to that:

{"label": "random", "blockheight": 0, "descriptor": "wpkh([efb41152/84h/1h/0h]tpubDCVeSJMK2GnUEWbX3wSF9fisCXg6rjADTVfou19hbmphiJoMeBhXZCneXrbBaQFTUPMDcQ3hMgLdeFxgehKnC5nHNu3qMVQJ2fazGDN8TNx/0/*)#xx4n5gxk", "devices": [{"type": "specter", "label": "random"}]}

This means Specter-DIY can now add any wallet from Specter-Desktop and other software even if it is not used in these wallets as a signer. This allows (with some tweaks) to detect what wallet the money go to. For example Specter-DIY will be able to detect that you are transferring money to your c-lightning node, or to your mobile wallet, if this wallet was imported into DIY as watch-only.

EDIT: Also adds compatibility with Coldcard / Blue wallet format