11// @generated
2- // This file is @generated by prost-build.
32/// Specifies which value to retrieve at a specific block
43#[ derive( Clone , PartialEq , :: prost:: Message ) ]
54pub struct GetRequest {
@@ -13,21 +12,29 @@ pub struct GetRequest {
1312 /// Must be left blank (empty) for Substreams WASM intrinsics, runtime provides block context
1413 #[ prost( bytes="vec" , tag="2" ) ]
1514 pub block_hash : :: prost:: alloc:: vec:: Vec < u8 > ,
16- #[ prost( bool , tag="3" ) ]
17- pub omit_deleted : bool ,
15+ /// bool omit_deleted = 3;
16+ #[ prost( bytes="vec" , tag="4" ) ]
17+ pub key : :: prost:: alloc:: vec:: Vec < u8 > ,
18+ }
19+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
20+ pub struct GetFirstRequest {
21+ #[ prost( uint64, tag="1" ) ]
22+ pub block_number : u64 ,
23+ #[ prost( bytes="vec" , tag="2" ) ]
24+ pub block_hash : :: prost:: alloc:: vec:: Vec < u8 > ,
1825 #[ prost( bytes="vec" , tag="4" ) ]
1926 pub key : :: prost:: alloc:: vec:: Vec < u8 > ,
2027}
2128/// Contains the retrieved value and status
2229#[ derive( Clone , PartialEq , :: prost:: Message ) ]
2330pub struct GetResponse {
24- #[ prost( enumeration="ResponseCode" , tag="1" ) ]
31+ #[ prost( bool , tag="3" ) ]
32+ pub block_reached : bool ,
33+ #[ prost( enumeration="ResponseCode" , tag="4" ) ]
2534 pub code : i32 ,
2635 /// The stored value (only present when response = FOUND)
27- #[ prost( message, optional, tag="2 " ) ]
36+ #[ prost( message, optional, tag="5 " ) ]
2837 pub value : :: core:: option:: Option < :: prost_types:: Any > ,
29- #[ prost( bool , tag="3" ) ]
30- pub block_reached : bool ,
3138}
3239/// Specifies multiple values to retrieve at a specific block
3340#[ derive( Clone , PartialEq , :: prost:: Message ) ]
@@ -42,8 +49,7 @@ pub struct GetAllRequest {
4249 /// Must be left blank (empty) for Substreams WASM intrinsics, runtime provides block context
4350 #[ prost( bytes="vec" , tag="2" ) ]
4451 pub block_hash : :: prost:: alloc:: vec:: Vec < u8 > ,
45- #[ prost( bool , tag="3" ) ]
46- pub omit_deleted : bool ,
52+ /// bool omit_deleted = 3;
4753 #[ prost( bytes="vec" , repeated, tag="4" ) ]
4854 pub keys : :: prost:: alloc:: vec:: Vec < :: prost:: alloc:: vec:: Vec < u8 > > ,
4955}
@@ -67,9 +73,9 @@ pub struct GetAllResponse {
6773/// Represents a key-value pair in the store used for Substreams sink operations
6874#[ derive( Clone , PartialEq , :: prost:: Message ) ]
6975pub struct Entry {
70- #[ prost( bytes="vec" , tag="1 " ) ]
76+ #[ prost( bytes="vec" , tag="2 " ) ]
7177 pub key : :: prost:: alloc:: vec:: Vec < u8 > ,
72- #[ prost( message, optional, tag="2 " ) ]
78+ #[ prost( message, optional, tag="4 " ) ]
7379 pub value : :: core:: option:: Option < :: prost_types:: Any > ,
7480}
7581/// Container for multiple key-value pairs, typically used as Substreams module output
@@ -90,9 +96,9 @@ pub enum ResponseCode {
9096 /// Key does not exist at the requested block
9197 NotFound = 2 ,
9298 /// Key was deleted after finality (LIB) -> historical reference
93- NotFoundFinalize = 3 ,
99+ NotFoundFinalize = 4 ,
94100 /// Requested block number has not been processed yet (block_number > head_block)
95- NotFoundBlockNotReached = 4 ,
101+ NotFoundBlockNotReached = 5 ,
96102}
97103impl ResponseCode {
98104 /// String value of the enum field names used in the ProtoBuf definition.
@@ -101,22 +107,11 @@ impl ResponseCode {
101107 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
102108 pub fn as_str_name ( & self ) -> & ' static str {
103109 match self {
104- Self :: Unspecified => "RESPONSE_CODE_UNSPECIFIED" ,
105- Self :: Found => "RESPONSE_CODE_FOUND" ,
106- Self :: NotFound => "RESPONSE_CODE_NOT_FOUND" ,
107- Self :: NotFoundFinalize => "RESPONSE_CODE_NOT_FOUND_FINALIZE" ,
108- Self :: NotFoundBlockNotReached => "RESPONSE_CODE_NOT_FOUND_BLOCK_NOT_REACHED" ,
109- }
110- }
111- /// Creates an enum from field names used in the ProtoBuf definition.
112- pub fn from_str_name ( value : & str ) -> :: core:: option:: Option < Self > {
113- match value {
114- "RESPONSE_CODE_UNSPECIFIED" => Some ( Self :: Unspecified ) ,
115- "RESPONSE_CODE_FOUND" => Some ( Self :: Found ) ,
116- "RESPONSE_CODE_NOT_FOUND" => Some ( Self :: NotFound ) ,
117- "RESPONSE_CODE_NOT_FOUND_FINALIZE" => Some ( Self :: NotFoundFinalize ) ,
118- "RESPONSE_CODE_NOT_FOUND_BLOCK_NOT_REACHED" => Some ( Self :: NotFoundBlockNotReached ) ,
119- _ => None ,
110+ ResponseCode :: Unspecified => "RESPONSE_CODE_UNSPECIFIED" ,
111+ ResponseCode :: Found => "RESPONSE_CODE_FOUND" ,
112+ ResponseCode :: NotFound => "RESPONSE_CODE_NOT_FOUND" ,
113+ ResponseCode :: NotFoundFinalize => "RESPONSE_CODE_NOT_FOUND_FINALIZE" ,
114+ ResponseCode :: NotFoundBlockNotReached => "RESPONSE_CODE_NOT_FOUND_BLOCK_NOT_REACHED" ,
120115 }
121116 }
122117}
0 commit comments