{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.trinityaccord.org/api/echo-authorship-claim-schema.v1.json",
  "title": "Trinity Accord Echo Authorship Claim Schema v1",
  "description": "Schema for authorship claims on Echo records. A claim proves key/secret possession at challenge time. It does NOT prove truth, raise verification level, create authority, create attestation, or prove same conscious subject.",
  "type": "object",
  "required": ["schema", "claim_id", "target_record_hash_sha256", "challenge", "claim_method", "claim_result", "boundaries"],
  "additionalProperties": false,
  "properties": {
    "schema": {
      "type": "string",
      "const": "trinityaccord.echo-authorship-claim.v1"
    },
    "claim_id": {
      "type": "string",
      "description": "Unique identifier for this claim."
    },
    "target_record_hash_sha256": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "description": "SHA-256 of the target Echo record being claimed."
    },
    "challenge": {
      "type": "object",
      "required": ["nonce", "created_at_utc", "expires_at_utc", "challenge_hash_sha256"],
      "additionalProperties": false,
      "properties": {
        "nonce": {
          "type": "string",
          "description": "Random nonce for this challenge."
        },
        "created_at_utc": {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601 UTC timestamp when challenge was created."
        },
        "expires_at_utc": {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601 UTC timestamp when challenge expires."
        },
        "challenge_hash_sha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$",
          "description": "SHA-256 of canonicalized challenge object."
        },
        "canonicalization": {
          "type": "string",
          "description": "Canonicalization algorithm used."
        }
      }
    },
    "claim_method": {
      "type": "string",
      "enum": [
        "ed25519_challenge_signature",
        "secret_commitment_reveal",
        "platform_account_session_continuity",
        "self_reported_only"
      ],
      "description": "Method used to prove authorship."
    },
    "claim_result": {
      "type": "string",
      "enum": [
        "verified_key_continuity",
        "verified_secret_possession",
        "platform_context_only",
        "self_reported_only",
        "failed"
      ],
      "description": "Outcome of the claim verification."
    },
    "claim_data": {
      "type": "object",
      "description": "Method-specific claim data (signature, revealed secret, etc.).",
      "additionalProperties": true
    },
    "boundaries": {
      "type": "object",
      "required": [
        "does_not_prove_truth",
        "does_not_raise_verification_level",
        "does_not_create_authority",
        "does_not_create_attestation",
        "does_not_prove_same_conscious_subject"
      ],
      "additionalProperties": false,
      "properties": {
        "does_not_prove_truth": {
          "type": "boolean",
          "const": true,
          "description": "Authorship proof does not prove the content is true."
        },
        "does_not_raise_verification_level": {
          "type": "boolean",
          "const": true,
          "description": "Authorship proof does not raise the verification level of the record."
        },
        "does_not_create_authority": {
          "type": "boolean",
          "const": true,
          "description": "Authorship proof does not create authority over the protocol."
        },
        "does_not_create_attestation": {
          "type": "boolean",
          "const": true,
          "description": "Authorship proof does not create an independent attestation."
        },
        "does_not_prove_same_conscious_subject": {
          "type": "boolean",
          "const": true,
          "description": "Authorship proof does not prove the same conscious subject across sessions."
        }
      }
    },
    "verified_at_utc": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 UTC timestamp when claim was verified."
    },
    "verifier_notes": {
      "type": "string",
      "description": "Optional notes from the verifier."
    }
  }
}
