> ## Documentation Index
> Fetch the complete documentation index at: https://lnurl.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# LUD-07: `hostedChannelRequest` base spec.

> Display inline code and code blocks

`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:

   ```Typescript theme={null}
   {
       "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

   ```JSON theme={null}
   {"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.
