Skip to content

Commit

Permalink
test proto comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudBger committed Feb 13, 2024
1 parent e26bed2 commit 366a2fe
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion server/proto/sf/blockmeta/v2/blockmeta.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,20 @@ option go_package = "github.com/streamingfast/blockmeta-service/server/pb/sf/blo

//The Block service offers functionalities to map block numbers to block IDs, block IDs to their corresponding block numbers, and to retrieve the latest block information.
service Block {
// Given a block number, returns the block ID, number, and timestamp.
/**
* Returns the block ID, number, and timestamp, given a block number.
*
* Example:
* grpcurl -H "Authorization: Bearer $YOUR_TOKEN_HERE" -d '{"blockNum": "501"}' holesky.eth.streamingfast.io:443 sf.blockmeta.v2.Block/NumToID
*
* Response:
* {
* "id": "00cd01a162b0bc1e9a88eb8718891dd31984f3fb64c2392570d310d8a5f05bf6",
* "num": "501",
* "time": "2023-09-28T14:16:24Z"
* }
*
*/
rpc NumToID (NumToIDReq) returns (BlockResp);
// Given a block ID, returns the block ID, number, and timestamp.
rpc IDToNum(IDToNumReq) returns (BlockResp);
Expand Down

0 comments on commit 366a2fe

Please sign in to comment.