TRON — SolidityNode API (3/4)
API reference for TRON. All methods ->
wallet/getapprovedlist
Retrieves the signatures list of a transaction after signing.
Parameters
A transaction object after signing.
Request example
curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/getapprovedlist' \
-H 'Content-Type: application/json' \
-d '{
"visible": true,
"signature": [
"36c9d227b9dd6b6f377d018bb2df784be884f28c743dc97edfdaa8bd64b2ffb058bca24a4eb8b4543a052a4f353fee8cb9e606ff739c74d22f9451c7a35c8f5200"
],
"txID": "4d928f7adfbad5c82f5b8518a6f7b7c5e459d06d1cb5306c61fad8a793587d2d",
"raw_data": {
"contract": [
{
"parameter": {
"value": {
"amount": 1000000,
"owner_address": "TRGhNNfnmgLegT4zHNjEqDSADjgmnHvubJ",
"to_address": "TJCnKsPa7y5okkXvQAidZBzqx3QyQ6sxMW"
},
"type_url": "type.googleapis.com/protocol.TransferContract"
},
"type": "TransferContract",
"Permission_id": 2
}
],
"ref_block_bytes": "0380",
"ref_block_hash": "6cdc8193f096be0f",
"expiration": 1556249055000,
"timestamp": 1556248995694
},
"raw_data_hex": "0a02038022086cdc8193f096be0f40989eb0bda52d5a69080112630a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412320a1541a7d8a35b260395c14aa456297662092ba3b76fc01215415a523b449890854c8fc460ab602df9f31fe4293f18c0843d280270eeceacbda52d"
}'
Response example
{
"result": {},
"approved_list": [
"TNhXo1GbRNCuorvYu5JFWN3m2NYr9QQpVR"
],
"transaction": {
"result": {
"result": true
},
"txid": "4d928f7adfbad5c82f5b8518a6f7b7c5e459d06d1cb5306c61fad8a793587d2d",
"transaction": {
"signature": [
"36c9d227b9dd6b6f377d018bb2df784be884f28c743dc97edfdaa8bd64b2ffb058bca24a4eb8b4543a052a4f353fee8cb9e606ff739c74d22f9451c7a35c8f5200"
],
"txID": "4d928f7adfbad5c82f5b8518a6f7b7c5e459d06d1cb5306c61fad8a793587d2d",
"raw_data": {
"contract": [
{
"parameter": {
"value": {
"amount": 1000000,
"owner_address": "TRGhNNfnmgLegT4zHNjEqDSADjgmnHvubJ",
"to_address": "TJCnKsPa7y5okkXvQAidZBzqx3QyQ6sxMW"
},
"type_url": "type.googleapis.com/protocol.TransferContract"
},
"type": "TransferContract",
"Permission_id": 2
}
],
"ref_block_bytes": "0380",
"ref_block_hash": "6cdc8193f096be0f",
"expiration": 1556249055000,
"timestamp": 1556248995694
},
"raw_data_hex": "0a02038022086cdc8193f096be0f40989eb0bda52d5a69080112630a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412320a1541a7d8a35b260395c14aa456297662092ba3b76fc01215415a523b449890854c8fc460ab602df9f31fe4293f18c0843d280270eeceacbda52d"
}
}
}
wallet/accountpermissionupdate
Sets a multi-signature for an account.
Parameters
owner_address(string; hex; required): an owner address of the account.owner(object): an account owner permission.witness(object): an account witness permission; only for the witness.actives(array): an operation permission.
Request example
curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/accountpermissionupdate' \
-H 'Content-Type: application/json' \
-d '{
"owner_address": "TRGhNNfnmgLegT4zHNjEqDSADjgmnHvubJ",
"owner": {
"type": 0,
"permission_name": "owner",
"threshold": 1,
"keys": [
{
"address": "TRGhNNfnmgLegT4zHNjEqDSADjgmnHvubJ",
"weight": 1
}
]
},
"actives": [
{
"type": 2,
"permission_name": "active12323",
"threshold": 2,
"operations": "7fff1fc0033e0000000000000000000000000000000000000000000000000000",
"keys": [
{
"address": "TNhXo1GbRNCuorvYu5JFWN3m2NYr9QQpVR",
"weight": 1
},
{
"address": "TKwhcDup8L2PH5r6hxp5CQvQzZqJLmKvZP",
"weight": 1
}
]
}
],
"visible": true
}'
Response example
{
"visible": true,
"txID": "893420ec0302c29b8a060b3a2ebbdf5239b628570a329b492f3e9a38222eb9a1",
"raw_data": {
"contract": [
{
"parameter": {
"value": {
"owner": {
"keys": [
{
"address": "TRGhNNfnmgLegT4zHNjEqDSADjgmnHvubJ",
"weight": 1
}
],
"threshold": 1,
"permission_name": "owner"
},
"owner_address": "TRGhNNfnmgLegT4zHNjEqDSADjgmnHvubJ",
"actives": [
{
"operations": "7fff1fc0033e0000000000000000000000000000000000000000000000000000",
"keys": [
{
"address": "TNhXo1GbRNCuorvYu5JFWN3m2NYr9QQpVR",
"weight": 1
},
{
"address": "TKwhcDup8L2PH5r6hxp5CQvQzZqJLmKvZP",
"weight": 1
}
],
"threshold": 2,
"type": "Active",
"permission_name": "active12323"
}
]
},
"type_url": "type.googleapis.com/protocol.AccountPermissionUpdateContract"
},
"type": "AccountPermissionUpdateContract"
}
],
"ref_block_bytes": "4ffc",
"ref_block_hash": "4e38306be89d0e14",
"expiration": 1680686277000,
"timestamp": 1680686217702
},
"raw_data_hex": "0a024ffc22084e38306be89d0e144088c3d585f5305aee01082e12e9010a3c747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e4163636f756e745065726d697373696f6e557064617465436f6e747261637412a8010a1541a7d8a35b260395c14aa456297662092ba3b76fc012241a056f776e657220013a190a1541a7d8a35b260395c14aa456297662092ba3b76fc01001226908021a0b6163746976653132333233200232207fff1fc0033e00000000000000000000000000000000000000000000000000003a190a15418ba2aaae540c642e44e3bed5522c63bbc21fff9210013a190a15416d684e23fdb378cd815852f42ab7d20c35160548100170e6f3d185f530"
}
wallet/getzenpaymentaddress
Retrieves payment address.
Parameters
ivk(string; hex; required): an incoming viewing key.d(string; required): d.
Request example
curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/createtransaction' \
-H 'Content-Type: application/json' \
-d '{
"ivk": "8c7852e10862d8eec058635974f70f24c1f8d73819131bb5b54028d0a9408a03",
"d": "736ba8692ed88a5473e009"
}'
//: # (curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/scannotebyivk' )
//: # (-H 'Content-Type: application/json' )
//: # (curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/scanandmarknotebyivk' )
//: # (-H 'Content-Type: application/json' )
//: # (curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/scannotebyovk' )
//: # (-H 'Content-Type: application/json' )
wallet/getrcm
Retrieves a random commitment trapdoor.
Parameters
None.
Request example
curl -X GET 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/getrcm'
Response example
{
"value": "cf41ab2baca05e1fee6d34778f1b059ae93669aa8011f4bc629a75c495226801"
}
//: # (curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/getmerkletreevoucherinfo' )
//: # (-H 'Content-Type: application/json' )
//: # (curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/isspend' )
//: # (-H 'Content-Type: application/json' )
//: # (curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/createshieldnullifier' )
//: # (-H 'Content-Type: application/json' )
//: # (curl -X POST 'https://rpc.ankr.com/premium-http/tron/YOUR_ANKR_API_KEY/wallet/getshieldtransactionhash' )
//: # (-H 'Content-Type: application/json' )