Skip to content

feat: verify and sign the length-framed NUT-11 SIG_ALL message - #1088

Open
robwoodgate wants to merge 2 commits into
cashubtc:mainfrom
robwoodgate:feat/sigall-v1
Open

feat: verify and sign the length-framed NUT-11 SIG_ALL message#1088
robwoodgate wants to merge 2 commits into
cashubtc:mainfrom
robwoodgate:feat/sigall-v1

Conversation

@robwoodgate

@robwoodgate robwoodgate commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Implements the length-framed NUT-11 SIG_ALL message aggregation (Cashu_SigAllSig_v1) proposed in cashubtc/nuts#404. The new format matches the domain separation and length framing already used for NUT-20 mint quote signatures.

  • The mint verifies the v1 and current message formats, counts unique public keys with valid signatures, and ignores signatures that do not verify (including malformed ones, which previously aborted the verification loop)
  • The wallet signs v1, current and legacy, so its transactions verify on mints at any upgrade stage
  • Melt verification passes the quote id instead of a prebuilt message string; each format binds the quote per its own rules
  • Canonical vectors from the spec's tests/11-test.md are pinned in tests/nuts/test_nut11_test_vectors.py

Draft until cashubtc/nuts#404 settles.

The mint accepts the v1 ("Cashu_SigAllSig_v1") and current message
formats, counting unique public keys with valid signatures and
ignoring signatures that do not verify. The wallet signs v1, current
and legacy so its transactions verify on mints at any upgrade stage.
Canonical vectors from the NUT-11 spec tests are pinned in the test
suite.
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.55556% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.60%. Comparing base (47726cc) to head (0111594).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
cashu/mint/conditions.py 85.71% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1088      +/-   ##
==========================================
+ Coverage   74.56%   74.60%   +0.04%     
==========================================
  Files         115      115              
  Lines       13167    13189      +22     
==========================================
+ Hits         9818     9840      +22     
  Misses       3349     3349              

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

@robwoodgate
robwoodgate marked this pull request as ready for review July 17, 2026 22:32
@ye0man
ye0man requested review from KvngMikey and a1denvalu3 July 20, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant