getAssetProof
Retrieve the Merkle proof for a compressed Solana NFT required for verification and on-chain operations like transfers and burns
curl --request POST \
--url 'https://mainnet.helius-rpc.com/?api-key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": "1",
"method": "getAssetProof",
"params": {
"id": "Bu1DEKeawy7txbnCEJE4BU3BKLXaNAKCYcHR4XhndGss"
}
}
'import requests
url = "https://mainnet.helius-rpc.com/?api-key="
payload = {
"jsonrpc": "2.0",
"id": "1",
"method": "getAssetProof",
"params": { "id": "Bu1DEKeawy7txbnCEJE4BU3BKLXaNAKCYcHR4XhndGss" }
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: '1',
method: 'getAssetProof',
params: {id: 'Bu1DEKeawy7txbnCEJE4BU3BKLXaNAKCYcHR4XhndGss'}
})
};
fetch('https://mainnet.helius-rpc.com/?api-key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mainnet.helius-rpc.com/?api-key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => '1',
'method' => 'getAssetProof',
'params' => [
'id' => 'Bu1DEKeawy7txbnCEJE4BU3BKLXaNAKCYcHR4XhndGss'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mainnet.helius-rpc.com/?api-key="
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getAssetProof\",\n \"params\": {\n \"id\": \"Bu1DEKeawy7txbnCEJE4BU3BKLXaNAKCYcHR4XhndGss\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://mainnet.helius-rpc.com/?api-key=")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getAssetProof\",\n \"params\": {\n \"id\": \"Bu1DEKeawy7txbnCEJE4BU3BKLXaNAKCYcHR4XhndGss\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mainnet.helius-rpc.com/?api-key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getAssetProof\",\n \"params\": {\n \"id\": \"Bu1DEKeawy7txbnCEJE4BU3BKLXaNAKCYcHR4XhndGss\"\n }\n}"
response = http.request(request)
puts response.read_body{
"last_indexed_slot": 365750752,
"root": "2o6Y6EiY3WXhoaEpei2pHmHLYnHDcEQVhgD89GrGHDBH",
"proof": [
[
"EmJXiXEAhEN3FfNQtBa5hwR8LC5kHvdLsaGCoERosZjK",
"7NEfhcNPAwbw3L87fjsPqTz2fQdd1CjoLE138SD58FDQ",
"6dM3VyeQoYkRFZ74G53EwvUPbQC6LsMZge6c7S1Ds4ks",
"A9AACJ5m7UtaVz4HxzhDxGjYaY88rc2XPoFvnoTvgYBj",
"2VG5cKeBZdqozwhHGGzs13b9tzy9TXt9kPfN8MzSJ1Sm",
"3E1uFze4pi6BnTZXMsQbeh3jQCeDi966Zax9aMbYgg2D",
"Bx9PdctdWCeC1WfU6dwP49idsXCYhqyxbRLyLwwGhr61",
"HSbJ8quT4vuXFgf5FnjzeUuFfAtLKsq6W1Frj8y1qrif",
"GJMLzL4F4hY9yFHY1EY6XRmW4wpuNGeBZTiv7vM2mYra",
"FYPtEiqmRx6JprHQvWeEWEuVp3WA7DPRCE4VbhFRVuAj",
"6MJKrpnK1GbYsnEzwMRWStNGkTjAZF23NhzTQSQVXsD3",
"HjnrJn5vBUUzpCxzjjM9ZnCPuXei2cXKJjX468B9yWD7",
"4YCF1CSyTXm1Yi9W9JeYevawupkomdgy2dLxEBHL9euq",
"E3oMtCuPEauftdZLX8EZ8YX7BbFzpBCVRYEiLxwPJLY2"
]
],
"node_index": 16384,
"leaf": "6YdZXw49M97mfFTwgQb6kxM2c6eqZkHSaW9XhhoZXtzv",
"tree_id": "2kuTFCcjbV22wvUmtmgsFR7cas7eZUzAu96jzJUvUcb7",
"burnt": "<unknown>"
}{
"jsonrpc": "2.0",
"error": {
"code": -32602,
"message": "Invalid request parameters."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32001,
"message": "Authentication failed. Missing or invalid API key."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32003,
"message": "You do not have permission to access this resource."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32004,
"message": "Asset proof not found for the specified ID."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32029,
"message": "Rate limit exceeded. Please try again later."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32000,
"message": "An unexpected error occurred on the server."
},
"id": "1"
}Request Parameters
Authorizations
Body
The version of the JSON-RPC protocol.
2.0 An ID to identify the request.
The name of the DAS method to invoke.
getAssetProof Show child attributes
Show child attributes
Response
Successful response
All data up to and including this slot is guaranteed to have been indexed.
365750752
The root hash of the Solana state compression merkle tree that contains this compressed NFT.
"2o6Y6EiY3WXhoaEpei2pHmHLYnHDcEQVhgD89GrGHDBH"
The array of merkle proof hashes needed to cryptographically verify this Solana compressed NFT exists in the tree.
The position index of this compressed NFT in the Solana merkle tree structure.
16384
The leaf hash representing this compressed NFT's data in the Solana merkle tree.
"6YdZXw49M97mfFTwgQb6kxM2c6eqZkHSaW9XhhoZXtzv"
The unique identifier of the Solana merkle tree where this compressed NFT is stored.
"2kuTFCcjbV22wvUmtmgsFR7cas7eZUzAu96jzJUvUcb7"
Was this page helpful?
curl --request POST \
--url 'https://mainnet.helius-rpc.com/?api-key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": "1",
"method": "getAssetProof",
"params": {
"id": "Bu1DEKeawy7txbnCEJE4BU3BKLXaNAKCYcHR4XhndGss"
}
}
'import requests
url = "https://mainnet.helius-rpc.com/?api-key="
payload = {
"jsonrpc": "2.0",
"id": "1",
"method": "getAssetProof",
"params": { "id": "Bu1DEKeawy7txbnCEJE4BU3BKLXaNAKCYcHR4XhndGss" }
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: '1',
method: 'getAssetProof',
params: {id: 'Bu1DEKeawy7txbnCEJE4BU3BKLXaNAKCYcHR4XhndGss'}
})
};
fetch('https://mainnet.helius-rpc.com/?api-key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mainnet.helius-rpc.com/?api-key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => '1',
'method' => 'getAssetProof',
'params' => [
'id' => 'Bu1DEKeawy7txbnCEJE4BU3BKLXaNAKCYcHR4XhndGss'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mainnet.helius-rpc.com/?api-key="
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getAssetProof\",\n \"params\": {\n \"id\": \"Bu1DEKeawy7txbnCEJE4BU3BKLXaNAKCYcHR4XhndGss\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://mainnet.helius-rpc.com/?api-key=")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getAssetProof\",\n \"params\": {\n \"id\": \"Bu1DEKeawy7txbnCEJE4BU3BKLXaNAKCYcHR4XhndGss\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mainnet.helius-rpc.com/?api-key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getAssetProof\",\n \"params\": {\n \"id\": \"Bu1DEKeawy7txbnCEJE4BU3BKLXaNAKCYcHR4XhndGss\"\n }\n}"
response = http.request(request)
puts response.read_body{
"last_indexed_slot": 365750752,
"root": "2o6Y6EiY3WXhoaEpei2pHmHLYnHDcEQVhgD89GrGHDBH",
"proof": [
[
"EmJXiXEAhEN3FfNQtBa5hwR8LC5kHvdLsaGCoERosZjK",
"7NEfhcNPAwbw3L87fjsPqTz2fQdd1CjoLE138SD58FDQ",
"6dM3VyeQoYkRFZ74G53EwvUPbQC6LsMZge6c7S1Ds4ks",
"A9AACJ5m7UtaVz4HxzhDxGjYaY88rc2XPoFvnoTvgYBj",
"2VG5cKeBZdqozwhHGGzs13b9tzy9TXt9kPfN8MzSJ1Sm",
"3E1uFze4pi6BnTZXMsQbeh3jQCeDi966Zax9aMbYgg2D",
"Bx9PdctdWCeC1WfU6dwP49idsXCYhqyxbRLyLwwGhr61",
"HSbJ8quT4vuXFgf5FnjzeUuFfAtLKsq6W1Frj8y1qrif",
"GJMLzL4F4hY9yFHY1EY6XRmW4wpuNGeBZTiv7vM2mYra",
"FYPtEiqmRx6JprHQvWeEWEuVp3WA7DPRCE4VbhFRVuAj",
"6MJKrpnK1GbYsnEzwMRWStNGkTjAZF23NhzTQSQVXsD3",
"HjnrJn5vBUUzpCxzjjM9ZnCPuXei2cXKJjX468B9yWD7",
"4YCF1CSyTXm1Yi9W9JeYevawupkomdgy2dLxEBHL9euq",
"E3oMtCuPEauftdZLX8EZ8YX7BbFzpBCVRYEiLxwPJLY2"
]
],
"node_index": 16384,
"leaf": "6YdZXw49M97mfFTwgQb6kxM2c6eqZkHSaW9XhhoZXtzv",
"tree_id": "2kuTFCcjbV22wvUmtmgsFR7cas7eZUzAu96jzJUvUcb7",
"burnt": "<unknown>"
}{
"jsonrpc": "2.0",
"error": {
"code": -32602,
"message": "Invalid request parameters."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32001,
"message": "Authentication failed. Missing or invalid API key."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32003,
"message": "You do not have permission to access this resource."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32004,
"message": "Asset proof not found for the specified ID."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32029,
"message": "Rate limit exceeded. Please try again later."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32000,
"message": "An unexpected error occurred on the server."
},
"id": "1"
}