Skip to main content
TRON API method that derives an expanded spending key from a spending key for shielded TRC20 transactions. The expanded spending key contains additional cryptographic material used 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 — spending key as a 32‑byte (64‑hex) string, no 0x prefix.

Response

  • ask — the authentication secret key component
  • nsk — the nullifier secret key component
  • ovk — the outgoing viewing key component

Use case

The wallet/getexpandedspendingkey method is used for:
  • Deriving cryptographic components needed for shielded transactions
  • Generating keys required for creating shielded TRC20 transfers
  • Supporting wallet implementations of the shielded transaction protocol
  • Enabling advanced privacy features in TRON applications

curl example

Shell
curl --request POST \
  --url 'https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getexpandedspendingkey' \
  --header 'Content-Type: application/json' \
  --data '{
    "value": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
  }'
Ensure the key is exactly 64 hexadecimal characters without a prefix. Including 0x or using the wrong length (for example, 66 hex chars) produces the error: “the length of spendingKey’s hexString should be 64”.