feat(mint): align NUT-04 with amount_paid/issued + updated_at#1044
Merged
a1denvalu3 merged 6 commits intoJun 26, 2026
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1044 +/- ##
==========================================
+ Coverage 74.79% 75.32% +0.52%
==========================================
Files 111 111
Lines 12413 12496 +83
==========================================
+ Hits 9284 9412 +128
+ Misses 3129 3084 -45 ☔ View full report in Codecov by Harness. |
61e1f1f to
956fd84
Compare
…er, align test mock
956fd84 to
67e3282
Compare
callebtc
approved these changes
Jun 26, 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.
This PR aligns the nutshell codebase with the Cashu specification change in cashubtc/nuts PR #377 (Align NUT-04 mint quote accounting with amount_paid / amount_issued).
Changes:
amount_paid,amount_issued, andupdated_atproperties toMintQuote(withamount_paidremaining0when state isPENDINGper requirements).amount_paid,amount_issued, andupdated_atfields toPostMintQuoteResponse(making themOptionalto maintain backward compatibility with older mints).from_resp_walletto prioritize usingamount_paid/amount_issuedoverstatewhen present, handling monotonic checks (updated_atand non-decreasing amounts) for stale responses.