Skip to content

feat(mint): add NUT-29 batch minting error codes#1944

Open
Forte11Cuba wants to merge 1 commit into
cashubtc:mainfrom
Forte11Cuba:feat/nut-29-error-codes
Open

feat(mint): add NUT-29 batch minting error codes#1944
Forte11Cuba wants to merge 1 commit into
cashubtc:mainfrom
Forte11Cuba:feat/nut-29-error-codes

Conversation

@Forte11Cuba
Copy link
Copy Markdown
Contributor

@Forte11Cuba Forte11Cuba commented Apr 28, 2026

Description

Implements the new NUT-29 batch minting error codes from cashubtc/nuts#366, replacing the incorrect reuse of generic input/output codes
Closes #1943


Notes to the reviewers


Suggested CHANGELOG Updates

CHANGED

  • NUT-29 batch mint validation now returns DuplicateQuoteIds (11016) and BatchSizeExceeded (11017) instead of DuplicateInputs (11007) and MaxInputsExceeded (11014).

ADDED

  • Error::DuplicateQuoteIds and Error::BatchSizeExceeded actual, max variants.
  • ErrorCode::DuplicateQuoteIds (11016) and ErrorCode::BatchSizeExceeded (11017) variants.

REMOVED

FIXED


Checklist

  • I followed the code style guidelines
  • I ran just quick-check before committing
  • If the Wallet API was modified (added/removed/changed), I have reflected those changes in the FFI bindings (crates/cdk-ffi)

Copy link
Copy Markdown
Contributor

@TheMhv TheMhv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 35fea0d

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

❌ Patch coverage is 21.05263% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.14%. Comparing base (8ce06b1) to head (56a0d4c).

Files with missing lines Patch % Lines
crates/cdk-common/src/error.rs 0.00% 14 Missing ⚠️
crates/cdk/src/mint/issue/mod.rs 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1944      +/-   ##
==========================================
- Coverage   65.16%   65.14%   -0.02%     
==========================================
  Files         330      330              
  Lines       56742    56756      +14     
==========================================
  Hits        36976    36976              
- Misses      19766    19780      +14     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ye0man ye0man added this to the 0.17.0 milestone May 12, 2026
@thesimplekid thesimplekid force-pushed the feat/nut-29-error-codes branch from 35fea0d to 56a0d4c Compare May 13, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

feat: add NUT-29 batch minting error codes

3 participants