NIP-47: add state to transactions#1933
Merged
vitorpamplona merged 1 commit intoJul 31, 2025
Merged
Conversation
2386342 to
7b120de
Compare
Semisol
reviewed
Jun 7, 2025
7b120de to
3d31399
Compare
Contributor
|
@Semisol can this PR be merged? |
Collaborator
|
This sound's simple enough of a PR. |
3 tasks
yukibtc
pushed a commit
to rust-nostr/nostr
that referenced
this pull request
Aug 4, 2025
…ate field for transactions Notably adding state field for transactions: nostr-protocol/nips#1933 Pull-Request: #1021 Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
This was referenced Sep 1, 2025
Merged
pats2sats
pushed a commit
to sudonym-btc/accommodation-nip
that referenced
this pull request
May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds support for a new
statefield to the transaction object returned inmake_invoice,lookup_invoice, andlist_transactionsresponses. This allows clients to distinguish between pending, settled, and failed transactions in a consistent way.statecan bepending,settled, orfailedpayment_received,payment_sent) now explicitly include"state": "settled"(since we only send on successful send/receive) to be consistent with the transaction typeThis change is backward-compatible and aims to improve UX for clients fetching payments.
Implementation examples
Transaction lists can now show success, failed, and pending payments using this addition.
Alby Hub
Alby Go
@getalby/js-sdk
You can also test this by creating a connection in Alby Hub and fetching txs using this example.