11import { Params , ParamsSDKType } from "./params" ;
2- import { StatsMetadata , StatsMetadataSDKType , GlobalStats , GlobalStatsSDKType , UserStats , UserStatsSDKType } from "./stats" ;
2+ import { StatsMetadata , StatsMetadataSDKType , GlobalStats , GlobalStatsSDKType , UserStats , UserStatsSDKType , EpochStats , EpochStatsSDKType } from "./stats" ;
33import * as _m0 from "protobufjs/minimal" ;
44import { DeepPartial } from "../../helpers" ;
55/** QueryParamsRequest is a request type for the Params RPC method. */
@@ -90,6 +90,30 @@ export interface QueryUserStatsResponseSDKType {
9090 /** QueryUserStatsResponse is a request type for the UserStats RPC method. */
9191 stats ?: UserStatsSDKType ;
9292}
93+ /** QueryEpochStatsRequest is a request type for the EpochStats RPC method. */
94+
95+ export interface QueryEpochStatsRequest {
96+ /** QueryEpochStatsRequest is a request type for the EpochStats RPC method. */
97+ epoch : number ;
98+ }
99+ /** QueryEpochStatsRequest is a request type for the EpochStats RPC method. */
100+
101+ export interface QueryEpochStatsRequestSDKType {
102+ /** QueryEpochStatsRequest is a request type for the EpochStats RPC method. */
103+ epoch : number ;
104+ }
105+ /** QueryEpochStatsResponse is a response type for the EpochStats RPC method. */
106+
107+ export interface QueryEpochStatsResponse {
108+ /** QueryEpochStatsResponse is a response type for the EpochStats RPC method. */
109+ stats ?: EpochStats ;
110+ }
111+ /** QueryEpochStatsResponse is a response type for the EpochStats RPC method. */
112+
113+ export interface QueryEpochStatsResponseSDKType {
114+ /** QueryEpochStatsResponse is a response type for the EpochStats RPC method. */
115+ stats ?: EpochStatsSDKType ;
116+ }
93117
94118function createBaseQueryParamsRequest ( ) : QueryParamsRequest {
95119 return { } ;
@@ -416,4 +440,94 @@ export const QueryUserStatsResponse = {
416440 return message ;
417441 }
418442
443+ } ;
444+
445+ function createBaseQueryEpochStatsRequest ( ) : QueryEpochStatsRequest {
446+ return {
447+ epoch : 0
448+ } ;
449+ }
450+
451+ export const QueryEpochStatsRequest = {
452+ encode ( message : QueryEpochStatsRequest , writer : _m0 . Writer = _m0 . Writer . create ( ) ) : _m0 . Writer {
453+ if ( message . epoch !== 0 ) {
454+ writer . uint32 ( 8 ) . uint32 ( message . epoch ) ;
455+ }
456+
457+ return writer ;
458+ } ,
459+
460+ decode ( input : _m0 . Reader | Uint8Array , length ?: number ) : QueryEpochStatsRequest {
461+ const reader = input instanceof _m0 . Reader ? input : new _m0 . Reader ( input ) ;
462+ let end = length === undefined ? reader . len : reader . pos + length ;
463+ const message = createBaseQueryEpochStatsRequest ( ) ;
464+
465+ while ( reader . pos < end ) {
466+ const tag = reader . uint32 ( ) ;
467+
468+ switch ( tag >>> 3 ) {
469+ case 1 :
470+ message . epoch = reader . uint32 ( ) ;
471+ break ;
472+
473+ default :
474+ reader . skipType ( tag & 7 ) ;
475+ break ;
476+ }
477+ }
478+
479+ return message ;
480+ } ,
481+
482+ fromPartial ( object : DeepPartial < QueryEpochStatsRequest > ) : QueryEpochStatsRequest {
483+ const message = createBaseQueryEpochStatsRequest ( ) ;
484+ message . epoch = object . epoch ?? 0 ;
485+ return message ;
486+ }
487+
488+ } ;
489+
490+ function createBaseQueryEpochStatsResponse ( ) : QueryEpochStatsResponse {
491+ return {
492+ stats : undefined
493+ } ;
494+ }
495+
496+ export const QueryEpochStatsResponse = {
497+ encode ( message : QueryEpochStatsResponse , writer : _m0 . Writer = _m0 . Writer . create ( ) ) : _m0 . Writer {
498+ if ( message . stats !== undefined ) {
499+ EpochStats . encode ( message . stats , writer . uint32 ( 10 ) . fork ( ) ) . ldelim ( ) ;
500+ }
501+
502+ return writer ;
503+ } ,
504+
505+ decode ( input : _m0 . Reader | Uint8Array , length ?: number ) : QueryEpochStatsResponse {
506+ const reader = input instanceof _m0 . Reader ? input : new _m0 . Reader ( input ) ;
507+ let end = length === undefined ? reader . len : reader . pos + length ;
508+ const message = createBaseQueryEpochStatsResponse ( ) ;
509+
510+ while ( reader . pos < end ) {
511+ const tag = reader . uint32 ( ) ;
512+
513+ switch ( tag >>> 3 ) {
514+ case 1 :
515+ message . stats = EpochStats . decode ( reader , reader . uint32 ( ) ) ;
516+ break ;
517+
518+ default :
519+ reader . skipType ( tag & 7 ) ;
520+ break ;
521+ }
522+ }
523+
524+ return message ;
525+ } ,
526+
527+ fromPartial ( object : DeepPartial < QueryEpochStatsResponse > ) : QueryEpochStatsResponse {
528+ const message = createBaseQueryEpochStatsResponse ( ) ;
529+ message . stats = object . stats !== undefined && object . stats !== null ? EpochStats . fromPartial ( object . stats ) : undefined ;
530+ return message ;
531+ }
532+
419533} ;
0 commit comments