chainrpc: update proto to expose GetBlockHeader

This commit is contained in:
Jonathan Harvey-Buschel committed 2023-10-26 16:16:35 -04:00
1 parent 7d2e0ae3e4
commit 7a8803e3cf
7 files changed
+404 -58

No files matched your search

+15
View File
@@ -12,6 +12,11 @@ service ChainKit {
*/
rpc GetBlock (GetBlockRequest) returns (GetBlockResponse);
/* lncli: `chain getblockheader`
GetBlockHeader returns a block header with a particular block hash.
*/
rpc GetBlockHeader (GetBlockHeaderRequest) returns (GetBlockHeaderResponse);
/* lncli: `chain getbestblock`
GetBestBlock returns the block hash and current height from the valid
most-work chain.
@@ -37,6 +42,16 @@ message GetBlockResponse {
bytes raw_block = 1;
}
message GetBlockHeaderRequest {
// The hash of the block with the requested header.
bytes block_hash = 1;
}
message GetBlockHeaderResponse {
// The header of the block with the requested hash.
bytes raw_block_header = 1;
}
message GetBestBlockRequest {
}