Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BCUR v1 (legacy) support? #12

Open
mflaxman opened this issue Nov 4, 2021 · 2 comments
Open

BCUR v1 (legacy) support? #12

mflaxman opened this issue Nov 4, 2021 · 2 comments

Comments

@mflaxman
Copy link

mflaxman commented Nov 4, 2021

I'm looking to use this library to generate a PSBT QR gif for airgap signing. When looking at what Specter-Desktop or Sparrow generate for PSBTs it's of the form (for legacy encoding):

ur:bytes/6of8/dyzuek4l5mdgatky6ff34dqq7h8llkdu792jsuw3tcrs7pct9fys0s27r7/ll0r7ssp0xmdfq209wzttv4gx8lzx92u9sk3yjcw39nehdf2ugsxqdtv69pt0w32td8yms5a3mtfr08j9jaawuzrjnmhzjcsm5eypwwq288qck2u2vqqqzqqzqqqsqqqqqyqqgqqpqqpqqqqqqqqqqqzypsralma4nlau06zq9umd4ypfu4cfddj4qclugc4tskz

Looking at the tests/examples, is this supported in your library? I do see this example, but it doesn't match the legacy ur:bytes... format:

  • There's no mofn (i.e, 2of8). Instead, it appears that a - is being used.
  • There's no checksum.

Is it possible to use this library to produce/consume a QR that a HWW/Coordinator could understand for legacy encoding/decoding? A working example would be very helpful.

I'm hoping to be able to make it work with an older Cobo Vault (whose firmware can unfortunately never be updated).

(Sorry for the multiple edits, I bumped submit earlier while drafting this post and updated it. And I realized while writing this that I think this is a BCUR2 library and not a BCUR1 library which was causing some of my confusion).

@mflaxman mflaxman changed the title No test/example matches actual QR PSBTs generated/consumed by HWWs No BCURv1 test/example matches actual PSBT QRs generated/consumed by HWWs Nov 4, 2021
@mflaxman mflaxman changed the title No BCURv1 test/example matches actual PSBT QRs generated/consumed by HWWs BCUR v1 (legacy) support? Nov 5, 2021
@xardass
Copy link
Contributor

xardass commented Nov 8, 2021

We currently offer no backwards compatibility with v1, but I would expect this to become rather useful/necessary.

I'm glad that you proposed it, I will see if I can prioritize this.

@KayBeSee
Copy link
Contributor

I think the consensus is to move away from UR1 in favor of UR2. See discussion here: BlockchainCommons/Gordian-Developer-Community#26

That said, for backward compatibility with Cobo Vault I have two files here that should be compatible:

Encode: https://github.com/Lily-Technologies/lily-wallet/blob/c7d2141ab4887fdf9f3849afab59db2b4f9a0535/apps/frontend/src/pages/Send/Onchain/AddSignatureFromQrCode/DecodePsbtQrCode.tsx#L1

Decode: https://github.com/Lily-Technologies/lily-wallet/blob/c7d2141ab4887fdf9f3849afab59db2b4f9a0535/apps/frontend/src/pages/Send/Onchain/AddSignatureFromQrCode/PsbtQrCode.tsx

I have these pinned to the commit since I am updating those files in favor of UR2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants