spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.27k stars 3.04k forks source link

Support UR2.0 QR codes (for PSBTs) #7905

Open Jakob-1870 opened 2 years ago

Jakob-1870 commented 2 years ago

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.

SomberNight commented 1 year ago

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?

Jakob-1870 commented 1 year ago

Yes that's it.

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

stepansnigirev commented 1 year ago

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

massmux commented 1 year ago

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

SomberNight commented 1 year ago

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.

ecdsa commented 1 year ago

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?

massmux commented 1 year ago

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

Medgeina commented 1 year ago

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

pciccioni commented 1 year ago

This feature is really important that it is implemented

massmux commented 1 year ago

@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

amarett0 commented 1 year ago

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

tadeubas commented 1 year ago

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

SomberNight commented 1 year ago

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.

tadeubas commented 1 year ago

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 commented 1 year ago

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

Ciugam commented 1 year ago

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

dangarthwaite commented 8 months ago

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

liebregris commented 8 months ago

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?

dangarthwaite commented 8 months ago

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

massimopavoni commented 6 months ago

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?

accumulator commented 6 months ago

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