author: akumaigorodski
Incoming payment channel request
Suppose user has a balance on a certain service which he wishes to turn into an incoming channel and service supports such functionality. This would require many parameters, so the resulting QR may be overly dense and cause scanning issues. Additionally, the user has must ensure that a connection to target LN node is established before an incoming channel is requested.Wallet to service interaction flow:
-
User scans a LNURL QR code or accesses an
lightning:LNURL..link withLN WALLETandLN WALLETdecodes LNURL. -
LN WALLETmakes a GET request toLN SERVICEusing the decoded LNURL. -
LN WALLETgets JSON response fromLN SERVICEof form:or -
LN WALLETopens a connection to the target node usingurifield. -
LN WALLETissues a GET request toLN SERVICEusing<callback><?/&>k1=<k1>&remoteid=<Local LN node ID>&private=<1/0>if user decides to proceed or<callback><?/&>k1=<k1>&remoteid=<Local LN node ID>&cancel=1if user decides to cancel a channel midway. -
LN SERVICEsends a{"status": "OK"}or{"status": "ERROR", "reason": "error details..."}JSON response. -
LN WALLETawaits for incomingOpenChannelmessage from the target node, which would initiate a channel opening.