{
  "openapi": "3.1.0",
  "info": {
    "title": "truth gateway",
    "version": "0.1.0",
    "description": "Labels: {\"mode\":\"live\",\"status\":\"LIVE_LIMITED\",\"anchoring\":\"UNANCHORED\",\"review\":\"LOCAL_VERIFIED\"}. A record from this system states that a named witness observed the specified input at the stated time and, when FINALIZED, that a stated payer paid a stated amount for that record. It does not establish that the observed content is true, authentic, lawful, compliant, owned by anyone, fair, or correct outside its stated scope. FINALIZED, OBSERVED, REFUSED and REJECTED describe the substrate's own gate outcomes, not moral, legal or factual judgments."
  },
  "servers": [
    {
      "url": "https://genesis402.com"
    }
  ],
  "paths": {
    "/.well-known/truth.json": {
      "get": {
        "summary": "Manifest"
      }
    },
    "/status.json": {
      "get": {
        "summary": "Labels and rails"
      }
    },
    "/pricing.json": {
      "get": {
        "summary": "Per-observation prices with TEST/EARLY_ACCESS label"
      }
    },
    "/health": {
      "get": {
        "summary": "Head of ledger"
      }
    },
    "/anchor": {
      "get": {
        "summary": "Latest internal merkle anchor (UNANCHORED externally)"
      }
    },
    "/entries": {
      "get": {
        "summary": "Chain segment",
        "parameters": [
          {
            "name": "from",
            "in": "query"
          },
          {
            "name": "limit",
            "in": "query"
          }
        ]
      }
    },
    "/entries/{seq}": {
      "get": {
        "summary": "One entry"
      }
    },
    "/verify/{hash}": {
      "get": {
        "summary": "Entry, structural verdict, signature verdict, chain links, inclusion proof, referenced_by"
      }
    },
    "/witness/document": {
      "post": {
        "summary": "Records the submission of a SHA-256 document digest with declared size, media type and name.",
        "description": "observation=submitted. A record from this system states that a named witness observed the specified input at the stated time and, when FINALIZED, that a stated payer paid a stated amount for that record. It does not establish that the observed content is true, authentic, lawful, compliant, owned by anyone, fair, or correct outside its stated scope. FINALIZED, OBSERVED, REFUSED and REJECTED describe the substrate's own gate outcomes, not moral, legal or factual judgments.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
                "bytes": 3,
                "media_type": "text/plain",
                "name": "hello.txt"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "truth-attestation-v1 (see docs/schema)"
          },
          "400": {
            "description": "body not observable before payment; nothing written"
          },
          "402": {
            "description": "x402 payment required: { x402Version, accepts[], alt_rails[] }"
          },
          "503": {
            "description": "paid routes disabled (PENDING_CONFIGURATION)"
          }
        }
      }
    },
    "/witness/ai-output": {
      "post": {
        "summary": "Records the submission of prompt and output SHA-256 digests with declared provider, model and request id.",
        "description": "observation=submitted. A record from this system states that a named witness observed the specified input at the stated time and, when FINALIZED, that a stated payer paid a stated amount for that record. It does not establish that the observed content is true, authentic, lawful, compliant, owned by anyone, fair, or correct outside its stated scope. FINALIZED, OBSERVED, REFUSED and REJECTED describe the substrate's own gate outcomes, not moral, legal or factual judgments.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "provider": "anthropic",
                "model": "claude-fable-5-1",
                "request_id": "msg_01ABC",
                "prompt_sha256": "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae",
                "output_sha256": "fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9",
                "tokens_in": 12,
                "tokens_out": 34
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "truth-attestation-v1 (see docs/schema)"
          },
          "400": {
            "description": "body not observable before payment; nothing written"
          },
          "402": {
            "description": "x402 payment required: { x402Version, accepts[], alt_rails[] }"
          },
          "503": {
            "description": "paid routes disabled (PENDING_CONFIGURATION)"
          }
        }
      }
    },
    "/witness/http-served": {
      "post": {
        "summary": "Fetches a public URL and records status, selected headers and the SHA-256 of the served body.",
        "description": "observation=direct. A record from this system states that a named witness observed the specified input at the stated time and, when FINALIZED, that a stated payer paid a stated amount for that record. It does not establish that the observed content is true, authentic, lawful, compliant, owned by anyone, fair, or correct outside its stated scope. FINALIZED, OBSERVED, REFUSED and REJECTED describe the substrate's own gate outcomes, not moral, legal or factual judgments.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "url": "https://example.com/"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "truth-attestation-v1 (see docs/schema)"
          },
          "400": {
            "description": "body not observable before payment; nothing written"
          },
          "402": {
            "description": "x402 payment required: { x402Version, accepts[], alt_rails[] }"
          },
          "503": {
            "description": "paid routes disabled (PENDING_CONFIGURATION)"
          }
        }
      }
    },
    "/witness/evm-tx": {
      "post": {
        "summary": "Reads a transaction receipt from an EVM JSON-RPC node and records it as returned (block, from, to, raw status, gas, logs digest).",
        "description": "observation=direct. A record from this system states that a named witness observed the specified input at the stated time and, when FINALIZED, that a stated payer paid a stated amount for that record. It does not establish that the observed content is true, authentic, lawful, compliant, owned by anyone, fair, or correct outside its stated scope. FINALIZED, OBSERVED, REFUSED and REJECTED describe the substrate's own gate outcomes, not moral, legal or factual judgments.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "chain_id": 8453,
                "tx_hash": "0x0000000000000000000000000000000000000000000000000000000000000000"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "truth-attestation-v1 (see docs/schema)"
          },
          "400": {
            "description": "body not observable before payment; nothing written"
          },
          "402": {
            "description": "x402 payment required: { x402Version, accepts[], alt_rails[] }"
          },
          "503": {
            "description": "paid routes disabled (PENDING_CONFIGURATION)"
          }
        }
      }
    },
    "/witness/xrpl-tx": {
      "post": {
        "summary": "Reads a validated XRPL transaction by hash and records ledger index, type, accounts, fee and the raw engine result.",
        "description": "observation=direct. A record from this system states that a named witness observed the specified input at the stated time and, when FINALIZED, that a stated payer paid a stated amount for that record. It does not establish that the observed content is true, authentic, lawful, compliant, owned by anyone, fair, or correct outside its stated scope. FINALIZED, OBSERVED, REFUSED and REJECTED describe the substrate's own gate outcomes, not moral, legal or factual judgments.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "tx_hash": "0000000000000000000000000000000000000000000000000000000000000000",
                "network": "mainnet"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "truth-attestation-v1 (see docs/schema)"
          },
          "400": {
            "description": "body not observable before payment; nothing written"
          },
          "402": {
            "description": "x402 payment required: { x402Version, accepts[], alt_rails[] }"
          },
          "503": {
            "description": "paid routes disabled (PENDING_CONFIGURATION)"
          }
        }
      }
    },
    "/witness/correction": {
      "post": {
        "summary": "Records the submission of a reference to a prior ledger entry, with an optional replacement digest. Append-only; the referenced entry is unchanged.",
        "description": "observation=submitted. A record from this system states that a named witness observed the specified input at the stated time and, when FINALIZED, that a stated payer paid a stated amount for that record. It does not establish that the observed content is true, authentic, lawful, compliant, owned by anyone, fair, or correct outside its stated scope. FINALIZED, OBSERVED, REFUSED and REJECTED describe the substrate's own gate outcomes, not moral, legal or factual judgments.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "references": "0000000000000000000000000000000000000000000000000000000000000000",
                "replacement_sha256": "1111111111111111111111111111111111111111111111111111111111111111",
                "note_sha256": "2222222222222222222222222222222222222222222222222222222222222222"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "truth-attestation-v1 (see docs/schema)"
          },
          "400": {
            "description": "body not observable before payment; nothing written"
          },
          "402": {
            "description": "x402 payment required: { x402Version, accepts[], alt_rails[] }"
          },
          "503": {
            "description": "paid routes disabled (PENDING_CONFIGURATION)"
          }
        }
      }
    },
    "/witness/g402-receipt": {
      "post": {
        "summary": "Records the submission of a genesis402-receipt-v1 by its id, kind, mode, canonical body hash, leaf hash, segment root and issuer key. The receipt's decision, labels and claims are not recorded.",
        "description": "observation=submitted. A record from this system states that a named witness observed the specified input at the stated time and, when FINALIZED, that a stated payer paid a stated amount for that record. It does not establish that the observed content is true, authentic, lawful, compliant, owned by anyone, fair, or correct outside its stated scope. FINALIZED, OBSERVED, REFUSED and REJECTED describe the substrate's own gate outcomes, not moral, legal or factual judgments.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "receiptVersion": "genesis402-receipt-v1",
                "receiptId": "g402_rcpt_46e945cf29cd",
                "kind": "payment.dry_run",
                "mode": "DRY_RUN",
                "issuer": {
                  "id": "unykorn-control",
                  "keyId": "g402-key-25a7b4924d932aa9"
                },
                "lifecycle": {
                  "issuedAt": "2026-09-13T11:59:13.828Z"
                },
                "integrity": {
                  "canonicalBodyHash": "sha256:13dd28671f537cf65f4e8e50cf132209f778e762da6ce812d4a5d8090b3ba467",
                  "leafHash": "500f1e63a5aa15356bce372a2affa5f2f3b5fe2d58f41370dc3439c2f75679f9",
                  "segmentRoot": "6c8f938e75f08fd65969950a764eba5b252d517acf626d32810d92546b6b9212"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "truth-attestation-v1 (see docs/schema)"
          },
          "400": {
            "description": "body not observable before payment; nothing written"
          },
          "402": {
            "description": "x402 payment required: { x402Version, accepts[], alt_rails[] }"
          },
          "503": {
            "description": "paid routes disabled (PENDING_CONFIGURATION)"
          }
        }
      }
    }
  }
}