Version 3.0.0 - Major Release
We're excited to announce version 3.0.0 of cashu-ts! This release brings significant improvements to the API design, making it more intuitive and powerful. While this version includes breaking changes, we've streamlined the developer experience and added new features that make working with Cashu easier than ever.
Highlights
Simplified Class Names & Initialization
CashuWallet→WalletCashuMint→Mint- Wallets can now be instantiated directly with a mint URL
- New
loadMint()method completes initialization
New Fluent Builder API
Introducing WalletOps - a beautiful, chainable API for wallet operations:
const { keep, send } = await wallet.ops
.send(amount, proofs)
.asP2PK({ pubkey: bytesToHex(pubKeyBob) })
.includeFees(true)
.run();Simplified Exports
- Crypto functions now exported directly from main package
- No more sub-module imports needed
- Cleaner, more consistent type names
Better Organization
- Keyset management delegated to
wallet.keyChain - Event subscriptions delegated to
wallet.on - More modular and maintainable code structure
Enhanced Authentication
- New
AuthManagerfor CAT/BAT management createAuthWallet()helper for authenticated sessions- Modern
OIDCAuthclass for OIDC flows
API Cleanup
- Logger now uses lowercase string levels (
'debug','info', etc.) - Mint methods renamed for clarity (e.g.,
createMintQuoteBolt11) - Removed unused constants and deprecated code
Developer Experience and Type Safety
- Lots of internal refactoring make it easier to work on Cashu-TS
- Typesafety on configs and method increased to make using Cashu-TS easier
Migration Guide
Please see the full migration guide for detailed instructions on upgrading your code.
Thank You
Thanks to all contributors who made this release possible! Special thanks to @robwoodgate who led the redesign effort and showed incredible dedication in building this release!
What's Changed
- Chore: update CI to include Node tests on PR by @robwoodgate in #362
- Add final_expiry to GetKeysetsResponse by @d4rp4t in #367
- V3: Adds public decodeToken method by @robwoodgate in #372
- Fix v3 minting by @Egge21M in #375
- V3 alpha 3: Auth Mint and OIDC support by @robwoodgate in #379
- V3 WalletOps support for mintbolt12 by @robwoodgate in #382
- V3: Renames crypto/NUT09.ts to crypto/NUT13.ts by @robwoodgate in #373
- Add support for Prefer: respond-async on melt operations by @robwoodgate in #378
- signP2PKProofs: Replace beStrict param with logger by @robwoodgate in #385
- V3 proofs we have by @Egge21M in #384
- Cashu-TS v3 by @robwoodgate in #383
Full Changelog: v2.7.2...v3.0.0