LUD-16: Paying to static internet identifiers. ============================================== `author: akumaigorodski` `author: andreneves` `author: fiatjaf` `discussion: https://t.me/lnurl/11610` --- ## Paying to [internet identifiers](https://datatracker.ietf.org/doc/html/rfc5322#section-3.4.1) (email-like addresses) The idea here is that a `SERVICE` can offer human-readable addresses for users or specific internal endpoints that use the format `@`, e.g. satoshi@bitcoin.org. A user can then type these on a `WALLET`. The `` is limited to `a-z0-9-_.` (and `+` if the `SERVICE` supports tags). Please note that this is way more strict than common email addresses as it allows fewer symbols and only lowercase characters. Upon seeing such an address, `WALLET` makes a GET request to `https:///.well-known/lnurlp/` endpoint if `domain` is clearnet or `http:///.well-known/lnurlp/` if `domain` is onion. For example, if the address is `satoshi@bitcoin.org`, the request is to be made to `https://bitcoin.org/.well-known/lnurlp/satoshi`. The response from `SERVICE` then MUST be the same as in [LUD-06](06.md), step 3, and the flow is the same. ### Default identifier A `SERVICE` MAY offer a default internet identifier for a domain by using `_` as the ``. Upon seeing an address in the format `@`, a `WALLET` MAY treat it as shorthand for `_@` and make a GET request to the `https:///.well-known/lnurlp/_` endpoint if `domain` is clearnet or `http:///.well-known/lnurlp/_` if `domain` is onion. For example, if the address is `@bitcoin.org`, the request is to be made to `https://bitcoin.org/.well-known/lnurlp/_`. This shorthand is optional. A `WALLET` that does not implement it MAY reject `@` as an invalid internet identifier, and a `SERVICE` that does not offer a default identifier MAY return an error or 404 for `/.well-known/lnurlp/_`. Existing `@` identifiers MUST continue to resolve as specified above. If a `SERVICE` returns metadata for a default identifier, it SHOULD use `_@` as the canonical `text/identifier` value. If providing such a scheme, `SERVICE` MUST add to the `metadata` JSON array either a `text/email` entry or a `text/identifier` entry, as in examples below: ``` [ "text/identifier", // indication that this payment link is associated with an internet identifier string content // an internet identifier string in standard user@site.com format ] ``` or ``` [ "text/email", // indication that this payment link is associated with an email address content // an email string in standard user@site.com format ] ``` The `text/email` entry MUST be used if the internet identifier corresponds to an actual email address. ### Tags A `SERVICE` can offer multiple identifiers resolving to the same user by using the format `+@`. Upon seeing such an address, `WALLET` makes a GET request to `https:///.well-known/lnurlp/+` endpoint. A `SERVICE` SHOULD strip the `+` part and continue as normal and MAY add a `text/tag` entry to the `metadata` JSON array: ``` [ "text/tag", // optional content // the `` that has been passed in `+` ] ```