From 425da7c8a6e45486a80f9ba01ddf1ba0e290899e Mon Sep 17 00:00:00 2001 From: Andrei <92177534+andrei-21@users.noreply.github.com> Date: Fri, 6 Oct 2023 11:49:36 +0100 Subject: [PATCH] Expose `hide_topup` (#680) Co-authored-by: Dominic Leutenegger --- src/lib.rs | 6 ++++++ src/lipalightninglib.udl | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index d3a86a4b..affce956 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -755,6 +755,12 @@ impl LightningNode { Ok(topup_info) } + pub fn hide_topup(&self, id: String) -> Result<()> { + self.offer_manager + .hide_topup(id) + .map_runtime_error_to(RuntimeErrorCode::OfferServiceUnavailable) + } + pub fn query_uncompleted_offers(&self) -> Result> { let topup_infos = self .offer_manager diff --git a/src/lipalightninglib.udl b/src/lipalightninglib.udl index 6cc34e11..9e0e33e0 100644 --- a/src/lipalightninglib.udl +++ b/src/lipalightninglib.udl @@ -175,6 +175,10 @@ interface LightningNode { [Throws=LnError] string sweep(string address, u32 onchain_fee); + // Hides the topup with the given id. + [Throws=LnError] + void hide_topup(string id); + // Prints additional debug information to the logs. // // Throws an error in case that the necessary information can't be received.