Add proposal for currencies on payRequest#251
Conversation
6fceacf to
35ceb75
Compare
|
Nice :-D. As discussed on telegram, it would be great to align this with the existing LUD-21 proposal (and UMA) where possible. UMA actually already extended that proposal in a few of the ways you've done here:
A few super simple changes to make these more consistent:
Also a very minor spelling nit - convertable -> convertible. |
35ceb75 to
7b19a21
Compare
|
@jklein24 Some comments on your
I have no problems making this change, but would you explain to me why it's better? It feels to me like
Changed!
This is really interesting. Thinking about a little, how would you say the preference is BTC if BTC is not listed in the currencies? Moreover, maybe this could be achieved with a separate preferredCurrency field or something like that? I really like this idea, just thinking of the best way to achieve it.
I thought about that as well, but thought that maybe it could be an extension of the proposal, since the max/min already present kind of fulfills this role? What do you think? I'd love to hear what @ethanrose thinks as well.
Not very minor, cmon, I'd hate to merge a spelling mistake into this repo haha thanks! fixed |
7b19a21 to
56bbdd8
Compare
The order of currencies in the array dictates order of preferences between currencies. So if I prefer BRL, but can also get BTC, you'd have your currencies array contain BRL first and then BTC. You can check out the UMA protocol to see the full structure, but essentially it would look like: |
Would love @ethanrose's take on this too. Tbh I wasn't thinking it was better for some technical reason, but more just because so many entities are already live with the |
|
@jklein24 Maybe I am the one missing something! Let me try to explain. First exampleThe user inputs that it wants to send 1 BRL to the other side. If the This is the use-case supported by @ethanrose PR and it looks nicer having the multiplier in this case. Second exampleThe user inputs that it wants to send 500 sats as BRL to the other side. If the ConclusionIn the second case you use the multiplier as the denominator, which I think can be confusing this it's called "multiplier". Does these examples help in any way clear up the confusion? |
Thanks for the writeup - that makes things much more clear and concrete. I guess the thing is that in your two scenarios, you're asking 2 different questions:
To me, it makes sense that these different questions would require some different math. In fact for the first scenario, the easiest thing to do would just be to decode the invoice you get back in the |
408c732 to
801f196
Compare
801f196 to
2d37cec
Compare
f670c07 to
f70a0d6
Compare
|
@lsunsi noice! I wrote a similar interface ¹ to do the samething 😂 that I showed to @lorenzolfm |
Yeah my theory is that he is incepting us with his ideas at the same time! |
|
FYI this is now live in UMA v1 and VASPs are rolling it out. Xapo, Ripio, and Bitnob are upgraded and several more are on the way. |
This will help serve use cases like e-cash wallets, bolt-12 offers which allow for other currency denominations, and [LUD-21](lnurl/luds#251 wallet providers like UMA VASPs.
be2081c to
2446ff5
Compare
|
@lorenzolfm @jaonoctus Updated LUD to 22 |
|
👀 |
|
@dni 👀 |
|
any interest in this proposal left? :D should we roll it up again? |
|
@dni definitely! I even have a functional demo of receiving through it since back when hahaha. We should definitely roll it up, but one question, what does rolling it up mean? |
|
This is also now live with Bringin in Europe in addition to being used for UMA (Nubank, Bitso, Ripio, Coins, Xapo, Zerohash, etc.) and by Bipa as @lsunsi noted above. |
|
@jklein24 Bringin is actually pretty off-spec, right? Judging from https://api.bringin.xyz/.well-known/lnurlp/prashanth |
Good catch! I hadn't actually tested their implementation! Will flag to them on twitter :-) |
- Renumber spec from LUD-22 to LUD-23 (LUD-22 reserved for currency denomination PR lnurl#251) - Switch wallet callback from POST+JSON to GET with query params to match existing LUD conventions - Rename `metadata` field to `description` to avoid collision with LUD-06 - Update address validation regex to LUD-16 compliant character set ([a-z0-9\-_.+]) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Renumber spec from LUD-22 to LUD-23 (LUD-22 reserved for currency denomination PR lnurl#251) - Switch wallet callback from POST+JSON to GET with query params to match existing LUD conventions - Rename `metadata` field to `description` to avoid collision with LUD-06 - Update address validation regex to LUD-16 compliant character set ([a-z0-9\-_.+]) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Abstract
This PR proposes an extension to the payRequest specification to allow for denomination of amount in different currencies and negotiating a conversion to this currency. It aims to be backwards compatible while taking a further step on providing lightning wallets and services a common language about exchanges and remittances on foreign currencies.
The PR includes what I expect to be a detailed description with some examples of the proposed extension. It also includes some references to related works that can be competing or complementary proposals to this one. This proposal is inspired by those references.
Implementations
I've been discussing this proposal inside @bipa-app currently and I aim to implement the most recent version of it and testing with partners before merging this PR.
EDIT:
Current proposal implemented at
lsunsi@bipa.appif anyone wants to check it out.