跳转到主要内容
POST
/
cURL
curl --request POST \
  --url https://mainnet.helius-rpc.com/ \
  --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": {},
    "leafIndices": [
      1
    ],
    "leaves": [
      "<string>"
    ],
    "merkleTrees": [
      "<string>"
    ],
    "rootIndices": [
      1
    ],
    "roots": [
      "<string>"
    ]
  }
}

Authorizations

api-key
string
query
required

您的 Helius API 密钥。您可以在仪表板中免费获取一个。

Body

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

JSON-RPC 协议的版本。

Available options:
2.0
id
string
default:1
required

用于标识请求的 ID。

method
enum<string>
default:getValidityProof
required

要调用的方法名称。

Available options:
getValidityProof
params
object
required

Response

成功检索到 Solana 压缩账户的有效性证明

context
object
required
value
object
required
I