{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/swopme-co/json-schema/swopme-co-health-response-schema.json",
  "title": "HealthResponse",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/swopme-co-openapi.json#/components/schemas/HealthResponse",
  "type": "object",
  "required": [
    "ok",
    "service",
    "readiness",
    "inlineIntentProcessing",
    "database",
    "emailDelivery",
    "chains",
    "signer",
    "signerOk",
    "webauthn"
  ],
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "service": {
      "type": "string"
    },
    "readiness": {
      "type": "object",
      "required": [
        "serving",
        "launch"
      ],
      "properties": {
        "serving": {
          "type": "boolean"
        },
        "launch": {
          "type": "boolean"
        }
      }
    },
    "inlineIntentProcessing": {
      "type": "boolean"
    },
    "database": {
      "type": "object",
      "required": [
        "ok",
        "driver"
      ],
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "driver": {
          "type": "string",
          "enum": [
            "sqlite",
            "postgres"
          ]
        },
        "error": {
          "type": "string"
        }
      }
    },
    "emailDelivery": {
      "type": "object",
      "required": [
        "ok",
        "mode"
      ],
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "mode": {
          "type": "string",
          "enum": [
            "log",
            "smtp",
            "http"
          ]
        },
        "error": {
          "type": "string"
        }
      }
    },
    "chains": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ChainCapabilities"
      }
    },
    "signer": {
      "anyOf": [
        {
          "$ref": "#/$defs/SecureSignerStatus"
        },
        {
          "type": "null"
        }
      ]
    },
    "signerOk": {
      "type": "boolean"
    },
    "signerError": {
      "type": "string"
    },
    "webauthn": {
      "type": "object",
      "required": [
        "ok",
        "rpId",
        "allowedOrigins"
      ],
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "rpId": {
          "type": "string"
        },
        "allowedOrigins": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "error": {
          "type": "string"
        }
      }
    }
  },
  "$defs": {
    "Chain": {
      "type": "string",
      "enum": [
        "evm",
        "solana"
      ]
    },
    "ChainCapabilities": {
      "type": "object",
      "required": [
        "chain",
        "supportsSmartAccounts",
        "supportsLinkedWallets",
        "supportsMessageSigning",
        "supportsTransactionSigning",
        "supportsHostedExecution",
        "supportsSessionDelegation"
      ],
      "properties": {
        "chain": {
          "$ref": "#/$defs/Chain"
        },
        "supportsSmartAccounts": {
          "type": "boolean"
        },
        "supportsLinkedWallets": {
          "type": "boolean"
        },
        "supportsMessageSigning": {
          "type": "boolean"
        },
        "supportsTransactionSigning": {
          "type": "boolean"
        },
        "supportsHostedExecution": {
          "type": "boolean"
        },
        "supportsSessionDelegation": {
          "type": "boolean"
        }
      }
    },
    "NitroPcrMap": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "SecureSignerMode": {
      "type": "string",
      "enum": [
        "software",
        "mock_tee",
        "nitro_tee"
      ]
    },
    "SecureSignerStatus": {
      "type": "object",
      "required": [
        "mode",
        "transport",
        "provider",
        "enclaveId",
        "measurement",
        "healthy",
        "trustVerified",
        "attestation"
      ],
      "properties": {
        "mode": {
          "$ref": "#/$defs/SecureSignerMode"
        },
        "transport": {
          "$ref": "#/$defs/SignerTransport"
        },
        "provider": {
          "type": "string"
        },
        "enclaveId": {
          "type": "string"
        },
        "measurement": {
          "type": "string"
        },
        "healthy": {
          "type": "boolean"
        },
        "trustVerified": {
          "type": "boolean"
        },
        "remoteUrl": {
          "type": "string"
        },
        "imageSha384": {
          "type": "string"
        },
        "pcrs": {
          "$ref": "#/$defs/NitroPcrMap"
        },
        "kmsKeyArn": {
          "type": "string"
        },
        "attestation": {
          "$ref": "#/$defs/SignerAttestation"
        }
      }
    },
    "SignerAttestation": {
      "type": "object",
      "required": [
        "mode",
        "provider",
        "enclaveId",
        "measurement",
        "issuedAt",
        "document",
        "signatureAlgorithm",
        "signatureBase64",
        "publicKeyFingerprint"
      ],
      "properties": {
        "mode": {
          "$ref": "#/$defs/SecureSignerMode"
        },
        "provider": {
          "type": "string"
        },
        "enclaveId": {
          "type": "string"
        },
        "measurement": {
          "type": "string"
        },
        "issuedAt": {
          "type": "string",
          "format": "date-time"
        },
        "document": {
          "type": "string"
        },
        "signatureAlgorithm": {
          "type": "string",
          "enum": [
            "ed25519"
          ]
        },
        "signatureBase64": {
          "type": "string"
        },
        "publicKeyFingerprint": {
          "type": "string"
        },
        "imageSha384": {
          "type": "string"
        },
        "pcrs": {
          "$ref": "#/$defs/NitroPcrMap"
        },
        "kmsKeyArn": {
          "type": "string"
        }
      }
    },
    "SignerTransport": {
      "type": "string",
      "enum": [
        "local",
        "remote"
      ]
    }
  }
}