Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
163 lines (131 sloc) 3.38 KB
syntax = "proto3";
package TW.Tron.Proto;
option java_package = "wallet.core.jni.proto";
message TransferContract {
// Sender address.
string owner_address = 1;
// Recipient address.
string to_address = 2;
// Amount to send.
int64 amount = 3;
}
message TransferAssetContract {
// Asset name.
string asset_name = 1;
// Sender address.
string owner_address = 2;
// Recipient address.
string to_address = 3;
// Amount to send.
int64 amount = 4;
}
message TransferTRC20Contract {
// Contract name.
string contract_address = 1;
// Sender address.
string owner_address = 2;
// Recipient address.
string to_address = 3;
// Amount to send.
int64 amount = 4;
}
message FreezeBalanceContract {
// Sender address.
string owner_address = 1;
// Frozen balance. Minimum 1
int64 frozen_balance = 2;
// Frozen duration
int64 frozen_duration = 3;
// Resource type: BANDWIDTH | ENERGY
string resource = 10;
// Receiver address
string receiver_address = 15;
}
message UnfreezeBalanceContract {
// Sender address
string owner_address = 1;
// Resource type: BANDWIDTH | ENERGY
string resource = 10;
// Receiver address
string receiver_address = 15;
}
message UnfreezeAssetContract {
// Sender address
string owner_address = 1;
}
message VoteAssetContract {
// Sender address
string owner_address = 1;
// Vote addresses
repeated string vote_address = 2;
bool support = 3;
int32 count = 5;
}
message VoteWitnessContract {
message Vote {
string vote_address = 1;
int64 vote_count = 2;
}
string owner_address = 1;
repeated Vote votes = 2;
bool support = 3;
}
message WithdrawBalanceContract {
// Sender address
string owner_address = 1;
}
message TriggerSmartContract {
string owner_address = 1;
string contract_address = 2;
int64 call_value = 3;
bytes data = 4;
int64 call_token_value = 5;
int64 token_id = 6;
}
message BlockHeader {
int64 timestamp = 1;
bytes tx_trie_root = 2;
bytes parent_hash = 3;
int64 number = 7;
bytes witness_address = 9;
int32 version = 10;
}
message Transaction {
// Transaction timestamp in milliseconds.
int64 timestamp = 1;
// Transaction expiration time in milliseconds.
int64 expiration = 2;
// Transaction block header.
BlockHeader block_header = 3;
// Transaction fee limit
int64 fee_limit = 4;
// Contract.
oneof contract_oneof {
TransferContract transfer = 10;
TransferAssetContract transfer_asset = 11;
FreezeBalanceContract freeze_balance = 12;
UnfreezeBalanceContract unfreeze_balance = 13;
UnfreezeAssetContract unfreeze_asset = 14;
WithdrawBalanceContract withdraw_balance = 15;
VoteAssetContract vote_asset = 16;
VoteWitnessContract vote_witness = 17;
TriggerSmartContract trigger_smart_contract = 18;
TransferTRC20Contract transfer_trc20_contract = 19;
}
}
message SigningInput {
// Transaction.
Transaction transaction = 1;
// Private key.
bytes private_key = 2;
}
// Transaction signing output.
message SigningOutput {
// Transaction identifier.
bytes id = 1;
// Signature.
bytes signature = 2;
bytes ref_block_bytes = 3;
bytes ref_block_hash = 4;
string json = 5;
}
You can’t perform that action at this time.