getAssetProof
Récupérez la preuve Merkle pour un NFT Solana compressé requis pour la vérification et les opérations on-chain comme les transferts et les brûlures
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": "Paramètres de requête invalides."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32001,
"message": "Authentification échouée. Clé API manquante ou invalide."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32003,
"message": "Vous n'avez pas la permission d'accéder à cette ressource."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32004,
"message": "Preuve d'actif non trouvée pour l'ID spécifié."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32029,
"message": "Limite de taux dépassée. Veuillez réessayer plus tard."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32000,
"message": "Une erreur inattendue s'est produite sur le serveur."
},
"id": "1"
}Paramètres de la requête
Autorisations
Votre clé API Helius. Vous pouvez en obtenir une gratuitement dans le tableau de bord.
Corps
La version du protocole JSON-RPC.
2.0 Un ID pour identifier la demande.
Le nom de la méthode DAS à invoquer.
getAssetProof Show child attributes
Show child attributes
Réponse
Réponse réussie
Toutes les données jusqu'à et y compris ce slot sont garanties d'avoir été indexées.
365750752
La racine du hachage de l'arbre de compression d'état Solana qui contient ce NFT compressé.
"2o6Y6EiY3WXhoaEpei2pHmHLYnHDcEQVhgD89GrGHDBH"
Le tableau des hachages de preuve merkle nécessaires pour vérifier cryptographiquement que ce NFT compressé Solana existe dans l'arbre.
L'index de position de ce NFT compressé dans la structure de l'arbre merkle de Solana.
16384
Le hachage de la feuille représentant les données de ce NFT compressé dans l'arbre merkle de Solana.
"6YdZXw49M97mfFTwgQb6kxM2c6eqZkHSaW9XhhoZXtzv"
L'identifiant unique de l'arbre merkle Solana où ce NFT compressé est stocké.
"2kuTFCcjbV22wvUmtmgsFR7cas7eZUzAu96jzJUvUcb7"
Cette page vous a-t-elle été utile ?
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": "Paramètres de requête invalides."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32001,
"message": "Authentification échouée. Clé API manquante ou invalide."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32003,
"message": "Vous n'avez pas la permission d'accéder à cette ressource."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32004,
"message": "Preuve d'actif non trouvée pour l'ID spécifié."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32029,
"message": "Limite de taux dépassée. Veuillez réessayer plus tard."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32000,
"message": "Une erreur inattendue s'est produite sur le serveur."
},
"id": "1"
}