{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/blockvectra/json-schema/blockvectra-identity-view-schema.json",
  "title": "IdentityView",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/console.yaml#/components/schemas/IdentityView",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "identity_id",
    "provider",
    "subject",
    "display",
    "created_at",
    "last_login_at"
  ],
  "properties": {
    "identity_id": {
      "type": "string",
      "pattern": "^id_[a-z2-7]{26}$"
    },
    "provider": {
      "type": "string",
      "enum": [
        "siwe",
        "github",
        "google"
      ]
    },
    "subject": {
      "type": "string",
      "description": "SIWE: `eip155:1:<lowercase address>`; GitHub: numeric id; Google: `sub`."
    },
    "display": {
      "type": [
        "string",
        "null"
      ],
      "description": "EIP-55 address for SIWE, login for GitHub (display only), null for Google."
    },
    "created_at": {
      "$ref": "#/$defs/Timestamp"
    },
    "last_login_at": {
      "oneOf": [
        {
          "$ref": "#/$defs/Timestamp"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "$defs": {
    "Timestamp": {
      "type": "string",
      "format": "date-time",
      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$",
      "description": "RFC 3339 UTC, second precision, ending in `Z` (`2026-09-26T08:00:00Z`); no fractional seconds, without `+00:00` timezone offsets."
    }
  }
}