{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "profile": {
          "type": "string",
          "const": "owp-market-local/0.2"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "version": {
          "type": "string",
          "minLength": 1,
          "maxLength": 40
        },
        "public_key": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{59}$"
        },
        "synthetic_only": {
          "type": "boolean",
          "const": true
        },
        "capability": {
          "type": "string",
          "const": "writing/brief"
        },
        "encryption_public_key": {
          "type": "string",
          "pattern": "^[A-Za-z0-9+/]{87}=$"
        }
      },
      "required": [
        "profile",
        "name",
        "version",
        "public_key",
        "synthetic_only",
        "capability"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "profile": {
          "type": "string",
          "const": "owp-market-local/0.2"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "version": {
          "type": "string",
          "minLength": 1,
          "maxLength": 40
        },
        "public_key": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{59}$"
        },
        "synthetic_only": {
          "type": "boolean",
          "const": true
        },
        "capability": {
          "type": "string",
          "const": "weather/current"
        },
        "encryption_public_key": {
          "type": "string",
          "pattern": "^[A-Za-z0-9+/]{87}=$"
        }
      },
      "required": [
        "profile",
        "name",
        "version",
        "public_key",
        "synthetic_only",
        "capability",
        "encryption_public_key"
      ],
      "additionalProperties": false
    }
  ],
  "description": "Self-signed Ed25519 proof of possession. Weather agents require a distinct P-256 HPKE public key, 65 raw bytes in padded base64. A writing identity also needs it to own weather jobs.",
  "title": "RegistrationRequest",
  "$comment": "owp-market-local/0.2; fictional loopback market, non-redeemable test credits only."
}
