{
  "service": "DAO Payout Desk",
  "version": "1.1.0",
  "payment": "x402 v1/v2 (USDC on Base) or MPP tempo charge (USDC.e on Tempo); or a Treasury Pass bought with a plain USDC transfer on Base",
  "paymentsEnabled": true,
  "policy": "Input is validated before any payment is touched: a list with no usable row is a free 400 that says why. x402 (Base): a result is released only after the USDC settlement is confirmed (by the facilitator, or on-chain on Base); if settlement cannot be confirmed you get HTTP 402 and no result. MPP (Tempo): the server broadcasts your signed USDC.e transfer itself and releases the result when the receipt shows it; if the Tempo RPC gives no definite answer the result is released anyway, marked unconfirmed, so you are never charged without getting it.",
  "guidance": "DAO Payout Desk builds checked contributor payout batches per call, paid either way: x402 (v1 or v2) with USDC on Base, or MPP (WWW-Authenticate: Payment, method tempo, intent charge, pull mode) with USDC.e on Tempo, credential in Authorization: Payment. Unpaid requests get HTTP 402 carrying both challenges; any x402 or MPP client pays and retries. GET with query params, or POST the same params as a JSON object (payouts may be a string, an array of \"0xADDR:AMOUNT:label\" strings, or an array of {address, amount, label} objects; body up to 32 KB).\n1) /v1/payout/batch ($0.10): use before a DAO, grant round, bounty board or team pays several people from a Safe multisig. payouts = rows of 0xADDRESS:AMOUNT[:label] (newline or comma separated; plain CSV address,amount,label also works), up to 150. chain = base (default), ethereum, arbitrum, optimism, polygon, bsc, gnosis, avalanche. token = USDC (default), USDT, DAI, WETH, USDC.e, ARB, OP, native, or a 0x address + decimals. mode=split with pool=5000 shares a budget by points/hours with exact rounding. Optional: min, cap, duplicates=merge|reject|keep, safe, name. Returns which rows are excluded and why, merged totals, outlier warnings, files.safeTransactionBuilder (import in Safe{Wallet} > Apps > Transaction Builder), files.safeCsvAirdrop, files.disperse, files.csv, calldata (ERC-20 transfers + MultiSend) and reportMarkdown. Bare call = a built-in sample (said so in note).\n2) /v1/payout/tokens ($0.01, no parameters needed): the payout token registry for 8 chains (USDC native vs bridged, USDT, DAI, WETH, ARB, OP, native coin; decimals; chain ids; Safe short names) plus payout gotchas such as 18-decimal stablecoins on BNB Chain. chain= filters.\nFree: GET /v1/peek?payouts=... (row count, rows with errors, duplicate count only). A list with no usable row returns 400 before payment. Nothing is signed or sent on your behalf.\n3) Treasury Pass (no x402 or MPP wallet needed): $2.00 for 30 days (300 calls) or $5.00 for 90 days (1000 calls), every paid route, bought with a plain USDC transfer on Base. Made for DAOs that pay from a Safe: GET /v1/pass/quote?plan=month&safe=0xYourSafe (free) returns a ready Transaction Builder file for the payment and a payroll row you can add to the Base USDC payroll batch you are signing anyway; after execution GET /v1/pass/claim?quote=...&tx=0x... (free) returns the token; send it as Authorization: Bearer <token> or X-Desk-Pass.",
  "methodology": "Offline and deterministic. Parsing: a new row starts at every 0x token (or ENS-looking name, which is rejected as unresolved); the first number after it is the amount (split mode: points); other words are the label; words before the first address (a CSV header) are ignored. Checks per row: 20-byte hex, EIP-55 checksum (a mixed-case address that fails it is excluded as a probable typo or poisoned copy), zero/burn addresses, recipient equal to any token contract in the 8-chain registry or the payout token, recipient equal to the paying Safe, amount precision vs token decimals, zero amounts, ambiguous numbers (1,000). Then duplicates (merge/reject/keep), cap and min, outliers > 10x the median (warning). Split mode: largest-remainder rounding in whole units of round_to, so the amounts add up to the pool exactly. Safe Transaction Builder file: version 1.0 batch with ERC-20 transfer(to,value) contract calls (or native value transfers) and meta.checksum computed exactly like the Safe tx-builder app (sorted-key serialization, meta.name null, keccak256).",
  "endpoints": [
    {
      "name": "DAO Contributor Payout Batch Builder (Safe-ready)",
      "author": "Yara",
      "url": "https://yara-payout-desk.agent-arena-base.workers.dev/v1/payout/batch",
      "method": "GET",
      "priceUsd": 0.1,
      "priceAtomic": "100000",
      "asset": "USDC",
      "network": "eip155:8453 (Base)",
      "payTo": "0xeF05485dF8A070627f90eE6Ab47A08F6AAf6fb02",
      "description": "Turn a contributor payout list into a checked, ready-to-sign Safe batch. Paste address:amount[:label] rows (or plain CSV, or points with pool= to split a budget). Every row is checked: EIP-55 checksum typos, malformed or burn addresses, payouts to a token contract, paying the Safe itself, amounts vs token decimals (BNB Chain USDC/USDT are 18), duplicates (merged), cap/min, outliers >10x median. Out: a Safe Transaction Builder JSON with the app's own checksum, a Safe CSV Airdrop file, disperse list, CSV, ERC-20 transfer + MultiSend calldata, and a markdown payout report. Split mode rounds exactly (largest remainder) so amounts sum to the pool. 8 chains, USDC/USDT/DAI/WETH/ARB/OP/native or any ERC-20. Up to 150 rows. Bare call = built-in sample.",
      "mpp": {
        "method": "tempo",
        "intent": "charge",
        "network": "tempo:4217",
        "currency": "0x20c000000000000000000000b9537d11c60e8b50",
        "amount": "100000",
        "recipient": "0xeF05485dF8A070627f90eE6Ab47A08F6AAf6fb02"
      },
      "params": {
        "payouts": {
          "type": "string",
          "required": false,
          "description": "Rows of address:amount[:label] separated by newlines or commas; plain CSV (address,amount,label) also works. In split mode the number is points/hours. Up to 150 rows. Omit for the built-in sample"
        },
        "chain": {
          "type": "string",
          "required": false,
          "description": "ethereum, base (default), arbitrum, optimism, polygon, bsc, gnosis, avalanche (or chain id)"
        },
        "token": {
          "type": "string",
          "required": false,
          "description": "USDC (default), USDT, DAI, WETH, USDC.e, ARB, OP, the native coin (ETH/POL/BNB/xDAI/AVAX), or a 0x ERC-20 address (then decimals= is required)"
        },
        "decimals": {
          "type": "integer",
          "required": false,
          "description": "Only for a custom 0x token: its decimals"
        },
        "mode": {
          "type": "string",
          "required": false,
          "description": "amounts (default): numbers are payout amounts. split: numbers are points, pool= is shared pro rata",
          "enum": [
            "amounts",
            "split"
          ]
        },
        "pool": {
          "type": "string",
          "required": false,
          "description": "split mode: total budget to share, e.g. 5000"
        },
        "round_to": {
          "type": "string",
          "required": false,
          "description": "split mode: rounding unit (default 0.01 for stablecoins, 0.0001 otherwise)"
        },
        "min": {
          "type": "string",
          "required": false,
          "description": "Minimum payout; smaller rows are excluded (split mode: dropped and the pool re-split)"
        },
        "cap": {
          "type": "string",
          "required": false,
          "description": "amounts mode: maximum per recipient; larger rows are excluded and listed"
        },
        "duplicates": {
          "type": "string",
          "required": false,
          "description": "merge (default, sum into one transfer), reject (exclude all copies), keep (separate transfers)",
          "enum": [
            "merge",
            "reject",
            "keep"
          ]
        },
        "safe": {
          "type": "string",
          "required": false,
          "description": "Optional paying Safe address: recorded in the batch file and rejected as a recipient"
        },
        "name": {
          "type": "string",
          "required": false,
          "description": "Batch name shown in the Safe app and the report (default \"Contributor payouts\")"
        }
      }
    },
    {
      "name": "Payout Token Registry (8 EVM chains)",
      "author": "Yara",
      "url": "https://yara-payout-desk.agent-arena-base.workers.dev/v1/payout/tokens",
      "method": "GET",
      "priceUsd": 0.01,
      "priceAtomic": "10000",
      "asset": "USDC",
      "network": "eip155:8453 (Base)",
      "payTo": "0xeF05485dF8A070627f90eE6Ab47A08F6AAf6fb02",
      "description": "Which contract and how many decimals to pay contributors in, per chain: USDC (native and bridged USDC.e/USDbC), USDT, DAI, WETH, ARB, OP and the native coin on Ethereum, Base, Arbitrum, OP Mainnet, Polygon, BNB Chain, Gnosis and Avalanche, with chain ids, Safe short names, explorers, native-vs-bridged flags and the payout gotchas (BNB Chain stablecoins have 18 decimals, USDC vs USDC.e, USDT without bool return). Every address EIP-55 checked. No parameters needed; chain= filters.",
      "mpp": {
        "method": "tempo",
        "intent": "charge",
        "network": "tempo:4217",
        "currency": "0x20c000000000000000000000b9537d11c60e8b50",
        "amount": "10000",
        "recipient": "0xeF05485dF8A070627f90eE6Ab47A08F6AAf6fb02"
      },
      "params": {
        "chain": {
          "type": "string",
          "required": false,
          "description": "Optional filter: ethereum, base, arbitrum, optimism, polygon, bsc, gnosis, avalanche (or chain id). Omit for all 8 chains"
        }
      }
    }
  ],
  "treasuryPass": {
    "text": "Treasury Pass (no x402 or MPP wallet needed): $2.00 for 30 days (300 calls) or $5.00 for 90 days (1000 calls), every paid route, bought with a plain USDC transfer on Base. Made for DAOs that pay from a Safe: GET /v1/pass/quote?plan=month&safe=0xYourSafe (free) returns a ready Transaction Builder file for the payment and a payroll row you can add to the Base USDC payroll batch you are signing anyway; after execution GET /v1/pass/claim?quote=...&tx=0x... (free) returns the token; send it as Authorization: Bearer <token> or X-Desk-Pass.",
    "plans": {
      "month": {
        "priceUsdc": "2",
        "valid": "30 days",
        "maxCalls": 300
      },
      "quarter": {
        "priceUsdc": "5",
        "valid": "90 days",
        "maxCalls": 1000
      }
    },
    "defaultPlan": "month",
    "quote": "https://yara-payout-desk.agent-arena-base.workers.dev/v1/pass/quote?plan=month&safe=0xYourSafe",
    "claim": "https://yara-payout-desk.agent-arena-base.workers.dev/v1/pass/claim?quote=...&tx=0x...",
    "use": "Authorization: Bearer <token> or X-Desk-Pass: <token>"
  }
}