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

> Returns a proof the compression program uses to verify that the account is valid.

## Request Parameters

<ParamField body="hash" type="string" required>
  A 32-byte cryptographic hash represented as a base58 string, uniquely identifying a Solana compressed account.
</ParamField>


## OpenAPI

````yaml openapi/zk-compression/getCompressedAccountProof.yaml POST /
openapi: 3.0.3
info:
  title: Solana Compressed Account Verification API
  description: >
    Advanced Solana indexer for verifying compressed accounts using merkle
    proofs.

    This specialized verification API enables applications to cryptographically
    validate 

    the existence and data integrity of compressed NFTs and token accounts on
    the Solana blockchain

    through efficient merkle proof verification, supporting the secure usage of
    state compression

    technology that reduces on-chain storage costs by up to 1000x compared to
    traditional accounts.
  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: Mainnet RPC endpoint
  - url: https://devnet.helius-rpc.com
    description: Devnet RPC endpoint
security: []
paths:
  /:
    summary: getCompressedAccountProof
    post:
      description: >
        Retrieve the cryptographic merkle proof for a specific compressed Solana
        account.

        This verification endpoint returns the complete proof path needed to
        validate a compressed

        NFT or token account's existence and data integrity on the Solana
        blockchain without requiring

        the full account data to be stored on-chain. Essential for wallet
        applications, marketplaces,

        and DeFi protocols that need to verify ownership and authenticity of
        compressed assets while

        benefiting from Solana's breakthrough state compression technology for
        dramatic cost reductions.
      operationId: getCompressedAccountProof
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                jsonrpc:
                  type: string
                  description: The version of the JSON-RPC protocol.
                  enum:
                    - '2.0'
                  default: '2.0'
                id:
                  type: string
                  description: An ID to identify the request.
                  default: '1'
                method:
                  type: string
                  description: >-
                    The name of the method to invoke for retrieving Solana
                    compressed account proof data.
                  enum:
                    - getCompressedAccountProof
                  default: getCompressedAccountProof
                params:
                  type: object
                  required:
                    - hash
                  properties:
                    hash:
                      $ref: '#/components/schemas/Hash'
                      description: >-
                        The hash of the Solana compressed account to retrieve
                        the proof for
        required: true
      responses:
        '200':
          description: >-
            Successfully retrieved merkle proof for the requested Solana
            compressed account
          content:
            application/json:
              schema:
                type: object
                required:
                  - context
                  - value
                properties:
                  context:
                    $ref: '#/components/schemas/Context'
                  value:
                    $ref: '#/components/schemas/MerkleProofWithContext'
                additionalProperties: false
        '400':
          description: Bad Request - Invalid request parameters or malformed request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: Invalid params
                id: '1'
        '401':
          description: Unauthorized - Invalid or missing API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: Unauthorized
                id: '1'
        '429':
          description: Too Many Requests - Rate limit exceeded.
          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 - An error occurred on the server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: Internal error
                id: '1'
        '503':
          description: Service Unavailable - The service is temporarily 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 - The request timed out.
          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: >-
        A 32-byte cryptographic hash represented as a base58 string, uniquely
        identifying a Solana compressed account.
      example: 11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP
    Context:
      type: object
      required:
        - slot
      properties:
        slot:
          type: integer
          default: 100
          example: 100
          description: >-
            Current Solana blockchain slot for this compressed account proof
            request
    MerkleProofWithContext:
      type: object
      required:
        - proof
        - root
        - leafIndex
        - hash
        - merkleTree
        - rootSeq
      properties:
        hash:
          $ref: '#/components/schemas/Hash'
          description: >-
            The unique hash identifier of the Solana compressed account being
            verified
        leafIndex:
          type: integer
          format: int32
          minimum: 0
          description: >-
            The position index of this compressed account in the Solana merkle
            tree structure
        merkleTree:
          $ref: '#/components/schemas/SerializablePubkey'
          description: >-
            The address of the Solana merkle tree where this compressed account
            is stored
        proof:
          type: array
          items:
            $ref: '#/components/schemas/Hash'
          description: >-
            Array of hashes forming the merkle proof path to verify this Solana
            compressed account
        root:
          $ref: '#/components/schemas/Hash'
          description: >-
            The root hash of the Solana merkle tree containing this compressed
            account
        rootSeq:
          type: integer
          format: int64
          minimum: 0
          description: >-
            The sequence number of the root in the Solana merkle tree for
            version tracking
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        jsonrpc:
          type: string
          description: The JSON-RPC protocol version.
          enum:
            - '2.0'
          example: '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
              description: The error code.
              example: -32602
            message:
              type: string
              description: The error message.
            data:
              type: object
              description: Additional data about the error.
        id:
          type: string
          description: Identifier matching the request.
          example: '1'
    SerializablePubkey:
      type: string
      description: >-
        A Solana public key represented as a base58 string, used to identify
        merkle trees and accounts.
      default: 11111117353mdUKehx9GW6JNHznGt5oSZs9fWkVkB
      example: 11111117353mdUKehx9GW6JNHznGt5oSZs9fWkVkB
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        Your Helius API key. You can get one for free in the
        [dashboard](https://dashboard.helius.dev/api-keys).

````