Skip to content

nostr: synchronize nip47 fields with current spec#1021

Closed
daywalker90 wants to merge 1 commit into
rust-nostr:masterfrom
daywalker90:nip47-state
Closed

nostr: synchronize nip47 fields with current spec#1021
daywalker90 wants to merge 1 commit into
rust-nostr:masterfrom
daywalker90:nip47-state

Conversation

@daywalker90

Copy link
Copy Markdown
Contributor

Description

notably adding state field for transactions : nostr-protocol/nips#1933

Checklist

yukibtc pushed a commit 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>
@yukibtc

yukibtc commented Aug 4, 2025

Copy link
Copy Markdown
Member

Thanks, I've fixed the conflicts and merged at 4e8e015

@yukibtc yukibtc closed this Aug 4, 2025
@afilini

afilini commented Aug 14, 2025

Copy link
Copy Markdown

FYI: this breaks NWC with lnbits instances because they don't include a state field. It's probably a bug of theirs but I would suggest next time adding the fields as options so they don't completely break if the server is not compliant

@daywalker90

Copy link
Copy Markdown
Contributor Author

FYI: this breaks NWC with lnbits instances because they don't include a state field. It's probably a bug of theirs but I would suggest next time adding the fields as options so they don't completely break if the server is not compliant

Well the spec change made it non-optional so best to comment there nostr-protocol/nips#1933 imo

@afilini

afilini commented Aug 14, 2025

Copy link
Copy Markdown

Yes I understand you are just following the spec, I wanted to point out that not everybody upgrades the spec at the same time unfortunately

@yukibtc

yukibtc commented Aug 15, 2025

Copy link
Copy Markdown
Member

Checking again the NIP-47 spec, I think that doesn't really make sense to have the type, state and fees_paid fields in the MakeInvoiceResponse.

IMO those fields should be removed from the make_invoice response. In the other responses they make sense, but I'll probably update the state to be optional until everybody support it. I'm going to open a PR to revert some of these changes. I'll open also a PR in the nips repo to adj. the spec.

@afilini, thanks for raising this issue.

@yukibtc

yukibtc commented Aug 15, 2025

Copy link
Copy Markdown
Member

I've opened a PR here to update the code, and I'm waiting for a reply regarding the make_invoice response here.

@yukibtc

yukibtc commented Aug 18, 2025

Copy link
Copy Markdown
Member

@afilini, from commit 36cc4bb the issue should be fixed. I've removed type, state and fees_paid, as they don't make sense there, and made all other fields optional, apart for invoice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants