github cashubtc/cashu-ts v4.0.0

11 hours ago

Version 4 is a major step forward for Cashu TS: It adds precision-safe amounts across the API, first-class proof serialization utilities, custom mint/melt methods, NUT-29 batch minting, and stronger security and rate-limit handling throughout the stack.

New features include:

  • Exact amount handling with Amount and bigint support across the API, eliminating silent precision loss (eg large millisat amounts).
  • Generic mint/melt APIs for custom payment methods, so apps can integrate new rails without waiting on library-specific support.
  • NUT-29 batch minting support for more efficient multi-quote mint workflows.
  • Better production resilience with explicit 429 handling, Retry-After parsing, and response metadata for rate-limit-aware clients.
  • Stronger security defaults via DLEQ verification hardening, optional strict signature enforcement, and tighter P2PK validation.
  • Improved privacy and compatibility through hardened request fingerprinting behavior and more flexible request-header overrides.
  • Slimmer ESM only package (ESM can finally be loaded from common.js on node)

Migration Guide

Please see the full migration guide for detailed instructions on upgrading your code.

What's Changed

Detailed changes below - for a summary, see the changelog.

Full Changelog: v3.6.1...v4.0.0

Don't miss a new cashu-ts release

NewReleases is sending notifications on new releases.