wallet/getincomingviewingkey
curl --request POST \
--url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getincomingviewingkey \
--header 'Content-Type: application/json' \
--data '
{
"ak": "03b2c3d4e5f67890123456789012345678901234567890123456789012345678",
"nk": "04c3d4e5f6789012345678901234567890123456789012345678901234567890"
}
'import requests
url = "https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getincomingviewingkey"
payload = {
"ak": "03b2c3d4e5f67890123456789012345678901234567890123456789012345678",
"nk": "04c3d4e5f6789012345678901234567890123456789012345678901234567890"
}
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({
ak: '03b2c3d4e5f67890123456789012345678901234567890123456789012345678',
nk: '04c3d4e5f6789012345678901234567890123456789012345678901234567890'
})
};
fetch('https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getincomingviewingkey', 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/getincomingviewingkey",
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([
'ak' => '03b2c3d4e5f67890123456789012345678901234567890123456789012345678',
'nk' => '04c3d4e5f6789012345678901234567890123456789012345678901234567890'
]),
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/getincomingviewingkey"
payload := strings.NewReader("{\n \"ak\": \"03b2c3d4e5f67890123456789012345678901234567890123456789012345678\",\n \"nk\": \"04c3d4e5f6789012345678901234567890123456789012345678901234567890\"\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/getincomingviewingkey")
.header("Content-Type", "application/json")
.body("{\n \"ak\": \"03b2c3d4e5f67890123456789012345678901234567890123456789012345678\",\n \"nk\": \"04c3d4e5f6789012345678901234567890123456789012345678901234567890\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getincomingviewingkey")
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 \"ak\": \"03b2c3d4e5f67890123456789012345678901234567890123456789012345678\",\n \"nk\": \"04c3d4e5f6789012345678901234567890123456789012345678901234567890\"\n}"
response = http.request(request)
puts response.read_body{
"ivk": "05d4e5f6789012345678901234567890123456789012345678901234567890abcdef"
}TRON node API
wallet/getincomingviewingkey | TRON
TRON API method that derives an incoming viewing key (ivk) from authentication key (ak) and nullifier key (nk) for shielded TRC20 transactions.
POST
/
95e61622bf6a8af293978377718e3b77
/
wallet
/
getincomingviewingkey
wallet/getincomingviewingkey
curl --request POST \
--url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getincomingviewingkey \
--header 'Content-Type: application/json' \
--data '
{
"ak": "03b2c3d4e5f67890123456789012345678901234567890123456789012345678",
"nk": "04c3d4e5f6789012345678901234567890123456789012345678901234567890"
}
'import requests
url = "https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getincomingviewingkey"
payload = {
"ak": "03b2c3d4e5f67890123456789012345678901234567890123456789012345678",
"nk": "04c3d4e5f6789012345678901234567890123456789012345678901234567890"
}
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({
ak: '03b2c3d4e5f67890123456789012345678901234567890123456789012345678',
nk: '04c3d4e5f6789012345678901234567890123456789012345678901234567890'
})
};
fetch('https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getincomingviewingkey', 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/getincomingviewingkey",
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([
'ak' => '03b2c3d4e5f67890123456789012345678901234567890123456789012345678',
'nk' => '04c3d4e5f6789012345678901234567890123456789012345678901234567890'
]),
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/getincomingviewingkey"
payload := strings.NewReader("{\n \"ak\": \"03b2c3d4e5f67890123456789012345678901234567890123456789012345678\",\n \"nk\": \"04c3d4e5f6789012345678901234567890123456789012345678901234567890\"\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/getincomingviewingkey")
.header("Content-Type", "application/json")
.body("{\n \"ak\": \"03b2c3d4e5f67890123456789012345678901234567890123456789012345678\",\n \"nk\": \"04c3d4e5f6789012345678901234567890123456789012345678901234567890\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getincomingviewingkey")
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 \"ak\": \"03b2c3d4e5f67890123456789012345678901234567890123456789012345678\",\n \"nk\": \"04c3d4e5f6789012345678901234567890123456789012345678901234567890\"\n}"
response = http.request(request)
puts response.read_body{
"ivk": "05d4e5f6789012345678901234567890123456789012345678901234567890abcdef"
}TRON API method that derives an incoming viewing key (ivk) from authentication key (ak) and nullifier key (nk) for shielded TRC20 transactions. The incoming viewing key is used to scan for incoming shielded payments.
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.
Parameters
ak— authentication key as a 32‑byte (64‑hex) string, no0xprefix.nk— nullifier key as a 32‑byte (64‑hex) string, no0xprefix.
Response
ivk— the derived incoming viewing key in hexadecimal format
Use case
Thewallet/getincomingviewingkey method is used for:
- Generating keys needed to scan for incoming shielded payments
- Creating viewing keys that allow monitoring received transactions without spending authority
- Supporting wallet implementations that need to detect incoming shielded transfers
- Enabling privacy-preserving transaction monitoring
curl example
Shell
curl --request POST \
--url 'https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getincomingviewingkey' \
--header 'Content-Type: application/json' \
--data '{
"ak": "03b2c3d4e5f67890123456789012345678901234567890123456789012345678",
"nk": "04c3d4e5f6789012345678901234567890123456789012345678901234567890"
}'
All keys must be exactly 64 hexadecimal characters without a
0x prefix. Otherwise the node returns an error like: “param length must be 32”.Body
application/json
Authentication key (ak) as a 32‑byte (64‑hex) string without 0x prefix.
Pattern:
^[0-9a-fA-F]{64}$Example:
"03b2c3d4e5f67890123456789012345678901234567890123456789012345678"
Nullifier key (nk) as a 32‑byte (64‑hex) string without 0x prefix.
Pattern:
^[0-9a-fA-F]{64}$Example:
"04c3d4e5f6789012345678901234567890123456789012345678901234567890"
Response
200 - application/json
Successfully derived incoming viewing key
The derived incoming viewing key (ivk) in hexadecimal format (no 0x prefix)
Example:
"05d4e5f6789012345678901234567890123456789012345678901234567890abcdef"
Last modified on June 22, 2026
Was this page helpful?