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 an optional wallet query param to indicate to the LN_SERVICE which wallet was used to authenticate #175

Open
wants to merge 1 commit into
base: luds
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion 04.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Later, once `LN SERVICE` receives a call at the specified `LNURL-auth` handler,
- `k1` (hex encoded 32 bytes of challenge) which is going to be signed by user's `linkingPrivKey`.
- optional `action` enum which can be one of four strings: `register | login | link | auth`.
2. `LN WALLET` displays a "Login" dialog which must include a domain name extracted from `LNURL` query string and `action` enum translated into human readable text if `action` query parameter was present.
3. Once accepted by user, `LN WALLET` signs `k1` on `secp256k1` using `linkingPrivKey` and DER-encodes the signature. `LN WALLET` Then issues a GET to `LN SERVICE` using `<LNURL_hostname_and_path>?<LNURL_existing_query_parameters>&sig=<hex(sign(hexToBytes(k1), linkingPrivKey))>&key=<hex(linkingKey)>`
3. Once accepted by user, `LN WALLET` signs `k1` on `secp256k1` using `linkingPrivKey` and DER-encodes the signature. `LN WALLET` Then issues a GET to `LN SERVICE` using `<LNURL_hostname_and_path>?<LNURL_existing_query_parameters>&sig=<hex(sign(hexToBytes(k1), linkingPrivKey))>&key=<hex(linkingKey)>`. Optionally, `LN_WALLET` can append `&wallet=<LN_WALLET>` to inform `LN_SERVICE` of the wallet used to authenticate. This may be used by `LN_SERVICE` to show the user which wallets they have connected to it.
4. `LN SERVICE` responds with the following JSON once client signature is verified:
```JSON
{"status": "OK"}
Expand Down