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

Commit

Permalink
feat: add fullnode GRPC.
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeNinjaEvan committed Apr 27, 2018
1 parent 08b0663 commit 5d93c0c
Showing 1 changed file with 98 additions and 16 deletions.
114 changes: 98 additions & 16 deletions api/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ service Wallet {
post: "/wallet/getaccount"
body: "*"
};

};

rpc CreateTransaction (TransferContract) returns (Transaction) {
Expand Down Expand Up @@ -168,59 +167,134 @@ service Wallet {
body: "*"
};
}
rpc GetBlockById (BytesMessage) returns (Block) {
option (google.api.http) = {
post: "/wallet/totaltransaction"
body: "*"
};
}
rpc GetBlockByLimitNext (BlockLimit) returns (BlockList) {
option (google.api.http) = {
post: "/wallet/totaltransaction"
body: "*"
};
}
rpc GetBlockByLatestNum (NumberMessage) returns (BlockList) {
option (google.api.http) = {
post: "/wallet/totaltransaction"
body: "*"
};
}
rpc GetTransactionById (BytesMessage) returns (Transaction) {
option (google.api.http) = {
post: "/wallet/totaltransaction"
body: "*"
};
}
rpc GetTransactionByLimitPrev (TransactionLimit) returns (TransactionList) {
option (google.api.http) = {
post: "/wallet/totaltransaction"
body: "*"
};
}
};


service WalletSolidity {

rpc GetAccount (Account) returns (Account) {

option (google.api.http) = {
post: "/wallet/totaltransaction"
body: "*"
};
};

rpc ListAccounts (EmptyMessage) returns (AccountList) {

option (google.api.http) = {
post: "/wallet/totaltransaction"
body: "*"
};
};

rpc ListWitnesses (EmptyMessage) returns (WitnessList) {

option (google.api.http) = {
post: "/wallet/totaltransaction"
body: "*"
};
};

rpc ListNodes (EmptyMessage) returns (NodeList) {

option (google.api.http) = {
post: "/wallet/totaltransaction"
body: "*"
};
}
rpc GetAssetIssueList (EmptyMessage) returns (AssetIssueList) {

option (google.api.http) = {
post: "/wallet/totaltransaction"
body: "*"
};
}
rpc GetAssetIssueListByTimestamp (NumberMessage) returns (AssetIssueList) {

option (google.api.http) = {
post: "/wallet/totaltransaction"
body: "*"
};
}
rpc GetAssetIssueByAccount (Account) returns (AssetIssueList) {

option (google.api.http) = {
post: "/wallet/totaltransaction"
body: "*"
};
}
rpc GetAssetIssueByName (BytesMessage) returns (AssetIssueContract) {

option (google.api.http) = {
post: "/wallet/totaltransaction"
body: "*"
};
}
rpc GetNowBlock (EmptyMessage) returns (Block) {

option (google.api.http) = {
post: "/wallet/totaltransaction"
body: "*"
};
}
rpc GetBlockByNum (NumberMessage) returns (Block) {

option (google.api.http) = {
post: "/wallet/totaltransaction"
body: "*"
};
}
//get transaction
rpc TotalTransaction (EmptyMessage) returns (NumberMessage) {

option (google.api.http) = {
post: "/wallet/totaltransaction"
body: "*"
};
}
rpc getTransactionById (BytesMessage) returns (Transaction) {

option (google.api.http) = {
post: "/wallet/totaltransaction"
body: "*"
};
}
rpc getTransactionsByTimestamp (TimeMessage) returns (TransactionList) {

option (google.api.http) = {
post: "/wallet/totaltransaction"
body: "*"
};
}
rpc getTransactionsFromThis (Account) returns (TransactionList) {

option (google.api.http) = {
post: "/wallet/totaltransaction"
body: "*"
};
}
rpc getTransactionsToThis (Account) returns (TransactionList) {

option (google.api.http) = {
post: "/wallet/totaltransaction"
body: "*"
};
}
};

Expand Down Expand Up @@ -301,4 +375,12 @@ message BytesMessage {
message TimeMessage {
int64 beginInMilliseconds = 1;
int64 endInMilliseconds = 2;
}
message BlockLimit {
int64 startNum = 1;
int64 endNum = 2;
}
message TransactionLimit {
bytes transactionId = 1;
int64 limitNum = 2;
}

0 comments on commit 5d93c0c

Please sign in to comment.