From ca2772e68c991eaf26507a84a9bb1681cb7c1d88 Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz <4012752+erdemyerebasmaz@users.noreply.github.com> Date: Fri, 10 Nov 2023 16:31:11 +0300 Subject: [PATCH] Add registerWebhook API to sdk-flutter --- libs/sdk-flutter/lib/breez_sdk.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libs/sdk-flutter/lib/breez_sdk.dart b/libs/sdk-flutter/lib/breez_sdk.dart index 754672edf..20e542129 100644 --- a/libs/sdk-flutter/lib/breez_sdk.dart +++ b/libs/sdk-flutter/lib/breez_sdk.dart @@ -66,6 +66,13 @@ class BreezSDK { Stream get nodeStateStream => nodeStateController.stream; + /// Register for webhook callbacks at the given `webhook_url` whenever a new payment is received. + /// + /// More webhook types may be supported in the future. + Future registerWebhook({required String webhookUrl}) async { + return _lnToolkit.registerWebhook(webhookUrl: webhookUrl); + } + /// connect initializes the global NodeService, schedule the node to run in the cloud and /// run the signer. This must be called in order to start communicate with the node ///