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

Closed
tnull opened this issue Nov 1, 2023 · 7 comments
Closed

Add helpers for BIP21/Unified QR Support #182

tnull opened this issue Nov 1, 2023 · 7 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

@danielnordh
Copy link

I can see support has been merged in Rust, but can't seem to find it in Swift, 0.3.0.
Is it waiting to be exposed in the bindings?

@tnull
Copy link
Collaborator Author

tnull commented Oct 7, 2024

I can see support has been merged in Rust, but can't seem to find it in Swift, 0.3.0. Is it waiting to be exposed in the bindings?

As explained elsewhere, this was indeed addressed in #302 and will be part of the next release.

@tnull tnull closed this as completed Oct 7, 2024
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

5 participants