POST
/
95e61622bf6a8af293978377718e3b77
/
wallet
/
isshieldedtrc20contractnotespent
wallet/isshieldedtrc20contractnotespent
curl --request POST \
  --url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/isshieldedtrc20contractnotespent \
  --header 'Content-Type: application/json' \
  --data '{
  "nullifiers": [
    "0x1446f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7"
  ],
  "shielded_TRC20_contract_address": "TGzz8gjYiYRqpfmDwnLxfgPuLVNmpCswVp",
  "block_num": 10001000
}'
{
  "spent_status": [
    {
      "nullifier": "0x1446f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7",
      "spent": false
    }
  ]
}
TRON API method that checks whether specific shielded TRC20 contract notes have 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.

Parameters

  • nullifiers — array of nullifiers to check for spending status
  • shielded_TRC20_contract_address — the shielded TRC20 contract address
  • block_num — optional block number to check status at specific height

Response

  • spent_status — array indicating which nullifiers have been spent
  • nullifier — the nullifier that was checked
  • spent — boolean indicating if the nullifier has been used (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

Body

application/json
nullifiers
string[]
required

Array of nullifiers to check for spending status

shielded_TRC20_contract_address
string
required

Shielded TRC20 contract address

Example:

"TGzz8gjYiYRqpfmDwnLxfgPuLVNmpCswVp"

block_num
integer

Optional block number to check status at specific height

Example:

10001000

Response

200 - application/json

Successfully checked nullifier spending status

spent_status
object[]

Array indicating spending status of each nullifier