You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add client-side tooling for the batch-settlement trustless reclaim escape hatch — initiateWithdraw(config, amount) → (grace period) → finalizeWithdraw(config) — so a payer can
unilaterally recover unclaimed escrow if the receiver/facilitator goes dark.
Context
The batch-settlement facilitator (upstream PR x402-rs/x402-rs#90; beta image #4) ships the escrow and
the cooperative refund path (refundWithSignature, gasless, needs receiver consent). The trustless
timed-withdrawal escape hatch is specified (scheme_batch_settlement_evm.md:51) and the escrow exposes initiateWithdraw/finalizeWithdraw, but in x402-rs these are ABI bindings only — zero call sites
(crates/chains/x402-chain-eip155/src/v2_eip155_batch_settlement/facilitator/abi.rs:150,152).
Why the facilitator can't do it
initiateWithdraw/finalizeWithdraw are msg.sender-gated (caller must be payer or payerAuthorizer) with no signature variant — unlike claimWithSignature/refundWithSignature.
So the facilitator cannot relay/sponsor them; the tx must be submitted by the payer's own wallet (needs
ETH). This is the reclaim path that keeps escrow trustless even if the service disappears.
Deliverables
Rust client helper: build + submit initiateWithdraw then finalizeWithdraw from a payer signer,
tracking withdrawDelay (15 min–30 days) and auto-finalizing when the grace period elapses.
TS @x402/evm client helper (same, for browser/widget use).
Summary
Add client-side tooling for the batch-settlement trustless reclaim escape hatch —
initiateWithdraw(config, amount)→ (grace period) →finalizeWithdraw(config)— so a payer canunilaterally recover unclaimed escrow if the receiver/facilitator goes dark.
Context
The batch-settlement facilitator (upstream PR x402-rs/x402-rs#90; beta image #4) ships the escrow and
the cooperative refund path (
refundWithSignature, gasless, needs receiver consent). The trustlesstimed-withdrawal escape hatch is specified (
scheme_batch_settlement_evm.md:51) and the escrow exposesinitiateWithdraw/finalizeWithdraw, but in x402-rs these are ABI bindings only — zero call sites(
crates/chains/x402-chain-eip155/src/v2_eip155_batch_settlement/facilitator/abi.rs:150,152).Why the facilitator can't do it
initiateWithdraw/finalizeWithdrawaremsg.sender-gated (caller must bepayerorpayerAuthorizer) with no signature variant — unlikeclaimWithSignature/refundWithSignature.So the facilitator cannot relay/sponsor them; the tx must be submitted by the payer's own wallet (needs
ETH). This is the reclaim path that keeps escrow trustless even if the service disappears.
Deliverables
initiateWithdrawthenfinalizeWithdrawfrom a payer signer,tracking
withdrawDelay(15 min–30 days) and auto-finalizing when the grace period elapses.@x402/evmclient helper (same, for browser/widget use).refundWithSignatureis the everyday reclaim; this is the backstop.Notes
finalizeWithdrawreturns only escrow still unclaimed after the grace window (server may claimlegitimately-held vouchers during it — fairness).