Skip to main content
POST
cURL
curl --request POST \
  --url 'https://mainnet.helius-rpc.com/?api-key=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "id": "1",
  "method": "getValidityProof",
  "params": {
    "hashes": [
      "11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP"
    ],
    "newAddressesWithTrees": [
      {
        "address": "11111118eRTi4fUVRoeYEeeTyL4DPAwxatvWT5q1Z",
        "tree": "11111118eRTi4fUVRoeYEeeTyL4DPAwxatvWT5q1Z"
      }
    ]
  }
}
'
{
  "context": {
    "slot": 100
  },
  "value": {
    "compressedProof": {
      "a": "<string>",
      "b": "<string>",
      "c": "<string>"
    },
    "leafIndices": [
      1
    ],
    "leaves": [
      "<string>"
    ],
    "merkleTrees": [
      "<string>"
    ],
    "rootIndices": [
      1
    ],
    "roots": [
      "<string>"
    ]
  }
}

Authorizations

api-key
string
query
required

Your Helius API key. You can get one for free in the dashboard.

Body

application/json
jsonrpc
enum<string>
default:2.0
required

The version of the JSON-RPC protocol.

Available options:
2.0
id
string
default:1
required

An ID to identify the request.

method
enum<string>
default:getValidityProof
required

The name of the method to invoke.

Available options:
getValidityProof
params
object
required

Response

Successfully retrieved validity proof for Solana compressed accounts

context
object
required
value
object
required