status of BCR-2020-005 and implementations in the field (cobo and bluewallet) #46
m0dB
started this conversation in
General & Announcements
Replies: 1 comment 1 reply
-
Heh, I see I should have read this discussion first: #26 It would have helped me a lot if the paper had mentioned and briefly described the existence of this earlier format and it certainly would be nice if the reference code could support or at least detect and inform about the format (though I see how that doesn't belong in a reference implementation). |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I recently tried to use the BCR-2020-005 reference code to decode what I supposed were BC-UR format QR codes, only to come to the conclusion that there is a diverging format in the field (so in the end I rolled my own decoder).
Some background: I was trying to use BlueWallet to pass a PSBT to an airgapped Electrum, but Electrum, or rather zbar, which Electrum uses for QR scanning, didn't know what to do with the animated QRs. It could decode the individual QRs and gave me strings in a
"UR:BYTES/<sequence>/<data>/<moredata>"
format and google took me to the BCR-2020-005 paper.I decided to add support for these QRs to zbar and started by trying to use the reference code to the decode the strings. Several hours later, after wrestling with the code a lot, I came to the conclusion that despite strong similarities, it wasn't following the same format. I looked at the BlueWallet source code (I later found that they based their implementation on Cobo's) and put together some c++ code and was now able to decode my QRs. Next, I integrated this code in a fork of zbar (adding rudimentary animated QR support). If anyone is interested, the code is here: https://github.com/m0dB/zbar/tree/master/zbar/qrcode/bc-ur . The README explains the format.
While I am happy that I was able to get this to work, the whole experience was a bit worrying. I don't know why there is a format in the field that is diverging from the paper (maybe it was based on an earlier proposal?) but I don't think it's necessarily an issue as I am sure both formats can exist next to each other (and apparently the Cobo/BlueWallet format has gained some traction). But it definitely is something to keep in mind as it can be quite confusing. And if both formats have to coexists, it will be important for decoders to be aware of this.
Beta Was this translation helpful? Give feedback.
All reactions