DocsThe data protocol

claim/v2

packages/core/schema/claim-v2.schema.json
On this page

One attributed, immutable statement about an account, a contract or a group. Named by the SHA-256 of its RFC 8785 canonical JSON, without id and proof. The rules a schema can't say are in validateClaim. See specs/002-system/contracts/claims.md. v2 adds annotations: a name, a note and a link in words (named, noted, linked), a person's own word (stated), research as a ground, and a transaction, a proposal and a quote in the evidence. A name or a person in its words is kept in a person's own project only (people.ts).

Fields

Field Type or allowed values Presence in its parent Description
petal "claim/v2" Required
id string Required
subject string Required Namespaced. refs.ts says which namespaces parse. No natural person.
verb "holds" / "measured" / "delegates_to" / "owned_by" / "member_of" / "holds_role" / "voted" / "proposed" / "reviewed" / "paid" / "funded_by" / "signer_of" / "deployed" / "controls" / "declares_same_controller" / "shares_signer" / "moves_with" / "same_funder" / "same_address" / "labelled" / "requests_correction" / "challenges" / "responds" / "retracts" / "supersedes" / "confidence" / "named" / "noted" / "linked" Required A closed list per version. Each verb's definition is in verbs.ts and contracts/claims.md.
object choice Required
object (variant 1) string Required Namespaced. refs.ts says which namespaces parse. No natural person.
object (variant 2) object Required
object (variant 2).value string Required A number as a string, a closed tag, or, for named, noted and linked, words or a link.
object (variant 2).unit string Optional
qualifiers object Optional Checked per verb. Amounts are strings.
qualifiers.* string Optional
valid_from string Optional UTC with Z, so one moment has one spelling and one id.
valid_to string Optional UTC with Z, so one moment has one spelling and one id.
issued_at string Required UTC with Z, so one moment has one spelling and one id.
as_of object Optional
as_of.chain string Required
as_of.block integer Required
kind "observed" / "declared" / "stated" / "sourced" / "inferred" Required
method string Optional Required if inferred: a rule or model, its version, and an optional hash of its parameters.
evidence array Required
evidence[] object Required
evidence[].snapshot_sha256 string Optional
evidence[].url string Optional
evidence[].url_sha256 string Optional
evidence[].retrieved_at string Optional UTC with Z, so one moment has one spelling and one id.
evidence[].claim_id string Optional
evidence[].note string Optional Short. In a published claim it must not name a person (people.ts).
evidence[].tx string Optional The transaction it rests on, on its chain: <caip2>:<hash>.
evidence[].proposal string Optional The proposal it rests on: proposal:<caip2>:<key>.
evidence[].quote string Optional The source's own words, exactly as written.
by string Required Namespaced. refs.ts says which namespaces parse. No natural person.
via string Optional Namespaced. refs.ts says which namespaces parse. No natural person.
proof choice Optional Outside the hash: the same claim can carry different proofs.
proof (variant 1) object Optional
proof (variant 1).type "tx" Required
proof (variant 1).hash string Required
proof (variant 2) object Optional
proof (variant 2).type "nep413" Required
proof (variant 2).account_id string Required
proof (variant 2).public_key string Required
proof (variant 2).signature string Required
proof (variant 2).message string Required
proof (variant 2).nonce string Required
proof (variant 2).recipient string Required
proof (variant 3) object Optional
proof (variant 3).type "nearai" Required
proof (variant 3).model string Required
proof (variant 3).completion_id string Required
proof (variant 3).text string Required
proof (variant 3).signature string Required
proof (variant 3).signing_address string Required
proof (variant 3).signing_algo "ecdsa" / "ed25519" Required

Examples

claim.v2.json

Fixture source

{
  "petal": "claim/v2",
  "subject": "eip155:100:0x1111111111111111111111111111111111111111",
  "verb": "named",
  "object": {
    "value": "Ada"
  },
  "issued_at": "2026-11-10T12:00:00Z",
  "kind": "sourced",
  "evidence": [
    {
      "url": "https://gnosisscan.io/tx/0xabababababababababababababababababababababababababababababababab",
      "tx": "eip155:100:0xabababababababababababababababababababababababababababababababab",
      "proposal": "proposal:eip155:100:0x2222222222222222222222222222222222222222:7",
      "quote": "Elect Ada as Keeper of the Handbook",
      "note": "The proposal names this address as the keeper. Passed; its action succeeded."
    }
  ],
  "by": "near:mainnet:reed.example.near",
  "via": "tool:codex@2026-11-10",
  "id": "fce63b2b052eca1ee6bafb80aff608c6032760fd9ff5a45a6cc8364569c5fc34"
}

