> ## 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

> Mengembalikan satu Bukti ZK yang digunakan oleh program kompresi untuk memverifikasi bahwa akun yang diberikan valid dan alamat baru dapat dibuat.

## Parameter Permintaan

<ParamField body="hashes" type="array">
  Array hash kriptografis untuk akun terkompresi Solana yang akan diverifikasi
</ParamField>

<ParamField body="newAddressesWithTrees" type="array">
  Array alamat akun Solana beserta pohon Merkle terkait untuk verifikasi
</ParamField>


## OpenAPI

````yaml id/openapi/zk-compression/getValidityProof.yaml POST /
openapi: 3.0.3
info:
  title: API Validasi Bukti Zero-Knowledge Solana
  description: >
    Pengindeks Solana tingkat lanjut untuk validasi kompresi status menggunakan
    kriptografi zero-knowledge.

    API khusus ini memungkinkan verifikasi NFT terkompresi dan akun token pada
    blockchain Solana

    melalui bukti validitas kriptografis, sehingga memberikan kepastian
    matematis atas integritas data untuk aset 

    terkompresi sekaligus mempertahankan jaminan keamanan model konsensus
    Solana.
  license:
    name: Apache-2.0
  version: 0.50.0
servers:
  - url: https://mainnet.helius-rpc.com
    description: Titik akhir RPC Mainnet
  - url: https://devnet.helius-rpc.com
    description: Titik akhir RPC Devnet
security: []
paths:
  /:
    summary: getValidityProof
    post:
      description: >
        Ambil bukti validitas zero-knowledge kriptografis untuk akun Solana
        terkompresi.

        Titik akhir verifikasi tingkat lanjut ini mengembalikan komponen bukti
        matematis yang diperlukan untuk

        memvalidasi NFT terkompresi dan akun token tanpa memerlukan seluruh data
        on-chain.

        Penting bagi aplikasi yang memerlukan verifikasi kriptografis atas
        status aset terkompresi

        sekaligus memanfaatkan teknologi kompresi status Solana untuk mengurangi
        biaya penyimpanan

        dan meningkatkan skalabilitas.
      operationId: getValidityProof
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                jsonrpc:
                  type: string
                  description: Versi protokol JSON-RPC.
                  enum:
                    - '2.0'
                  default: '2.0'
                id:
                  type: string
                  description: ID untuk mengidentifikasi permintaan.
                  default: '1'
                method:
                  type: string
                  description: Nama metode yang akan dipanggil.
                  enum:
                    - getValidityProof
                  default: getValidityProof
                params:
                  type: object
                  default:
                    hashes:
                      - gEF8v1TLb2T9vTaJarFj6kQoSfWNkskMSCJpPJSxZzT
                  properties:
                    hashes:
                      type: array
                      items:
                        $ref: '#/components/schemas/Hash'
                      description: >-
                        Array hash kriptografis untuk akun Solana terkompresi
                        yang akan diverifikasi
                    newAddressesWithTrees:
                      type: array
                      items:
                        $ref: '#/components/schemas/AddressWithTree'
                      description: >-
                        Array alamat akun Solana beserta pohon Merkle terkait
                        untuk verifikasi
                  additionalProperties: false
        required: true
      responses:
        '200':
          description: Bukti validitas untuk akun Solana terkompresi berhasil diambil
          content:
            application/json:
              schema:
                type: object
                required:
                  - value
                  - context
                properties:
                  context:
                    $ref: '#/components/schemas/Context'
                  value:
                    $ref: '#/components/schemas/CompressedProofWithContext'
                additionalProperties: false
        '400':
          description: >-
            Permintaan Tidak Valid - Parameter permintaan tidak valid atau
            format permintaan salah.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: Parameter tidak valid
                id: '1'
        '401':
          description: Tidak Diotorisasi - Kunci API tidak valid atau tidak tersedia.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: Tidak diotorisasi
                id: '1'
        '429':
          description: Terlalu Banyak Permintaan - Batas laju terlampaui.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: Terlalu banyak permintaan
                id: '1'
        '500':
          description: Kesalahan Server Internal - Terjadi kesalahan pada server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: Kesalahan internal
                id: '1'
        '503':
          description: Layanan Tidak Tersedia - Layanan untuk sementara tidak tersedia.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: Layanan tidak tersedia
                id: '1'
        '504':
          description: Waktu Tunggu Gateway Habis - Waktu permintaan habis.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32003
                  message: Waktu tunggu gateway habis
                id: '1'
      security:
        - ApiKeyQuery: []
