Skip to main content
POST
/
95e61622bf6a8af293978377718e3b77
/
wallet
/
getnkfromnsk
wallet/getnkfromnsk
curl --request POST \
  --url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getnkfromnsk \
  --header 'Content-Type: application/json' \
  --data '{
  "value": "abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcd"
}'
{
  "value": "04b2c3d4e5f6789012345678901234567890123456789abcdef0123456789abcd"
}
TRON API method that derives a nullifier key (nk) from a nullifier secret key (nsk) for shielded TRC20 transactions. The nullifier key is used to generate nullifiers that prevent double-spending in the shielded transaction protocol.
Get you 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

  • value — nullifier secret key (nsk) as a 32‑byte (64‑hex) string, no 0x prefix.

Response

  • value — the derived nullifier key (nk) in hexadecimal format

Use case

The wallet/getnkfromnsk method is used for:
  • Deriving nullifier keys required for preventing double-spending in shielded transactions
  • Converting secret nullifier keys to public nullifier key components
  • Supporting the cryptographic foundation for privacy-preserving transaction verification
  • Enabling secure nullifier generation in shielded TRC20 implementations

curl example

Shell
curl --request POST \
  --url 'https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getnkfromnsk' \
  --header 'Content-Type: application/json' \
  --data '{
    "value": "abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcd"
  }'
Ensure value is exactly 64 hexadecimal characters without a 0x prefix; otherwise the node returns a validation error indicating the expected length.

Body

application/json
value
string
required

Nullifier secret key (nsk) as a 32‑byte (64‑hex) string without 0x prefix.

Example:

"abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcd"

Response

200 - application/json

Successfully derived nullifier key

value
string

The derived nullifier key (nk) in hexadecimal format (no 0x prefix)

Example:

"04b2c3d4e5f6789012345678901234567890123456789abcdef0123456789abcd"