Full schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:petal:schema:claim:v2",
  "title": "Petal claim v2",
  "description": "One attributed, immutable statement about an account, a contract or a group. Named by the SHA-256 of its RFC 8785 canonical JSON, without id and proof. The rules a schema can't say are in validateClaim. See specs/002-system/contracts/claims.md. v2 adds annotations: a name, a note and a link in words (named, noted, linked), a person's own word (stated), research as a ground, and a transaction, a proposal and a quote in the evidence. A name or a person in its words is kept in a person's own project only (people.ts).",
  "type": "object",
  "required": [
    "petal",
    "id",
    "subject",
    "verb",
    "object",
    "issued_at",
    "kind",
    "evidence",
    "by"
  ],
  "additionalProperties": false,
  "properties": {
    "petal": {
      "const": "claim/v2"
    },
    "id": {
      "$ref": "#/$defs/sha256"
    },
    "subject": {
      "$ref": "#/$defs/entityRef"
    },
    "verb": {
      "enum": [
        "holds",
        "measured",
        "delegates_to",
        "owned_by",
        "member_of",
        "holds_role",
        "voted",
        "proposed",
        "reviewed",
        "paid",
        "funded_by",
        "signer_of",
        "deployed",
        "controls",
        "declares_same_controller",
        "shares_signer",
        "moves_with",
        "same_funder",
        "same_address",
        "labelled",
        "requests_correction",
        "challenges",
        "responds",
        "retracts",
        "supersedes",
        "confidence",
        "named",
        "noted",
        "linked"
      ],
      "description": "A closed list per version. Each verb's definition is in verbs.ts and contracts/claims.md."
    },
    "object": {
      "oneOf": [
        {
          "$ref": "#/$defs/entityRef"
        },
        {
          "type": "object",
          "required": [
            "value"
          ],
          "additionalProperties": false,
          "properties": {
            "value": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4000,
              "description": "A number as a string, a closed tag, or, for named, noted and linked, words or a link."
            },
            "unit": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            }
          }
        }
      ]
    },
    "qualifiers": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "maxLength": 256
      },
      "description": "Checked per verb. Amounts are strings."
    },
    "valid_from": {
      "$ref": "#/$defs/datetime"
    },
    "valid_to": {
      "$ref": "#/$defs/datetime"
    },
    "issued_at": {
      "$ref": "#/$defs/datetime"
    },
    "as_of": {
      "type": "object",
      "required": [
        "chain",
        "block"
      ],
      "additionalProperties": false,
      "properties": {
        "chain": {
          "type": "string",
          "pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$"
        },
        "block": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      }
    },
    "kind": {
      "enum": [
        "observed",
        "declared",
        "stated",
        "sourced",
        "inferred"
      ]
    },
    "method": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._/-]*@[a-zA-Z0-9][a-zA-Z0-9._/-]*(#[0-9a-f]{8,64})?$",
      "description": "Required if inferred: a rule or model, its version, and an optional hash of its parameters."
    },
    "evidence": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/evidence"
      }
    },
    "by": {
      "$ref": "#/$defs/entityRef"
    },
    "via": {
      "$ref": "#/$defs/entityRef"
    },
    "proof": {
      "oneOf": [
        {
          "$ref": "#/$defs/txProof"
        },
        {
          "$ref": "#/$defs/nep413Proof"
        },
        {
          "$ref": "#/$defs/nearAiProof"
        }
      ],
      "description": "Outside the hash: the same claim can carry different proofs."
    }
  },
  "if": {
    "type": "object",
    "properties": {
      "kind": {
        "const": "inferred"
      }
    },
    "required": [
      "kind"
    ]
  },
  "then": {
    "type": "object",
    "properties": {
      "method": true
    },
    "required": [
      "method"
    ]
  },
  "else": {
    "not": {
      "type": "object",
      "properties": {
        "method": true
      },
      "required": [
        "method"
      ]
    }
  },
  "$defs": {
    "sha256": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "datetime": {
      "type": "string",
      "format": "date-time",
      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]{1,9})?Z$",
      "description": "UTC with Z, so one moment has one spelling and one id."
    },
    "entityRef": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9-]*:[^\\s]+$",
      "maxLength": 300,
      "description": "Namespaced. refs.ts says which namespaces parse. No natural person."
    },
    "evidence": {
      "type": "object",
      "minProperties": 1,
      "additionalProperties": false,
      "properties": {
        "snapshot_sha256": {
          "$ref": "#/$defs/sha256"
        },
        "url": {
          "type": "string",
          "minLength": 1,
          "maxLength": 2048
        },
        "url_sha256": {
          "$ref": "#/$defs/sha256"
        },
        "retrieved_at": {
          "$ref": "#/$defs/datetime"
        },
        "claim_id": {
          "$ref": "#/$defs/sha256"
        },
        "note": {
          "type": "string",
          "minLength": 1,
          "maxLength": 280,
          "description": "Short. In a published claim it must not name a person (people.ts)."
        },
        "tx": {
          "type": "string",
          "pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}:[0-9a-zA-Z]{16,128}$",
          "description": "The transaction it rests on, on its chain: <caip2>:<hash>."
        },
        "proposal": {
          "$ref": "#/$defs/entityRef",
          "description": "The proposal it rests on: proposal:<caip2>:<key>."
        },
        "quote": {
          "type": "string",
          "minLength": 1,
          "maxLength": 1000,
          "description": "The source's own words, exactly as written."
        }
      }
    },
    "txProof": {
      "type": "object",
      "required": [
        "type",
        "hash"
      ],
      "additionalProperties": false,
      "properties": {
        "type": {
          "const": "tx"
        },
        "hash": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "nep413Proof": {
      "type": "object",
      "required": [
        "type",
        "account_id",
        "public_key",
        "signature",
        "message",
        "nonce",
        "recipient"
      ],
      "additionalProperties": false,
      "properties": {
        "type": {
          "const": "nep413"
        },
        "account_id": {
          "type": "string"
        },
        "public_key": {
          "type": "string",
          "pattern": "^ed25519:"
        },
        "signature": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "nonce": {
          "type": "string"
        },
        "recipient": {
          "type": "string"
        }
      }
    },
    "nearAiProof": {
      "type": "object",
      "required": [
        "type",
        "model",
        "completion_id",
        "text",
        "signature",
        "signing_address",
        "signing_algo"
      ],
      "additionalProperties": false,
      "properties": {
        "type": {
          "const": "nearai"
        },
        "model": {
          "type": "string"
        },
        "completion_id": {
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "signature": {
          "type": "string"
        },
        "signing_address": {
          "type": "string"
        },
        "signing_algo": {
          "enum": [
            "ecdsa",
            "ed25519"
          ]
        }
      }
    }
  }
}