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 lnurl #384

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions value/value.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ and will be added to the list as they see some measure of adoption, or at least
The `method` attribute is used to indicate a sub-protocol to use within the given `type`. Again, returning to
Lightning as an example, the `method` would be "keysend". Normally, a Lightning payment requires an invoice
to be generated by the payee in order to fulfill a transaction. The "keysend" protocol of Lightning allows payments
to be streamed to what is, essentially, an open invoice. Other cryptocurrencies may have a similar protocol that
would be used here. If not, a value of "default" should be given.
to be streamed to what is, essentially, an open invoice. The "lnurl" protocol has similar properties.
Other cryptocurrencies may have a similar protocol that would be used here. If not, a value of "default" should be given.

The "suggested" amount is just that. It's a suggestion, and must be changeable by the user to another value, or
to zero. The suggested amount depends on the payment protocol being used. For instance, with Lightning on the Bitcoin network, the amount can be as low as one millisatoshi, expressed as `0.00000000001` BTC.
Expand Down Expand Up @@ -374,6 +374,30 @@ payment `method` to `amp`:
</channel>
```

##### Example: LNURL and Lightning address
LNURL is a web protocol for Lightning wallets to communicate with Lightning services. To send to a LNURL-pay code ([LUD-06](https://github.com/fiatjaf/lnurl-rfc/blob/luds/06.md)) or a Lightning addresses ([LUD-16](https://github.com/fiatjaf/lnurl-rfc/blob/luds/16.md)), use the `method="lnurl"` and `type="lnurl"` . LNURL-pay codes are decoded [LUD-01](https://github.com/fiatjaf/lnurl-rfc/blob/luds/01.md) and Lightning addresses are parsed by the sender's wallet software. LNURL-pay allows the sender to attach a [comment](https://github.com/fiatjaf/lnurl-rfc/blob/luds/12.md) for the receiver with each paid invoice. If the listener's wallet chooses to attach payer identity data ([LUD-18]([LUD-18](https://github.com/fiatjaf/lnurl-rfc/blob/luds/18.md))), the receiver's wallet can choose to display this to them.

The first `<podcast:valueRecipient>` is an example of a LNURL-pay code, the second one is a Lightning address.
```xml
...
<channel>
<podcast:value type="lightning" method="lnurl" suggested="0.00000015000">
<podcast:valueRecipient
name="Welsh Podcaster"
type="lnurl"
address="lnurl1dp68gurn8ghj7amhwuh8jmm4w36kyefwvdhk6tmhv96xx6plwc7kg5thx3mnj4m8tp34zgn5ulc"
split="50"
/>
<podcast:valueRecipient
name="Donation to grassroots project"
type="lnurl"
address="bitcoinekasi@ln.tips"
split="50"
/>
</podcast:value>
</channel>
```

##### Example: `<Item>` Override

To set up different payment splits for individual episodes, a value block has to
Expand Down
3 changes: 2 additions & 1 deletion value/valueslugs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ lightning
keysend
amp
wallet
node
node
lnurl