{
  "$ref": "#/definitions/identity-disclosure-v1",
  "definitions": {
    "identity-disclosure-v1": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "agent": {
          "type": "object",
          "properties": {
            "mint": {
              "type": "string"
            },
            "network": {
              "type": "string",
              "enum": [
                "solana-devnet",
                "solana-mainnet"
              ]
            },
            "handle": {
              "type": [
                "string",
                "null"
              ]
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "mint",
            "network",
            "handle",
            "name"
          ],
          "additionalProperties": false
        },
        "expires_at": {
          "type": "string"
        },
        "resources": {
          "type": "object",
          "properties": {
            "capability_cards": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "seller_api",
                      "buyer_tool",
                      "data_source",
                      "control_channel",
                      "automation",
                      "marketplace",
                      "pay_skills",
                      "custom"
                    ]
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "leash",
                      "pay-skills",
                      "manual",
                      "connection",
                      "automation"
                    ]
                  },
                  "slug": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "endpoint": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 800
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "default": []
                  },
                  "protocols": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "x402",
                        "mpp"
                      ]
                    },
                    "default": []
                  },
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "public",
                      "private"
                    ],
                    "default": "public"
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "title"
                ],
                "additionalProperties": false
              }
            },
            "claims": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "issuer": {
                    "type": "string"
                  },
                  "subject_mint": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  },
                  "value": {
                    "type": "string"
                  },
                  "evidence_url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "signature": {
                    "type": "string"
                  },
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "public",
                      "private"
                    ]
                  },
                  "expires_at": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "revoked_at": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "created_at": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "issuer",
                  "subject_mint",
                  "type",
                  "value",
                  "evidence_url",
                  "signature",
                  "visibility",
                  "expires_at",
                  "revoked_at",
                  "created_at"
                ],
                "additionalProperties": false
              }
            },
            "receipts": {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          },
          "required": [
            "capability_cards",
            "claims",
            "receipts"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "id",
        "agent",
        "expires_at",
        "resources"
      ],
      "additionalProperties": false
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#"
}