diff --git a/bdchain/api/ac_chain.proto b/bdchain/api/ac_chain.proto index af86ddd..1853c9c 100644 --- a/bdchain/api/ac_chain.proto +++ b/bdchain/api/ac_chain.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package bdchain.api; +import "google/protobuf/empty.proto"; import "bdchain/api/common.proto"; option go_package = "bdchain/api/grpc/acchain"; @@ -10,6 +11,7 @@ option java_outer_classname = "AccountingChainProto"; option java_multiple_files = true; service AccountingChain { + rpc ClientVersion (google.protobuf.Empty) returns (ClientVersionResponse); rpc BlockNumber (BlockNumberRequest) returns (BlockNumberResponse); rpc GetBlockByNumber (GetBlockByNumberRequest) returns (BlockResponse); rpc GetBlockByHash (GetBlockByHashRequest) returns (BlockResponse); diff --git a/bdchain/api/common.proto b/bdchain/api/common.proto index 911eef6..76dc142 100644 --- a/bdchain/api/common.proto +++ b/bdchain/api/common.proto @@ -13,6 +13,11 @@ message Error { string target = 3; // The target of the error. } +message ClientVersionResponse { + Error error = 1; + string version = 2; // 节点客户端版本 +} + /* 事务类型 */ enum TransactionType { RECORD = 0; // 通用数据记录 diff --git a/bdchain/api/tx_ledger.proto b/bdchain/api/tx_ledger.proto index 3ddcbe2..2fa63ca 100644 --- a/bdchain/api/tx_ledger.proto +++ b/bdchain/api/tx_ledger.proto @@ -11,6 +11,7 @@ option java_outer_classname = "TransactionLedgerProto"; option java_multiple_files = true; service TransactionLedger { + rpc ClientVersion (google.protobuf.Empty) returns (ClientVersionResponse); rpc CreateLedger (CreateLedgerRequest) returns (CreateLedgerResponse); rpc GetLedgers (google.protobuf.Empty) returns (GetLedgersResponse); rpc SendTransaction (SendTransactionRequest) returns (SendTransactionResponse);