wallet/isshieldedtrc20contractnotespent
curl --request POST \
--url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/isshieldedtrc20contractnotespent \
--header 'Content-Type: application/json' \
--data '
{
"note": {
"value": 40,
"payment_address": "ztron1768kf7dy4qquefp46szk978d65eeua66yhr4zv260c0uzj68t3tfjl3en9lhyyfxalv4jus30xs",
"rcm": "296070782a94c6936b0b4f6daf8d7c7605a4374fe595b96148dc0f4b59015d0d"
},
"ak": "8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64",
"nk": "590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14",
"position": 272,
"shielded_TRC20_contract_address": "41274fc7464fadac5c00c893c58bce6c39bf59e4c7"
}
'import requests
url = "https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/isshieldedtrc20contractnotespent"
payload = {
"note": {
"value": 40,
"payment_address": "ztron1768kf7dy4qquefp46szk978d65eeua66yhr4zv260c0uzj68t3tfjl3en9lhyyfxalv4jus30xs",
"rcm": "296070782a94c6936b0b4f6daf8d7c7605a4374fe595b96148dc0f4b59015d0d"
},
"ak": "8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64",
"nk": "590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14",
"position": 272,
"shielded_TRC20_contract_address": "41274fc7464fadac5c00c893c58bce6c39bf59e4c7"
}
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({
note: {
value: 40,
payment_address: 'ztron1768kf7dy4qquefp46szk978d65eeua66yhr4zv260c0uzj68t3tfjl3en9lhyyfxalv4jus30xs',
rcm: '296070782a94c6936b0b4f6daf8d7c7605a4374fe595b96148dc0f4b59015d0d'
},
ak: '8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64',
nk: '590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14',
position: 272,
shielded_TRC20_contract_address: '41274fc7464fadac5c00c893c58bce6c39bf59e4c7'
})
};
fetch('https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/isshieldedtrc20contractnotespent', 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://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/isshieldedtrc20contractnotespent",
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([
'note' => [
'value' => 40,
'payment_address' => 'ztron1768kf7dy4qquefp46szk978d65eeua66yhr4zv260c0uzj68t3tfjl3en9lhyyfxalv4jus30xs',
'rcm' => '296070782a94c6936b0b4f6daf8d7c7605a4374fe595b96148dc0f4b59015d0d'
],
'ak' => '8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64',
'nk' => '590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14',
'position' => 272,
'shielded_TRC20_contract_address' => '41274fc7464fadac5c00c893c58bce6c39bf59e4c7'
]),
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://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/isshieldedtrc20contractnotespent"
payload := strings.NewReader("{\n \"note\": {\n \"value\": 40,\n \"payment_address\": \"ztron1768kf7dy4qquefp46szk978d65eeua66yhr4zv260c0uzj68t3tfjl3en9lhyyfxalv4jus30xs\",\n \"rcm\": \"296070782a94c6936b0b4f6daf8d7c7605a4374fe595b96148dc0f4b59015d0d\"\n },\n \"ak\": \"8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64\",\n \"nk\": \"590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14\",\n \"position\": 272,\n \"shielded_TRC20_contract_address\": \"41274fc7464fadac5c00c893c58bce6c39bf59e4c7\"\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://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/isshieldedtrc20contractnotespent")
.header("Content-Type", "application/json")
.body("{\n \"note\": {\n \"value\": 40,\n \"payment_address\": \"ztron1768kf7dy4qquefp46szk978d65eeua66yhr4zv260c0uzj68t3tfjl3en9lhyyfxalv4jus30xs\",\n \"rcm\": \"296070782a94c6936b0b4f6daf8d7c7605a4374fe595b96148dc0f4b59015d0d\"\n },\n \"ak\": \"8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64\",\n \"nk\": \"590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14\",\n \"position\": 272,\n \"shielded_TRC20_contract_address\": \"41274fc7464fadac5c00c893c58bce6c39bf59e4c7\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/isshieldedtrc20contractnotespent")
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 \"note\": {\n \"value\": 40,\n \"payment_address\": \"ztron1768kf7dy4qquefp46szk978d65eeua66yhr4zv260c0uzj68t3tfjl3en9lhyyfxalv4jus30xs\",\n \"rcm\": \"296070782a94c6936b0b4f6daf8d7c7605a4374fe595b96148dc0f4b59015d0d\"\n },\n \"ak\": \"8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64\",\n \"nk\": \"590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14\",\n \"position\": 272,\n \"shielded_TRC20_contract_address\": \"41274fc7464fadac5c00c893c58bce6c39bf59e4c7\"\n}"
response = http.request(request)
puts response.read_body{
"is_spent": false
}TRON node API
wallet/isshieldedtrc20contractnotespent | TRON
TRON API method that checks whether a specific shielded TRC20 contract note has been spent. wallet/isshieldedtrc20contractnotespent on TRON via Chainstack.
POST
/
95e61622bf6a8af293978377718e3b77
/
wallet
/
isshieldedtrc20contractnotespent
wallet/isshieldedtrc20contractnotespent
curl --request POST \
--url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/isshieldedtrc20contractnotespent \
--header 'Content-Type: application/json' \
--data '
{
"note": {
"value": 40,
"payment_address": "ztron1768kf7dy4qquefp46szk978d65eeua66yhr4zv260c0uzj68t3tfjl3en9lhyyfxalv4jus30xs",
"rcm": "296070782a94c6936b0b4f6daf8d7c7605a4374fe595b96148dc0f4b59015d0d"
},
"ak": "8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64",
"nk": "590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14",
"position": 272,
"shielded_TRC20_contract_address": "41274fc7464fadac5c00c893c58bce6c39bf59e4c7"
}
'import requests
url = "https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/isshieldedtrc20contractnotespent"
payload = {
"note": {
"value": 40,
"payment_address": "ztron1768kf7dy4qquefp46szk978d65eeua66yhr4zv260c0uzj68t3tfjl3en9lhyyfxalv4jus30xs",
"rcm": "296070782a94c6936b0b4f6daf8d7c7605a4374fe595b96148dc0f4b59015d0d"
},
"ak": "8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64",
"nk": "590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14",
"position": 272,
"shielded_TRC20_contract_address": "41274fc7464fadac5c00c893c58bce6c39bf59e4c7"
}
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({
note: {
value: 40,
payment_address: 'ztron1768kf7dy4qquefp46szk978d65eeua66yhr4zv260c0uzj68t3tfjl3en9lhyyfxalv4jus30xs',
rcm: '296070782a94c6936b0b4f6daf8d7c7605a4374fe595b96148dc0f4b59015d0d'
},
ak: '8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64',
nk: '590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14',
position: 272,
shielded_TRC20_contract_address: '41274fc7464fadac5c00c893c58bce6c39bf59e4c7'
})
};
fetch('https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/isshieldedtrc20contractnotespent', 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://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/isshieldedtrc20contractnotespent",
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([
'note' => [
'value' => 40,
'payment_address' => 'ztron1768kf7dy4qquefp46szk978d65eeua66yhr4zv260c0uzj68t3tfjl3en9lhyyfxalv4jus30xs',
'rcm' => '296070782a94c6936b0b4f6daf8d7c7605a4374fe595b96148dc0f4b59015d0d'
],
'ak' => '8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64',
'nk' => '590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14',
'position' => 272,
'shielded_TRC20_contract_address' => '41274fc7464fadac5c00c893c58bce6c39bf59e4c7'
]),
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://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/isshieldedtrc20contractnotespent"
payload := strings.NewReader("{\n \"note\": {\n \"value\": 40,\n \"payment_address\": \"ztron1768kf7dy4qquefp46szk978d65eeua66yhr4zv260c0uzj68t3tfjl3en9lhyyfxalv4jus30xs\",\n \"rcm\": \"296070782a94c6936b0b4f6daf8d7c7605a4374fe595b96148dc0f4b59015d0d\"\n },\n \"ak\": \"8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64\",\n \"nk\": \"590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14\",\n \"position\": 272,\n \"shielded_TRC20_contract_address\": \"41274fc7464fadac5c00c893c58bce6c39bf59e4c7\"\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://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/isshieldedtrc20contractnotespent")
.header("Content-Type", "application/json")
.body("{\n \"note\": {\n \"value\": 40,\n \"payment_address\": \"ztron1768kf7dy4qquefp46szk978d65eeua66yhr4zv260c0uzj68t3tfjl3en9lhyyfxalv4jus30xs\",\n \"rcm\": \"296070782a94c6936b0b4f6daf8d7c7605a4374fe595b96148dc0f4b59015d0d\"\n },\n \"ak\": \"8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64\",\n \"nk\": \"590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14\",\n \"position\": 272,\n \"shielded_TRC20_contract_address\": \"41274fc7464fadac5c00c893c58bce6c39bf59e4c7\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/isshieldedtrc20contractnotespent")
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 \"note\": {\n \"value\": 40,\n \"payment_address\": \"ztron1768kf7dy4qquefp46szk978d65eeua66yhr4zv260c0uzj68t3tfjl3en9lhyyfxalv4jus30xs\",\n \"rcm\": \"296070782a94c6936b0b4f6daf8d7c7605a4374fe595b96148dc0f4b59015d0d\"\n },\n \"ak\": \"8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64\",\n \"nk\": \"590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14\",\n \"position\": 272,\n \"shielded_TRC20_contract_address\": \"41274fc7464fadac5c00c893c58bce6c39bf59e4c7\"\n}"
response = http.request(request)
puts response.read_body{
"is_spent": false
}TRON API method that checks whether a specific shielded TRC20 contract note has been spent. This method is crucial for preventing double-spending in shielded transactions and maintaining the integrity of the privacy protocol.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
All hex values (
ak, nk, rcm) must be provided without the 0x prefix and must be exactly 64 hexadecimal characters (32 bytes). The shielded_TRC20_contract_address must be in hex format (starting with 41), not base58 format. The value represents the scaled value multiplied by the contract’s scalingFactor.Parameters
note— the note object to check for spending statusvalue— scaled value (multiplied by contract’s scalingFactor)payment_address— shielded payment address (ztron1 format)rcm— random commitment trapdoor (64 hex characters, no0xprefix)
ak— authorization key (64 hex characters, no0xprefix)nk— nullifier key (64 hex characters, no0xprefix)position— leaf position index in Merkle treeshielded_TRC20_contract_address— the shielded TRC20 contract address (hex format starting with 41, no0xprefix)
Response
is_spent— boolean indicating if the note has been spent (true = spent, false = unspent)
Use case
Thewallet/isshieldedtrc20contractnotespent method is used for:
- Preventing double-spending attacks in shielded transactions
- Validating that notes are available for spending before creating transactions
- Maintaining the security and integrity of the shielded transaction system
- Supporting wallet implementations that need to track note spending status
The nullifier key (nk) and authorization key (ak) are used together with the note’s position in the Merkle tree to generate a unique nullifier for each note. This nullifier is checked to determine if the note has been spent, preventing double-spending while maintaining privacy. The note’s value is scaled by the contract’s scalingFactor to maintain precision in token amounts.
Body
application/json
The note to check for spending status
Show child attributes
Show child attributes
Authorization key (64 hex characters, no 0x prefix)
Example:
"8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64"
Nullifier key (64 hex characters, no 0x prefix)
Example:
"590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14"
Leaf position index in Merkle tree
Example:
272
Shielded TRC20 contract address (hex format, no 0x prefix)
Example:
"41274fc7464fadac5c00c893c58bce6c39bf59e4c7"
Response
200 - application/json
Successfully checked nullifier spending status
Whether the note has been spent (true = spent, false = unspent)
Example:
false
Last modified on June 22, 2026
Was this page helpful?