-
Notifications
You must be signed in to change notification settings - Fork 116
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
First stab at changes to add lnaddress #433
base: main
Are you sure you want to change the base?
First stab at changes to add lnaddress #433
Conversation
Signed-off-by: Brian of London (Dot) <[email protected]>
|
Ok.
I seem to remember route hints being in the spec but can't find any reference to them in the current version. I don't think I've ever seen them in the wild and I must admit that my Node had some unadvertised channels but I stopped using those a while back. |
Signed-off-by: Brian of London (Dot) <[email protected]>
I just added the details for a bare endpoint response to signify a server which is acting as a lookup for Keysend. |
This looks great! Should we also have a custom error returned when the Lightning address does not exist, but the provider still supports keysend? This would eliminate the need of making an additional request to @MerryOscar suggested having something like Personally, I think HTTP status 404 with JSON field |
I actually send out a 422 if the name isn't a valid Hive account name. I do not, however, check if the account has been created on Hive (that's a somewhat slow lookup) You can see this here:
|
I'm just thinking how to make the spec precise, yet not too difficult to implement. @brianoflondon, summarizing what you wrote and adding some more info, would the following work?
A few other comments:
|
The status and message field comes from FastAPI which is what I'm using, that's it's default behaviour for 422 and this happens outside of any code I write. I'll try to take your suggestion and put it in this proposal soon. |
Got it! Well, then maybe this could be simplified by simply having a 404 with an optional |
Signed-off-by: Brian of London (Dot) <[email protected]>
That's a part of FastAPI which I'm sure could be altered but I'm not going to try :-) The way FastAPI generates the docs and handles all the input sanitization is somewhere close to miraculous to my eyes! |
Are you talking about something like this @brianoflondon ? |
This is what I meant: I've never seen anyone put routing hints in a value block. I can't find any explanation of what these look like in the current spec though I seem to remember they were once in the spec.
|
The routing hints are the customKey/customValue properties. |
Maybe that's what you meant in the spec but "routing hints" has a special meaning in Bolt 11 Invoices and concerns nodes connected to the rest of the network by purely private or un-announced channels. When I started up my V4VApp Voltage node I used private channels and soon realised that in order for funds to get to me the invoices my node generated were huge and the QR codes very detailed. That was because, if you decoded them, you got a list of public node addresses for nodes that I had private channels to. Those were the route hints. The simple reality is that using a node only connected by these private channels for receiving keysend is not very practical. Also Keysend payments would only come in on public channels.
|
I agree with Brian. Name needs to be different from routingHints. Can be almost anything but that to avoid confusion |
I think the current version assumes that the domain name and web server will be accessible. What happens if one or both of those are temporarily or permanently inaccessible/unresolvable? Should it hard fail the split as if the server returned a 404/NOT_FOUND? Should it have a "temporarily inaccessible - retry later" mode? How should applications handle lnaddress lookup failures? Should unresolvable splits be skipped over or should the entire payment fail with a message to the user? |
Splits fail, clients just need to handle this regardless of the reason. Usually apps just fail a specific split. |
Signed-off-by: Brian of London (Dot) [email protected]
I moved the Lightning block info out of the main Value.md because they're separate. Lightning is A value block system not THE value block system.
This is a follow up to pull request #384 about lnurl.