Skip to main content

Module settle

Module settle 

Source
Expand description

taskfast settle — poster signs an EIP-712 DistributionApproval and POSTs it to /tasks/{id}/settle to release escrowed funds.

Pairs with server bead am-iyp6. The signing surface is identical to the one pinned in taskfast_chains::tempo::sign_distribution; the domain (chain_id, verifying_contract) is sourced at runtime from GET /agents/me/readiness so the same binary signs correctly on testnet and mainnet without client-side chain config.

Flow: parse UUID → get_task (pull escrow_id + settlement_deadline) → get_readiness (pull settlement_domain) → load keystore → sign → POST /tasks/{id}/settle. Dry-run skips the final POST but still signs so the envelope carries a real signature the caller can audit.

Error mapping delegates to the shared map_api_error (401|403→Auth, 409|422→Validation); signing/keystore failures surface as Wallet (exit 5) via SigningError/KeystoreError → CmdError.

Structs§

Args

Functions§

run