From 43d5f5f173ab8a764ed8e7882847f7792a9b96c4 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Thu, 11 Jan 2024 12:02:13 +0100 Subject: [PATCH] WIP Allow for variable amount payments .. or maybe not --- src/lib.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index d08b275e8..3cb7ae890 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1606,6 +1606,28 @@ impl Node { ) } + ///// Returns a payable invoice that can be used to request a variable amount payment (also known + ///// as "zero-amount" invoice) and receive it via a newly created just-in-time (JIT) channel. + ///// + ///// When the returned invoice is paid, the configured [LSPS2]-compliant LSP will open a channel + ///// to us, supplying just-in-time inbound liquidity. + ///// + ///// + ///// If set, `max_lsp_fee_limit_msat` will limit how much fee we allow the LSP to take for opening the + ///// channel to us. We'll use its cheapest offer otherwise. + ///// + ///// [LSPS2]: https://github.com/BitcoinAndLightningLayerSpecs/lsp/blob/main/LSPS2/README.md + //pub fn receive_variable_amount_payment_via_jit_channel( + // &self, description: &str, expiry_secs: u32, max_lsp_fee_limit_msat: Option, + //) -> Result { + // self.receive_payment_via_jit_channel_inner( + // None, + // description, + // expiry_secs, + // max_lsp_fee_limit_msat, + // ) + //} + fn receive_payment_via_jit_channel_inner( &self, amount_msat: Option, description: &str, expiry_secs: u32, max_lsp_fee_limit_msat: Option,