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

Commit

Permalink
Squashed 'protocol/' changes from 6ced950..8c6167e
Browse files Browse the repository at this point in the history
8c6167e Merge pull request #25 from tronprotocol/xd-reason-code
130f5a2 modify reason code
6f41dfa Merge pull request #22 from tronprotocol/feature/add_db_api
9498448 feature: merge master to this.
13d4b62 Merge remote-tracking branch 'origin/master' into feature/add_db_api
246cf61 Merge pull request #24 from tronprotocol/add_database_api
2f7ae0b feature:add Datebase api Service.
a5e544c fix:change go_package.
c003d39 Merge remote-tracking branch 'origin/master' into feature/add_db_api
2dbee3b add WalletSolidity api service.
acc5c20 add get AssetIssueList by Timestamp api.
87c23fb add get Transaction api.

git-subtree-dir: protocol
git-subtree-split: 8c6167e
  • Loading branch information
ithinker1991 committed Apr 18, 2018
1 parent bc147ed commit c094314
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 15 deletions.
82 changes: 82 additions & 0 deletions api/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,83 @@ 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
rpc getBlockReference (EmptyMessage) returns (BlockReference) {

}
rpc GetDynamicProperties (EmptyMessage) returns (DynamicProperties) {

}
rpc GetNowBlock (EmptyMessage) returns (Block) {

}
rpc GetBlockByNum (NumberMessage) returns (Block) {

}
};

message BlockReference {
int64 block_num = 1;
bytes block_hash = 2;
}

// the api of tron's network such as node list.
service Network {

Expand All @@ -174,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 @@ -198,4 +276,8 @@ message NumberMessage {
}
message BytesMessage {
bytes value = 1;
}
message TimeMessage {
int64 beginInMilliseconds = 1;
int64 endInMilliseconds = 2;
}
30 changes: 15 additions & 15 deletions core/Tron.proto
Original file line number Diff line number Diff line change
Expand Up @@ -187,21 +187,21 @@ message DynamicProperties {
}

enum ReasonCode {
REQUESTED = 0;
TCP_ERROR = 1;
BAD_PROTOCOL = 2;
USELESS_PEER = 3;
TOO_MANY_PEERS = 4;
DUPLICATE_PEER = 5;
INCOMPATIBLE_PROTOCOL = 6;
NULL_IDENTITY = 7;
PEER_QUITING = 8;
UNEXPECTED_IDENTITY = 9;
LOCAL_IDENTITY = 10;
PING_TIMEOUT = 11;
USER_REASON = 12;
RESET = 16;
UNKNOWN = 255;
REQUESTED = 0x00;
TCP_ERROR = 0x01;
BAD_PROTOCOL = 0x02;
USELESS_PEER = 0x03;
TOO_MANY_PEERS = 0x04;
DUPLICATE_PEER = 0x05;
INCOMPATIBLE_PROTOCOL = 0x06;
NULL_IDENTITY = 0x07;
PEER_QUITING = 0x08;
UNEXPECTED_IDENTITY = 0x09;
LOCAL_IDENTITY = 0x0A;
PING_TIMEOUT = 0x0B;
USER_REASON = 0x10;
RESET = 0x11;
UNKNOWN = 0xFF;
}

message DisconnectMessage {
Expand Down

0 comments on commit c094314

Please sign in to comment.