GitHub

Testnet · Whitechain · World ID · ENS

Spending mandatesfor AI agents.

Your agent pays in USDT only inside limits a contract enforces. Anything bigger waits for a verified human to countersign the exact payment.

contract tests
118
API tests
97
Whitechain chain ID
1874
primitives: Whitechain, World ID, ENS
3
agent1.countersign.eth · live
Connecting to testnet backend…
  1. signedagent signs exact amount, merchant, payout
  2. relayedrelayer + GasGuard submit to chain 1874
  3. over thresholdwaiting for World ID approval
  4. settledUSDT paid, receipt on explorer
Illustrative flow, not live data · testnet

Flow

How it works

  1. Owner sets the mandate

    Budget, per-payment cap, allowed merchants and an approval threshold, written on-chain from the owner console.

  2. Agent signs exact terms

    The agent signs the precise amount, merchant and payout. Nothing is left for a relayer to fill in.

  3. Relayer + GasGuard submit

    A relayer pays gas and forwards the signed payment; GasGuard keeps submission costs bounded.

  4. Contract enforces

    The Mandate contract checks every term and settles USDT, or reverts. Above the threshold it requires a World ID approval bound to that payment.

Stack

Built on three primitives

  • Settlement

    Whitechain

    USDT settles on Whitechain testnet (chain 1874). Mandate and MerchantRegistry are verified on the explorer.

    Mandate on explorer ↗
  • Human approval

    World ID

    Payments above the threshold wait for a verified human to approve that exact transaction, not a blanket permission.

    Human-approved payment ↗
  • Agent identity

    ENS

    The agent resolves as agent1.countersign.eth on ENSv2 Sepolia, with a live check that its published policy matches the contract.

    agent1.countersign.eth ↗

Enforcement

What the contract refuses

Each of these is rejected on-chain, not by the app. Covered by 118 contract tests and 97 API tests.

  • Tampered amount

    Signed terms don't match the submitted amount.

  • Tampered payout

    Funds can't be redirected to a different address.

  • Over budget

    Spend beyond the mandate's remaining budget reverts.

  • Paused

    A paused mandate rejects every payment until the owner resumes.

  • Over-refund

    Refunds can never exceed what was paid.

Verify

Proof, on-chain

Mandate contract
0x923298…889EbA ↗
MerchantRegistry
0x2686f6…2329E2 ↗
Human-approved tx
0x98fa81…9cb531 ↗

FAQ

Questions

What is Countersign?

Countersign gives an AI agent a USDT budget. The agent signs exact payment terms, a relayer pays the gas, and the Mandate smart contract enforces the owner's limits at the moment USDT moves. It is a testnet development preview.

How are spending limits enforced?

On-chain by the Mandate contract: it checks signatures, merchant payout, per-transaction limit, period budget, nonce, order, epoch, expiry and pause before moving USDT, and reverts otherwise. Neither the agent, the relayer nor the API can exceed them.

How does World ID approval work?

Payments above the owner's threshold are held until the owner completes a fresh World ID sign-in and signs with their wallet. A separate attestor then co-signs, and the contract verifies both signatures for that exact payment.

How is ENS used?

The agent is published as agent1.countersign.eth on ENSv2 (Sepolia) with its policy mirrored in text records. The app runs a live drift check that compares the ENS records with the Mandate contract and shows MATCH or MISMATCH.

Which chain and token does it use?

Whitechain Sepolia testnet (chain ID 1874) with the official test USDT token at 0xcedfB56113143d55b2358b8CFbB0dEB5Ad2f55a7.

See an agent get countersigned.