From 070c42669120bedaa466271b3e3d8279dfa7e0f3 Mon Sep 17 00:00:00 2001 From: im-adithya Date: Wed, 12 Jun 2024 19:33:26 +0530 Subject: [PATCH] chore: add payment_sent notification --- src/NWCClient.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/NWCClient.ts b/src/NWCClient.ts index dea38bf..278ce1e 100644 --- a/src/NWCClient.ts +++ b/src/NWCClient.ts @@ -103,10 +103,15 @@ export type Nip47Transaction = { export type Nip47NotificationType = Nip47Notification["notification_type"]; -export type Nip47Notification = { - notification_type: "payment_received"; - notification: Nip47Transaction; -}; /* | { notification_type: "other_type", notification: OtherTypeHere } */ +export type Nip47Notification = + | { + notification_type: "payment_received"; + notification: Nip47Transaction; + } + | { + notification_type: "payment_sent"; + notification: Nip47Transaction; + }; export type Nip47PayInvoiceRequest = { invoice: string;