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

LUD-21: LNURL-verify #264

Merged
merged 4 commits into from
Jun 6, 2024
Merged
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
55 changes: 55 additions & 0 deletions 21.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
LUD-21: `verify` base spec.
===============================

`author: reneaaron`

---

Allow `SERVICE`s to check whether an invoice has been paid by contacting the `LN SERVICE`.

A `SERVICE` can verify a payment was made without access to the user's node. Users can give their LNURL or [Lightning Address](https://lightningaddress.com) to a `SERVICE` and allow the `SERVICE` to create *and* verify invoices on their behalf.

This allows users to re-use existing wallets and `SERVICE`s to facilitate P2P payments without being an intermediary.

## LNURL-verify

An optional field `verify` is added to the `callback` response:

```diff
{
"status": "OK",
"routes": [],
"pr": "lnbc10...",
"verify": "https://example.com/verify/894e7f7e...",
}
```

The field `verify` provides an URL to a `SERVICE` to check if the invoice has been settled:

`https://example.com/verify/894e7f7e...`

Response
```json
{
"status": "OK",
"settled": true,
"preimage": "123456...",
"pr": "lnbc10..."
}
```

```json
{
"status": "OK",
"settled": false,
"preimage": null,
"pr": "lnbc10..."
}
```
or
```json
{
"status": "ERROR",
"reason": "Not found"
}
```
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ These are all the individual documents describing each small piece of protocol t
| [18][18] | Payer identity in `payRequest` protocol. | [Alby][alby], [BitBanana][bitbanana], [Blixt][blixt], [cliché][cliche], [OBW][obw], [ZBD Discord][zbd], [ZBD Telegram][zbd] |
| [19][19] | Pay link discoverable from withdraw link. | [Blixt][blixt], [CoinCorner][coincorner], [OBW][obw], [LNbits][lnbits] |
| [20][20] | Long payment description for pay protocol. | [Alby][alby], [BitBanana][bitbanana], [Blixt][blixt], [Clams][clams], [cliché][cliche], [Mash][mash], [OneKey][onekey], [Phoenix][phoenix] |
| [21][21] | `verify` LNURL-pay payments | [Alby][alby], [Mutiny][mutiny], [Stacker.News][stacker.news], [Zaprite][zaprite] |

[alby]: https://github.com/getAlby/lightning-browser-extension
[bipa]: https://bipa.app
Expand All @@ -49,6 +50,7 @@ These are all the individual documents describing each small piece of protocol t
[ltb]: https://ln.tips
[machankura]: https://8333.mobi
[mash]: https://mash.com/consumer-experience/
[mutiny]: https://www.mutinywallet.com
[muun]: https://muun.com
[OBW]: https://darthcoin.substack.com/p/obw-open-bitcoin-wallet
[OneKey]: https://onekey.so
Expand All @@ -66,6 +68,7 @@ These are all the individual documents describing each small piece of protocol t
[thunderhub]: https://www.thunderhub.io
[wos]: https://www.walletofsatoshi.com
[zap]: https://zaphq.io/
[zaprite]: https://zaprite.com
[zbd]: https://zebedee.io/wallet
[zeus]: https://zeusln.app

Expand Down Expand Up @@ -216,6 +219,7 @@ Tools for developers
[18]: 18.md
[19]: 19.md
[20]: 20.md
[21]: 21.md

Dependency Tree
---------------
Expand Down