Uh oh!
There was an error while loading. Please reload this page.
Add LSPS1 client-side integration - #418
Merged
Merged
Conversation
tnull
marked this pull request as draft
December 4, 2024 14:49
tnullforce-pushed
the
2024-07-lsps1-integration
branch
from
December 4, 2024 14:55
a160bf2 to
d0eb977Comparetnullforce-pushed
the
2024-07-lsps1-integration
branch
from
December 10, 2024 13:37
d0eb977 to
fe59fedComparetnullforce-pushed
the
2024-07-lsps1-integration
branch
2 times, most recently
from
January 10, 2025 12:09
82fc329 to
9d47470Comparetnullforce-pushed
the
2024-07-lsps1-integration
branch
from
January 16, 2025 09:33
9d47470 to
5e13aa5Comparetnull
marked this pull request as ready for review
January 16, 2025 09:33
tnullforce-pushed
the
2024-07-lsps1-integration
branch
from
January 17, 2025 08:47
5e13aa5 to
2780049Comparetnull
commented
Jan 17, 2025
CollaboratorAuthor
Rebased on main after #426 landed. |
tnullforce-pushed
the
2024-07-lsps1-integration
branch
2 times, most recently
from
January 30, 2025 13:19
115f732 to
a2593aeComparetnull
commented
Jan 30, 2025
CollaboratorAuthor
Rebased on main to resolve minor changes. |
tnullforce-pushed
the
2024-07-lsps1-integration
branch
2 times, most recently
from
January 30, 2025 13:41
1d68d58 to
e3725b4Comparejkczyz
reviewed
Jan 31, 2025
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
.. 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.
tnullforce-pushed
the
2024-07-lsps1-integration
branch
4 times, most recently
from
February 1, 2025 09:09
9cec3f4 to
0e590baCompareWe 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.
tnullforce-pushed
the
2024-07-lsps1-integration
branch
from
February 6, 2025 09:55
0e590ba to
b1a277cComparetnull
commented
Feb 6, 2025
CollaboratorAuthor
Now went ahead and squashed fixups, including the doc changes: > git diff-tree -U2 0e590ba9 b1a277c6diff --git a/src/liquidity.rs b/src/liquidity.rs
index 7414260c..cbc19954 100644
--- a/src/liquidity.rs+++ b/src/liquidity.rs@@ -224,9 +224,9 @@ where
match sender.send(response) {
Ok(()) => (),
- Err(e) => {+ Err(_) => {
log_error!(
self.logger,
- "Failed to handle response from liquidity service: {:?}",- e+ "Failed to handle response for request {:?} from liquidity service",+ request_id
);
},
@@ -285,9 +285,9 @@ where
match sender.send(response) {
Ok(()) => (),
- Err(e) => {+ Err(_) => {
log_error!(
self.logger,
- "Failed to handle response from liquidity service: {:?}",- e+ "Failed to handle response for request {:?} from liquidity service",+ request_id
);
},
@@ -343,9 +343,9 @@ where
match sender.send(response) {
Ok(()) => (),
- Err(e) => {+ Err(_) => {
log_error!(
self.logger,
- "Failed to handle response from liquidity service: {:?}",- e+ "Failed to handle response for request {:?} from liquidity service",+ request_id
);
},
@@ -390,9 +390,9 @@ where
match sender.send(response) {
Ok(()) => (),
- Err(e) => {+ Err(_) => {
log_error!(
self.logger,
- "Failed to handle response from liquidity service: {:?}",- e+ "Failed to handle response for request {:?} from liquidity service",+ request_id
);
},
@@ -442,9 +442,9 @@ where
match sender.send(response) {
Ok(()) => (),
- Err(e) => {+ Err(_) => {
log_error!(
self.logger,
- "Failed to handle response from liquidity service: {:?}",- e+ "Failed to handle response for request {:?} from liquidity service",+ request_id
);
},
@@ -964,6 +964,11 @@ pub(crate) struct LSPS2BuyResponse {
/// Should be retrieved by calling [`Node::lsps1_liquidity`].
///
+/// To open [bLIP-52 / LSPS2] JIT channels, please refer to+/// [`Bolt11Payment::receive_via_jit_channel`].+///
/// [bLIP-51 / LSPS1]: https://github.com/lightning/blips/blob/master/blip-0051.md
+/// [bLIP-52 / LSPS2]: https://github.com/lightning/blips/blob/master/blip-0052.md
/// [`Node::lsps1_liquidity`]: crate::Node::lsps1_liquidity
+/// [`Bolt11Payment::receive_via_jit_channel`]: crate::payment::Bolt11Payment::receive_via_jit_channel
#[derive(Clone)]
pub struct LSPS1Liquidity { |
jkczyz
approved these changes
Feb 6, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We add the capability to act as an LSPS1 / bLIP-51 client.