getValidityProof

Returns a single ZK Proof used by the compression program to verify that the given accounts are valid and that the new addresses can be created

  • Proof limits per request are:

    • hashes: 1, 2, 3, 4, or 8

    • newAddressesWithTrees : 1, 2

  • The newAddresses param field is supported but deprecated. Please use newAddressesWithTreesinstead.

post
Body
idstring · enumRequired

An ID to identify the request.

Possible values:
jsonrpcstring · enumRequired

The version of the JSON-RPC protocol.

Possible values:
methodstring · enumRequired

The name of the method to invoke.

Possible values:
Responses
200Success
application/json
post
POST / HTTP/1.1
Host: mainnet.helius-rpc.com
Content-Type: application/json
Accept: */*
Content-Length: 264

{
  "id": "test-account",
  "jsonrpc": "2.0",
  "method": "getValidityProof",
  "params": {
    "hashes": [
      "11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP"
    ],
    "newAddressesWithTrees": [
      {
        "address": "11111118eRTi4fUVRoeYEeeTyL4DPAwxatvWT5q1Z",
        "tree": "11111118eRTi4fUVRoeYEeeTyL4DPAwxatvWT5q1Z"
      }
    ]
  }
}
{
  "context": {
    "slot": 100
  },
  "value": {
    "compressedProof": {
      "a": "binary",
      "b": "binary",
      "c": "binary"
    },
    "leafIndices": [
      1
    ],
    "leaves": [
      "text"
    ],
    "merkleTrees": [
      "text"
    ],
    "rootIndices": [
      1
    ],
    "roots": [
      "text"
    ]
  }
}

Last updated