Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #22 from tronprotocol/feature/add_db_api
Browse files Browse the repository at this point in the history
Feature/add db api
  • Loading branch information
huzhenyuan committed Apr 16, 2018
2 parents 246cf61 + 9498448 commit 6f41dfa
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions api/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,60 @@ service Wallet {
}
};


service WalletSolidity {

rpc GetAccount (Account) returns (Account) {

};

rpc ListAccounts (EmptyMessage) returns (AccountList) {

};

rpc ListWitnesses (EmptyMessage) returns (WitnessList) {

};

rpc ListNodes (EmptyMessage) returns (NodeList) {

}
rpc GetAssetIssueList (EmptyMessage) returns (AssetIssueList) {

}
rpc GetAssetIssueListByTimestamp (NumberMessage) returns (AssetIssueList) {

}
rpc GetAssetIssueByAccount (Account) returns (AssetIssueList) {

}
rpc GetAssetIssueByName (BytesMessage) returns (AssetIssueContract) {

}
rpc GetNowBlock (EmptyMessage) returns (Block) {

}
rpc GetBlockByNum (NumberMessage) returns (Block) {

}
//get transaction
rpc TotalTransaction (EmptyMessage) returns (NumberMessage) {

}
rpc getTransactionById (BytesMessage) returns (Transaction) {

}
rpc getTransactionsByTimestamp (TimeMessage) returns (TransactionList) {

}
rpc getTransactionsFromThis (Account) returns (TransactionList) {

}
rpc getTransactionsToThis (Account) returns (NumberMessage) {

}
};

// the api of tron's db
service Database {
// for tapos
Expand Down Expand Up @@ -192,6 +246,12 @@ message WitnessList {
message AssetIssueList {
repeated AssetIssueContract assetIssue = 1;
}
message BlockList {
repeated Block block = 1;
}
message TransactionList {
repeated Transaction transaction = 1;
}

// Gossip node list
message NodeList {
Expand All @@ -216,4 +276,8 @@ message NumberMessage {
}
message BytesMessage {
bytes value = 1;
}
message TimeMessage {
int64 beginInMilliseconds = 1;
int64 endInMilliseconds = 2;
}

0 comments on commit 6f41dfa

Please sign in to comment.