-
Notifications
You must be signed in to change notification settings - Fork 3
Implement parsing & resolving lnurls #2
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh, found some comments I had still pending :(
@@ -944,6 +947,38 @@ impl PaymentInstructions { | |||
)) | |||
}, | |||
} | |||
} else if let Some((_, data)) = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this supposed to support decoding any part of the string that contains lnurl*
rather than only if the full string is lnurl*
? I saw a checkout not long ago that used a QR code to display, eg https://a.website/to-visit?lnurl=lnurlasdfwerqwer
so that users who just scan the QR code go to their website but if a wallet scans it it will resolve the lnurl.
@@ -111,10 +111,14 @@ pub trait HrnResolver { | |||
/// can be further parsed as payment instructions. | |||
fn resolve_hrn<'a>(&'a self, hrn: &'a HumanReadableName) -> HrnResolutionFuture<'a>; | |||
|
|||
/// Resolves the given Lnurl into a [`HrnResolution`] containing a result which |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An Lnurl
isn't a well-defined thing, I believe? This needs to specify what, exactly, the url
parameter is (a URL for an LNURL endpoint, and not the encoded LNURL...... strings).
@@ -111,10 +111,14 @@ pub trait HrnResolver { | |||
/// can be further parsed as payment instructions. | |||
fn resolve_hrn<'a>(&'a self, hrn: &'a HumanReadableName) -> HrnResolutionFuture<'a>; | |||
|
|||
/// Resolves the given Lnurl into a [`HrnResolution`] containing a result which | |||
/// can be further parsed as payment instructions. | |||
fn resolve_lnurl<'a>(&'a self, url: &'a str) -> HrnResolutionFuture<'a>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we rename the trait now that its resolving more than HRNs? I think I'm fine with no, because we really want this to be about HRNs, we just happen to support LNURL too, but still.
No description provided.