specter-desktop icon indicating copy to clipboard operation
specter-desktop copied to clipboard

Use standard formats for descriptor export

Open seedhammer opened this issue 2 years ago • 2 comments

Specter currently exports a multi-sig descriptor embedded in a JSON object, e.g.

{"label": "Test Multisig 2-of-3", "blockheight": 481824, "descriptor": "wsh(sortedmulti(2,[dc567276/48h/0h/0h/2h]xpub6DiYrfRwNnjeX4vHsWMajJVFKrbEEnu8gAW9vDuQzgTWEsEHE16sGWeXXUV1LBWQE1yCTmeprSNcqZ3W74hqVdgDbtYHUv3eM4W2TEUhpan/0/*,[f245ae38/48h/0h/0h/2h]xpub6DnT4E1fT8VxuAZW29avMjr5i99aYTHBp9d7fiLnpL5t4JEprQqPMbTw7k7rh5tZZ2F5g8PJpssqrZoebzBChaiJrmEvWwUTEMAbHsY39Ge/0/*,[c5d87297/48h/0h/0h/2h]xpub6DjrnfAyuonMaboEb3ZQZzhQ2ZEgaKV2r64BFmqymZqJqviLTe1JzMr2X2RfQF892RH7MyYUbcy77R7pPu1P71xoj8cDUMNhAMGYzKR4noZ/0/*))#hfwurrvt", "devices": [{"type": "other", "label": "Test Multisig 2-of-3 Cosigner 1"}, {"type": "other", "label": "Test Multisig 2-of-3 Cosigner 2"}, {" type": "other", "label": "Test Multisig 2-of-3 Cosigner 3"}] }

When exporting as animated QR codes, the parts looks like this:

p1of3 {"label": "Test Multisig 2-of-3", "blockheight": 481824, "descriptor": "wsh(sortedmulti(2,[dc567276/48h/0h/0h/2h]xpub6DiYrfRwNnjeX4vHsWMajJVFKrbEEnu8gAW9vDuQzgTWEsEHE16sGWeXXUV1LBWQE1yCTmeprSNcqZ3W74hqVdgDbtYHUv3eM4W2TEUhpan/0/*,[f245ae38/48

This issue is about supporting the blockchain commons standards, BCR-2020-005 for the QR codes, and BCR-2020-010 for the output descriptor.

To keep it simple, you can start by wrapping your descriptor in the generic bytes data type, and skip the fancier fountain encoding. BlueWallet does that.

CC @ChristopherA.

seedhammer avatar May 30 '23 15:05 seedhammer

Probably why I couldn't use it with Nunchuk wallet for a multisig setup. Got error messages when trying to import the descriptor.

image

bitcoinheiro avatar Jul 11 '23 07:07 bitcoinheiro

I don't think @bitcoinheiro issue is directly related as this would need to be implemented in Specter-DIY to work for him.

k9ert avatar Jan 15 '24 14:01 k9ert