Skip to main content

Module escrow

Module escrow 

Source
Expand description

taskfast escrow sign <bid_id> — headless poster escrow signing.

Replaces the web-UI-only wagmi + passkey path at assets/js/escrow_sign.js. Picks up bids the server parked in :accepted_pending_escrow after taskfast bid accept and drives them to :accepted without a browser:

  1. GET /bids/:id/escrow/params → server-derived on-chain params.
  2. EIP-712 DistributionDomain from those params (chain_id + task_escrow_contract) — the venue’s escrow for zone-bound tasks.
  3. ERC-20 allowance preflight; approve if short.
  4. Random 32-byte salt → compute_escrow_id (matches Solidity).
  5. EIP-712 DistributionApproval(escrowId, deadline) — sign_distribution.
  6. TaskEscrow.open / openWithMemo — broadcast + wait for receipt.
  7. POST /bids/:id/escrow/finalize with voucher + sig + deadline.

Memo is server-driven: memo_hash in the params payload selects openWithMemo vs open. No --memo flag.

Error mapping delegates to map_api_error (401|403→Auth, 409|422→ Validation). Keystore / signing failures surface as Wallet (exit 5).

Structs§

SignArgs

Enums§

Command

Functions§

run