parent
2ef4f77678
commit
645f0d0f9f
@ -13,11 +13,11 @@ 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);
|
||||
rpc GetTransactionByHash (GetTransactionByHashRequest) returns (TransactionResponse);
|
||||
rpc GetTransactionByBlockNumberAndIndex (GetTransactionByBlockNumberAndIndexRequest) returns (TransactionResponse);
|
||||
rpc GetTransactionByBlockHashAndIndex (GetTransactionByBlockHashAndIndexRequest) returns (TransactionResponse);
|
||||
rpc GetBlockByNumber (GetBlockByNumberRequest) returns (Block);
|
||||
rpc GetBlockByHash (GetBlockByHashRequest) returns (Block);
|
||||
rpc GetTransactionByHash (GetTransactionByHashRequest) returns (Transaction);
|
||||
rpc GetTransactionByBlockNumberAndIndex (GetTransactionByBlockNumberAndIndexRequest) returns (Transaction);
|
||||
rpc GetTransactionByBlockHashAndIndex (GetTransactionByBlockHashAndIndexRequest) returns (Transaction);
|
||||
}
|
||||
|
||||
message Transaction {
|
||||
@ -51,8 +51,7 @@ message BlockNumberRequest {
|
||||
string ledger = 1;
|
||||
}
|
||||
message BlockNumberResponse {
|
||||
Error error = 1;
|
||||
uint64 block_number = 2;
|
||||
uint64 block_number = 1;
|
||||
}
|
||||
|
||||
message GetBlockByNumberRequest {
|
||||
@ -67,11 +66,6 @@ message GetBlockByHashRequest {
|
||||
bool full_transaction = 3;
|
||||
}
|
||||
|
||||
message BlockResponse {
|
||||
Error error = 1;
|
||||
Block block = 2;
|
||||
}
|
||||
|
||||
message GetTransactionByHashRequest {
|
||||
string ledger = 1;
|
||||
bytes hash = 2;
|
||||
@ -88,8 +82,3 @@ message GetTransactionByBlockHashAndIndexRequest {
|
||||
bytes block_hash = 2;
|
||||
uint32 index = 3;
|
||||
}
|
||||
|
||||
message TransactionResponse {
|
||||
Error error = 1;
|
||||
Transaction transaction = 2;
|
||||
}
|
||||
|
@ -7,16 +7,8 @@ option java_package = "bdchain.api.grpc";
|
||||
option java_outer_classname = "CommonProto";
|
||||
option java_multiple_files = true;
|
||||
|
||||
message Error {
|
||||
string code = 1; // One of a server-defined set of error codes.
|
||||
string message = 2; // A human-readable representation of the error.
|
||||
string target = 3; // The target of the error.
|
||||
repeated Error details = 4; // An array of details about specific errors that led to this reported error.
|
||||
}
|
||||
|
||||
message ClientVersionResponse {
|
||||
Error error = 1;
|
||||
string version = 2; // 节点客户端版本
|
||||
string version = 1; // 节点客户端版本
|
||||
}
|
||||
|
||||
/* 事务类型 */
|
||||
|
@ -21,12 +21,11 @@ message CreateLedgerRequest {
|
||||
string name = 1;
|
||||
}
|
||||
message CreateLedgerResponse {
|
||||
Error error = 1;
|
||||
bool ok = 1;
|
||||
}
|
||||
|
||||
message GetLedgersResponse {
|
||||
Error error = 1;
|
||||
repeated string ledgers = 2;
|
||||
repeated string ledgers = 1;
|
||||
}
|
||||
|
||||
message SendTransactionRequest {
|
||||
@ -40,6 +39,5 @@ message SendTransactionRequest {
|
||||
Transaction transaction = 2;
|
||||
}
|
||||
message SendTransactionResponse {
|
||||
Error error = 1;
|
||||
bytes hash = 2;
|
||||
bytes hash = 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user