test(crypto): refresh amended mint-quote vector to a uuid-v7 quote id - #873
Open
robwoodgate wants to merge 1 commit into
Open
test(crypto): refresh amended mint-quote vector to a uuid-v7 quote id#873robwoodgate wants to merge 1 commit into
robwoodgate wants to merge 1 commit into
Conversation
The canonical NUT-29 batch-mint signature vector in nuts/tests/29-tests.md now uses a realistic uuid-v7 quote id instead of the 'locked-quote' placeholder. Update the mirrored vector (quote id, msg_to_sign, msg_hash, signature) to match, and hoist the quote id to a const.
3 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #873 +/- ##
==========================================
+ Coverage 95.61% 95.63% +0.01%
==========================================
Files 55 55
Lines 5544 5544
Branches 1383 1383
==========================================
+ Hits 5301 5302 +1
Misses 107 107
+ Partials 136 135 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
callebtc
pushed a commit
to cashubtc/nutshell
that referenced
this pull request
Jul 28, 2026
Aligns the NUT-29 batch-mint signature test vector with the canonical values regenerated upstream, replacing the "locked-quote" placeholder with a realistic UUIDv7 quote id. Test-only change: the msg_to_sign encoding, hash and signature all follow from the quote-id length prefix going from 12 to 36 bytes. cashu/core/nuts/nut20.py already produces the new preimage byte for byte, so no production code changes are required. Matches: - cashubtc/nuts#401 - cashubtc/cdk#2240 - cashubtc/cashu-ts#873
61 tasks
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.
NUT
The canonical NUT-29 batch-mint signature vector in
nuts/tests/29-tests.mdwas updated to use a realistic uuid-v7 quote id (019e6d5a-...) in place of thelocked-quoteplaceholder, with a correspondingly newmsg_to_sign,msg_hash, andsignature.This updates the mirrored vector in
NUT20.test.ts(the amended-message block, shared by NUT-20 single and NUT-29 batch minting) to match, and hoists the quote id to aconstso the calls stay on one line. The signing construction is unchanged: I confirmed CTS already verifies the new signature and that the vector is internally consistent (msg_to_signhashes tomsg_hash) before pinning it.Test-only;
npm run prtasksgreen.