Format
This commit is contained in:
parent
5ff6cc24ee
commit
c1b575d50c
@ -14,5 +14,5 @@ service Node {
|
||||
}
|
||||
|
||||
message ClientVersionResponse {
|
||||
string version = 1; // 节点客户端版本
|
||||
}
|
||||
string version = 1; // 节点客户端版本
|
||||
}
|
||||
|
@ -10,80 +10,80 @@ option java_outer_classname = "QueryProto";
|
||||
option java_multiple_files = true;
|
||||
|
||||
service Query {
|
||||
rpc GetBlockByHash (GetBlockByHashRequest) returns (GetBlockByHashResponse);
|
||||
rpc GetBlocks (BlocksRequest) returns (GetBlocksResponse);
|
||||
rpc CountBlocks (BlocksRequest) returns (CountBlocksResponse);
|
||||
rpc GetTransactionByHash (GetTransactionByHashRequest) returns (GetTransactionByHashResponse);
|
||||
rpc GetTransactionByBlockHashAndIndex (GetTransactionByBlockHashAndIndexRequest) returns (GetTransactionByBlockHashAndIndexResponse);
|
||||
rpc GetTransactions (TransactionsRequest) returns (GetTransactionsResponse);
|
||||
rpc CountTransactions (TransactionsRequest) returns (CountTransactionsResponse);
|
||||
rpc GetBlockByHash (GetBlockByHashRequest) returns (GetBlockByHashResponse);
|
||||
rpc GetBlocks (BlocksRequest) returns (GetBlocksResponse);
|
||||
rpc CountBlocks (BlocksRequest) returns (CountBlocksResponse);
|
||||
rpc GetTransactionByHash (GetTransactionByHashRequest) returns (GetTransactionByHashResponse);
|
||||
rpc GetTransactionByBlockHashAndIndex (GetTransactionByBlockHashAndIndexRequest) returns (GetTransactionByBlockHashAndIndexResponse);
|
||||
rpc GetTransactions (TransactionsRequest) returns (GetTransactionsResponse);
|
||||
rpc CountTransactions (TransactionsRequest) returns (CountTransactionsResponse);
|
||||
}
|
||||
|
||||
message BlockFilter {
|
||||
bytes hash = 1;
|
||||
int64 timestamp = 2;
|
||||
bytes hash = 1;
|
||||
int64 timestamp = 2;
|
||||
}
|
||||
|
||||
// repeated Transaction/BlockFilters are combined by "&&"(and) operator;
|
||||
message TransactionFilter {
|
||||
bytes hash = 1;
|
||||
bytes from = 2;
|
||||
bytes to = 3;
|
||||
bytes timestamp = 4;
|
||||
bytes hash = 1;
|
||||
bytes from = 2;
|
||||
bytes to = 3;
|
||||
bytes timestamp = 4;
|
||||
}
|
||||
|
||||
message GetBlockByHashRequest {
|
||||
string ledger = 1;
|
||||
bytes hash = 2;
|
||||
bool full_transactions = 3;
|
||||
string ledger = 1;
|
||||
bytes hash = 2;
|
||||
bool full_transactions = 3;
|
||||
}
|
||||
message GetBlockByHashResponse {
|
||||
Block block = 1;
|
||||
Block block = 1;
|
||||
}
|
||||
|
||||
message BlocksRequest {
|
||||
string ledger = 1;
|
||||
repeated BlockFilter filters = 2;
|
||||
int64 start_timestamp = 3; // required
|
||||
int64 end_timestamp = 4;
|
||||
string ledger = 1;
|
||||
repeated BlockFilter filters = 2;
|
||||
int64 start_timestamp = 3; // required
|
||||
int64 end_timestamp = 4;
|
||||
}
|
||||
message GetBlocksResponse {
|
||||
repeated Block blocks = 1;
|
||||
int64 start_timestamp = 2;
|
||||
int64 end_timestamp = 3;
|
||||
repeated Block blocks = 1;
|
||||
int64 start_timestamp = 2;
|
||||
int64 end_timestamp = 3;
|
||||
}
|
||||
message CountBlocksResponse {
|
||||
uint64 count = 1;
|
||||
uint64 count = 1;
|
||||
}
|
||||
|
||||
message GetTransactionByHashRequest {
|
||||
string ledger = 1;
|
||||
bytes hash = 2;
|
||||
string ledger = 1;
|
||||
bytes hash = 2;
|
||||
}
|
||||
message GetTransactionByHashResponse {
|
||||
Transaction transaction = 1;
|
||||
Transaction transaction = 1;
|
||||
}
|
||||
|
||||
message GetTransactionByBlockHashAndIndexRequest {
|
||||
string ledger = 1;
|
||||
bytes block_hash = 2;
|
||||
uint32 index = 3;
|
||||
string ledger = 1;
|
||||
bytes block_hash = 2;
|
||||
uint32 index = 3;
|
||||
}
|
||||
message GetTransactionByBlockHashAndIndexResponse {
|
||||
Transaction transaction = 1;
|
||||
Transaction transaction = 1;
|
||||
}
|
||||
|
||||
message TransactionsRequest {
|
||||
string ledger = 1;
|
||||
repeated TransactionFilter filters = 2;
|
||||
int64 start_timestamp = 3; // required
|
||||
int64 end_timestamp = 4;
|
||||
string ledger = 1;
|
||||
repeated TransactionFilter filters = 2;
|
||||
int64 start_timestamp = 3; // required
|
||||
int64 end_timestamp = 4;
|
||||
}
|
||||
message GetTransactionsResponse {
|
||||
repeated Transaction transactions = 1;
|
||||
int64 start_timestamp = 2;
|
||||
int64 end_timestamp = 3;
|
||||
repeated Transaction transactions = 1;
|
||||
int64 start_timestamp = 2;
|
||||
int64 end_timestamp = 3;
|
||||
}
|
||||
message CountTransactionsResponse {
|
||||
uint64 count = 1;
|
||||
uint64 count = 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user