components:
  schemas:
    Hash:
      type: string
      description: >-
        Hash kriptografis 32 byte yang direpresentasikan sebagai string base58
        dan digunakan untuk verifikasi akun Solana terkompresi.
      example: 11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP
    AddressWithTree:
      type: object
      required:
        - address
        - tree
      properties:
        address:
          $ref: '#/components/schemas/SerializablePubkey'
          description: >-
            Alamat akun Solana yang akan diverifikasi melalui bukti
            zero-knowledge
        tree:
          $ref: '#/components/schemas/SerializablePubkey'
          description: Alamat pohon Merkle tempat akun Solana terkompresi disimpan
      additionalProperties: false
    Context:
      type: object
      required:
        - slot
      properties:
        slot:
          type: integer
          default: 100
          example: 100
          description: Slot blockchain Solana saat ini untuk permintaan bukti validitas ini
    CompressedProofWithContext:
      type: object
      required:
        - compressedProof
        - roots
        - rootIndices
        - leafIndices
        - leaves
        - merkleTrees
      properties:
        compressedProof:
          $ref: '#/components/schemas/CompressedProof'
          description: >-
            Bukti kriptografis zero-knowledge untuk memvalidasi akun Solana
            terkompresi
        leafIndices:
          type: array
          items:
            type: integer
            format: int32
            minimum: 0
          description: Indeks daun dalam pohon Merkle Solana untuk akun terkompresi
        leaves:
          type: array
          items:
            type: string
          description: >-
            Data simpul daun untuk akun Solana terkompresi yang sedang
            diverifikasi
        merkleTrees:
          type: array
          items:
            type: string
          description: Alamat pohon Merkle Solana yang berisi akun terkompresi
        rootIndices:
          type: array
          items:
            type: integer
            format: int64
            minimum: 0
          description: Indeks akar dalam pohon Merkle Solana untuk akun terkompresi
        roots:
          type: array
          items:
            type: string
          description: Hash akar pohon Merkle Solana untuk akun terkompresi
    ErrorResponse:
      type: object
      properties:
        jsonrpc:
          type: string
          description: Versi protokol JSON-RPC.
          enum:
            - '2.0'
          example: '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
              description: Kode kesalahan.
              example: -32602
            message:
              type: string
              description: Pesan kesalahan.
            data:
              type: object
              description: Data tambahan tentang kesalahan.
        id:
          type: string
          description: Pengidentifikasi yang cocok dengan permintaan.
          example: '1'
    SerializablePubkey:
      type: string
      description: >-
        Kunci publik Solana yang direpresentasikan sebagai string base58 dan
        digunakan untuk mengidentifikasi akun, pohon, dan program.
      default: 11111118eRTi4fUVRoeYEeeTyL4DPAwxatvWT5q1Z
      example: 11111118eRTi4fUVRoeYEeeTyL4DPAwxatvWT5q1Z
    CompressedProof:
      type: object
      required:
        - a
        - b
        - c
      properties:
        a:
          type: string
          format: binary
          description: Komponen pertama bukti validitas zero-knowledge Solana
        b:
          type: string
          format: binary
          description: Komponen kedua bukti validitas zero-knowledge Solana
        c:
          type: string
          format: binary
          description: Komponen ketiga bukti validitas zero-knowledge Solana
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        Kunci API Helius Anda. Anda dapat memperolehnya secara gratis di
        [dasbor](https://dashboard.helius.dev/api-keys).

````