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

Implement LSPS2: tracking issue #385

Open
2 of 7 tasks
JssDWt opened this issue Aug 7, 2023 · 0 comments
Open
2 of 7 tasks

Implement LSPS2: tracking issue #385

JssDWt opened this issue Aug 7, 2023 · 0 comments
Assignees

Comments

@JssDWt
Copy link
Contributor

JssDWt commented Aug 7, 2023

Tracking issue for implementation of the LSPS2 spec into Breez SDK. The corresponding tracking issue for lspd can be found here

Is issue is completed when the entire open channel flow in the SDK has been replaced by LSPS2.

Notes for implementation

  • Only support MPP+fixed-invoice mode for now.
  • Defer checking the extra_fee tlv.

Tasks

  • Implement LSPS0 rpc client
  • Implement LSPS2 rpc client
  • Function to check whether a LSP supports LSPS2 (lsps0.list_protocols + lsps2.get_versions)
  • Make lsp_list call lsps2.get_info. This will change the method signature, because fields are different. Perhaps this step is unnecessary if all the required fields can be represented by the Breez server.
  • Make get_lsp call lsps2.get_info
  • Create a create_invoice function in the lsps2 module, that follows the LSPS2 protocol. calls lsps2.buy, creates the smaller and larger invoice, puts the scid as hop hint in the invoice. The caller will have already determined it needs the inbound liquidity.
  • Add a function in the LSPS2 module to compute the opening fee for a given amount and fee params.

Notes for breaking changes to dependent projects after this issue is completed:

  • LSP information will have another signature
  • The fees charged in LSPS2 are calculated differently than the current LSP fees.
  • Also the fees will have millisatoshi precision
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant