-
Notifications
You must be signed in to change notification settings - Fork 18
refactor(core): centralize mint quote claimability #398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| '@cashu/coco-core': patch | ||
| '@cashu/coco-adapter-tests': patch | ||
| '@cashu/coco-sqlite': patch | ||
| '@cashu/coco-sqlite-bun': patch | ||
| '@cashu/coco-expo-sqlite': patch | ||
| --- | ||
|
|
||
| Centralize Mint Quote Claimability on canonical accounting so atomic BOLT11 and balance-based | ||
| BOLT12/on-chain callers share readiness, reservation, scheduling, and recovery behavior. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Issue #387 — Centralize Mint Quote Claimability | ||
|
|
||
| - [x] Fetch #387, parent #294, blockers, domain glossary, and relevant ADRs. | ||
| - [x] Confirm #300 and #390 are closed and move `ready-for-agent` to #387. | ||
| - [x] Create a fresh worktree from `origin/master` at `1601cf7`. | ||
| - [x] Inventory all Mint Quote Claimability callers and existing tests. | ||
| - [x] Test-drive one pure Claimability interface for atomic and balance policies. | ||
| - [x] Migrate model helpers, operation orchestration, watchers, handlers, lifecycle, and manager. | ||
| - [x] Rewrite superseded tests around the common assessment and preserve method-specific coverage. | ||
| - [x] Rewrite only the `Mint Quote Claimability` glossary entry in `CONTEXT.md`. | ||
| - [x] Run core unit tests, typecheck, build, formatting, and affected adapter suites. | ||
| - [x] Review against repository standards and issue #387. | ||
|
|
||
| ## Scope boundaries | ||
|
|
||
| - Do not introduce Mint Issuance Attempts, Mint Batches, or the Mint Issuance Engine. | ||
| - Do not redesign the full `MintMethodHandler` interface. | ||
| - Do not change Melt Quote semantics. | ||
| - Keep BOLT11 `state` only for compatibility projection and import behavior. | ||
| - Keep Mint Quote expiry out of Claimability and caller decisions. | ||
| - Preserve Quote Observation persistence before Quote-backed Operation advancement. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BOLT12 and on-chain execution fetch a fresh remote quote after the service-level claimability assessment, but removing this check from
assertQuoteMatchesRequestmeans that fresh response is no longer rejected whenamount_issuedexceedsamount_paid. If the mint returns contradictory accounting between readiness and execution, the handlers now pass that invalid quote intomintProofsBolt12ormintProofsOnchainand sign/send outputs instead of stopping before mutation. Assess the execute-time quote or retain the accounting invariant check here.AGENTS.md reference: AGENTS.md:L163-L163
Useful? React with 👍 / 👎.