openapi: 3.2.0 info: title: FarmDash Agent Proof API version: 2.0.0 description: 'WARNING: Running trade executions and cancellations places real perpetual futures trades and alters active market exposure, carrying significant risk of financial loss.' contact: name: FarmDash Engineering url: https://www.farmdash.one/agents license: name: MIT servers: - url: https://www.farmdash.one/api description: Production tags: - name: Proof paths: /v1/agent/receipts/share: post: operationId: createReceiptShare summary: Mint a public proof-of-outcome share link for a receipt description: 'Creates an unguessable, revocable bearer token (fdrsh_…) over a TERMINAL intent receipt (CONFIRMED, FAILED, or REJECTED — in-flight receipts are rejected with 409). Only the SHA-256 of the token is stored; the token is returned once and cannot be recovered. The served projection is sanitized (credential-shaped fields stripped recursively and every stripped path disclosed), digest-bound (SHA-256 full + public digests), outcome classified, and Ed25519-signed. Requires session ownership of the receipt''s parent intent.' tags: - Proof security: - bearerAuth: [] - {} servers: - url: https://www.farmdash.one description: Production (public proof paths live at the site root) requestBody: required: true content: application/json: schema: type: object required: - receipt_id - sessionId - agentAddress - sessionToken properties: receipt_id: type: string description: Receipt id starting with fdrcpt_ sessionId: type: string agentAddress: type: string sessionToken: type: string parameters: - $ref: '#/components/parameters/X-ClawHub-Skill' responses: '201': description: Share created — token shown once, never recoverable content: application/json: schema: type: object required: - ok - token - url - receipt_id - warning properties: ok: type: boolean const: true token: type: string description: fdrsh_-prefixed bearer token; store it now url: type: string format: uri receipt_id: type: string created_at: type: string format: date-time warning: type: string '400': $ref: '#/components/responses/BadRequest' '402': $ref: '#/components/responses/PaymentRequired' '404': description: Receipt not found '409': description: Receipt not terminal (still in flight) '429': $ref: '#/components/responses/RateLimitExceeded' delete: operationId: revokeReceiptShare summary: Revoke a receipt share link description: 'Revokes the share (public URL returns 410 afterwards). Only the creating agent (or internal service key) can revoke. Pass the token as ?token= or in the body, AND the session credentials used at creation (sessionId, agentAddress, and sessionToken via body or the X-FarmDash-Session-Token header). Revocation propagates immediately — share responses are served with Cache-Control: no-store.' tags: - Proof security: - bearerAuth: [] - {} servers: - url: https://www.farmdash.one description: Production (public proof paths live at the site root) parameters: - $ref: '#/components/parameters/X-ClawHub-Skill' - name: token in: query required: true schema: type: string requestBody: required: false content: application/json: schema: type: object properties: token: type: string sessionId: type: string agentAddress: type: string sessionToken: type: string responses: '200': description: Share revoked content: application/json: schema: type: object properties: ok: type: boolean const: true revoked: type: boolean const: true '400': $ref: '#/components/responses/BadRequest' '402': $ref: '#/components/responses/PaymentRequired' '403': description: Unknown share, already revoked, or not the creator '429': $ref: '#/components/responses/RateLimitExceeded' /r/{token}: get: operationId: resolveReceiptShare summary: Resolve a public receipt share (agent JSON or human page) description: 'Public, keyless, TOLL-FREE proof-of-outcome endpoint. Returns the sanitized receipt, outcome classification with retry guidance, dual integrity digests, and the Ed25519 signature block containing the detached signature bytes and the exact signed envelope — verify independently against /.well-known/farmdash-receipt-key.json. Responds JSON by default and a retro no-JS HTML card when Accept includes text/html. Revoked shares return 410. Responses are no-store (revocation is immediate); a `valid:true` signature flag is a server self-check — third parties MUST verify the signature themselves. Verification reads are never payment-walled but share the caller''s daily booth budget and 429 past it, so spam burns its own bucket. Share tokens are unguessable 256-bit bearer secrets with no listing endpoint, so enumeration is infeasible. Minting (POST /api/v1/agent/receipts/share) remains session- and toll-gated.' tags: - Proof security: - {} servers: - url: https://www.farmdash.one description: Production (public proof paths live at the site root) parameters: - $ref: '#/components/parameters/X-ClawHub-Skill' - name: token in: path required: true schema: type: string responses: '200': description: Shared receipt payload (JSON) or card (HTML) '404': description: Unknown share token '405': description: Method not allowed (resolve is GET-only) '410': description: Share revoked by its creator '429': $ref: '#/components/responses/RateLimitExceeded' /.well-known/farmdash-receipt-key.json: get: operationId: getReceiptProofKey summary: Public Ed25519 key for verifying shared-receipt signatures description: 'Publishes the JWK verification key ring (current key plus any retained/retired keys by kid) with the exact third-party verification recipe (canonicalize the share JSON receipt object, compare public_digest, verify the envelope signature with the key whose kid matches integrity.signature.kid). Long-cacheable. Key type is validated at load time (Ed25519 only).' tags: - Proof security: - {} servers: - url: https://www.farmdash.one description: Production (public proof paths live at the site root) parameters: - $ref: '#/components/parameters/X-ClawHub-Skill' responses: '200': description: Proof key document components: parameters: X-ClawHub-Skill: name: X-ClawHub-Skill in: header required: false schema: type: string pattern: ^[a-zA-Z0-9-]{1,128}$ example: farmdash-signal-architect description: 'ClawHub skill attribution. An installed FarmDash skill sends its canonical skill slug (e.g. farmdash-signal-architect) on every FarmDash API request so anonymous Scout usage can be attributed to the skill that drove it. Optional and analytics-only: absence never blocks a request, and malformed values are ignored. This is a skill identity, never a wallet address, API key, or user ID.' headers: X-RateLimit-Reset: description: UTC epoch seconds when the rate limit window resets schema: type: string X-RateLimit-Limit: description: Maximum requests allowed in the current window schema: type: string X-RateLimit-Remaining: description: Remaining requests in the current window schema: type: string schemas: PaymentRequiredError: type: object properties: ok: type: boolean example: false error: type: string example: payment_required code: type: string description: '`free_quota_exhausted` when the shared Scout allowance is spent; otherwise `payment_required`.' example: free_quota_exhausted message: type: string instruction: type: string enum: - STOP_RETRYING description: Present when an exhausted free caller must not repeat the same unpaid request. retry_same_request: type: boolean example: false next_action: type: string example: Wait for your quota reset, upgrade your plan, or use x402 paid access. quota: type: object properties: tier: type: string example: scout remaining: type: integer example: 0 reset_at: type: string format: date-time abuse_notice: type: string example: Repeated automated requests while quota is exhausted may result in temporary or permanent API blocking. retryable: type: boolean upgrade_url: type: string format: uri direct_upgrade_url: type: string format: uri rate_limit: type: object additionalProperties: true developer_sandbox: type: object additionalProperties: true payment_required: type: object properties: amount: type: string example: 0.01 USDC chain: type: string example: Base destination: type: string example: '0xb0Ed0d7bca24BBaD635B977C2efbE06742e33377' token: type: string chainId: type: integer example: 8453 ErrorResponse: type: object required: - error properties: ok: type: boolean example: false error: type: string code: type: string message: type: string retryable: type: boolean request_id: type: string details: type: object additionalProperties: true responses: PaymentRequired: description: Free-tier limit exceeded — x402 payment required headers: X-Payment-Required: schema: type: string X-Payment-Address: schema: type: string description: Treasury wallet (USDC on Base) X-Payment-Token: schema: type: string description: USDC contract on Base X-Payment-Amount: schema: type: string description: Amount in token decimals (990000 = 0.99 USDC) X-Payment-Chain-Id: schema: type: string description: 8453 (Base) content: application/json: schema: $ref: '#/components/schemas/PaymentRequiredError' BadRequest: description: Invalid parameters content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' RateLimitExceeded: description: Rate limit exceeded headers: Retry-After: schema: type: integer description: Seconds until rate limit resets X-RateLimit-Limit: $ref: '#/components/headers/X-RateLimit-Limit' X-RateLimit-Remaining: $ref: '#/components/headers/X-RateLimit-Remaining' X-RateLimit-Reset: $ref: '#/components/headers/X-RateLimit-Reset' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' securitySchemes: bearerAuth: type: http scheme: bearer description: Pioneer or Syndicate API key x-agent-use-cases: - id: bounded-autopilot name: Bounded Autopilot tier: Syndicate cadence: Every 5 minutes purpose: Run an always-on loop inside explicit budgets, allowlists, cooldowns, quote freshness, and local-signing requirements. primaryTools: - agent_onboard - create_session - configure_autopilot - autopilot_cycle - session_heartbeat stopConditions: - Budget, allowlist, cooldown, quote freshness, or risk bound is violated. - Required local EIP-191 or EIP-712 signature is missing. - Realized performance degrades enough to require analysis_only mode. - id: airdrop-rotation name: Airdrop Rotation Desk tier: Pioneer cadence: Daily or event-driven purpose: Watch Trail Heat, snapshots, multiplier changes, wallet health, and costs before entering, waiting, rotating, or exiting. primaryTools: - get_trail_heat - get_historical_trailheat - get_agent_events - simulate_points - get_swap_quote - simulate_swap_execution stopConditions: - Expected point edge is unclear or negative after fees and gas. - Sybil risk exceeds the configured threshold. - User constraints do not allow the target chain or protocol. - id: cross-chain-roi name: Cross-Chain ROI Gate tier: Pioneer cadence: Before any bridge purpose: Bridge only when net expected edge remains positive after bridge fee, gas, slippage, and execution risk buffer. primaryTools: - get_chain_breakdown - get_wallet_balances - get_token_prices - get_swap_quote - simulate_swap_execution - optimize_portfolio stopConditions: - netEdgeUsd is not positive. - Quote age exceeds the configured freshness limit. - Target chain is not allowlisted. - id: perps-hedge name: Perps Hedge Co-Pilot tier: Syndicate cadence: Before exposure changes purpose: Evaluate whether a farming position needs a Hyperliquid hedge, with no_trade as a valid outcome. primaryTools: - scan_funding_rates - scan_market_conditions - get_futures_account - analyze_futures_strategy - calculate_position_size stopConditions: - Research gate expires. - Strategy confidence, liquidity, jurisdiction, or guardrails do not support execution. - Daily loss or drawdown limit is reached.