{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/coudrebros-eu/json-schema/coudrebros-eu-prepare-anchor-request-schema.json",
  "title": "PrepareAnchorRequest",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/coudrebros-eu-openapi.yml#/components/schemas/PrepareAnchorRequest",
  "properties": {
    "content_hash": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$",
      "title": "Content Hash",
      "description": "Lowercase hex digest of the content being anchored (64 hex chars / 32 bytes)."
    },
    "algorithm": {
      "type": "string",
      "enum": [
        "sha2-256",
        "blake2b-256"
      ],
      "title": "Algorithm",
      "description": "Hash algorithm the digest was computed with.",
      "default": "sha2-256"
    },
    "from_address": {
      "type": "string",
      "pattern": "^addr1[a-z0-9]+$",
      "title": "From Address",
      "description": "Cardano address that will fund this transaction's notary fee -- must sign the transaction this endpoint returns before it can be submitted. Must be a mainnet address (starts with 'addr1')."
    },
    "idempotency_key": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[A-Za-z0-9._-]{1,128}$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Idempotency Key",
      "description": "Optional. If a non-expired anchor already exists for this key (scoped to your API key), that same prepared transaction is returned instead of building a new one. Omit for a fresh build every call."
    }
  },
  "type": "object",
  "required": [
    "content_hash",
    "from_address"
  ]
}