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

Add helpers for BIP21/Unified QR Support #182

Open
tnull opened this issue Nov 1, 2023 · 5 comments
Open

Add helpers for BIP21/Unified QR Support #182

tnull opened this issue Nov 1, 2023 · 5 comments

Comments

@tnull
Copy link
Collaborator

tnull commented Nov 1, 2023

While we probably shouldn't add dependencies for generating the actual QR codes, we should add helper methods that make it trivial to generate and parse the raw BIP21 data so that integration with any (native) QR code scanning/generation logic can easily be integrated.

Also see:
https://bitcoinqr.dev/
https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki

@bennyhodl
Copy link

What is the best way to go about this? Should this be a trait for onchain addresses and lightning invoice structs to implement?

As well as an impl function in Node to create a BIP21 invoice?

@tnull
Copy link
Collaborator Author

tnull commented Nov 10, 2023

What is the best way to go about this? Should this be a trait for onchain addresses and lightning invoice structs to implement?

I'm not quite sure why you think this would require an extra trait?

As well as an impl function in Node to create a BIP21 invoice?

Yes I think it would mainly be a util method (probably not even on Node itself) that would take an invoice and an onchain address and spit out a bytes array/hex string that you'd only need to give to a QR code library.

We might want to use https://github.com/Kixunil/bip21 for this. However, I'm just now seeing that they upgraded to rust-bitcoin 0.30, which we can't do yet until lightningdevkit/rust-lightning#2124 lands upstream. So I'm afraid this is currently blocked on this :/

@jbesraa
Copy link
Contributor

jbesraa commented Dec 13, 2023

I understand the reasoning behind not adding a new dep for this, but it would be nice to actually have some standard around different projects. at payjoin we are using https://github.com/Kixunil/bip21 and planning to maintain it

@tnull
Copy link
Collaborator Author

tnull commented Dec 13, 2023

I understand the reasoning behind not adding a new dep for this, but it would be nice to actually have some standard around different projects. at payjoin we are using https://github.com/Kixunil/bip21 and planning to maintain it

No, I wasn't saying we don't want to add the dependency. Rather, we can't currently as we still run an incompatible version of rust-bitcoin. This will be unblocked by #214.

@DanGould
Copy link

Seems like this has been unblocked

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

No branches or pull requests

4 participants