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

# getValidityProof

> 주어진 계정이 유효하고 새로운 주소가 생성될 수 있음을 확인하기 위해 압축 프로그램에서 사용하는 단일 ZK 증명을 반환합니다.

## 요청 매개변수

<ParamField body="hashes" type="array">
  검증할 Solana 압축 계정의 암호화 해시 배열
</ParamField>

<ParamField body="newAddressesWithTrees" type="array">
  검증을 위한 관련 머클 트리와 함께 하는 Solana 계정 주소 배열
</ParamField>


## OpenAPI

````yaml ko/openapi/zk-compression/getValidityProof.yaml POST /
openapi: 3.0.3
info:
  title: Solana Zero-Knowledge Proof Validation API
  description: >
    영지식 암호화를 사용한 상태 압축 유효성 검사를 위한 고급 Solana 인덱서.

    이 특수화된 API는 압축된 NFT와 토큰 계정을 Solana 블록체인에서 암호 유효성 증명을 통해 검증할 수 있도록 하여 압축된 자산의
    데이터 무결성을 수학적 확실성으로 제공하면서 Solana 합의 모델의 보안 보장을 유지합니다.
  license:
    name: Apache-2.0
  version: 0.50.0
servers:
  - url: https://mainnet.helius-rpc.com
    description: 메인넷 RPC 엔드포인트
  - url: https://devnet.helius-rpc.com
    description: Devnet RPC 엔드포인트
security: []
paths:
  /:
    summary: getValidityProof
    post:
      description: >
        Solana 압축 계정에 대한 암호적 영지식 유효성 증명을 검색합니다.

        이 고급 검증 엔드포인트는 전체 온체인 데이터를 요구하지 않고 압축된 NFT와 토큰 계정을 검증하기 위해 필요한 수학적 증명 구성
        요소를 반환합니다.

        저장 비용 절감과 향상된 확장성을 위한 Solana의 상태 압축 기술의 이점을 활용하는 동시에 압축 자산 상태의 암호 검증이
        필요한 응용 프로그램에 필수적입니다.
      operationId: getValidityProof
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                jsonrpc:
                  type: string
                  description: JSON-RPC 프로토콜의 버전입니다.
                  enum:
                    - '2.0'
                  default: '2.0'
                id:
                  type: string
                  description: 요청을 식별하는 ID입니다.
                  default: '1'
                method:
                  type: string
                  description: 호출할 메소드의 이름입니다.
                  enum:
                    - getValidityProof
                  default: getValidityProof
                params:
                  type: object
                  default:
                    hashes:
                      - gEF8v1TLb2T9vTaJarFj6kQoSfWNkskMSCJpPJSxZzT
                  properties:
                    hashes:
                      type: array
                      items:
                        $ref: '#/components/schemas/Hash'
                      description: 검증할 Solana 압축 계정의 암호 해시 배열
                    newAddressesWithTrees:
                      type: array
                      items:
                        $ref: '#/components/schemas/AddressWithTree'
                      description: 검증을 위한 머클 트리가 포함된 Solana 계정 주소 배열
                  additionalProperties: false
        required: true
      responses:
        '200':
          description: Solana 압축 계정에 대한 유효성 증명을 성공적으로 검색했습니다
          content:
            application/json:
              schema:
                type: object
                required:
                  - value
                  - context
                properties:
                  context:
                    $ref: '#/components/schemas/Context'
                  value:
                    $ref: '#/components/schemas/CompressedProofWithContext'
                additionalProperties: false
        '400':
          description: 잘못된 요청 - 요청 매개변수가 유효하지 않거나 요청이 잘못되었습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: 유효하지 않은 매개변수
                id: '1'
        '401':
          description: Unauthorized - 유효하지 않거나 누락된 API 키입니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: Unauthorized
                id: '1'
        '429':
          description: Too Many Requests - 요청 제한을 초과했습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: Too many requests
                id: '1'
        '500':
          description: Internal Server Error - 서버에서 오류가 발생했습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: Internal error
                id: '1'
        '503':
          description: Service Unavailable - 서비스가 일시적으로 사용 불가능합니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: Service unavailable
                id: '1'
        '504':
          description: Gateway Timeout - 요청 시간이 초과되었습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32003
                  message: Gateway timeout
                id: '1'
      security:
        - ApiKeyQuery: []
components:
  schemas:
    Hash:
      type: string
      description: Solana 압축 계정 검증에 사용되는 base58 문자열로 표현된 32바이트 암호 해시입니다.
      example: 11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP
    AddressWithTree:
      type: object
      required:
        - address
        - tree
      properties:
        address:
          $ref: '#/components/schemas/SerializablePubkey'
          description: 영지식 증명을 통한 검증을 위한 Solana 계정 주소
        tree:
          $ref: '#/components/schemas/SerializablePubkey'
          description: 압축된 Solana 계정이 저장된 머클 트리 주소
      additionalProperties: false
    Context:
      type: object
      required:
        - slot
      properties:
        slot:
          type: integer
          default: 100
          example: 100
          description: 이 유효성 증명 요청에 대한 현재 Solana 블록체인 슬롯
    CompressedProofWithContext:
      type: object
      required:
        - compressedProof
        - roots
        - rootIndices
        - leafIndices
        - leaves
        - merkleTrees
      properties:
        compressedProof:
          $ref: '#/components/schemas/CompressedProof'
          description: Solana 압축 계정을 검증하기 위한 영지식 암호 증명
        leafIndices:
          type: array
          items:
            type: integer
            format: int32
            minimum: 0
          description: 압축 계정에 대한 Solana 머클 트리의 리프 인덱스
        leaves:
          type: array
          items:
            type: string
          description: 검증 중인 Solana 압축 계정의 리프 노드 데이터
        merkleTrees:
          type: array
          items:
            type: string
          description: 압축 계정이 포함된 Solana 머클 트리의 주소
        rootIndices:
          type: array
          items:
            type: integer
            format: int64
            minimum: 0
          description: 압축 계정에 대한 Solana 머클 트리의 루트 인덱스
        roots:
          type: array
          items:
            type: string
          description: 압축 계정에 대한 Solana 머클 트리의 루트 해시
    ErrorResponse:
      type: object
      properties:
        jsonrpc:
          type: string
          description: JSON-RPC 프로토콜 버전입니다.
          enum:
            - '2.0'
          example: '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
              description: 오류 코드입니다.
              example: -32602
            message:
              type: string
              description: 오류 메시지입니다.
            data:
              type: object
              description: 오류에 대한 추가 데이터입니다.
        id:
          type: string
          description: 요청과 일치하는 식별자입니다.
          example: '1'
    SerializablePubkey:
      type: string
      description: 계정, 트리 및 프로그램을 식별하는 데 사용되는 base58 문자열로 표현된 Solana 공개 키입니다.
      default: 11111118eRTi4fUVRoeYEeeTyL4DPAwxatvWT5q1Z
      example: 11111118eRTi4fUVRoeYEeeTyL4DPAwxatvWT5q1Z
    CompressedProof:
      type: object
      required:
        - a
        - b
        - c
      properties:
        a:
          type: string
          format: binary
          description: Solana 영지식 유효성 증명의 첫 번째 구성 요소
        b:
          type: string
          format: binary
          description: Solana 영지식 유효성 증명의 두 번째 구성 요소
        c:
          type: string
          format: binary
          description: Solana 영지식 유효성 증명의 세 번째 구성 요소
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        당신의 Helius API 키입니다. [대시보드](https://dashboard.helius.dev/api-keys)에서 무료로
        받을 수 있습니다.

````