Skip to main content
TRON API method that checks whether a specific shielded TRC20 contract note has been spent. This method is crucial for preventing double-spending in shielded transactions and maintaining the integrity of the privacy 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.
All hex values (ak, nk, rcm) 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. The value represents the scaled value multiplied by the contract’s scalingFactor.

Parameters

  • note — the note object to check for spending status
    • value — scaled value (multiplied by contract’s scalingFactor)
    • payment_address — shielded payment address (ztron1 format)
    • rcm — random commitment trapdoor (64 hex characters, no 0x prefix)
  • ak — authorization key (64 hex characters, no 0x prefix)
  • nk — nullifier key (64 hex characters, no 0x prefix)
  • position — leaf position index in Merkle tree
  • shielded_TRC20_contract_address — the shielded TRC20 contract address (hex format starting with 41, no 0x prefix)

Response

  • is_spent — boolean indicating if the note has been spent (true = spent, false = unspent)

Use case

The wallet/isshieldedtrc20contractnotespent method is used for:
  • Preventing double-spending attacks in shielded transactions
  • Validating that notes are available for spending before creating transactions
  • Maintaining the security and integrity of the shielded transaction system
  • Supporting wallet implementations that need to track note spending status
The nullifier key (nk) and authorization key (ak) are used together with the note’s position in the Merkle tree to generate a unique nullifier for each note. This nullifier is checked to determine if the note has been spent, preventing double-spending while maintaining privacy. The note’s value is scaled by the contract’s scalingFactor to maintain precision in token amounts.