Summary
Add Bolt12 support as a first-class mint and melt payment method in
Coco.
Core is already structured around generic mint/melt method handlers,
so this should build on that architecture rather than introducing
Bolt12-specific one-off flows.
Goal
Support Bolt12 quote creation, tracking, execution, refresh/recovery,
and settlement for both:
- mint operations
- melt operations
Existing Bolt11 behavior should remain unchanged.
Model consideration
Bolt12 can allow quote ID reuse, so Coco should not assume that
(mintUrl, quoteId) uniquely identifies a single operation.
This likely means reviewing the current operation, history,
repository, and API surfaces that expose quote-based lookups.
Operation identity should remain operation-id based, while quote-based
lookup paths may need to support multiple operations or include enough
method/context to disambiguate.
Scope
- Core: add Bolt12 mint/melt method data, handlers, registration,
validation, recovery, and quote-state handling.
- Persistence: ensure repositories and schema/index assumptions do not
require quote IDs to be unique per mint when Bolt12 is used.
- React: expose Bolt12-capable mint/melt flows through the same
operation APIs/hooks once core support exists.
- Tests: cover Bolt12 mint and melt flows, plus the quote-id reuse
case.
Acceptance criteria
- Callers can initiate Bolt12 mint and melt operations through Coco’s
generic operation APIs.
- Bolt11 remains compatible and unchanged.
- Multiple operations can safely reference the same Bolt12 quote ID
without overwriting or confusing operation state.
- Persisted operations/history round-trip correctly when quote IDs are
reused.
Summary
Add Bolt12 support as a first-class mint and melt payment method in
Coco.
Core is already structured around generic mint/melt method handlers,
so this should build on that architecture rather than introducing
Bolt12-specific one-off flows.
Goal
Support Bolt12 quote creation, tracking, execution, refresh/recovery,
and settlement for both:
Existing Bolt11 behavior should remain unchanged.
Model consideration
Bolt12 can allow quote ID reuse, so Coco should not assume that
(mintUrl, quoteId)uniquely identifies a single operation.This likely means reviewing the current operation, history,
repository, and API surfaces that expose quote-based lookups.
Operation identity should remain operation-id based, while quote-based
lookup paths may need to support multiple operations or include enough
method/context to disambiguate.
Scope
validation, recovery, and quote-state handling.
require quote IDs to be unique per mint when Bolt12 is used.
operation APIs/hooks once core support exists.
case.
Acceptance criteria
generic operation APIs.
without overwriting or confusing operation state.
reused.