{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "profile": {
      "type": "string",
      "const": "owp-market-local/0.2"
    },
    "instance_id": {
      "type": "string",
      "allOf": [
        {
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "pattern": "^[a-f0-9-]+$"
        }
      ]
    },
    "synthetic_only": {
      "type": "boolean",
      "const": true
    },
    "transport": {
      "type": "string",
      "const": "loopback-http-ed25519"
    },
    "media_types": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "text/plain",
          "text/markdown",
          "application/json"
        ]
      }
    },
    "context": {
      "type": "object",
      "properties": {
        "broker_id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "encryption_public_key": {
          "type": "string",
          "pattern": "^[A-Za-z0-9+/]{87}=$"
        },
        "signing_public_key": {
          "type": "string",
          "pattern": "^[A-Za-z0-9+/]{43}=$"
        }
      },
      "required": [
        "broker_id",
        "encryption_public_key",
        "signing_public_key"
      ],
      "additionalProperties": false,
      "description": "Pin these trusted fixture-adapter keys. Discovery is trusted-local bootstrap, not independent production key distribution."
    },
    "limits": {
      "type": "object",
      "properties": {
        "body_bytes": {
          "type": "number",
          "const": 32768
        },
        "result_bytes": {
          "type": "number",
          "const": 4096
        },
        "session_seconds": {
          "type": "number",
          "const": 3600
        },
        "round_seconds": {
          "type": "number",
          "const": 120
        },
        "clock_skew_seconds": {
          "type": "number",
          "const": 300
        },
        "sessions": {
          "type": "number",
          "const": 64
        },
        "rounds": {
          "type": "number",
          "const": 32
        },
        "receipts_per_session": {
          "type": "number",
          "const": 256
        }
      },
      "required": [
        "body_bytes",
        "result_bytes",
        "session_seconds",
        "round_seconds",
        "clock_skew_seconds",
        "sessions",
        "rounds",
        "receipts_per_session"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "profile",
    "instance_id",
    "synthetic_only",
    "transport",
    "media_types",
    "context",
    "limits"
  ],
  "additionalProperties": false,
  "title": "ProfileResponse",
  "$comment": "owp-market-local/0.2; fictional loopback market, non-redeemable test credits only."
}
