Skip to main content
POST
/
95e61622bf6a8af293978377718e3b77
/
wallet
/
gettriggerinputforshieldedtrc20contract
wallet/gettriggerinputforshieldedtrc20contract
curl --request POST \
  --url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/gettriggerinputforshieldedtrc20contract \
  --header 'Content-Type: application/json' \
  --data '{
  "shielded_TRC20_Parameters": {
    "spend_description": [
      {
        "value_commitment": "219ed48bc4bfe14cc2953ab5027528353e177e2263479122ea97c609ce187986",
        "anchor": "c1dda86b7af8ce842e349347b364936baf24ad36be65046e2fd7349640bba873",
        "nullifier": "79e938e0951d4d6cf6acd679fc6bb59147a6abc2f9e2828185328e93a83ab2f1",
        "rk": "99c0c1fbe3ad8a6e27d712632064fdeeb10952624c60a0ddcba0eb233bbf4e8b",
        "zkproof": "b536d0f442f6e0517930a9ccdb551c9e551a148c41fcf1e4748d1330d6c3e6f9"
      }
    ],
    "receive_description": [
      {
        "value_commitment": "19ac352ba8d7f5167ef43a5b9c225056db2c44fb19f7fe8c63e0d2b956771656",
        "note_commitment": "e40b9da38887963c8cd1e163b4b7d4b999502c32e1204b791242633aebcdbb6d",
        "epk": "b1675f0b5331371466ff30d621991f0a30c9bc4d34c322be44619a0acf932905",
        "c_enc": "b69f20ae969de55319d2b7617bf7351a4683098af1e7b16fa64d44ff758471f3",
        "c_out": "1e5333e35985d343697dcce92703c2536a861eb49722e1c83a112cf004006e9c",
        "zkproof": "a6b41694f8fa378886ef77d5bd07de56de55b9ad7c8438d05380dd5fa1ce2e7d"
      }
    ],
    "binding_signature": "c7f303709c57e49264fd5ae5922bf977ef2a57ccc84d746effc5c6937eecf36e05b09faf95e5f869aeaf1aa87b24570eb723a4d8c77edea32c31b2909c84eb04",
    "message_hash": "7fb99e66df052f430d50e80a3f197c319a4e35184ed48a433d6219e025741337",
    "parameter_type": "transfer"
  },
  "spend_authority_signature": [
    {
      "value": "66c806bc592a7599e65833bf25c3c7005c8b21b7895dd835a84c97d7bec49d0f1493d2c73a68eeb9b9699b92cae42406f9e44ebe19acaea3d5febfe28de57109"
    }
  ]
}'
{
  "trigger_contract_input": "a9059cbb000000000000000000000041..."
}
TRON API method that generates trigger input parameters for shielded TRC20 contract calls. This method converts shielded TRC20 transaction parameters into formatted input data that can be used to trigger shielded contract operations.
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.
This endpoint requires valid shielded TRC20 parameters generated from prior shielded transaction preparation. All hex values must be provided without the 0x prefix. You must specify the parameter_type field with one of these values: “mint”, “burn”, or “transfer”. The parameters must include valid zero-knowledge proofs, binding signature, and message hash from the shielded transaction protocol.

Parameters

  • shielded_TRC20_Parameters — object containing shielded transaction parameters
    • spend_description — array of spend descriptions for transaction inputs
      • value_commitment — value commitment (hex without 0x prefix)
      • anchor — Merkle root of note commitment tree (hex without 0x prefix)
      • nullifier — nullifier to prevent double spending (hex without 0x prefix)
      • rk — public key for spend authorization signature verification (hex without 0x prefix)
      • zkproof — zero-knowledge proof data (hex without 0x prefix)
    • receive_description — array of receive descriptions for transaction outputs (required for transfer operations)
      • value_commitment — value commitment (hex without 0x prefix)
      • note_commitment — note commitment (hex without 0x prefix)
      • epk — ephemeral public key (hex without 0x prefix)
      • c_enc — encrypted note ciphertext (hex without 0x prefix)
      • c_out — output ciphertext for auditing (hex without 0x prefix)
      • zkproof — zero-knowledge proof data (hex without 0x prefix)
    • binding_signature — binding signature for the transaction (hex without 0x prefix)
    • message_hash — hash of the transaction message (hex without 0x prefix)
    • parameter_type — type of shielded operation: “mint”, “burn”, or “transfer”
  • spend_authority_signature — array of spend authority signatures (one for each spend description)
    • value — spend authorization signature (hex without 0x prefix)

Response

  • trigger_contract_input — the formatted input data for triggering the shielded TRC20 contract

Use case

The wallet/gettriggerinputforshieldedtrc20contract method is used for:
  • Preparing input data for shielded TRC20 contract interactions
  • Converting shielded transaction parameters into contract-compatible format
  • Enabling smart contract integration with shielded TRC20 functionality
  • Supporting advanced DeFi applications with privacy features

Body

application/json
shielded_TRC20_Parameters
object
required

Shielded TRC20 transaction parameters

spend_authority_signature
object[]
required

Array of spend authority signatures, one for each spend description

Response

200 - application/json

Successfully generated trigger input parameters

trigger_contract_input
string

Formatted input data for triggering the shielded TRC20 contract

Example:

"a9059cbb000000000000000000000041..."