breez-sdk
breez-sdk copied to clipboard
Implement LSPS1
- [ ] create an LSPS1 client in an LSPS1 module
- [ ] create a
order_channel_info
function in BreezServices that is similar tolsps1.info
- [ ] create a
order_channel
function inBreezServices
that is similar to LSPS1.create_order, with sane defaults. It returns an object with an invoice+onchain address to pay, the fees and channel information. Persist the order for future reference. - [ ] create a
get_channel_order_info
function in BreezServices that returns info about the channel order. Either from disk or from the lsp. - [ ] Potentially monitor the onchain payment address in case of a dispute.
Above methods should all work with a state machine for LSPS1 channels that provides guidance on whether an action is legal or not.
Optionally LDK can be used as a dependency: https://github.com/lightningdevkit/ldk-lsp-client/pull/8
A potentially problematic moment is the moment the user paid for the channel open, but the user is not online when the LSP tries to open the channel.