aboutsummaryrefslogtreecommitdiffstats
path: root/meltguard.ts
Commit message (Collapse)AuthorAgeFilesLines
* meltguard: report cap-refused pays as failed so melts don't stick pendingAdam Soltys9 days1-2/+33
| | | | | | | | | | | | | | A pay refused for the per-melt or rolling cap never reaches cl, so listpays returns nothing for its hash. nutshell 0.22 treats that as NOT_FOUND and keeps the melt quote PENDING with the proofs locked indefinitely. Record cap-refused hashes in GUARD_DIR/rejected and answer a listpays for one of them with a failed pay when cl has none, so the mint marks the quote unpaid and releases the proofs. cl's own answer still wins when it has a pay for the hash. Repeat-hash and partial refusals are not recorded. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6W9CsdxmhFrfaKNVHU
* mint: one pay per invoice hash, refuse MPP melts, gate a retired keysetAdam Soltys10 days1-11/+42
| | | | | | | | | | | meltguard refuses repeat and partial pays for a payment hash and can apply its cap as a rolling window. mintdemux refuses melt quotes with MPP or amountless options or an unparseable invoice, and only lets ecash from a gated keyset be spent if its DLEQ blinding factor traces it to an allowed mint operation. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6SEnsbshZrUDtTsxAX
* meltguard: guard /v1/xpay and parse form-encoded melt bodiesAdam Soltys2026-09-041-8/+38
| | | | | | | | | | | | nutshell >= 0.20.3.1 melts via POST /v1/xpay (form field invstring), while older CLNRest wallets post /v1/pay form-encoded under `invoice` or `bolt11`. The guard only parsed JSON `bolt11`, so form bodies never yielded an amount and were rejected, and an xpay backend would have bypassed the caps entirely. Accept both endpoints and all three field names, forward as form on the same endpoint preserving fee params. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_014uxZLvYS4gH9UqUX2Ey8TV
* mint-recovery: add meltguard + mintdemux proxies; ignore local *.bakAdam Soltys2026-07-301-0/+80
- meltguard: out-of-band CLNRest spend limiter (per-melt cap + cumulative hard-freeze) that sits between the panic-mode mint and the node - mintdemux: fronts the mint hostname, routing between the retired and current mint instances after the hostname swap - gitignore *.bak / *.bak-* so local backups (some hold secrets) never commit Co-Authored-By: Claude Opus 4.8 <[email protected]>