feat: canonical Casper settlement v3 production RC - #13
Conversation
|
Independent pre-deploy verification flag. The v3 contract verifies clean (value-only atomic transfer-before-receipt, 99/1/0 + 100/0/0, replay/expiry/pause). But the JS tooling still targets the LEGACY v1 entrypoint. The handoff says "wallet builder uses exact
→ A settlement against v3 via this tooling would fail (or hit the quarantined v1). Fix the JS builders/demo to call the v3 |
|
Ready-to-apply spec for the testnet builder (follow-up to my legacy-entrypoint flag — I read the v3 v3 entrypoint is In // no register_agent — v3 has no agent registry
const validUntilMs = blockTimeMs + 10 * 60 * 1000; // ≤ 20 min ahead, else PaymentExpired
h = await submit(callContract(kp, 'pay', RuntimeArgs.fromMap({
route: CLValueBuilder.u8(1), // 1 = AIFP-1 (99/1/0); 2 = AIFP-2 (100/0/0)
merchant: CLValueBuilder.string(providerHash), // 'account-hash-…' of the payee
gross_amount: CLValueBuilder.u512(AMOUNT), // payer total in motes; fee is deducted FROM gross
request_id: CLValueBuilder.string(REQ),
valid_until_ms: CLValueBuilder.u64(validUntilMs),
})));Three semantic gotchas the demo's assertion must track (else it fails a correct contract):
Happy to open this as a PR against your RC branch if you'd rather I land it — just say the word; leaving it as a spec so I don't step on the testnet-builder work you're doing. |
Scope
Supersedes chain-local agent-registration settlement with a value-only canonical settlement contract for the global Agent Passport architecture.
Economics
Identity boundary
The contract no longer treats
from_agent/to_agentstrings as financial identity. Payer authorization is the Casper caller; global @username/AIFP-ID resolution stays in AIFP-3 with signed wallet bindings.Safety
Asset scope
Casper defaults to native CSPR only. No USDC/USD₮ contract is claimed without issuer-confirmed canonical asset support.
Release gate
Source-level RC only. Requires CI green, independent review, new deploy, named-key/config readback, exact artifact evidence, paid AIFP-1/AIFP-2 E2E and replay/expiry negative tests before unpause.
Built from the security-hardening work in PR #11; that PR should not be treated as the final canonical economic model.