Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 46 additions & 34 deletions api/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import "core/contract/balance_contract.proto";
import "core/contract/proposal_contract.proto";
import "core/contract/storage_contract.proto";
import "core/contract/exchange_contract.proto";
import "core/contract/market_contract.proto";
import "core/contract/smart_contract.proto";
import "core/contract/shield_contract.proto";
import "core/contract/market_contract.proto";

option java_package = "org.tron.api"; //Specify the name of the package that generated the Java file
option java_outer_classname = "GrpcAPI"; //Specify the class name of the generated Java file
Expand Down Expand Up @@ -287,6 +287,28 @@ service Wallet {
rpc ExchangeTransaction (ExchangeTransactionContract) returns (TransactionExtention) {
}

rpc MarketSellAsset (MarketSellAssetContract) returns (TransactionExtention) {
}

rpc MarketCancelOrder (MarketCancelOrderContract) returns (TransactionExtention) {
}

rpc GetMarketOrderById (BytesMessage) returns (MarketOrder) {
}

rpc GetMarketOrderByAccount (BytesMessage) returns (MarketOrderList) {
}

rpc GetMarketPriceByPair (MarketOrderPair) returns (MarketPriceList) {
}

rpc GetMarketOrderListByPair (MarketOrderPair) returns (MarketOrderList) {
}

rpc GetMarketPairList (EmptyMessage) returns (MarketOrderPairList) {
}


rpc ListNodes (EmptyMessage) returns (NodeList) {
option (google.api.http) = {
post: "/wallet/listnodes"
Expand Down Expand Up @@ -735,29 +757,6 @@ service Wallet {

rpc GetTransactionInfoByBlockNum (NumberMessage) returns (TransactionInfoList) {
}

// for market
rpc MarketSellAsset (MarketSellAssetContract) returns (TransactionExtention) {
}

rpc MarketCancelOrder (MarketCancelOrderContract) returns (TransactionExtention) {
}

rpc GetMarketOrderByAccount (BytesMessage) returns (MarketOrderList) {
}

rpc GetMarketOrderById (BytesMessage) returns (MarketOrder) {
}

rpc GetMarketPriceByPair (MarketOrderPair) returns (MarketPriceList) {
}

rpc GetMarketOrderListByPair (MarketOrderPair) returns (MarketOrderList) {
}

rpc GetMarketPairList (EmptyMessage) returns (MarketOrderPairList) {
}
// end for market
};

service WalletSolidity {
Expand Down Expand Up @@ -926,10 +925,10 @@ service WalletSolidity {
rpc GetTransactionInfoByBlockNum (NumberMessage) returns (TransactionInfoList) {
}

rpc GetMarketOrderByAccount (BytesMessage) returns (MarketOrderList) {
rpc GetMarketOrderById (BytesMessage) returns (MarketOrder) {
}

rpc GetMarketOrderById (BytesMessage) returns (MarketOrder) {
rpc GetMarketOrderByAccount (BytesMessage) returns (MarketOrderList) {
}

rpc GetMarketPriceByPair (MarketOrderPair) returns (MarketPriceList) {
Expand All @@ -940,6 +939,7 @@ service WalletSolidity {

rpc GetMarketPairList (EmptyMessage) returns (MarketOrderPairList) {
}

};

service WalletExtension {
Expand Down Expand Up @@ -988,6 +988,18 @@ service Database {
}
};

service Monitor {
rpc GetStatsInfo (EmptyMessage) returns (MetricsInfo) {
option (google.api.http) = {
post: "/monitor/getstatsinfo"
body: "*"
additional_bindings {
get: "/monitor/getstatsinfo"
}
};
}
}

message Return {
enum response_code {
SUCCESS = 0;
Expand Down Expand Up @@ -1156,7 +1168,7 @@ message EasyTransferAssetByPrivateMessage {
message EasyTransferResponse {
Transaction transaction = 1;
Return result = 2;
bytes txid = 3; //transaction id = sha256(transaction.raw_data)
bytes txid = 3; //transaction id = sha256(transaction.rowdata)
}

message AddressPrKeyPairMessage {
Expand All @@ -1166,7 +1178,7 @@ message AddressPrKeyPairMessage {

message TransactionExtention {
Transaction transaction = 1;
bytes txid = 2; //transaction id = sha256(transaction.raw_data)
bytes txid = 2; //transaction id = sha256(transaction.rowdata)
repeated bytes constant_result = 3;
Return result = 4;
}
Expand Down Expand Up @@ -1251,7 +1263,7 @@ message OvkDecryptParameters {
message DecryptNotes {
message NoteTx {
Note note = 1;
bytes txid = 2; //transaction id = sha256(transaction.raw_data)
bytes txid = 2; //transaction id = sha256(transaction.rowdata)
int32 index = 3; //the index of note in receive
}
repeated NoteTx noteTxs = 1;
Expand All @@ -1260,7 +1272,7 @@ message DecryptNotes {
message DecryptNotesMarked {
message NoteTx {
Note note = 1;
bytes txid = 2; //transaction id = sha256(transaction.raw_data)
bytes txid = 2; //transaction id = sha256(transaction.rowdata)
int32 index = 3; //the index of note in receive
bool is_spend = 4;
}
Expand Down Expand Up @@ -1295,7 +1307,7 @@ message PrivateParameters {
repeated ReceiveNote shielded_receives = 7;
bytes transparent_to_address = 8;
int64 to_amount = 9;
int64 timeout = 10; // timeout in seconds, it works only when it bigger than 0
int64 timeout = 10; // timeout in seconds, it works only when it bigger than 0
}

message PrivateParametersWithoutAsk {
Expand All @@ -1308,7 +1320,7 @@ message PrivateParametersWithoutAsk {
repeated ReceiveNote shielded_receives = 7;
bytes transparent_to_address = 8;
int64 to_amount = 9;
int64 timeout = 10; // timeout in seconds, it works only when it bigger than 0
int64 timeout = 10; // timeout in seconds, it works only when it bigger than 0
}

message SpendAuthSigParameters {
Expand Down Expand Up @@ -1354,7 +1366,7 @@ message PaymentAddressMessage {
string payment_address = 3;
}

message ShieldedAddressInfo{
message ShieldedAddressInfo {
bytes sk = 1;
bytes ask = 2;
bytes nsk = 3;
Expand Down Expand Up @@ -1473,4 +1485,4 @@ message ShieldedTRC20TriggerContractParameters {
repeated BytesMessage spend_authority_signature = 2;
string amount = 3;
bytes transparent_to_address = 4;
}
}
18 changes: 9 additions & 9 deletions api/zksnark.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ service TronZksnark {
};

message ZksnarkRequest {
Transaction transaction = 1;
bytes sighash = 2;
int64 valueBalance = 3;
string txId = 4;
Transaction transaction = 1;
bytes sighash = 2;
int64 valueBalance = 3;
string txId = 4;
}

message ZksnarkResponse {
enum Code {
SUCCESS = 0;
FAILED = 1;
}
enum Code {
SUCCESS = 0;
FAILED = 1;
}

Code code = 1;
Code code = 1;
}


Expand Down
Loading