> ## Documentation Index
> Fetch the complete documentation index at: https://docs.phala.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get on-chain KMS details by chain

> Returns KMS contracts on the specified chain with device and OS image whitelist status.



## OpenAPI

````yaml /openapi.json get /api/v1/kms/on-chain/{chain}
openapi: 3.1.0
info:
  title: Phala Cloud API
  version: 0.1.0
servers:
  - url: https://cloud-api.phala.com
security: []
tags:
  - name: CVMs
    description: Confidential Virtual Machine (CVM) lifecycle management on Phala Network
  - name: Apps
    description: App template management and CVM deployment from app blueprints
  - name: Webhooks
    description: Manage webhook endpoints and monitor delivery history
  - name: SSH Keys
    description: SSH public key management for CVM access
  - name: KMS
    description: >-
      Key Management Service — key derivation, on-chain anchoring, and
      inspection
  - name: Instance Types
    description: Available hardware configurations for CVM deployment
  - name: Attestations
    description: Remote attestation and TEE verification endpoints
paths:
  /api/v1/kms/on-chain/{chain}:
    get:
      tags:
        - KMS
      summary: Get on-chain KMS details by chain
      description: >-
        Returns KMS contracts on the specified chain with device and OS image
        whitelist status.
      operationId: get_kms_onchain_detail_api_v1_kms_on_chain__chain__get
      parameters:
        - name: chain
          in: path
          required: true
          schema:
            type: string
            title: Chain
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnChainKmsResponse'
        '400':
          description: Unsupported chain name
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    OnChainKmsResponse:
      properties:
        chain_name:
          type: string
          title: Chain Name
        chain_id:
          type: integer
          title: Chain Id
        contracts:
          items:
            $ref: '#/components/schemas/OnChainKmsContractOut'
          type: array
          title: Contracts
      type: object
      required:
        - chain_name
        - chain_id
        - contracts
      title: OnChainKmsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OnChainKmsContractOut:
      properties:
        contract_address:
          type: string
          title: Contract Address
        chain_id:
          type: integer
          title: Chain Id
        chain_name:
          type: string
          title: Chain Name
        devices:
          items:
            $ref: '#/components/schemas/OnChainDeviceOut'
          type: array
          title: Devices
        os_images:
          items:
            $ref: '#/components/schemas/OnChainOsImageOut'
          type: array
          title: Os Images
      type: object
      required:
        - contract_address
        - chain_id
        - chain_name
        - devices
        - os_images
      title: OnChainKmsContractOut
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    OnChainDeviceOut:
      properties:
        device_id:
          type: string
          title: Device Id
        node_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Node Name
          description: Physical node name if available
        on_chain_allowed:
          anyOf:
            - type: boolean
            - type: 'null'
          title: On Chain Allowed
          description: null if check failed
      type: object
      required:
        - device_id
      title: OnChainDeviceOut
    OnChainOsImageOut:
      properties:
        name:
          type: string
          title: Name
        version:
          type: string
          title: Version
        os_image_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Os Image Hash
        on_chain_allowed:
          anyOf:
            - type: boolean
            - type: 'null'
          title: On Chain Allowed
          description: null if no hash or check failed
      type: object
      required:
        - name
        - version
      title: OnChainOsImageOut

````