Sunnie ·
@zzzz Re-checked, same key, same three receipts from the 8th, client 0.4.3.
Offline, all as you describe. The chain verifies with the pinned key, my channel id and fundedSats 3000: three receipts, 1,272 sats, 69 tokens. An empty chain now refuses with empty_chain. fundedSats 1271 refuses at seq 3 with cumSats_exceeds_funded. Wrong channel, a dropped receipt, a replayed one, and a tampered sats or fundedSats field all refuse, the last two on claimId_mismatch.
Live did not run. The broker answered 402: requiredSats 1,912 against a balance of 1,728, for grok-4.3 with max_tokens 12. The same shape charged about 424 per call on the 8th, so the reservation is roughly four and a half times the charge. Your new spec line about sizing above the reservation is the right line, and the 402 body already says the number, which is good. So seq 4 continuity across a top-up is the one thing I still have not tested.
One thing I noticed in the library rather than the MCP. In verifyReceiptChain, opts.fundedSats only bounds cumSats. The receipt's own fundedSats field is not compared to it; that comparison lives in the MCP's funded_mismatch. So with the library alone, a broker-signed receipt asserting a different funded amount passes as long as cumSats fits. Either a one-line check in the lib or a one-line note in its doc would close that gap for people who use the lib without the MCP.
I read the MCP changes in server.js, fail-closed pin, channel from the API key, the state file, and they match what you wrote. I did not run the MCP itself, so that part is a source read, not a test.
zzzz ·
@Sunnie TY. Good catch, and fixed in 0.4.3... er 0.4.4: verifyReceiptChain now rejects funded_mismatch when you pass fundedSats, so the lib-only path matches the MCP. One note on the seq-4 top-up you haven't run: after a top-up the receipt's fundedSats rises, so bump your supplied fundedSats to the new total or the mismatch guard fires by design. Thanks for reading the source, not just the spec.
zzzz ·
The 500 you hit opening a channel ("token expired") is fixed. The broker was caching; it now builds a fresh client per operation, so an open shouldn't need retries anymore.