electrum icon indicating copy to clipboard operation
electrum copied to clipboard

Support UR2.0 QR codes (for PSBTs)

Open Jakob-1870 opened this issue 2 years ago • 22 comments

UR 2.0 is becoming the standard for QR PSBT's. It's implemented in almost all software and hardware wallets that support QR PSBT's. https://github.com/BlockchainCommons/Research

Electrum should add support for it.

Jakob-1870 avatar Jul 27 '22 15:07 Jakob-1870

https://github.com/BlockchainCommons/Research

There's a lot of stuff there... Which "spec" in particular are you referring to? Is it this one? https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-005-ur.md

UR 2.0 is becoming the standard for QR PSBT's. It's implemented in almost all software and hardware wallets that support QR PSBT's.

Which other software/hardware/services support it?

SomberNight avatar Aug 02 '22 16:08 SomberNight

Yes that's it.

Bluewallet, Sparrow, Specter, Keystone, Passport, Gordian, Krux, Seedsigner all use UR2.0.

Jakob-1870 avatar Aug 02 '22 23:08 Jakob-1870

Two python implementation that might be interesting for you: From Foundation Devices: https://github.com/Foundation-Devices/foundation-ur-py Implementation in Specter-DIY: https://github.com/diybitcoinhardware/f469-disco/tree/master/libs/common/microur

stepansnigirev avatar Dec 06 '22 09:12 stepansnigirev

Sorry for duplicating the request i did not get aware of this one. But yes this would be important i think for all the community

massmux avatar Dec 06 '22 09:12 massmux

Some previous discussion re the custom format we have been using since 2015: https://github.com/spesmilo/electrum/issues/5746 In short, when implementing PSBT support in 2019 we decided to keep using the base43 encoding inside alphanumeric-mode QR codes, instead of using either base64 text inside binary-mode QR codes or raw bytes inside binary-mode QR codes, due to maximising payload size and easy-copy-pasteability.


Anyway, if this BCR-2020-005 format has traction, we could have it too. PR welcome. It probably needs some GUI-specific work, but getting it to work with the Qt GUI would be a good starting point.

The best way to transition would be to start always encoding using the new format, but support decoding using both.

SomberNight avatar Dec 06 '22 09:12 SomberNight

I think it would be a pity if we were forced to adopt an animated qr code standard just because some spec is feature bloated. Has someone taken the time to evaluate that?

ecdsa avatar Dec 06 '22 09:12 ecdsa

actually sparrow and specter desktop use such a format. maybe it would be important electrum's users also can share same standard. imho

massmux avatar Dec 06 '22 18:12 massmux

I too think that the use of QRcodes would be very practical. There would be less room for error, it takes away the fragility caused by the use of USB or SDcards... also, if everyone used the same standard, it would be easier to use different wallets/devices for broadcasting

Medgeina avatar Dec 06 '22 22:12 Medgeina

This feature is really important that it is implemented

pciccioni avatar Dec 07 '22 10:12 pciccioni

@SomberNight can you please write here in this thread, where a dev willing contribute, can find appropriate code parts to update. This may be makes things easier for finding the help to include this change

massmux avatar Dec 07 '22 10:12 massmux

Is there any progress with this? I think the Jade hardware wallet uses this system

amarett0 avatar May 18 '23 14:05 amarett0

Krux also uses this system of animated QRCodes (UR types) and it doesn't work with Electrum, but it works with BW, Sparrow and others... the implementation is here (Python): https://github.com/selfcustody/urtypes

tadeubas avatar May 23 '23 20:05 tadeubas

the implementation is here (Python): https://github.com/selfcustody/urtypes

Is that really implementing the same thing? Looks unrelated to me. The code linked in https://github.com/spesmilo/electrum/issues/7905#issuecomment-1338994775 look much more promising.

SomberNight avatar May 26 '23 01:05 SomberNight

the implementation is here (Python): https://github.com/selfcustody/urtypes

Is that really implementing the same thing? Looks unrelated to me. The code linked in #7905 (comment) look much more promising.

Yes you are right, the other code is just a helper to determine the type of the UR... Krux also uses that code as a simple fork from Foundation Devices: https://github.com/selfcustody/foundation-ur-py

tadeubas avatar May 26 '23 11:05 tadeubas

Maybe this project in Python can help Electrum achieve Multiframes QRCodes too: https://github.com/pythcoiner/SeedQReader

tadeubas avatar Jun 05 '23 13:06 tadeubas

Are there any news on this topic? I think it's important to implement, thanks to seedsigner and jade's QRs features

Ciugam avatar Jul 19 '23 23:07 Ciugam

I'm willing to pay a bounty for this feature. It would allow old phones, with internet disabled, to become multisig participants.

dangarthwaite avatar Nov 23 '23 16:11 dangarthwaite

I'm willing to pay a bounty for this feature. It would allow old phones, with internet disabled, to become multisig participants.

A bit off topic, just out of curiosity: do you mean use old phones as signers using electrum, may I assume electrum android app?

liebregris avatar Nov 26 '23 08:11 liebregris

@liebregris Yes, that's something I can see value in. Everyone has a junk drawer full of old phones, most of them Android.

dangarthwaite avatar Nov 26 '23 16:11 dangarthwaite

Are there any updates on this? Or is there a sort of workaround, like saving a psbt and then using another tool to generate the codes?

massimopavoni avatar Jan 23 '24 18:01 massimopavoni

@massimopavoni we will update this issue if there is any progress here

accumulator avatar Jan 23 '24 23:01 accumulator