Skip to content

test(crypto): refresh amended mint-quote vector to a uuid-v7 quote id - #873

Open
robwoodgate wants to merge 1 commit into
mainfrom
test/nut29-uuid-vector
Open

test(crypto): refresh amended mint-quote vector to a uuid-v7 quote id#873
robwoodgate wants to merge 1 commit into
mainfrom
test/nut29-uuid-vector

Conversation

@robwoodgate

@robwoodgate robwoodgate commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

NUT

The canonical NUT-29 batch-mint signature vector in nuts/tests/29-tests.md was updated to use a realistic uuid-v7 quote id (019e6d5a-...) in place of the locked-quote placeholder, with a correspondingly new msg_to_sign, msg_hash, and signature.

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 a const so 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_sign hashes to msg_hash) before pinning it.

Test-only; npm run prtasks green.

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.
@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.63%. Comparing base (8ad6129) to head (3ed0ab0).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

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     
Flag Coverage Δ
integration 38.14% <ø> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@robwoodgate robwoodgate added the nut hold This PR is held pending the merge of a new or updated NUT label Jul 23, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nut hold This PR is held pending the merge of a new or updated NUT

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant