{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.bullpen.fi/reference/schemas/doctor.wallet.schema.json",
  "title": "bullpen doctor wallet JSON output",
  "description": "Initial stable schema for the documented cached-auth-unavailable wallet diagnostic envelope.",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schema_version",
    "status",
    "total_owners",
    "entries",
    "safety"
  ],
  "properties": {
    "schema_version": {
      "type": "integer",
      "const": 2
    },
    "status": {
      "type": "string",
      "minLength": 1
    },
    "message": {
      "type": [
        "string",
        "null"
      ]
    },
    "total_owners": {
      "type": "integer",
      "minimum": 0
    },
    "entries": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "safety": {
      "$ref": "#/$defs/safety"
    }
  },
  "$defs": {
    "safety": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "signer_creation",
        "token_refresh",
        "wallet_cache_mutation"
      ],
      "properties": {
        "signer_creation": {
          "const": false
        },
        "token_refresh": {
          "const": false
        },
        "wallet_cache_mutation": {
          "const": false
        }
      }
    }
  }
}
