Coco v2.0.0
We’re excited to release Coco v2.0.0, a major update that expands payment support, makes wallet state more reliable, and establishes cleaner foundations for applications, plugins, and storage adapters.
Highlights
- First-class support for BOLT12 minting and melting.
- NUT-30 on-chain mint and melt flows, including reusable deposit addresses and automatic claiming.
- NUT-18 P2PK payment requests, covering both outgoing payments and incoming requests through transports such as Nostr.
- Custom Cashu units throughout balances, proofs, operations, history, React hooks, and storage.
- Canonical, persistent quote management through
manager.quotes, with safer recovery and background settlement. - Operation-backed transaction history with deterministic IDs and more accurate lifecycle state.
- Improved React initialization, browser seed handling, manager cleanup, and storage consistency.
- Numerous reliability fixes covering concurrent receives, quote polling, fee calculations, proof recovery, and duplicate operations.
Important upgrade notes
This is a breaking release:
- Coco packages are now ESM-only.
- Monetary values are represented by
Amountobjects rather than plain numbers. - Mint and melt flows are now quote-first: create or load a quote through
manager.quotes, then prepare an operation from it. - Quotes are identified by
{ mintUrl, quoteId }. - Adapter and plugin contracts have moved to
@cashu/coco-core/adapterand@cashu/coco-core/plugin. - Several legacy quote services, waiters, events, and operation helpers have been removed.
- Built-in storage adapters migrate existing wallet data automatically; custom adapters must implement the updated repository contracts.
- Coco v2.0.0 uses
@cashu/cashu-ts@5.0.0-rc.4. BLS v3 keysets and tokens are temporarily unsupported.
Applications upgrading from v1 should review the [migration guide](https://github.com/cashubtc/coco/blob/v2.0.0/packages/docs/starting/migrating-from-v1.md). For the complete technical breakdown, see the [core changelog](https://github.com/cashubtc/coco/blob/v2.0.0/packages/core/CHANGELOG.md).
What's Changed
- feat: migrate to cashu-ts v4 Amount semantics by @Egge21M in #155
- feat(react): initialize Coco from provider config by @Egge21M in #171
- Feat: Multi unit support by @igbopharaoh in #174
- test: add custom-unit integration coverage by @Egge21M in #176
- feat(core): add payment request receive saga by @Egge21M in #172
- feat: project history from operations by @Egge21M in #167
- fix(core): unblind restored signatures via toProof() in recoverProofsFromOutputData by @KvngMikey in #177
- refactor: remove legacy melt quote surface by @Egge21M in #178
- fix(core): avoid duplicate proof state polling batches by @Egge21M in #166
- feat: add quote-first BOLT11 mint operations by @Egge21M in #183
- feat: add reusable onchain mint quotes by @Egge21M in #184
- fix(core): align BOLT12 mint with reusable quotes by @Egge21M in #187
- chore: remove redundant feature doc by @igbopharaoh in #188
- feat(docs): publish nightly docs alongside stable by @Egge21M in #190
- fix: use valid runner temp path in docs workflow by @Egge21M in #192
- Chore/docs clean by @Egge21M in #193
- feat: add onchain melt operations by @Egge21M in #189
- feat: publish npm RCs from prerelease releases by @Egge21M in #191
- chore: enforce dependency release age checks by @Egge21M in #173
- refactor(core): simplify quote API types by @Egge21M in #195
- [codex] agents: add matt's skill setup by @Egge21M in #196
- feat(core): enforce canonical quote identity by @Egge21M in #204
- feat(core): resolve quotes by identity by @Egge21M in #205
- feat(core): prepare mint operations from quote refs by @Egge21M in #206
- feat: prepare melt operations from quote refs by @Egge21M in #218
- feat: update quote operation query APIs by @Egge21M in #219
- docs: refresh v2 quote workflow examples by @Egge21M in #220
- fix(sqlite-bun): align SQL drift before extraction by @Egge21M in #217
- refactor(sql): add shared SQL storage contract by @Egge21M in #221
- refactor(sql): move schema into shared storage by @Egge21M in #222
- refactor(sqlite-bun): compose shared SQL repositories by @Egge21M in #223
- refactor(sqlite): compose shared SQL repositories by @Egge21M in #224
- refactor(expo-sqlite): compose shared SQL repositories by @Egge21M in #225
- refactor: narrow sqlite adapter exports by @Egge21M in #227
- test: remove duplicate sqlite adapter SQL tests by @Egge21M in #228
- [codex] docs(sqlite adapters): document shared storage API by @Egge21M in #229
- fix(core): resolve unrecoverable receive recovery by @Egge21M in #230
- docs(agents): add shared context language by @Egge21M in #231
- fix(core): dedupe proof watcher finalization checks by @Egge21M in #180
- docs: record generic payment method decisions by @Egge21M in #239
- feat(core): expose payment method capability APIs by @Egge21M in #240
- feat(core): persist optional memo on executed send token by @KvngMikey in #194
- docs: remove stale release candidate messaging by @Egge21M in #244
- fix(core): publish documented event types by @Egge21M in #246
- feat(core): add adapter persistence entry point by @Egge21M in #251
- feat(core): add stable plugin entry point by @Egge21M in #252
- feat(core): narrow root public surface by @Egge21M in #253
- docs(core): document public import surfaces by @Egge21M in #254
- fix(core): make manager disposal complete by @Egge21M in #257
- docs(core): codify methodless quote identity contract by @Egge21M in #260
- fix(sqlite): declare better-sqlite3 types dependency by @Egge21M in #262
- fix(core): remove legacy send created event by @Egge21M in #264
- feat(core): persist melt quote observations by @Egge21M in #273
- [codex] docs: record quote observation decision by @Egge21M in #278
- fix(core): record melt quotes before settlement by @Egge21M in #275
- feat(core): add melt quote watcher service by @Egge21M in #276
- feat(core): add melt settlement processor by @Egge21M in #279
- feat(core): wire melt settlement into manager lifecycle by @Egge21M in #281
- feat(core)!: remove subscription quote waiters by @Egge21M in #265
- docs: remove postponed generic payment ADRs by @Egge21M in #284
- chore: make release publishing tag-driven by @Egge21M in #280
- fix(core): align cashu-ts error types by @Egge21M in #304
- Fix(core): separate failed mint events from finalization by @igbopharaoh in #296
- feat(core): expose quotes to plugins by @Egge21M in #306
- docs(docs): expand v1 migration guide by @Egge21M in #285
- fix(core): serialize receive prepare per mint to prevent NUT-13 counter collisions by @2100wan in #307
- Bug: make polling fallback to poll every quoteId by @igbopharaoh in #282
- fix: guard against null financial fields in operation hydration by @KvngMikey in #185
- feat(core): support custom output data creators by @Egge21M in #312
- docs: clarify storage encryption responsibility by @Egge21M in #313
- feat(core): Support P2PK payment request sends by @igbopharaoh in #309
- fix(core): export P2PK payment request types by @Egge21M in #318
- fix(core): treat zero mint quote expiry as no expiry by @Egge21M in #319
- refactor(core): return canonical melt quote from upsert by @Egge21M in #322
- feat(core): add batch mint quote polling by @Egge21M in #384
- refactor(core): centralize mint quote observation resolution by @Egge21M in #388
- chore: upgrade to cashu-ts v5 quote boundary by @Egge21M in #389
- feat: persist canonical mint quote accounting by @Egge21M in #391
- fix(core): prevent stale mint quote accounting rollback by @Egge21M in #392
- fix(core): treat mint quote expiry as advisory by @Egge21M in #397
- feat(core): add protocol and secure BOLT11 foundations by @igbopharaoh in #400
- refactor(core): centralize mint quote claimability by @Egge21M in #403
- fix(react): serialize local storage seed initialization by @Egge21M in #407
- refactor(core): centralize pending mint classification by @Egge21M in #409
- fix(core): decouple pending mint checks from wallet instances by @Egge21M in #410
- docs(agents): update skill setup by @Egge21M in #315
- feat(cocod): import cocod as a private workspace package on Coco v2 by @Kelbie in #401
- docs: add SECURITY.md policy by @ye0man in #416
New Contributors
- @KvngMikey made their first contribution in #177
- @Kelbie made their first contribution in #401
- @ye0man made their first contribution in #416
Full Changelog: v1.0.0...v2.0.0