Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 1.14 KB

07.md

File metadata and controls

31 lines (24 loc) · 1.14 KB

LUD-07: hostedChannelRequest base spec.

author: akumaigorodski


Hosted channel request

Wallet to service interaction flow:

  1. User scans a LNURL QR code or accesses an lightning:LNURL.. link with LN WALLET and LN WALLET decodes LNURL.

  2. LN WALLET makes a GET request to LN SERVICE using the decoded LNURL.

  3. LN WALLET gets JSON response from LN SERVICE of form:

    {
        "uri": string, // Remote node address of form node_key@ip_address:port_number
        "k1": string, // a second-level hex encoded secret byte array to be used by wallet in `InvokeHostedChannel` message, may be random if Host has no use for it
        "alias": string, // Optional remote node alias
        "tag": "hostedChannelRequest" // type of LNURL
    }

    or

    {"status": "ERROR", "reason": "error details..."}
  4. LN WALLET opens a connection to the target node using uri field.

  5. Once connected, LN WALLET sends an InvokeHostedChannel message to the target node using k1 converted to byte array.

  6. The rest is handled by hosted channel protocol.