From ec9425b3baacdfdd2d78b10b781c4de8d6c0763d Mon Sep 17 00:00:00 2001 From: Roland Bewick Date: Fri, 6 Dec 2024 16:18:15 +0700 Subject: [PATCH 1/3] feat: add state property to Nip47Transaction --- src/NWCClient.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/NWCClient.ts b/src/NWCClient.ts index 78788cf..5105e33 100644 --- a/src/NWCClient.ts +++ b/src/NWCClient.ts @@ -100,6 +100,7 @@ export type Nip47ListTransactionsResponse = { export type Nip47Transaction = { type: string; + state: "settled" | "pending" | "failed"; invoice: string; description: string; description_hash: string; From 026ae6a8eac2830d82dff60981cd1795e4d14f28 Mon Sep 17 00:00:00 2001 From: Roland Bewick Date: Sat, 7 Dec 2024 12:35:31 +0700 Subject: [PATCH 2/3] chore: add extra unpaid list transaction filters and comments about non-spec-compliant properties --- src/NWCClient.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/NWCClient.ts b/src/NWCClient.ts index 5105e33..700283d 100644 --- a/src/NWCClient.ts +++ b/src/NWCClient.ts @@ -91,6 +91,14 @@ export interface Nip47ListTransactionsRequest { limit?: number; offset?: number; unpaid?: boolean; + /** + * NOTE: non-NIP-47 spec compliant + */ + unpaid_outgoing?: boolean; + /** + * NOTE: non-NIP-47 spec compliant + */ + unpaid_incoming?: boolean; type?: "incoming" | "outgoing"; } @@ -100,6 +108,9 @@ export type Nip47ListTransactionsResponse = { export type Nip47Transaction = { type: string; + /** + * NOTE: non-NIP-47 spec compliant + */ state: "settled" | "pending" | "failed"; invoice: string; description: string; From 7a9a829de8ed9e31d74081ac7b1d4eb87d420355 Mon Sep 17 00:00:00 2001 From: Roland Bewick Date: Sat, 7 Dec 2024 12:35:55 +0700 Subject: [PATCH 3/3] chore: bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c828a8c..0b4ac98 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@getalby/sdk", - "version": "3.8.1", + "version": "3.8.2", "description": "The SDK to integrate with Nostr Wallet Connect and the Alby API", "repository": "https://github.com/getAlby/js-sdk.git", "bugs": "https://github.com/getAlby/js-sdk/issues",