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

Add LSPS2 service-side support #420

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

tnull
Copy link
Collaborator

@tnull tnull commented Dec 10, 2024

Based on #418.

WIP

@tnull tnull marked this pull request as draft December 10, 2024 13:33
@tnull tnull force-pushed the 2024-12-add-lsps2-service-support branch 2 times, most recently from 1cca737 to cd2795d Compare December 10, 2024 15:17
tnull added 13 commits January 16, 2025 09:43
Previously, we decided to continue parsing any fields if we failed to
parse a known (i.e., `lightning` or `lno`) parameter failed to parse.
This however just hides the error and is a bit anti-idiomatic even
though allowing to use *some* URI fields even in the face of
incompatible formats for others.

Here we therefore opt to fail parsing the URI if any field fails.
.. to align with the rest of the APIs where we usually go `node_id`,
`address`, etc.
We add support for LSPS1 liquidity sources. To this end we slightly
refactor our logic to first create a `LiquiditySourceBuilder` that then
can be used to `build()` the `LiquiditySource` with the configured
services.
We add the logic required to send `create_order` requests and check on
their status.
We add an `Lsps1Liquidity` API object, mirroring the approach we took
with the `payment` APIs.
Previously, we named internal fields/APIs `lspsX_service` as us being
the client was implied. Since we're about to also add service-side
functionalities, such naming would start to get confusing. We hence
rename them to follow a `lspsX_client` scheme, and will add the
service-side APIs using the `service` terminology.
.. and while we're at it we move the VSS child key indexes to constants.
We add the capability to configure LSPS2 service mode in `Builder` and
`LiquiditySourceBuilder`.
.. and forward it to our `LiquditySource`.
.. to align with other event handling variants: First log, then act,
then emit event if everything went okay.
.. so far with dummy values, we'll have to discuss how the API should
look like.
@tnull tnull force-pushed the 2024-12-add-lsps2-service-support branch from cd2795d to dfdef1d Compare January 16, 2025 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant