Add ClientVersion methods

This commit is contained in:
Nex 2018-10-08 19:20:40 +08:00
parent 5b0dc19856
commit 65c1c95c19
3 changed files with 8 additions and 0 deletions

View File

@ -2,6 +2,7 @@ syntax = "proto3";
package bdchain.api; package bdchain.api;
import "google/protobuf/empty.proto";
import "bdchain/api/common.proto"; import "bdchain/api/common.proto";
option go_package = "bdchain/api/grpc/acchain"; option go_package = "bdchain/api/grpc/acchain";
@ -10,6 +11,7 @@ option java_outer_classname = "AccountingChainProto";
option java_multiple_files = true; option java_multiple_files = true;
service AccountingChain { service AccountingChain {
rpc ClientVersion (google.protobuf.Empty) returns (ClientVersionResponse);
rpc BlockNumber (BlockNumberRequest) returns (BlockNumberResponse); rpc BlockNumber (BlockNumberRequest) returns (BlockNumberResponse);
rpc GetBlockByNumber (GetBlockByNumberRequest) returns (BlockResponse); rpc GetBlockByNumber (GetBlockByNumberRequest) returns (BlockResponse);
rpc GetBlockByHash (GetBlockByHashRequest) returns (BlockResponse); rpc GetBlockByHash (GetBlockByHashRequest) returns (BlockResponse);

View File

@ -13,6 +13,11 @@ message Error {
string target = 3; // The target of the error. string target = 3; // The target of the error.
} }
message ClientVersionResponse {
Error error = 1;
string version = 2; //
}
/* 事务类型 */ /* 事务类型 */
enum TransactionType { enum TransactionType {
RECORD = 0; // RECORD = 0; //

View File

@ -11,6 +11,7 @@ option java_outer_classname = "TransactionLedgerProto";
option java_multiple_files = true; option java_multiple_files = true;
service TransactionLedger { service TransactionLedger {
rpc ClientVersion (google.protobuf.Empty) returns (ClientVersionResponse);
rpc CreateLedger (CreateLedgerRequest) returns (CreateLedgerResponse); rpc CreateLedger (CreateLedgerRequest) returns (CreateLedgerResponse);
rpc GetLedgers (google.protobuf.Empty) returns (GetLedgersResponse); rpc GetLedgers (google.protobuf.Empty) returns (GetLedgersResponse);
rpc SendTransaction (SendTransactionRequest) returns (SendTransactionResponse); rpc SendTransaction (SendTransactionRequest) returns (SendTransactionResponse);