{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://lydiahub.online/verified-packet-schema.json",
  "title": "ResetPulse verified public signal packet",
  "description": "A single source-private packet containing the current public signal and its SHA-256 evidence receipt.",
  "type": "object",
  "required": ["schema", "generatedAt", "checkedAt", "freshness", "signalVersion", "primarySignal", "latestContext", "receipt", "boundary", "links"],
  "properties": {
    "schema": { "const": "resetpulse.verified-packet.v1" },
    "generatedAt": { "type": "string", "format": "date-time" },
    "checkedAt": { "type": "string", "format": "date-time" },
    "freshness": { "$ref": "https://lydiahub.online/public-signal-schema.json#/properties/freshness" },
    "signalVersion": { "type": "string", "pattern": "^v1-[0-9a-f]{8}$" },
    "primarySignal": { "$ref": "https://lydiahub.online/public-signal-schema.json#/$defs/signal" },
    "latestContext": { "anyOf": [{ "$ref": "https://lydiahub.online/public-signal-schema.json#/$defs/signal" }, { "type": "null" }] },
    "receipt": {
      "type": "object",
      "required": ["schema", "schemaUrl", "value", "record"],
      "properties": {
        "schema": { "const": "resetpulse.evidence.v1" },
        "schemaUrl": { "type": "string", "format": "uri" },
        "value": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
        "record": { "$ref": "https://lydiahub.online/evidence-schema.json#/properties/record" },
        "history": { "$ref": "https://lydiahub.online/evidence-schema.json#/properties/receiptHistory" }
      },
      "additionalProperties": false
    },
    "boundary": {
      "type": "object",
      "required": ["credentialsRequired", "privateAccountTelemetry", "primaryIsTheDefaultEvidenceTarget", "contextDoesNotReplacePrimary", "note"],
      "properties": {
        "credentialsRequired": { "const": false },
        "privateAccountTelemetry": { "const": false },
        "primaryIsTheDefaultEvidenceTarget": { "const": true },
        "contextDoesNotReplacePrimary": { "const": true },
        "note": { "type": "string" }
      },
      "additionalProperties": false
    },
    "links": { "type": "object", "additionalProperties": { "type": "string", "format": "uri" } }
  },
  "additionalProperties": false
}
