Skip to content

refactor(crypto): split curve primitives#667

Merged
robwoodgate merged 1 commit into
mainfrom
refactor/crypto-curve-modules
May 22, 2026
Merged

refactor(crypto): split curve primitives#667
robwoodgate merged 1 commit into
mainfrom
refactor/crypto-curve-modules

Conversation

@robwoodgate

@robwoodgate robwoodgate commented May 21, 2026

Copy link
Copy Markdown
Collaborator

Stacked: #661 @ 31371a6

Summary

  • split curve-specific crypto primitives into curve_bls.ts and curve_secp.ts
  • move shared curve dispatch helpers into curves.ts
  • keep NUT modules focused on protocol coordination by importing narrower curve helpers
  • document the v5 deep-import migration note for crypto/core users

Validation

  • npm run check-lint
  • npm run compile
  • npx vitest run --project node --project browser test/crypto/core.test.ts test/crypto/NUT12.test.ts test/crypto/NUT13.test.ts test/crypto/NUT01.test.ts test/crypto/bls.test.ts test/model/OutputData.bls.test.ts
  • npm run check-format
  • pre-push lint/format hook passed

@codecov

codecov Bot commented May 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.15385% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.34%. Comparing base (a80dbf4) to head (a34d4fb).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/crypto/curve_secp.ts 97.22% 1 Missing ⚠️
src/crypto/curves.ts 92.85% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #667      +/-   ##
==========================================
+ Coverage   92.32%   92.34%   +0.02%     
==========================================
  Files          51       53       +2     
  Lines        4952     4952              
  Branches     1217     1217              
==========================================
+ Hits         4572     4573       +1     
  Misses        160      160              
+ Partials      220      219       -1     
Flag Coverage Δ
integration 38.59% <57.69%> (-0.03%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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 force-pushed the refactor/crypto-curve-modules branch from 2602ab0 to dfb9a7a Compare May 21, 2026 22:47
@robwoodgate robwoodgate marked this pull request as ready for review May 21, 2026 22:47
Base automatically changed from bls12-381 to main May 22, 2026 11:50
@robwoodgate robwoodgate force-pushed the refactor/crypto-curve-modules branch from dfb9a7a to a34d4fb Compare May 22, 2026 11:52
@robwoodgate robwoodgate merged commit 35da507 into main May 22, 2026
18 checks passed
@robwoodgate robwoodgate deleted the refactor/crypto-curve-modules branch May 22, 2026 12:16
@github-project-automation github-project-automation Bot moved this from Backlog to Done in cashu-ts May 22, 2026
robwoodgate added a commit that referenced this pull request Jun 3, 2026
…pt (#686)

The crypto split in #667 renamed src/crypto/bls to src/crypto/curve_bls
but left generate-nuts-vectors.ts pointing at the old path, which broke
renovate's build:scripts step. Narrow scripts/tsconfig.json to compile
only UpdateMakefileMintVersion.ts (the sole script CI runs) so dev/bench
files can't block renovate again, and fix the stale import.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant