@@ -35,7 +35,7 @@ message TronSignTx {
3535 required bytes ref_block_bytes = 2 ; // Reference block number
3636 required bytes ref_block_hash = 3 ; // Reference block hash
3737 required uint64 expiration = 4 ; // Transaction expiration
38- optional string data = 5 ; // Extra transaction info
38+ optional bytes data = 5 ; // Extra transaction info
3939 required TronContract contract = 6 ; // Contract messages
4040 required uint64 timestamp = 7 ; // UTC timestamp
4141 optional uint64 fee_limit = 8 ; // Fee limit for smartcontracts
@@ -63,6 +63,7 @@ message TronSignTx {
6363 enum TronResourceCode {
6464 BANDWIDTH = 0x00 ;
6565 ENERGY = 0x01 ;
66+ TRON_POWER = 0x02 ;
6667 }
6768
6869 // Freeze TRX balance
@@ -98,14 +99,26 @@ message TronSignTx {
9899 optional uint64 balance = 3 ;
99100 optional string receiver_address = 4 ;
100101 optional bool lock = 5 ;
102+ optional uint64 lock_period = 6 ;
101103 }
102104 message TronUnDelegateResourceContract {
103105 optional TronResourceCode resource = 2 ;
104106 optional uint64 balance = 3 ;
105107 optional string receiver_address = 4 ;
106108 }
107-
109+ message TronCancelAllUnfreezeV2Contract {
110+ }
111+ // Vote Witness Contract
112+ message TronVoteWitnessContract {
113+ message Vote {
114+ required string vote_address = 1 ;
115+ required uint32 vote_count = 2 ;
116+ }
117+ repeated Vote votes = 2 ;
118+ optional bool support = 3 ;
119+ }
108120 optional TronTransferContract transfer_contract = 2 ;
121+ optional TronVoteWitnessContract vote_witness_contract = 4 ;
109122 optional TronFreezeBalanceContract freeze_balance_contract = 11 ;
110123 optional TronUnfreezeBalanceContract unfreeze_balance_contract = 12 ;
111124 optional TronWithdrawBalanceContract withdraw_balance_contract = 13 ;
@@ -115,6 +128,10 @@ message TronSignTx {
115128 optional TronWithdrawExpireUnfreezeContract withdraw_expire_unfreeze_contract = 56 ;
116129 optional TronDelegateResourceContract delegate_resource_contract = 57 ;
117130 optional TronUnDelegateResourceContract undelegate_resource_contract = 58 ;
131+ optional TronCancelAllUnfreezeV2Contract cancel_all_unfreeze_v2_contract = 59 ;
132+ optional bytes provider = 3 ;
133+ optional bytes contract_name = 5 ;
134+ optional uint32 permission_id = 6 ;
118135 }
119136}
120137
@@ -127,14 +144,20 @@ message TronSignedTx {
127144 optional bytes serialized_tx = 2 ; // Serialized transaction
128145}
129146
147+ enum TronMessageType {
148+ V1 = 1 [deprecated =true ];
149+ V2 = 2 ;
150+ }
151+
130152/**
131153 * Request: Ask device to sign message
132154 * @next TronMessageSignature
133155 * @next Failure
134156 */
135157 message TronSignMessage {
136- repeated uint32 address_n = 1 ; // BIP-32 path to derive the key from master node
137- required bytes message = 2 ; // message to be signed
158+ repeated uint32 address_n = 1 ; // BIP-32 path to derive the key from master node
159+ required bytes message = 2 ; // message to be signed
160+ optional TronMessageType message_type = 3 [default = V1 ]; // message type
138161}
139162
140163/**
0 commit comments