{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://pactus.page/spec/pactus-profile-1.schema.json",
  "title": "pactus-profile/1",
  "description": "Public profile of a Pactus account, published through a PIP-50 anchor (anchor_type 1, root_hash = BLAKE2b-256 of the exact file bytes). Spec: https://pactus.page/spec/pactus-profile-1.html. Lengths are counted in Unicode code points. The whole file must be UTF-8 and at most 16384 bytes.",
  "type": "object",
  "required": ["schema", "name", "category"],
  "properties": {
    "schema": {
      "const": "pactus-profile/1"
    },
    "name": {
      "description": "Display name. Not blank.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "pattern": "\\S"
    },
    "category": {
      "enum": ["shops", "community", "development", "services", "validators", "other"]
    },
    "bio": {
      "description": "Short description, plain text.",
      "type": "string",
      "maxLength": 280
    },
    "location": {
      "description": "Free-form place, e.g. \"Madrid, ES\".",
      "type": "string",
      "maxLength": 80
    },
    "links": {
      "type": "array",
      "maxItems": 12,
      "items": {
        "type": "object",
        "required": ["label", "url"],
        "properties": {
          "label": { "type": "string", "maxLength": 40 },
          "url": {
            "description": "https: or mailto: only, without credentials (user:pass@).",
            "type": "string",
            "maxLength": 300,
            "pattern": "^(mailto:|https://[^/?#@]+([/?#]|$))"
          }
        }
      }
    }
  }
}
