curl --request POST \
--url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getexpandedspendingkey \
--header 'Content-Type: application/json' \
--data '
{
"value": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
}
'{
"ask": "<string>",
"nsk": "<string>",
"ovk": "<string>"
}curl --request POST \
--url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getexpandedspendingkey \
--header 'Content-Type: application/json' \
--data '
{
"value": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
}
'{
"ask": "<string>",
"nsk": "<string>",
"ovk": "<string>"
}value — spending key as a 32‑byte (64‑hex) string, no 0x prefix.ask — the authentication secret key componentnsk — the nullifier secret key componentovk — the outgoing viewing key componentwallet/getexpandedspendingkey method is used for:
curl --request POST \
--url 'https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getexpandedspendingkey' \
--header 'Content-Type: application/json' \
--data '{
"value": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
}'
0x or using the wrong length (for example, 66 hex chars) produces the error: “the length of spendingKey’s hexString should be 64”.Spending key as a 32‑byte (64‑hex) string without 0x prefix.
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
Was this page helpful?