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

# getCompressedAccountProof

> Trả về bằng chứng mà chương trình nén sử dụng để xác minh rằng tài khoản hợp lệ.

## Tham số yêu cầu

<ParamField body="hash" type="string" required>
  Một hàm băm mật mã 32 byte được biểu diễn dưới dạng chuỗi base58, dùng để định danh duy nhất một tài khoản nén Solana.
</ParamField>


## OpenAPI

````yaml vi/openapi/zk-compression/getCompressedAccountProof.yaml POST /
openapi: 3.0.3
info:
  title: API xác minh tài khoản nén Solana
  description: >
    Trình lập chỉ mục Solana nâng cao để xác minh các tài khoản nén bằng chứng
    minh Merkle.

    API xác minh chuyên dụng này cho phép các ứng dụng xác thực bằng mật mã sự
    tồn tại và tính toàn vẹn dữ liệu của NFT nén và tài khoản token trên
    blockchain Solana

    thông qua quy trình xác minh bằng chứng Merkle hiệu quả, hỗ trợ sử dụng an
    toàn công nghệ nén trạng thái

    nhằm giảm chi phí lưu trữ on-chain tới 1000 lần so với tài khoản truyền
    thống.
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 0.50.0
servers:
  - url: https://mainnet.helius-rpc.com
    description: Điểm cuối RPC Mainnet
  - url: https://devnet.helius-rpc.com
    description: Điểm cuối RPC Devnet
security: []
paths:
  /:
    summary: getCompressedAccountProof
    post:
      description: >
        Truy xuất bằng chứng Merkle mật mã cho một tài khoản nén Solana cụ thể.

        Điểm cuối xác minh này trả về đường dẫn bằng chứng hoàn chỉnh cần thiết
        để xác thực sự tồn tại và tính toàn vẹn dữ liệu của NFT nén hoặc tài
        khoản token trên blockchain Solana mà không yêu cầu

        lưu trữ toàn bộ dữ liệu tài khoản on-chain. Đây là tính năng thiết yếu
        cho các ứng dụng ví, sàn giao dịch

        và giao thức DeFi cần xác minh quyền sở hữu và tính xác thực của tài sản
        nén, đồng thời

        tận dụng công nghệ nén trạng thái đột phá của Solana để giảm đáng kể chi
        phí.
      operationId: getCompressedAccountProof
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                jsonrpc:
                  type: string
                  description: Phiên bản của giao thức JSON-RPC.
                  enum:
                    - '2.0'
                  default: '2.0'
                id:
                  type: string
                  description: ID dùng để nhận dạng yêu cầu.
                  default: '1'
                method:
                  type: string
                  description: >-
                    Tên phương thức cần gọi để truy xuất dữ liệu bằng chứng tài
                    khoản nén Solana.
                  enum:
                    - getCompressedAccountProof
                  default: getCompressedAccountProof
                params:
                  type: object
                  default:
                    hash: gEF8v1TLb2T9vTaJarFj6kQoSfWNkskMSCJpPJSxZzT
                  required:
                    - hash
                  properties:
                    hash:
                      $ref: '#/components/schemas/Hash'
                      description: >-
                        Hàm băm của tài khoản nén Solana cần truy xuất bằng
                        chứng
        required: true
      responses:
        '200':
          description: >-
            Đã truy xuất thành công bằng chứng Merkle cho tài khoản nén Solana
            được yêu cầu
          content:
            application/json:
              schema:
                type: object
                required:
                  - context
                  - value
                properties:
                  context:
                    $ref: '#/components/schemas/Context'
                  value:
                    $ref: '#/components/schemas/MerkleProofWithContext'
                additionalProperties: false
        '400':
          description: >-
            Yêu cầu không hợp lệ - Tham số yêu cầu không hợp lệ hoặc yêu cầu
            không đúng định dạng.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: Tham số không hợp lệ
                id: '1'
        '401':
          description: Không được phép - Khóa API không hợp lệ hoặc bị thiếu.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: Không được phép
                id: '1'
        '429':
          description: Quá nhiều yêu cầu - Đã vượt quá giới hạn tốc độ.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: Quá nhiều yêu cầu
                id: '1'
        '500':
          description: Lỗi máy chủ nội bộ - Đã xảy ra lỗi trên máy chủ.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: Lỗi nội bộ
                id: '1'
        '503':
          description: Dịch vụ không khả dụng - Dịch vụ tạm thời không khả dụng.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: Dịch vụ không khả dụng
                id: '1'
        '504':
          description: Hết thời gian chờ cổng kết nối - Yêu cầu đã hết thời gian chờ.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32003
                  message: Hết thời gian chờ cổng kết nối
                id: '1'
      security:
        - ApiKeyQuery: []
components:
  schemas:
    Hash:
      type: string
      description: >-
        Hàm băm mật mã 32 byte được biểu diễn dưới dạng chuỗi base58, dùng để
        nhận dạng duy nhất một tài khoản nén Solana.
      example: 11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP
    Context:
      type: object
      required:
        - slot
      properties:
        slot:
          type: integer
          default: 100
          example: 100
          description: >-
            Slot blockchain Solana hiện tại cho yêu cầu bằng chứng tài khoản nén
            này
    MerkleProofWithContext:
      type: object
      required:
        - proof
        - root
        - leafIndex
        - hash
        - merkleTree
        - rootSeq
      properties:
        hash:
          $ref: '#/components/schemas/Hash'
          description: >-
            Mã định danh hàm băm duy nhất của tài khoản nén Solana đang được xác
            minh
        leafIndex:
          type: integer
          format: int32
          minimum: 0
          description: >-
            Chỉ mục vị trí của tài khoản nén này trong cấu trúc cây Merkle
            Solana
        merkleTree:
          $ref: '#/components/schemas/SerializablePubkey'
          description: Địa chỉ của cây Merkle Solana nơi lưu trữ tài khoản nén này
        proof:
          type: array
          items:
            $ref: '#/components/schemas/Hash'
          description: >-
            Mảng các hàm băm tạo thành đường dẫn bằng chứng Merkle để xác minh
            tài khoản nén Solana này
        root:
          $ref: '#/components/schemas/Hash'
          description: Hàm băm gốc của cây Merkle Solana chứa tài khoản nén này
        rootSeq:
          type: integer
          format: int64
          minimum: 0
          description: Số thứ tự của nút gốc trong cây Merkle Solana để theo dõi phiên bản
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        jsonrpc:
          type: string
          description: Phiên bản giao thức JSON-RPC.
          enum:
            - '2.0'
          example: '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
              description: Mã lỗi.
              example: -32602
            message:
              type: string
              description: Thông báo lỗi.
            data:
              type: object
              description: Dữ liệu bổ sung về lỗi.
        id:
          type: string
          description: Mã định danh khớp với yêu cầu.
          example: '1'
    SerializablePubkey:
      type: string
      description: >-
        Khóa công khai Solana được biểu diễn dưới dạng chuỗi base58, dùng để
        nhận dạng cây Merkle và tài khoản.
      default: 11111117353mdUKehx9GW6JNHznGt5oSZs9fWkVkB
      example: 11111117353mdUKehx9GW6JNHznGt5oSZs9fWkVkB
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        Khóa API Helius của bạn. Bạn có thể nhận khóa miễn phí trong [bảng điều
        khiển](https://dashboard.helius.dev/api-keys).

````