From 80e9063b8cfccc3b646f0c3ce9b193fb75939dfa Mon Sep 17 00:00:00 2001 From: Dominic Date: Thu, 5 Oct 2023 22:15:12 +0200 Subject: [PATCH] Expose `hide_topup` (#674) --- src/lib.rs | 6 ++++++ src/lipalightninglib.udl | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 906133cc5..1f7c22c4a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -757,6 +757,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 6cc34e115..9e0e33e03 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.