{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://thehiveryiq.com/.well-known/schemas/capture-commitment-v1.json",
  "title": "Capture Commitment Receipt r1.0.0",
  "description": "Capture Commitment receipt. Recomputes a capture structure from caller supplied evidence rather than signing one opaque evidence digest: the frame commitment set, the frame sequence digest, the segment chain, the container binding, the decoded binding, digest distinctness, and the declared skew are all rebuilt at verify time, so a disclosure that does not reconcile is refused. This receipt is distinct from media.origin, which carries origin and rights claims that a caller asserted and never inspects the bytes, and it is distinct from MoRSo, which extends a valid parent media.origin receipt and answers a meaning bearing edit question about an excerpt. capture.commitment requires no parent receipt and answers only where an excerpt sits inside a committed recording, in milliseconds. These three must never be merged or aliased.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "receipt_id",
    "algorithm",
    "key_id",
    "ts",
    "payload_sha256",
    "sig_b64u",
    "signed_body"
  ],
  "properties": {
    "receipt_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9._:-]{8,128}$"
    },
    "algorithm": {
      "type": "string",
      "const": "Ed25519"
    },
    "key_id": {
      "type": "string",
      "pattern": "^did:(hive|web|key):[A-Za-z0-9._:%-]+$"
    },
    "ts": {
      "type": "integer",
      "minimum": 1600000000
    },
    "payload_sha256": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "sig_b64u": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{80,120}$"
    },
    "signed_body": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "receipt_type",
        "schema",
        "capture_commitment",
        "boundary"
      ],
      "properties": {
        "receipt_type": {
          "type": "string",
          "const": "capture.commitment"
        },
        "schema": {
          "type": "string",
          "const": "r1.0.0"
        },
        "capture_commitment": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "commitment_id",
            "declared_at",
            "recorded_at",
            "skew_bound_ms",
            "observed_skew_ms",
            "skew_class",
            "capture",
            "canonical_form",
            "container_digest",
            "decoded_digest",
            "frame_ms",
            "frame_count",
            "frame_commitment_scheme",
            "frame_sequence_digest",
            "segment_chain_head",
            "possession_class",
            "custody_role",
            "evidence_access_class",
            "salt_commitment"
          ],
          "properties": {
            "commitment_id": {
              "type": "string",
              "pattern": "^cc_[0-9a-f]{16,64}$"
            },
            "declared_at": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
            },
            "recorded_at": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$"
            },
            "skew_bound_ms": {
              "type": "integer",
              "minimum": 1,
              "maximum": 86400000
            },
            "observed_skew_ms": {
              "type": "integer",
              "minimum": 0,
              "maximum": 86400000
            },
            "skew_class": {
              "type": "string",
              "enum": [
                "within_declared_bound",
                "exceeds_declared_bound"
              ]
            },
            "capture": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "capture_class",
                "container_type",
                "source_byte_length",
                "source_channel_count",
                "source_sample_rate_hz"
              ],
              "properties": {
                "capture_class": {
                  "type": "string",
                  "enum": [
                    "local_file_selection",
                    "live_microphone_capture",
                    "page_supplied_sample",
                    "programmatic_buffer"
                  ]
                },
                "container_type": {
                  "type": "string",
                  "enum": [
                    "audio_wav",
                    "audio_mpeg",
                    "audio_mp4",
                    "audio_aac",
                    "audio_ogg",
                    "audio_webm",
                    "audio_flac",
                    "audio_amr",
                    "audio_other"
                  ]
                },
                "source_byte_length": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 4294967296
                },
                "source_channel_count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 32
                },
                "source_sample_rate_hz": {
                  "type": "integer",
                  "minimum": 4000,
                  "maximum": 384000
                }
              }
            },
            "canonical_form": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "sample_rate_hz",
                "channel_count",
                "sample_encoding",
                "sample_count",
                "byte_length",
                "duration_ms",
                "downmix_rule"
              ],
              "properties": {
                "sample_rate_hz": {
                  "type": "integer",
                  "minimum": 4000,
                  "maximum": 384000
                },
                "channel_count": {
                  "type": "integer",
                  "const": 1
                },
                "sample_encoding": {
                  "type": "string",
                  "const": "pcm_s16le"
                },
                "sample_count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 4294967296
                },
                "byte_length": {
                  "type": "integer",
                  "minimum": 2,
                  "maximum": 8589934592
                },
                "duration_ms": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 86400000
                },
                "downmix_rule": {
                  "type": "string",
                  "const": "channel_arithmetic_mean"
                }
              }
            },
            "container_digest": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            "decoded_digest": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            "frame_ms": {
              "type": "integer",
              "const": 1000
            },
            "frame_count": {
              "type": "integer",
              "minimum": 1,
              "maximum": 36000
            },
            "frame_commitment_scheme": {
              "type": "string",
              "const": "hmac_sha256_salted_frame_v1"
            },
            "frame_sequence_digest": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            "segment_chain_head": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            "possession_class": {
              "type": "string",
              "const": "no_media_transmitted"
            },
            "custody_role": {
              "type": "string",
              "const": "non_possessing_recorder"
            },
            "evidence_access_class": {
              "type": "string",
              "enum": [
                "confidential_independent",
                "issuer_only",
                "public_commitment_only"
              ]
            },
            "salt_commitment": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            }
          }
        },
        "boundary": {
          "type": "string",
          "const": "This receipt fixes what was committed, not what was heard. The recording was never transmitted to the recorder and the recorder never decoded it, so nothing here asserts that the committed digests belong to any particular sound, speaker, event, or file on disk. What is fixed is this: at the stated instant a holder committed a container digest, a decoded digest, and an ordered per second commitment chain over a recording of the stated length, under a secret salt whose commitment is published here. Anyone later holding the recording can recompute all three and show they match, and anyone holding a clip can show it sits at an exact position in that chain with nothing inserted, removed, or reordered around it. No digest here survives a re encode of the audio, and this receipt makes no claim that it does. It is not a detector, not a watermark, not an identification of a voice, and not a statement that the recording is authentic, consented, human, or machine made."
        }
      }
    }
  }
}
