Skip to content
Merged
Changes from 3 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
14 changes: 13 additions & 1 deletion 57.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Having lightning receipts on nostr allows clients to display lightning payments

### Client side

1. Calculate the lnurl pay request url for a user from the lud06 or lud16 field on their profile
1. Calculate the lnurl pay request url for a user from the `zap` tag on the event being zapped, or alternatively the lud06 or lud16 field on their profile.

2. Fetch the lnurl pay request static endpoint (`https://host.com/.well-known/lnurlp/user`) and gather the `allowsNostr` and `nostrPubkey` fields. If `allowsNostr` exists and it is `true`, and if `nostrPubkey` exists and is a valid BIP 340 public key in hex, associate this information with the user. The `nostrPubkey` is the `zapper`'s pubkey, and it is used to authorize zaps sent to that user.

Expand All @@ -34,6 +34,18 @@ Having lightning receipts on nostr allows clients to display lightning payments

5. Pay this invoice or pass it to an app that can pay the invoice. Once it's paid, a `zap note` will be created by the `zapper`.

### `zap` tag on zapped event

When an event includes a `zap` tag, clients SHOULD calculate the lnurl pay request based on it's value instead of the profile's field. An optional third argument on the tag specifies the type of value, either `lud06` or `lud16`.

```json
{
"tags": [
[ "zap", "[email protected]", "lud16" ]
]
}
```

### LNURL Server side

The lnurl server will need some additional pieces of information so that clients can know that zap invoices are supported:
Expand Down