curl --request POST \
--url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/scanshieldedtrc20notesbyivk \
--header 'Content-Type: application/json' \
--data '
{
"start_block_index": 10000000,
"end_block_index": 10000001,
"ivk": "9f8e74bb3d7188a2781dc1db38810c6914eef4570a79e8ec8404480948e4e305",
"ak": "8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64",
"nk": "590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14",
"shielded_TRC20_contract_address": "41274fc7464fadac5c00c893c58bce6c39bf59e4c7"
}
'import requests
url = "https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/scanshieldedtrc20notesbyivk"
payload = {
"start_block_index": 10000000,
"end_block_index": 10000001,
"ivk": "9f8e74bb3d7188a2781dc1db38810c6914eef4570a79e8ec8404480948e4e305",
"ak": "8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64",
"nk": "590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14",
"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({
start_block_index: 10000000,
end_block_index: 10000001,
ivk: '9f8e74bb3d7188a2781dc1db38810c6914eef4570a79e8ec8404480948e4e305',
ak: '8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64',
nk: '590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14',
shielded_TRC20_contract_address: '41274fc7464fadac5c00c893c58bce6c39bf59e4c7'
})
};
fetch('https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/scanshieldedtrc20notesbyivk', 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/scanshieldedtrc20notesbyivk",
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([
'start_block_index' => 10000000,
'end_block_index' => 10000001,
'ivk' => '9f8e74bb3d7188a2781dc1db38810c6914eef4570a79e8ec8404480948e4e305',
'ak' => '8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64',
'nk' => '590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14',
'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/scanshieldedtrc20notesbyivk"
payload := strings.NewReader("{\n \"start_block_index\": 10000000,\n \"end_block_index\": 10000001,\n \"ivk\": \"9f8e74bb3d7188a2781dc1db38810c6914eef4570a79e8ec8404480948e4e305\",\n \"ak\": \"8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64\",\n \"nk\": \"590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14\",\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/scanshieldedtrc20notesbyivk")
.header("Content-Type", "application/json")
.body("{\n \"start_block_index\": 10000000,\n \"end_block_index\": 10000001,\n \"ivk\": \"9f8e74bb3d7188a2781dc1db38810c6914eef4570a79e8ec8404480948e4e305\",\n \"ak\": \"8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64\",\n \"nk\": \"590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14\",\n \"shielded_TRC20_contract_address\": \"41274fc7464fadac5c00c893c58bce6c39bf59e4c7\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/scanshieldedtrc20notesbyivk")
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 \"start_block_index\": 10000000,\n \"end_block_index\": 10000001,\n \"ivk\": \"9f8e74bb3d7188a2781dc1db38810c6914eef4570a79e8ec8404480948e4e305\",\n \"ak\": \"8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64\",\n \"nk\": \"590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14\",\n \"shielded_TRC20_contract_address\": \"41274fc7464fadac5c00c893c58bce6c39bf59e4c7\"\n}"
response = http.request(request)
puts response.read_body{
"noteTxs": [
{
"txid": "<string>",
"index": 123,
"note": {
"value": 123,
"payment_address": "<string>",
"rcm": "<string>",
"memo": "<string>"
},
"position": 123,
"is_spent": true
}
]
}wallet/scanshieldedtrc20notesbyivk | TRON
TRON API method that scans for shielded TRC20 notes using an incoming viewing key (ivk). wallet/scanshieldedtrc20notesbyivk on TRON via Chainstack.
curl --request POST \
--url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/scanshieldedtrc20notesbyivk \
--header 'Content-Type: application/json' \
--data '
{
"start_block_index": 10000000,
"end_block_index": 10000001,
"ivk": "9f8e74bb3d7188a2781dc1db38810c6914eef4570a79e8ec8404480948e4e305",
"ak": "8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64",
"nk": "590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14",
"shielded_TRC20_contract_address": "41274fc7464fadac5c00c893c58bce6c39bf59e4c7"
}
'import requests
url = "https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/scanshieldedtrc20notesbyivk"
payload = {
"start_block_index": 10000000,
"end_block_index": 10000001,
"ivk": "9f8e74bb3d7188a2781dc1db38810c6914eef4570a79e8ec8404480948e4e305",
"ak": "8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64",
"nk": "590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14",
"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({
start_block_index: 10000000,
end_block_index: 10000001,
ivk: '9f8e74bb3d7188a2781dc1db38810c6914eef4570a79e8ec8404480948e4e305',
ak: '8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64',
nk: '590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14',
shielded_TRC20_contract_address: '41274fc7464fadac5c00c893c58bce6c39bf59e4c7'
})
};
fetch('https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/scanshieldedtrc20notesbyivk', 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/scanshieldedtrc20notesbyivk",
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([
'start_block_index' => 10000000,
'end_block_index' => 10000001,
'ivk' => '9f8e74bb3d7188a2781dc1db38810c6914eef4570a79e8ec8404480948e4e305',
'ak' => '8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64',
'nk' => '590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14',
'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/scanshieldedtrc20notesbyivk"
payload := strings.NewReader("{\n \"start_block_index\": 10000000,\n \"end_block_index\": 10000001,\n \"ivk\": \"9f8e74bb3d7188a2781dc1db38810c6914eef4570a79e8ec8404480948e4e305\",\n \"ak\": \"8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64\",\n \"nk\": \"590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14\",\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/scanshieldedtrc20notesbyivk")
.header("Content-Type", "application/json")
.body("{\n \"start_block_index\": 10000000,\n \"end_block_index\": 10000001,\n \"ivk\": \"9f8e74bb3d7188a2781dc1db38810c6914eef4570a79e8ec8404480948e4e305\",\n \"ak\": \"8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64\",\n \"nk\": \"590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14\",\n \"shielded_TRC20_contract_address\": \"41274fc7464fadac5c00c893c58bce6c39bf59e4c7\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/scanshieldedtrc20notesbyivk")
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 \"start_block_index\": 10000000,\n \"end_block_index\": 10000001,\n \"ivk\": \"9f8e74bb3d7188a2781dc1db38810c6914eef4570a79e8ec8404480948e4e305\",\n \"ak\": \"8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64\",\n \"nk\": \"590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14\",\n \"shielded_TRC20_contract_address\": \"41274fc7464fadac5c00c893c58bce6c39bf59e4c7\"\n}"
response = http.request(request)
puts response.read_body{
"noteTxs": [
{
"txid": "<string>",
"index": 123,
"note": {
"value": 123,
"payment_address": "<string>",
"rcm": "<string>",
"memo": "<string>"
},
"position": 123,
"is_spent": true
}
]
}ivk, ak, nk) 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. There is a block range limit: (end_block_index - start_block_index) <= 1000.Parameters
start_block_index— the starting block number for scanning (inclusive)end_block_index— the ending block number for scanning (exclusive, max 1000 blocks from start)ivk— the incoming viewing key for decrypting notes (64 hex characters, no0xprefix)ak— the authentication key for verification (64 hex characters, no0xprefix)nk— the nullifier key for note identification (64 hex characters, no0xprefix)shielded_TRC20_contract_address— the shielded TRC20 contract address to scan (hex format starting with 41, no0xprefix)
Response
noteTxs— array of found shielded note transactionstxid— transaction ID containing the noteindex— index of the note within the transactionnote— the decrypted note detailsvalue— note valuepayment_address— shielded payment addressrcm— randomness commitmentmemo— optional memo field
position— position in the merkle treeis_spent— whether the note has been spent
Use case
Thewallet/scanshieldedtrc20notesbyivk method is used for:
- Scanning the blockchain for incoming shielded TRC20 payments
- Detecting received transactions without compromising sender privacy
- Building wallet interfaces that show shielded transaction history
- Monitoring shielded contract activity for specific addresses
curl example
curl --request POST \
--url 'https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/scanshieldedtrc20notesbyivk' \
--header 'Content-Type: application/json' \
--data '{
"start_block_index": 10000000,
"end_block_index": 10000001,
"ivk": "9f8e74bb3d7188a2781dc1db38810c6914eef4570a79e8ec8404480948e4e305",
"ak": "8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64",
"nk": "590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14",
"shielded_TRC20_contract_address": "41274fc7464fadac5c00c893c58bce6c39bf59e4c7"
}'
Body
Starting block number for scanning
10000000
Ending block number for scanning
10000001
Incoming viewing key for decrypting notes (64 hex characters, no 0x prefix)
"9f8e74bb3d7188a2781dc1db38810c6914eef4570a79e8ec8404480948e4e305"
Authentication key for verification (64 hex characters, no 0x prefix)
"8072d9110c9de9d9ade33d5d0f5890a7aa65b0cde42af7816d187297caf2fd64"
Nullifier key for note identification (64 hex characters, no 0x prefix)
"590bf33f93f792be659fd404df91e75c3b08d38d4e08ee226c3f5219cf598f14"
Shielded TRC20 contract address to scan (hex format, no 0x prefix)
"41274fc7464fadac5c00c893c58bce6c39bf59e4c7"
Response
Successfully scanned for shielded notes
Array of found shielded note transactions
Show child attributes
Show child attributes
Was this page helpful?