---
title: "POST /getValidityProofV2"
method: POST
path: "/getValidityProofV2"
---

# POST /getValidityProofV2

`POST /getValidityProofV2`

## Request body

- object
  - `id` 'test-account', required — An ID to identify the request.
  - `jsonrpc` '2.0', required — The version of the JSON-RPC protocol.
  - `method` 'getValidityProofV2', required — The name of the method to invoke.
  - `params` object, required
    - `hashes` Hash[]
    - `newAddressesWithTrees` AddressWithTree[]
      - `address` string, required — A Solana public key represented as a base58 string.
      - `tree` string, required — A Solana public key represented as a base58 string.

## Response `200`

- object
  - `error` object
    - `code` integer
    - `message` string
  - `id` 'test-account', required — An ID to identify the response.
  - `jsonrpc` '2.0', required — The version of the JSON-RPC protocol.
  - `result` object
    - `context` Context, required
      - `slot` integer, required
    - `value` CompressedProofWithContextV2, required
      - `accounts` AccountProofInputs[], required
        - `hash` string, required
        - `leafIndex` integer, required
        - `merkleContext` MerkleContextV2, required
          - `cpiContext` string — A Solana public key represented as a base58 string.
          - `nextTreeContext` TreeContextInfo
            - `cpiContext` string — A Solana public key represented as a base58 string.
            - `queue` string, required — A Solana public key represented as a base58 string.
            - `tree` string, required — A Solana public key represented as a base58 string.
            - `treeType` integer, required
          - `queue` string, required — A Solana public key represented as a base58 string.
          - `tree` string, required — A Solana public key represented as a base58 string.
          - `treeType` integer, required
        - `root` string, required
        - `rootIndex` RootIndex, required
          - `proveByIndex` boolean, required
          - `rootIndex` integer, required
      - `addresses` AddressProofInputs[], required
        - `address` string, required
        - `merkleContext` MerkleContextV2, required
          - `cpiContext` string — A Solana public key represented as a base58 string.
          - `nextTreeContext` TreeContextInfo
            - `cpiContext` string — A Solana public key represented as a base58 string.
            - `queue` string, required — A Solana public key represented as a base58 string.
            - `tree` string, required — A Solana public key represented as a base58 string.
            - `treeType` integer, required
          - `queue` string, required — A Solana public key represented as a base58 string.
          - `tree` string, required — A Solana public key represented as a base58 string.
          - `treeType` integer, required
        - `root` string, required
        - `rootIndex` integer, required
      - `compressedProof` CompressedProof
        - `a` integer[], required
        - `b` integer[], required
        - `c` integer[], required

## Other responses

- `429` — Exceeded rate limit.
- `500` — The server encountered an unexpected condition that prevented it from fulfilling the request.

---

[API](https://skmtc.net/helius-labs/apis/photon-indexer.md) · [All operations](https://skmtc.net/helius-labs/apis/photon-indexer/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/helius-labs/photon-indexer/versions/0ab5c33fdae3/schema)
