import { PageRequest, PageRequestSDKType, PageResponse, PageResponseSDKType } from "../../cosmos/base/query/v1beta1/pagination"; import { Coin, CoinSDKType } from "../../cosmos/base/v1beta1/coin"; import { Gauge, GaugeSDKType } from "./gauge"; import { Duration, DurationSDKType } from "../../google/protobuf/duration"; import * as _m0 from "protobufjs/minimal"; import { DeepPartial, Long } from "../../helpers"; export interface ModuleToDistributeCoinsRequest {} export interface ModuleToDistributeCoinsRequestSDKType {} export interface ModuleToDistributeCoinsResponse { /** Coins that have yet to be distributed */ coins: Coin[]; } export interface ModuleToDistributeCoinsResponseSDKType { /** Coins that have yet to be distributed */ coins: CoinSDKType[]; } export interface ModuleDistributedCoinsRequest {} export interface ModuleDistributedCoinsRequestSDKType {} export interface ModuleDistributedCoinsResponse { /** Coins that have been distributed already */ coins: Coin[]; } export interface ModuleDistributedCoinsResponseSDKType { /** Coins that have been distributed already */ coins: CoinSDKType[]; } export interface GaugeByIDRequest { /** Gague ID being queried */ id: Long; } export interface GaugeByIDRequestSDKType { /** Gague ID being queried */ id: Long; } export interface GaugeByIDResponse { /** Gauge that corresponds to provided gague ID */ gauge?: Gauge; } export interface GaugeByIDResponseSDKType { /** Gauge that corresponds to provided gague ID */ gauge?: GaugeSDKType; } export interface GaugesRequest { /** Pagination defines pagination for the request */ pagination?: PageRequest; } export interface GaugesRequestSDKType { /** Pagination defines pagination for the request */ pagination?: PageRequestSDKType; } export interface GaugesResponse { /** Upcoming and active gauges */ data: Gauge[]; /** Pagination defines pagination for the response */ pagination?: PageResponse; } export interface GaugesResponseSDKType { /** Upcoming and active gauges */ data: GaugeSDKType[]; /** Pagination defines pagination for the response */ pagination?: PageResponseSDKType; } export interface ActiveGaugesRequest { /** Pagination defines pagination for the request */ pagination?: PageRequest; } export interface ActiveGaugesRequestSDKType { /** Pagination defines pagination for the request */ pagination?: PageRequestSDKType; } export interface ActiveGaugesResponse { /** Active gagues only */ data: Gauge[]; /** Pagination defines pagination for the response */ pagination?: PageResponse; } export interface ActiveGaugesResponseSDKType { /** Active gagues only */ data: GaugeSDKType[]; /** Pagination defines pagination for the response */ pagination?: PageResponseSDKType; } export interface ActiveGaugesPerDenomRequest { /** Desired denom when querying active gagues */ denom: string; /** Pagination defines pagination for the request */ pagination?: PageRequest; } export interface ActiveGaugesPerDenomRequestSDKType { /** Desired denom when querying active gagues */ denom: string; /** Pagination defines pagination for the request */ pagination?: PageRequestSDKType; } export interface ActiveGaugesPerDenomResponse { /** Active gagues that match denom in query */ data: Gauge[]; /** Pagination defines pagination for the response */ pagination?: PageResponse; } export interface ActiveGaugesPerDenomResponseSDKType { /** Active gagues that match denom in query */ data: GaugeSDKType[]; /** Pagination defines pagination for the response */ pagination?: PageResponseSDKType; } export interface UpcomingGaugesRequest { /** Pagination defines pagination for the request */ pagination?: PageRequest; } export interface UpcomingGaugesRequestSDKType { /** Pagination defines pagination for the request */ pagination?: PageRequestSDKType; } export interface UpcomingGaugesResponse { /** Gauges whose distribution is upcoming */ data: Gauge[]; /** Pagination defines pagination for the response */ pagination?: PageResponse; } export interface UpcomingGaugesResponseSDKType { /** Gauges whose distribution is upcoming */ data: GaugeSDKType[]; /** Pagination defines pagination for the response */ pagination?: PageResponseSDKType; } export interface UpcomingGaugesPerDenomRequest { /** Filter for upcoming gagues that match specific denom */ denom: string; /** Pagination defines pagination for the request */ pagination?: PageRequest; } export interface UpcomingGaugesPerDenomRequestSDKType { /** Filter for upcoming gagues that match specific denom */ denom: string; /** Pagination defines pagination for the request */ pagination?: PageRequestSDKType; } export interface UpcomingGaugesPerDenomResponse { /** Upcoming gagues that match denom in query */ upcomingGauges: Gauge[]; /** Pagination defines pagination for the response */ pagination?: PageResponse; } export interface UpcomingGaugesPerDenomResponseSDKType { /** Upcoming gagues that match denom in query */ upcoming_gauges: GaugeSDKType[]; /** Pagination defines pagination for the response */ pagination?: PageResponseSDKType; } export interface RewardsEstRequest { /** Address that is being queried for future estimated rewards */ owner: string; /** Lock IDs included in future reward estimation */ lockIds: Long[]; /** * Upper time limit of reward estimation * Lower limit is current epoch */ endEpoch: Long; } export interface RewardsEstRequestSDKType { /** Address that is being queried for future estimated rewards */ owner: string; /** Lock IDs included in future reward estimation */ lock_ids: Long[]; /** * Upper time limit of reward estimation * Lower limit is current epoch */ end_epoch: Long; } export interface RewardsEstResponse { /** * Estimated coin rewards that will be recieved at provided address * from specified locks between current time and end epoch */ coins: Coin[]; } export interface RewardsEstResponseSDKType { /** * Estimated coin rewards that will be recieved at provided address * from specified locks between current time and end epoch */ coins: CoinSDKType[]; } export interface QueryLockableDurationsRequest {} export interface QueryLockableDurationsRequestSDKType {} export interface QueryLockableDurationsResponse { /** Time durations that users can lock coins for in order to recieve rewards */ lockableDurations: Duration[]; } export interface QueryLockableDurationsResponseSDKType { /** Time durations that users can lock coins for in order to recieve rewards */ lockable_durations: DurationSDKType[]; } function createBaseModuleToDistributeCoinsRequest(): ModuleToDistributeCoinsRequest { return {}; } export const ModuleToDistributeCoinsRequest = { encode(_: ModuleToDistributeCoinsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): ModuleToDistributeCoinsRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseModuleToDistributeCoinsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_: DeepPartial): ModuleToDistributeCoinsRequest { const message = createBaseModuleToDistributeCoinsRequest(); return message; } }; function createBaseModuleToDistributeCoinsResponse(): ModuleToDistributeCoinsResponse { return { coins: [] }; } export const ModuleToDistributeCoinsResponse = { encode(message: ModuleToDistributeCoinsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.coins) { Coin.encode(v!, writer.uint32(10).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): ModuleToDistributeCoinsResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseModuleToDistributeCoinsResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.coins.push(Coin.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: DeepPartial): ModuleToDistributeCoinsResponse { const message = createBaseModuleToDistributeCoinsResponse(); message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; return message; } }; function createBaseModuleDistributedCoinsRequest(): ModuleDistributedCoinsRequest { return {}; } export const ModuleDistributedCoinsRequest = { encode(_: ModuleDistributedCoinsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): ModuleDistributedCoinsRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseModuleDistributedCoinsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_: DeepPartial): ModuleDistributedCoinsRequest { const message = createBaseModuleDistributedCoinsRequest(); return message; } }; function createBaseModuleDistributedCoinsResponse(): ModuleDistributedCoinsResponse { return { coins: [] }; } export const ModuleDistributedCoinsResponse = { encode(message: ModuleDistributedCoinsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.coins) { Coin.encode(v!, writer.uint32(10).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): ModuleDistributedCoinsResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseModuleDistributedCoinsResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.coins.push(Coin.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: DeepPartial): ModuleDistributedCoinsResponse { const message = createBaseModuleDistributedCoinsResponse(); message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; return message; } }; function createBaseGaugeByIDRequest(): GaugeByIDRequest { return { id: Long.UZERO }; } export const GaugeByIDRequest = { encode(message: GaugeByIDRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (!message.id.isZero()) { writer.uint32(8).uint64(message.id); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): GaugeByIDRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGaugeByIDRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.id = (reader.uint64() as Long); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: DeepPartial): GaugeByIDRequest { const message = createBaseGaugeByIDRequest(); message.id = object.id !== undefined && object.id !== null ? Long.fromValue(object.id) : Long.UZERO; return message; } }; function createBaseGaugeByIDResponse(): GaugeByIDResponse { return { gauge: undefined }; } export const GaugeByIDResponse = { encode(message: GaugeByIDResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.gauge !== undefined) { Gauge.encode(message.gauge, writer.uint32(10).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): GaugeByIDResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGaugeByIDResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.gauge = Gauge.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: DeepPartial): GaugeByIDResponse { const message = createBaseGaugeByIDResponse(); message.gauge = object.gauge !== undefined && object.gauge !== null ? Gauge.fromPartial(object.gauge) : undefined; return message; } }; function createBaseGaugesRequest(): GaugesRequest { return { pagination: undefined }; } export const GaugesRequest = { encode(message: GaugesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): GaugesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGaugesRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.pagination = PageRequest.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: DeepPartial): GaugesRequest { const message = createBaseGaugesRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; } }; function createBaseGaugesResponse(): GaugesResponse { return { data: [], pagination: undefined }; } export const GaugesResponse = { encode(message: GaugesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.data) { Gauge.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): GaugesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGaugesResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.data.push(Gauge.decode(reader, reader.uint32())); break; case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: DeepPartial): GaugesResponse { const message = createBaseGaugesResponse(); message.data = object.data?.map(e => Gauge.fromPartial(e)) || []; message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; } }; function createBaseActiveGaugesRequest(): ActiveGaugesRequest { return { pagination: undefined }; } export const ActiveGaugesRequest = { encode(message: ActiveGaugesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): ActiveGaugesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseActiveGaugesRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.pagination = PageRequest.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: DeepPartial): ActiveGaugesRequest { const message = createBaseActiveGaugesRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; } }; function createBaseActiveGaugesResponse(): ActiveGaugesResponse { return { data: [], pagination: undefined }; } export const ActiveGaugesResponse = { encode(message: ActiveGaugesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.data) { Gauge.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): ActiveGaugesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseActiveGaugesResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.data.push(Gauge.decode(reader, reader.uint32())); break; case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: DeepPartial): ActiveGaugesResponse { const message = createBaseActiveGaugesResponse(); message.data = object.data?.map(e => Gauge.fromPartial(e)) || []; message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; } }; function createBaseActiveGaugesPerDenomRequest(): ActiveGaugesPerDenomRequest { return { denom: "", pagination: undefined }; } export const ActiveGaugesPerDenomRequest = { encode(message: ActiveGaugesPerDenomRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.denom !== "") { writer.uint32(10).string(message.denom); } if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): ActiveGaugesPerDenomRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseActiveGaugesPerDenomRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.denom = reader.string(); break; case 2: message.pagination = PageRequest.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: DeepPartial): ActiveGaugesPerDenomRequest { const message = createBaseActiveGaugesPerDenomRequest(); message.denom = object.denom ?? ""; message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; } }; function createBaseActiveGaugesPerDenomResponse(): ActiveGaugesPerDenomResponse { return { data: [], pagination: undefined }; } export const ActiveGaugesPerDenomResponse = { encode(message: ActiveGaugesPerDenomResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.data) { Gauge.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): ActiveGaugesPerDenomResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseActiveGaugesPerDenomResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.data.push(Gauge.decode(reader, reader.uint32())); break; case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: DeepPartial): ActiveGaugesPerDenomResponse { const message = createBaseActiveGaugesPerDenomResponse(); message.data = object.data?.map(e => Gauge.fromPartial(e)) || []; message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; } }; function createBaseUpcomingGaugesRequest(): UpcomingGaugesRequest { return { pagination: undefined }; } export const UpcomingGaugesRequest = { encode(message: UpcomingGaugesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): UpcomingGaugesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpcomingGaugesRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.pagination = PageRequest.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: DeepPartial): UpcomingGaugesRequest { const message = createBaseUpcomingGaugesRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; } }; function createBaseUpcomingGaugesResponse(): UpcomingGaugesResponse { return { data: [], pagination: undefined }; } export const UpcomingGaugesResponse = { encode(message: UpcomingGaugesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.data) { Gauge.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): UpcomingGaugesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpcomingGaugesResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.data.push(Gauge.decode(reader, reader.uint32())); break; case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: DeepPartial): UpcomingGaugesResponse { const message = createBaseUpcomingGaugesResponse(); message.data = object.data?.map(e => Gauge.fromPartial(e)) || []; message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; } }; function createBaseUpcomingGaugesPerDenomRequest(): UpcomingGaugesPerDenomRequest { return { denom: "", pagination: undefined }; } export const UpcomingGaugesPerDenomRequest = { encode(message: UpcomingGaugesPerDenomRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.denom !== "") { writer.uint32(10).string(message.denom); } if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): UpcomingGaugesPerDenomRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpcomingGaugesPerDenomRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.denom = reader.string(); break; case 2: message.pagination = PageRequest.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: DeepPartial): UpcomingGaugesPerDenomRequest { const message = createBaseUpcomingGaugesPerDenomRequest(); message.denom = object.denom ?? ""; message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; } }; function createBaseUpcomingGaugesPerDenomResponse(): UpcomingGaugesPerDenomResponse { return { upcomingGauges: [], pagination: undefined }; } export const UpcomingGaugesPerDenomResponse = { encode(message: UpcomingGaugesPerDenomResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.upcomingGauges) { Gauge.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): UpcomingGaugesPerDenomResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpcomingGaugesPerDenomResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.upcomingGauges.push(Gauge.decode(reader, reader.uint32())); break; case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: DeepPartial): UpcomingGaugesPerDenomResponse { const message = createBaseUpcomingGaugesPerDenomResponse(); message.upcomingGauges = object.upcomingGauges?.map(e => Gauge.fromPartial(e)) || []; message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; } }; function createBaseRewardsEstRequest(): RewardsEstRequest { return { owner: "", lockIds: [], endEpoch: Long.ZERO }; } export const RewardsEstRequest = { encode(message: RewardsEstRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } writer.uint32(18).fork(); for (const v of message.lockIds) { writer.uint64(v); } writer.ldelim(); if (!message.endEpoch.isZero()) { writer.uint32(24).int64(message.endEpoch); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): RewardsEstRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRewardsEstRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.owner = reader.string(); break; case 2: if ((tag & 7) === 2) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { message.lockIds.push((reader.uint64() as Long)); } } else { message.lockIds.push((reader.uint64() as Long)); } break; case 3: message.endEpoch = (reader.int64() as Long); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: DeepPartial): RewardsEstRequest { const message = createBaseRewardsEstRequest(); message.owner = object.owner ?? ""; message.lockIds = object.lockIds?.map(e => Long.fromValue(e)) || []; message.endEpoch = object.endEpoch !== undefined && object.endEpoch !== null ? Long.fromValue(object.endEpoch) : Long.ZERO; return message; } }; function createBaseRewardsEstResponse(): RewardsEstResponse { return { coins: [] }; } export const RewardsEstResponse = { encode(message: RewardsEstResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.coins) { Coin.encode(v!, writer.uint32(10).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): RewardsEstResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseRewardsEstResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.coins.push(Coin.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: DeepPartial): RewardsEstResponse { const message = createBaseRewardsEstResponse(); message.coins = object.coins?.map(e => Coin.fromPartial(e)) || []; return message; } }; function createBaseQueryLockableDurationsRequest(): QueryLockableDurationsRequest { return {}; } export const QueryLockableDurationsRequest = { encode(_: QueryLockableDurationsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryLockableDurationsRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryLockableDurationsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_: DeepPartial): QueryLockableDurationsRequest { const message = createBaseQueryLockableDurationsRequest(); return message; } }; function createBaseQueryLockableDurationsResponse(): QueryLockableDurationsResponse { return { lockableDurations: [] }; } export const QueryLockableDurationsResponse = { encode(message: QueryLockableDurationsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.lockableDurations) { Duration.encode(v!, writer.uint32(10).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryLockableDurationsResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryLockableDurationsResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.lockableDurations.push(Duration.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: DeepPartial): QueryLockableDurationsResponse { const message = createBaseQueryLockableDurationsResponse(); message.lockableDurations = object.lockableDurations?.map(e => Duration.fromPartial(e)) || []; return message; } };