From 7ed5074f122a3eaeab0df420eb806ff371569d92 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 26 Jan 2021 10:41:13 +0000 Subject: [PATCH 1/7] stargate: Update codec for staking/distribution --- packages/stargate/scripts/predefine-proto.sh | 4 + .../src/codec/generated/codecimpl.d.ts | 4445 +++++++++++++++++ .../stargate/src/codec/generated/codecimpl.js | 3067 ++++++++++++ .../types/codec/generated/codecimpl.d.ts | 4445 +++++++++++++++++ 4 files changed, 11961 insertions(+) diff --git a/packages/stargate/scripts/predefine-proto.sh b/packages/stargate/scripts/predefine-proto.sh index 6556bbdd..5776bc7f 100755 --- a/packages/stargate/scripts/predefine-proto.sh +++ b/packages/stargate/scripts/predefine-proto.sh @@ -31,6 +31,10 @@ yarn pbjs \ "$COSMOS_PROTO_DIR/base/v1beta1/coin.proto" \ "$COSMOS_PROTO_DIR/crypto/multisig/v1beta1/multisig.proto" \ "$COSMOS_PROTO_DIR/crypto/secp256k1/keys.proto" \ + "$COSMOS_PROTO_DIR/distribution/v1beta1/distribution.proto" \ + "$COSMOS_PROTO_DIR/distribution/v1beta1/query.proto" \ + "$COSMOS_PROTO_DIR/distribution/v1beta1/tx.proto" \ + "$COSMOS_PROTO_DIR/staking/v1beta1/query.proto" \ "$COSMOS_PROTO_DIR/staking/v1beta1/staking.proto" \ "$COSMOS_PROTO_DIR/staking/v1beta1/tx.proto" \ "$COSMOS_PROTO_DIR/tx/signing/v1beta1/signing.proto" \ diff --git a/packages/stargate/src/codec/generated/codecimpl.d.ts b/packages/stargate/src/codec/generated/codecimpl.d.ts index 32dd36f8..ec980e21 100644 --- a/packages/stargate/src/codec/generated/codecimpl.d.ts +++ b/packages/stargate/src/codec/generated/codecimpl.d.ts @@ -2976,10 +2976,4455 @@ export namespace cosmos { } } + /** Namespace distribution. */ + namespace distribution { + /** Namespace v1beta1. */ + namespace v1beta1 { + /** Properties of a Params. */ + interface IParams { + /** Params communityTax */ + communityTax?: string | null; + + /** Params baseProposerReward */ + baseProposerReward?: string | null; + + /** Params bonusProposerReward */ + bonusProposerReward?: string | null; + + /** Params withdrawAddrEnabled */ + withdrawAddrEnabled?: boolean | null; + } + + /** Represents a Params. */ + class Params implements IParams { + /** + * Constructs a new Params. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IParams); + + /** Params communityTax. */ + public communityTax: string; + + /** Params baseProposerReward. */ + public baseProposerReward: string; + + /** Params bonusProposerReward. */ + public bonusProposerReward: string; + + /** Params withdrawAddrEnabled. */ + public withdrawAddrEnabled: boolean; + + /** + * Creates a new Params instance using the specified properties. + * @param [properties] Properties to set + * @returns Params instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IParams, + ): cosmos.distribution.v1beta1.Params; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos.distribution.v1beta1.Params.verify|verify} messages. + * @param m Params message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.distribution.v1beta1.IParams, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Params message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.Params; + } + + /** Properties of a ValidatorHistoricalRewards. */ + interface IValidatorHistoricalRewards { + /** ValidatorHistoricalRewards cumulativeRewardRatio */ + cumulativeRewardRatio?: cosmos.base.v1beta1.IDecCoin[] | null; + + /** ValidatorHistoricalRewards referenceCount */ + referenceCount?: number | null; + } + + /** Represents a ValidatorHistoricalRewards. */ + class ValidatorHistoricalRewards implements IValidatorHistoricalRewards { + /** + * Constructs a new ValidatorHistoricalRewards. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IValidatorHistoricalRewards); + + /** ValidatorHistoricalRewards cumulativeRewardRatio. */ + public cumulativeRewardRatio: cosmos.base.v1beta1.IDecCoin[]; + + /** ValidatorHistoricalRewards referenceCount. */ + public referenceCount: number; + + /** + * Creates a new ValidatorHistoricalRewards instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorHistoricalRewards instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IValidatorHistoricalRewards, + ): cosmos.distribution.v1beta1.ValidatorHistoricalRewards; + + /** + * Encodes the specified ValidatorHistoricalRewards message. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorHistoricalRewards.verify|verify} messages. + * @param m ValidatorHistoricalRewards message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IValidatorHistoricalRewards, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValidatorHistoricalRewards message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ValidatorHistoricalRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.ValidatorHistoricalRewards; + } + + /** Properties of a ValidatorCurrentRewards. */ + interface IValidatorCurrentRewards { + /** ValidatorCurrentRewards rewards */ + rewards?: cosmos.base.v1beta1.IDecCoin[] | null; + + /** ValidatorCurrentRewards period */ + period?: Long | null; + } + + /** Represents a ValidatorCurrentRewards. */ + class ValidatorCurrentRewards implements IValidatorCurrentRewards { + /** + * Constructs a new ValidatorCurrentRewards. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IValidatorCurrentRewards); + + /** ValidatorCurrentRewards rewards. */ + public rewards: cosmos.base.v1beta1.IDecCoin[]; + + /** ValidatorCurrentRewards period. */ + public period: Long; + + /** + * Creates a new ValidatorCurrentRewards instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorCurrentRewards instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IValidatorCurrentRewards, + ): cosmos.distribution.v1beta1.ValidatorCurrentRewards; + + /** + * Encodes the specified ValidatorCurrentRewards message. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorCurrentRewards.verify|verify} messages. + * @param m ValidatorCurrentRewards message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IValidatorCurrentRewards, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValidatorCurrentRewards message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ValidatorCurrentRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.ValidatorCurrentRewards; + } + + /** Properties of a ValidatorAccumulatedCommission. */ + interface IValidatorAccumulatedCommission { + /** ValidatorAccumulatedCommission commission */ + commission?: cosmos.base.v1beta1.IDecCoin[] | null; + } + + /** Represents a ValidatorAccumulatedCommission. */ + class ValidatorAccumulatedCommission implements IValidatorAccumulatedCommission { + /** + * Constructs a new ValidatorAccumulatedCommission. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IValidatorAccumulatedCommission); + + /** ValidatorAccumulatedCommission commission. */ + public commission: cosmos.base.v1beta1.IDecCoin[]; + + /** + * Creates a new ValidatorAccumulatedCommission instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorAccumulatedCommission instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IValidatorAccumulatedCommission, + ): cosmos.distribution.v1beta1.ValidatorAccumulatedCommission; + + /** + * Encodes the specified ValidatorAccumulatedCommission message. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.verify|verify} messages. + * @param m ValidatorAccumulatedCommission message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IValidatorAccumulatedCommission, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValidatorAccumulatedCommission message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ValidatorAccumulatedCommission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.ValidatorAccumulatedCommission; + } + + /** Properties of a ValidatorOutstandingRewards. */ + interface IValidatorOutstandingRewards { + /** ValidatorOutstandingRewards rewards */ + rewards?: cosmos.base.v1beta1.IDecCoin[] | null; + } + + /** Represents a ValidatorOutstandingRewards. */ + class ValidatorOutstandingRewards implements IValidatorOutstandingRewards { + /** + * Constructs a new ValidatorOutstandingRewards. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IValidatorOutstandingRewards); + + /** ValidatorOutstandingRewards rewards. */ + public rewards: cosmos.base.v1beta1.IDecCoin[]; + + /** + * Creates a new ValidatorOutstandingRewards instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorOutstandingRewards instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IValidatorOutstandingRewards, + ): cosmos.distribution.v1beta1.ValidatorOutstandingRewards; + + /** + * Encodes the specified ValidatorOutstandingRewards message. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorOutstandingRewards.verify|verify} messages. + * @param m ValidatorOutstandingRewards message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IValidatorOutstandingRewards, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValidatorOutstandingRewards message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ValidatorOutstandingRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.ValidatorOutstandingRewards; + } + + /** Properties of a ValidatorSlashEvent. */ + interface IValidatorSlashEvent { + /** ValidatorSlashEvent validatorPeriod */ + validatorPeriod?: Long | null; + + /** ValidatorSlashEvent fraction */ + fraction?: string | null; + } + + /** Represents a ValidatorSlashEvent. */ + class ValidatorSlashEvent implements IValidatorSlashEvent { + /** + * Constructs a new ValidatorSlashEvent. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IValidatorSlashEvent); + + /** ValidatorSlashEvent validatorPeriod. */ + public validatorPeriod: Long; + + /** ValidatorSlashEvent fraction. */ + public fraction: string; + + /** + * Creates a new ValidatorSlashEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorSlashEvent instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IValidatorSlashEvent, + ): cosmos.distribution.v1beta1.ValidatorSlashEvent; + + /** + * Encodes the specified ValidatorSlashEvent message. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorSlashEvent.verify|verify} messages. + * @param m ValidatorSlashEvent message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IValidatorSlashEvent, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValidatorSlashEvent message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ValidatorSlashEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.ValidatorSlashEvent; + } + + /** Properties of a ValidatorSlashEvents. */ + interface IValidatorSlashEvents { + /** ValidatorSlashEvents validatorSlashEvents */ + validatorSlashEvents?: cosmos.distribution.v1beta1.IValidatorSlashEvent[] | null; + } + + /** Represents a ValidatorSlashEvents. */ + class ValidatorSlashEvents implements IValidatorSlashEvents { + /** + * Constructs a new ValidatorSlashEvents. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IValidatorSlashEvents); + + /** ValidatorSlashEvents validatorSlashEvents. */ + public validatorSlashEvents: cosmos.distribution.v1beta1.IValidatorSlashEvent[]; + + /** + * Creates a new ValidatorSlashEvents instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorSlashEvents instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IValidatorSlashEvents, + ): cosmos.distribution.v1beta1.ValidatorSlashEvents; + + /** + * Encodes the specified ValidatorSlashEvents message. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorSlashEvents.verify|verify} messages. + * @param m ValidatorSlashEvents message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IValidatorSlashEvents, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValidatorSlashEvents message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ValidatorSlashEvents + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.ValidatorSlashEvents; + } + + /** Properties of a FeePool. */ + interface IFeePool { + /** FeePool communityPool */ + communityPool?: cosmos.base.v1beta1.IDecCoin[] | null; + } + + /** Represents a FeePool. */ + class FeePool implements IFeePool { + /** + * Constructs a new FeePool. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IFeePool); + + /** FeePool communityPool. */ + public communityPool: cosmos.base.v1beta1.IDecCoin[]; + + /** + * Creates a new FeePool instance using the specified properties. + * @param [properties] Properties to set + * @returns FeePool instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IFeePool, + ): cosmos.distribution.v1beta1.FeePool; + + /** + * Encodes the specified FeePool message. Does not implicitly {@link cosmos.distribution.v1beta1.FeePool.verify|verify} messages. + * @param m FeePool message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.distribution.v1beta1.IFeePool, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeePool message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns FeePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.FeePool; + } + + /** Properties of a CommunityPoolSpendProposal. */ + interface ICommunityPoolSpendProposal { + /** CommunityPoolSpendProposal title */ + title?: string | null; + + /** CommunityPoolSpendProposal description */ + description?: string | null; + + /** CommunityPoolSpendProposal recipient */ + recipient?: string | null; + + /** CommunityPoolSpendProposal amount */ + amount?: cosmos.base.v1beta1.ICoin[] | null; + } + + /** Represents a CommunityPoolSpendProposal. */ + class CommunityPoolSpendProposal implements ICommunityPoolSpendProposal { + /** + * Constructs a new CommunityPoolSpendProposal. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.ICommunityPoolSpendProposal); + + /** CommunityPoolSpendProposal title. */ + public title: string; + + /** CommunityPoolSpendProposal description. */ + public description: string; + + /** CommunityPoolSpendProposal recipient. */ + public recipient: string; + + /** CommunityPoolSpendProposal amount. */ + public amount: cosmos.base.v1beta1.ICoin[]; + + /** + * Creates a new CommunityPoolSpendProposal instance using the specified properties. + * @param [properties] Properties to set + * @returns CommunityPoolSpendProposal instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.ICommunityPoolSpendProposal, + ): cosmos.distribution.v1beta1.CommunityPoolSpendProposal; + + /** + * Encodes the specified CommunityPoolSpendProposal message. Does not implicitly {@link cosmos.distribution.v1beta1.CommunityPoolSpendProposal.verify|verify} messages. + * @param m CommunityPoolSpendProposal message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.ICommunityPoolSpendProposal, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a CommunityPoolSpendProposal message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns CommunityPoolSpendProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.CommunityPoolSpendProposal; + } + + /** Properties of a DelegatorStartingInfo. */ + interface IDelegatorStartingInfo { + /** DelegatorStartingInfo previousPeriod */ + previousPeriod?: Long | null; + + /** DelegatorStartingInfo stake */ + stake?: string | null; + + /** DelegatorStartingInfo height */ + height?: Long | null; + } + + /** Represents a DelegatorStartingInfo. */ + class DelegatorStartingInfo implements IDelegatorStartingInfo { + /** + * Constructs a new DelegatorStartingInfo. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IDelegatorStartingInfo); + + /** DelegatorStartingInfo previousPeriod. */ + public previousPeriod: Long; + + /** DelegatorStartingInfo stake. */ + public stake: string; + + /** DelegatorStartingInfo height. */ + public height: Long; + + /** + * Creates a new DelegatorStartingInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DelegatorStartingInfo instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IDelegatorStartingInfo, + ): cosmos.distribution.v1beta1.DelegatorStartingInfo; + + /** + * Encodes the specified DelegatorStartingInfo message. Does not implicitly {@link cosmos.distribution.v1beta1.DelegatorStartingInfo.verify|verify} messages. + * @param m DelegatorStartingInfo message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IDelegatorStartingInfo, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a DelegatorStartingInfo message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns DelegatorStartingInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.DelegatorStartingInfo; + } + + /** Properties of a DelegationDelegatorReward. */ + interface IDelegationDelegatorReward { + /** DelegationDelegatorReward validatorAddress */ + validatorAddress?: string | null; + + /** DelegationDelegatorReward reward */ + reward?: cosmos.base.v1beta1.IDecCoin[] | null; + } + + /** Represents a DelegationDelegatorReward. */ + class DelegationDelegatorReward implements IDelegationDelegatorReward { + /** + * Constructs a new DelegationDelegatorReward. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IDelegationDelegatorReward); + + /** DelegationDelegatorReward validatorAddress. */ + public validatorAddress: string; + + /** DelegationDelegatorReward reward. */ + public reward: cosmos.base.v1beta1.IDecCoin[]; + + /** + * Creates a new DelegationDelegatorReward instance using the specified properties. + * @param [properties] Properties to set + * @returns DelegationDelegatorReward instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IDelegationDelegatorReward, + ): cosmos.distribution.v1beta1.DelegationDelegatorReward; + + /** + * Encodes the specified DelegationDelegatorReward message. Does not implicitly {@link cosmos.distribution.v1beta1.DelegationDelegatorReward.verify|verify} messages. + * @param m DelegationDelegatorReward message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IDelegationDelegatorReward, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a DelegationDelegatorReward message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns DelegationDelegatorReward + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.DelegationDelegatorReward; + } + + /** Properties of a CommunityPoolSpendProposalWithDeposit. */ + interface ICommunityPoolSpendProposalWithDeposit { + /** CommunityPoolSpendProposalWithDeposit title */ + title?: string | null; + + /** CommunityPoolSpendProposalWithDeposit description */ + description?: string | null; + + /** CommunityPoolSpendProposalWithDeposit recipient */ + recipient?: string | null; + + /** CommunityPoolSpendProposalWithDeposit amount */ + amount?: string | null; + + /** CommunityPoolSpendProposalWithDeposit deposit */ + deposit?: string | null; + } + + /** Represents a CommunityPoolSpendProposalWithDeposit. */ + class CommunityPoolSpendProposalWithDeposit implements ICommunityPoolSpendProposalWithDeposit { + /** + * Constructs a new CommunityPoolSpendProposalWithDeposit. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.ICommunityPoolSpendProposalWithDeposit); + + /** CommunityPoolSpendProposalWithDeposit title. */ + public title: string; + + /** CommunityPoolSpendProposalWithDeposit description. */ + public description: string; + + /** CommunityPoolSpendProposalWithDeposit recipient. */ + public recipient: string; + + /** CommunityPoolSpendProposalWithDeposit amount. */ + public amount: string; + + /** CommunityPoolSpendProposalWithDeposit deposit. */ + public deposit: string; + + /** + * Creates a new CommunityPoolSpendProposalWithDeposit instance using the specified properties. + * @param [properties] Properties to set + * @returns CommunityPoolSpendProposalWithDeposit instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.ICommunityPoolSpendProposalWithDeposit, + ): cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit; + + /** + * Encodes the specified CommunityPoolSpendProposalWithDeposit message. Does not implicitly {@link cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.verify|verify} messages. + * @param m CommunityPoolSpendProposalWithDeposit message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.ICommunityPoolSpendProposalWithDeposit, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a CommunityPoolSpendProposalWithDeposit message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns CommunityPoolSpendProposalWithDeposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit; + } + + /** Represents a Query */ + class Query extends $protobuf.rpc.Service { + /** + * Constructs a new Query service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Query service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create( + rpcImpl: $protobuf.RPCImpl, + requestDelimited?: boolean, + responseDelimited?: boolean, + ): Query; + + /** + * Calls Params. + * @param request QueryParamsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryParamsResponse + */ + public params( + request: cosmos.distribution.v1beta1.IQueryParamsRequest, + callback: cosmos.distribution.v1beta1.Query.ParamsCallback, + ): void; + + /** + * Calls Params. + * @param request QueryParamsRequest message or plain object + * @returns Promise + */ + public params( + request: cosmos.distribution.v1beta1.IQueryParamsRequest, + ): Promise; + + /** + * Calls ValidatorOutstandingRewards. + * @param request QueryValidatorOutstandingRewardsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryValidatorOutstandingRewardsResponse + */ + public validatorOutstandingRewards( + request: cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsRequest, + callback: cosmos.distribution.v1beta1.Query.ValidatorOutstandingRewardsCallback, + ): void; + + /** + * Calls ValidatorOutstandingRewards. + * @param request QueryValidatorOutstandingRewardsRequest message or plain object + * @returns Promise + */ + public validatorOutstandingRewards( + request: cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsRequest, + ): Promise; + + /** + * Calls ValidatorCommission. + * @param request QueryValidatorCommissionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryValidatorCommissionResponse + */ + public validatorCommission( + request: cosmos.distribution.v1beta1.IQueryValidatorCommissionRequest, + callback: cosmos.distribution.v1beta1.Query.ValidatorCommissionCallback, + ): void; + + /** + * Calls ValidatorCommission. + * @param request QueryValidatorCommissionRequest message or plain object + * @returns Promise + */ + public validatorCommission( + request: cosmos.distribution.v1beta1.IQueryValidatorCommissionRequest, + ): Promise; + + /** + * Calls ValidatorSlashes. + * @param request QueryValidatorSlashesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryValidatorSlashesResponse + */ + public validatorSlashes( + request: cosmos.distribution.v1beta1.IQueryValidatorSlashesRequest, + callback: cosmos.distribution.v1beta1.Query.ValidatorSlashesCallback, + ): void; + + /** + * Calls ValidatorSlashes. + * @param request QueryValidatorSlashesRequest message or plain object + * @returns Promise + */ + public validatorSlashes( + request: cosmos.distribution.v1beta1.IQueryValidatorSlashesRequest, + ): Promise; + + /** + * Calls DelegationRewards. + * @param request QueryDelegationRewardsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryDelegationRewardsResponse + */ + public delegationRewards( + request: cosmos.distribution.v1beta1.IQueryDelegationRewardsRequest, + callback: cosmos.distribution.v1beta1.Query.DelegationRewardsCallback, + ): void; + + /** + * Calls DelegationRewards. + * @param request QueryDelegationRewardsRequest message or plain object + * @returns Promise + */ + public delegationRewards( + request: cosmos.distribution.v1beta1.IQueryDelegationRewardsRequest, + ): Promise; + + /** + * Calls DelegationTotalRewards. + * @param request QueryDelegationTotalRewardsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryDelegationTotalRewardsResponse + */ + public delegationTotalRewards( + request: cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsRequest, + callback: cosmos.distribution.v1beta1.Query.DelegationTotalRewardsCallback, + ): void; + + /** + * Calls DelegationTotalRewards. + * @param request QueryDelegationTotalRewardsRequest message or plain object + * @returns Promise + */ + public delegationTotalRewards( + request: cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsRequest, + ): Promise; + + /** + * Calls DelegatorValidators. + * @param request QueryDelegatorValidatorsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryDelegatorValidatorsResponse + */ + public delegatorValidators( + request: cosmos.distribution.v1beta1.IQueryDelegatorValidatorsRequest, + callback: cosmos.distribution.v1beta1.Query.DelegatorValidatorsCallback, + ): void; + + /** + * Calls DelegatorValidators. + * @param request QueryDelegatorValidatorsRequest message or plain object + * @returns Promise + */ + public delegatorValidators( + request: cosmos.distribution.v1beta1.IQueryDelegatorValidatorsRequest, + ): Promise; + + /** + * Calls DelegatorWithdrawAddress. + * @param request QueryDelegatorWithdrawAddressRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryDelegatorWithdrawAddressResponse + */ + public delegatorWithdrawAddress( + request: cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressRequest, + callback: cosmos.distribution.v1beta1.Query.DelegatorWithdrawAddressCallback, + ): void; + + /** + * Calls DelegatorWithdrawAddress. + * @param request QueryDelegatorWithdrawAddressRequest message or plain object + * @returns Promise + */ + public delegatorWithdrawAddress( + request: cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressRequest, + ): Promise; + + /** + * Calls CommunityPool. + * @param request QueryCommunityPoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryCommunityPoolResponse + */ + public communityPool( + request: cosmos.distribution.v1beta1.IQueryCommunityPoolRequest, + callback: cosmos.distribution.v1beta1.Query.CommunityPoolCallback, + ): void; + + /** + * Calls CommunityPool. + * @param request QueryCommunityPoolRequest message or plain object + * @returns Promise + */ + public communityPool( + request: cosmos.distribution.v1beta1.IQueryCommunityPoolRequest, + ): Promise; + } + + namespace Query { + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#params}. + * @param error Error, if any + * @param [response] QueryParamsResponse + */ + type ParamsCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.QueryParamsResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#validatorOutstandingRewards}. + * @param error Error, if any + * @param [response] QueryValidatorOutstandingRewardsResponse + */ + type ValidatorOutstandingRewardsCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#validatorCommission}. + * @param error Error, if any + * @param [response] QueryValidatorCommissionResponse + */ + type ValidatorCommissionCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.QueryValidatorCommissionResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#validatorSlashes}. + * @param error Error, if any + * @param [response] QueryValidatorSlashesResponse + */ + type ValidatorSlashesCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.QueryValidatorSlashesResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#delegationRewards}. + * @param error Error, if any + * @param [response] QueryDelegationRewardsResponse + */ + type DelegationRewardsCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.QueryDelegationRewardsResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#delegationTotalRewards}. + * @param error Error, if any + * @param [response] QueryDelegationTotalRewardsResponse + */ + type DelegationTotalRewardsCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#delegatorValidators}. + * @param error Error, if any + * @param [response] QueryDelegatorValidatorsResponse + */ + type DelegatorValidatorsCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#delegatorWithdrawAddress}. + * @param error Error, if any + * @param [response] QueryDelegatorWithdrawAddressResponse + */ + type DelegatorWithdrawAddressCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#communityPool}. + * @param error Error, if any + * @param [response] QueryCommunityPoolResponse + */ + type CommunityPoolCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.QueryCommunityPoolResponse, + ) => void; + } + + /** Properties of a QueryParamsRequest. */ + interface IQueryParamsRequest {} + + /** Represents a QueryParamsRequest. */ + class QueryParamsRequest implements IQueryParamsRequest { + /** + * Constructs a new QueryParamsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryParamsRequest); + + /** + * Creates a new QueryParamsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryParamsRequest instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryParamsRequest, + ): cosmos.distribution.v1beta1.QueryParamsRequest; + + /** + * Encodes the specified QueryParamsRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryParamsRequest.verify|verify} messages. + * @param m QueryParamsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryParamsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryParamsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryParamsRequest; + } + + /** Properties of a QueryParamsResponse. */ + interface IQueryParamsResponse { + /** QueryParamsResponse params */ + params?: cosmos.distribution.v1beta1.IParams | null; + } + + /** Represents a QueryParamsResponse. */ + class QueryParamsResponse implements IQueryParamsResponse { + /** + * Constructs a new QueryParamsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryParamsResponse); + + /** QueryParamsResponse params. */ + public params?: cosmos.distribution.v1beta1.IParams | null; + + /** + * Creates a new QueryParamsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryParamsResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryParamsResponse, + ): cosmos.distribution.v1beta1.QueryParamsResponse; + + /** + * Encodes the specified QueryParamsResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryParamsResponse.verify|verify} messages. + * @param m QueryParamsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryParamsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryParamsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryParamsResponse; + } + + /** Properties of a QueryValidatorOutstandingRewardsRequest. */ + interface IQueryValidatorOutstandingRewardsRequest { + /** QueryValidatorOutstandingRewardsRequest validatorAddress */ + validatorAddress?: string | null; + } + + /** Represents a QueryValidatorOutstandingRewardsRequest. */ + class QueryValidatorOutstandingRewardsRequest implements IQueryValidatorOutstandingRewardsRequest { + /** + * Constructs a new QueryValidatorOutstandingRewardsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsRequest); + + /** QueryValidatorOutstandingRewardsRequest validatorAddress. */ + public validatorAddress: string; + + /** + * Creates a new QueryValidatorOutstandingRewardsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorOutstandingRewardsRequest instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsRequest, + ): cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest; + + /** + * Encodes the specified QueryValidatorOutstandingRewardsRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.verify|verify} messages. + * @param m QueryValidatorOutstandingRewardsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorOutstandingRewardsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorOutstandingRewardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest; + } + + /** Properties of a QueryValidatorOutstandingRewardsResponse. */ + interface IQueryValidatorOutstandingRewardsResponse { + /** QueryValidatorOutstandingRewardsResponse rewards */ + rewards?: cosmos.distribution.v1beta1.IValidatorOutstandingRewards | null; + } + + /** Represents a QueryValidatorOutstandingRewardsResponse. */ + class QueryValidatorOutstandingRewardsResponse implements IQueryValidatorOutstandingRewardsResponse { + /** + * Constructs a new QueryValidatorOutstandingRewardsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsResponse); + + /** QueryValidatorOutstandingRewardsResponse rewards. */ + public rewards?: cosmos.distribution.v1beta1.IValidatorOutstandingRewards | null; + + /** + * Creates a new QueryValidatorOutstandingRewardsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorOutstandingRewardsResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsResponse, + ): cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse; + + /** + * Encodes the specified QueryValidatorOutstandingRewardsResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.verify|verify} messages. + * @param m QueryValidatorOutstandingRewardsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorOutstandingRewardsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorOutstandingRewardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse; + } + + /** Properties of a QueryValidatorCommissionRequest. */ + interface IQueryValidatorCommissionRequest { + /** QueryValidatorCommissionRequest validatorAddress */ + validatorAddress?: string | null; + } + + /** Represents a QueryValidatorCommissionRequest. */ + class QueryValidatorCommissionRequest implements IQueryValidatorCommissionRequest { + /** + * Constructs a new QueryValidatorCommissionRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryValidatorCommissionRequest); + + /** QueryValidatorCommissionRequest validatorAddress. */ + public validatorAddress: string; + + /** + * Creates a new QueryValidatorCommissionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorCommissionRequest instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryValidatorCommissionRequest, + ): cosmos.distribution.v1beta1.QueryValidatorCommissionRequest; + + /** + * Encodes the specified QueryValidatorCommissionRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.verify|verify} messages. + * @param m QueryValidatorCommissionRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryValidatorCommissionRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorCommissionRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorCommissionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryValidatorCommissionRequest; + } + + /** Properties of a QueryValidatorCommissionResponse. */ + interface IQueryValidatorCommissionResponse { + /** QueryValidatorCommissionResponse commission */ + commission?: cosmos.distribution.v1beta1.IValidatorAccumulatedCommission | null; + } + + /** Represents a QueryValidatorCommissionResponse. */ + class QueryValidatorCommissionResponse implements IQueryValidatorCommissionResponse { + /** + * Constructs a new QueryValidatorCommissionResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryValidatorCommissionResponse); + + /** QueryValidatorCommissionResponse commission. */ + public commission?: cosmos.distribution.v1beta1.IValidatorAccumulatedCommission | null; + + /** + * Creates a new QueryValidatorCommissionResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorCommissionResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryValidatorCommissionResponse, + ): cosmos.distribution.v1beta1.QueryValidatorCommissionResponse; + + /** + * Encodes the specified QueryValidatorCommissionResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.verify|verify} messages. + * @param m QueryValidatorCommissionResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryValidatorCommissionResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorCommissionResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorCommissionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryValidatorCommissionResponse; + } + + /** Properties of a QueryValidatorSlashesRequest. */ + interface IQueryValidatorSlashesRequest { + /** QueryValidatorSlashesRequest validatorAddress */ + validatorAddress?: string | null; + + /** QueryValidatorSlashesRequest startingHeight */ + startingHeight?: Long | null; + + /** QueryValidatorSlashesRequest endingHeight */ + endingHeight?: Long | null; + + /** QueryValidatorSlashesRequest pagination */ + pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + } + + /** Represents a QueryValidatorSlashesRequest. */ + class QueryValidatorSlashesRequest implements IQueryValidatorSlashesRequest { + /** + * Constructs a new QueryValidatorSlashesRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryValidatorSlashesRequest); + + /** QueryValidatorSlashesRequest validatorAddress. */ + public validatorAddress: string; + + /** QueryValidatorSlashesRequest startingHeight. */ + public startingHeight: Long; + + /** QueryValidatorSlashesRequest endingHeight. */ + public endingHeight: Long; + + /** QueryValidatorSlashesRequest pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + + /** + * Creates a new QueryValidatorSlashesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorSlashesRequest instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryValidatorSlashesRequest, + ): cosmos.distribution.v1beta1.QueryValidatorSlashesRequest; + + /** + * Encodes the specified QueryValidatorSlashesRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.verify|verify} messages. + * @param m QueryValidatorSlashesRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryValidatorSlashesRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorSlashesRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorSlashesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryValidatorSlashesRequest; + } + + /** Properties of a QueryValidatorSlashesResponse. */ + interface IQueryValidatorSlashesResponse { + /** QueryValidatorSlashesResponse slashes */ + slashes?: cosmos.distribution.v1beta1.IValidatorSlashEvent[] | null; + + /** QueryValidatorSlashesResponse pagination */ + pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + } + + /** Represents a QueryValidatorSlashesResponse. */ + class QueryValidatorSlashesResponse implements IQueryValidatorSlashesResponse { + /** + * Constructs a new QueryValidatorSlashesResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryValidatorSlashesResponse); + + /** QueryValidatorSlashesResponse slashes. */ + public slashes: cosmos.distribution.v1beta1.IValidatorSlashEvent[]; + + /** QueryValidatorSlashesResponse pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + + /** + * Creates a new QueryValidatorSlashesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorSlashesResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryValidatorSlashesResponse, + ): cosmos.distribution.v1beta1.QueryValidatorSlashesResponse; + + /** + * Encodes the specified QueryValidatorSlashesResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.verify|verify} messages. + * @param m QueryValidatorSlashesResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryValidatorSlashesResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorSlashesResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorSlashesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryValidatorSlashesResponse; + } + + /** Properties of a QueryDelegationRewardsRequest. */ + interface IQueryDelegationRewardsRequest { + /** QueryDelegationRewardsRequest delegatorAddress */ + delegatorAddress?: string | null; + + /** QueryDelegationRewardsRequest validatorAddress */ + validatorAddress?: string | null; + } + + /** Represents a QueryDelegationRewardsRequest. */ + class QueryDelegationRewardsRequest implements IQueryDelegationRewardsRequest { + /** + * Constructs a new QueryDelegationRewardsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryDelegationRewardsRequest); + + /** QueryDelegationRewardsRequest delegatorAddress. */ + public delegatorAddress: string; + + /** QueryDelegationRewardsRequest validatorAddress. */ + public validatorAddress: string; + + /** + * Creates a new QueryDelegationRewardsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegationRewardsRequest instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryDelegationRewardsRequest, + ): cosmos.distribution.v1beta1.QueryDelegationRewardsRequest; + + /** + * Encodes the specified QueryDelegationRewardsRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.verify|verify} messages. + * @param m QueryDelegationRewardsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryDelegationRewardsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegationRewardsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegationRewardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryDelegationRewardsRequest; + } + + /** Properties of a QueryDelegationRewardsResponse. */ + interface IQueryDelegationRewardsResponse { + /** QueryDelegationRewardsResponse rewards */ + rewards?: cosmos.base.v1beta1.IDecCoin[] | null; + } + + /** Represents a QueryDelegationRewardsResponse. */ + class QueryDelegationRewardsResponse implements IQueryDelegationRewardsResponse { + /** + * Constructs a new QueryDelegationRewardsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryDelegationRewardsResponse); + + /** QueryDelegationRewardsResponse rewards. */ + public rewards: cosmos.base.v1beta1.IDecCoin[]; + + /** + * Creates a new QueryDelegationRewardsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegationRewardsResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryDelegationRewardsResponse, + ): cosmos.distribution.v1beta1.QueryDelegationRewardsResponse; + + /** + * Encodes the specified QueryDelegationRewardsResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.verify|verify} messages. + * @param m QueryDelegationRewardsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryDelegationRewardsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegationRewardsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegationRewardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryDelegationRewardsResponse; + } + + /** Properties of a QueryDelegationTotalRewardsRequest. */ + interface IQueryDelegationTotalRewardsRequest { + /** QueryDelegationTotalRewardsRequest delegatorAddress */ + delegatorAddress?: string | null; + } + + /** Represents a QueryDelegationTotalRewardsRequest. */ + class QueryDelegationTotalRewardsRequest implements IQueryDelegationTotalRewardsRequest { + /** + * Constructs a new QueryDelegationTotalRewardsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsRequest); + + /** QueryDelegationTotalRewardsRequest delegatorAddress. */ + public delegatorAddress: string; + + /** + * Creates a new QueryDelegationTotalRewardsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegationTotalRewardsRequest instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsRequest, + ): cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest; + + /** + * Encodes the specified QueryDelegationTotalRewardsRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.verify|verify} messages. + * @param m QueryDelegationTotalRewardsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegationTotalRewardsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegationTotalRewardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest; + } + + /** Properties of a QueryDelegationTotalRewardsResponse. */ + interface IQueryDelegationTotalRewardsResponse { + /** QueryDelegationTotalRewardsResponse rewards */ + rewards?: cosmos.distribution.v1beta1.IDelegationDelegatorReward[] | null; + + /** QueryDelegationTotalRewardsResponse total */ + total?: cosmos.base.v1beta1.IDecCoin[] | null; + } + + /** Represents a QueryDelegationTotalRewardsResponse. */ + class QueryDelegationTotalRewardsResponse implements IQueryDelegationTotalRewardsResponse { + /** + * Constructs a new QueryDelegationTotalRewardsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsResponse); + + /** QueryDelegationTotalRewardsResponse rewards. */ + public rewards: cosmos.distribution.v1beta1.IDelegationDelegatorReward[]; + + /** QueryDelegationTotalRewardsResponse total. */ + public total: cosmos.base.v1beta1.IDecCoin[]; + + /** + * Creates a new QueryDelegationTotalRewardsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegationTotalRewardsResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsResponse, + ): cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse; + + /** + * Encodes the specified QueryDelegationTotalRewardsResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.verify|verify} messages. + * @param m QueryDelegationTotalRewardsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegationTotalRewardsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegationTotalRewardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse; + } + + /** Properties of a QueryDelegatorValidatorsRequest. */ + interface IQueryDelegatorValidatorsRequest { + /** QueryDelegatorValidatorsRequest delegatorAddress */ + delegatorAddress?: string | null; + } + + /** Represents a QueryDelegatorValidatorsRequest. */ + class QueryDelegatorValidatorsRequest implements IQueryDelegatorValidatorsRequest { + /** + * Constructs a new QueryDelegatorValidatorsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryDelegatorValidatorsRequest); + + /** QueryDelegatorValidatorsRequest delegatorAddress. */ + public delegatorAddress: string; + + /** + * Creates a new QueryDelegatorValidatorsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegatorValidatorsRequest instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryDelegatorValidatorsRequest, + ): cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest; + + /** + * Encodes the specified QueryDelegatorValidatorsRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.verify|verify} messages. + * @param m QueryDelegatorValidatorsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryDelegatorValidatorsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegatorValidatorsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegatorValidatorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest; + } + + /** Properties of a QueryDelegatorValidatorsResponse. */ + interface IQueryDelegatorValidatorsResponse { + /** QueryDelegatorValidatorsResponse validators */ + validators?: string[] | null; + } + + /** Represents a QueryDelegatorValidatorsResponse. */ + class QueryDelegatorValidatorsResponse implements IQueryDelegatorValidatorsResponse { + /** + * Constructs a new QueryDelegatorValidatorsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryDelegatorValidatorsResponse); + + /** QueryDelegatorValidatorsResponse validators. */ + public validators: string[]; + + /** + * Creates a new QueryDelegatorValidatorsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegatorValidatorsResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryDelegatorValidatorsResponse, + ): cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse; + + /** + * Encodes the specified QueryDelegatorValidatorsResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.verify|verify} messages. + * @param m QueryDelegatorValidatorsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryDelegatorValidatorsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegatorValidatorsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegatorValidatorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse; + } + + /** Properties of a QueryDelegatorWithdrawAddressRequest. */ + interface IQueryDelegatorWithdrawAddressRequest { + /** QueryDelegatorWithdrawAddressRequest delegatorAddress */ + delegatorAddress?: string | null; + } + + /** Represents a QueryDelegatorWithdrawAddressRequest. */ + class QueryDelegatorWithdrawAddressRequest implements IQueryDelegatorWithdrawAddressRequest { + /** + * Constructs a new QueryDelegatorWithdrawAddressRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressRequest); + + /** QueryDelegatorWithdrawAddressRequest delegatorAddress. */ + public delegatorAddress: string; + + /** + * Creates a new QueryDelegatorWithdrawAddressRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegatorWithdrawAddressRequest instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressRequest, + ): cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest; + + /** + * Encodes the specified QueryDelegatorWithdrawAddressRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.verify|verify} messages. + * @param m QueryDelegatorWithdrawAddressRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegatorWithdrawAddressRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegatorWithdrawAddressRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest; + } + + /** Properties of a QueryDelegatorWithdrawAddressResponse. */ + interface IQueryDelegatorWithdrawAddressResponse { + /** QueryDelegatorWithdrawAddressResponse withdrawAddress */ + withdrawAddress?: string | null; + } + + /** Represents a QueryDelegatorWithdrawAddressResponse. */ + class QueryDelegatorWithdrawAddressResponse implements IQueryDelegatorWithdrawAddressResponse { + /** + * Constructs a new QueryDelegatorWithdrawAddressResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressResponse); + + /** QueryDelegatorWithdrawAddressResponse withdrawAddress. */ + public withdrawAddress: string; + + /** + * Creates a new QueryDelegatorWithdrawAddressResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegatorWithdrawAddressResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressResponse, + ): cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse; + + /** + * Encodes the specified QueryDelegatorWithdrawAddressResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.verify|verify} messages. + * @param m QueryDelegatorWithdrawAddressResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegatorWithdrawAddressResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegatorWithdrawAddressResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse; + } + + /** Properties of a QueryCommunityPoolRequest. */ + interface IQueryCommunityPoolRequest {} + + /** Represents a QueryCommunityPoolRequest. */ + class QueryCommunityPoolRequest implements IQueryCommunityPoolRequest { + /** + * Constructs a new QueryCommunityPoolRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryCommunityPoolRequest); + + /** + * Creates a new QueryCommunityPoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryCommunityPoolRequest instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryCommunityPoolRequest, + ): cosmos.distribution.v1beta1.QueryCommunityPoolRequest; + + /** + * Encodes the specified QueryCommunityPoolRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryCommunityPoolRequest.verify|verify} messages. + * @param m QueryCommunityPoolRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryCommunityPoolRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryCommunityPoolRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryCommunityPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryCommunityPoolRequest; + } + + /** Properties of a QueryCommunityPoolResponse. */ + interface IQueryCommunityPoolResponse { + /** QueryCommunityPoolResponse pool */ + pool?: cosmos.base.v1beta1.IDecCoin[] | null; + } + + /** Represents a QueryCommunityPoolResponse. */ + class QueryCommunityPoolResponse implements IQueryCommunityPoolResponse { + /** + * Constructs a new QueryCommunityPoolResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryCommunityPoolResponse); + + /** QueryCommunityPoolResponse pool. */ + public pool: cosmos.base.v1beta1.IDecCoin[]; + + /** + * Creates a new QueryCommunityPoolResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryCommunityPoolResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryCommunityPoolResponse, + ): cosmos.distribution.v1beta1.QueryCommunityPoolResponse; + + /** + * Encodes the specified QueryCommunityPoolResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryCommunityPoolResponse.verify|verify} messages. + * @param m QueryCommunityPoolResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryCommunityPoolResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryCommunityPoolResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryCommunityPoolResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryCommunityPoolResponse; + } + + /** Represents a Msg */ + class Msg extends $protobuf.rpc.Service { + /** + * Constructs a new Msg service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Msg service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create( + rpcImpl: $protobuf.RPCImpl, + requestDelimited?: boolean, + responseDelimited?: boolean, + ): Msg; + + /** + * Calls SetWithdrawAddress. + * @param request MsgSetWithdrawAddress message or plain object + * @param callback Node-style callback called with the error, if any, and MsgSetWithdrawAddressResponse + */ + public setWithdrawAddress( + request: cosmos.distribution.v1beta1.IMsgSetWithdrawAddress, + callback: cosmos.distribution.v1beta1.Msg.SetWithdrawAddressCallback, + ): void; + + /** + * Calls SetWithdrawAddress. + * @param request MsgSetWithdrawAddress message or plain object + * @returns Promise + */ + public setWithdrawAddress( + request: cosmos.distribution.v1beta1.IMsgSetWithdrawAddress, + ): Promise; + + /** + * Calls WithdrawDelegatorReward. + * @param request MsgWithdrawDelegatorReward message or plain object + * @param callback Node-style callback called with the error, if any, and MsgWithdrawDelegatorRewardResponse + */ + public withdrawDelegatorReward( + request: cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward, + callback: cosmos.distribution.v1beta1.Msg.WithdrawDelegatorRewardCallback, + ): void; + + /** + * Calls WithdrawDelegatorReward. + * @param request MsgWithdrawDelegatorReward message or plain object + * @returns Promise + */ + public withdrawDelegatorReward( + request: cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward, + ): Promise; + + /** + * Calls WithdrawValidatorCommission. + * @param request MsgWithdrawValidatorCommission message or plain object + * @param callback Node-style callback called with the error, if any, and MsgWithdrawValidatorCommissionResponse + */ + public withdrawValidatorCommission( + request: cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission, + callback: cosmos.distribution.v1beta1.Msg.WithdrawValidatorCommissionCallback, + ): void; + + /** + * Calls WithdrawValidatorCommission. + * @param request MsgWithdrawValidatorCommission message or plain object + * @returns Promise + */ + public withdrawValidatorCommission( + request: cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission, + ): Promise; + + /** + * Calls FundCommunityPool. + * @param request MsgFundCommunityPool message or plain object + * @param callback Node-style callback called with the error, if any, and MsgFundCommunityPoolResponse + */ + public fundCommunityPool( + request: cosmos.distribution.v1beta1.IMsgFundCommunityPool, + callback: cosmos.distribution.v1beta1.Msg.FundCommunityPoolCallback, + ): void; + + /** + * Calls FundCommunityPool. + * @param request MsgFundCommunityPool message or plain object + * @returns Promise + */ + public fundCommunityPool( + request: cosmos.distribution.v1beta1.IMsgFundCommunityPool, + ): Promise; + } + + namespace Msg { + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Msg#setWithdrawAddress}. + * @param error Error, if any + * @param [response] MsgSetWithdrawAddressResponse + */ + type SetWithdrawAddressCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Msg#withdrawDelegatorReward}. + * @param error Error, if any + * @param [response] MsgWithdrawDelegatorRewardResponse + */ + type WithdrawDelegatorRewardCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Msg#withdrawValidatorCommission}. + * @param error Error, if any + * @param [response] MsgWithdrawValidatorCommissionResponse + */ + type WithdrawValidatorCommissionCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Msg#fundCommunityPool}. + * @param error Error, if any + * @param [response] MsgFundCommunityPoolResponse + */ + type FundCommunityPoolCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse, + ) => void; + } + + /** Properties of a MsgSetWithdrawAddress. */ + interface IMsgSetWithdrawAddress { + /** MsgSetWithdrawAddress delegatorAddress */ + delegatorAddress?: string | null; + + /** MsgSetWithdrawAddress withdrawAddress */ + withdrawAddress?: string | null; + } + + /** Represents a MsgSetWithdrawAddress. */ + class MsgSetWithdrawAddress implements IMsgSetWithdrawAddress { + /** + * Constructs a new MsgSetWithdrawAddress. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IMsgSetWithdrawAddress); + + /** MsgSetWithdrawAddress delegatorAddress. */ + public delegatorAddress: string; + + /** MsgSetWithdrawAddress withdrawAddress. */ + public withdrawAddress: string; + + /** + * Creates a new MsgSetWithdrawAddress instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgSetWithdrawAddress instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IMsgSetWithdrawAddress, + ): cosmos.distribution.v1beta1.MsgSetWithdrawAddress; + + /** + * Encodes the specified MsgSetWithdrawAddress message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgSetWithdrawAddress.verify|verify} messages. + * @param m MsgSetWithdrawAddress message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IMsgSetWithdrawAddress, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgSetWithdrawAddress message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns MsgSetWithdrawAddress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.MsgSetWithdrawAddress; + } + + /** Properties of a MsgSetWithdrawAddressResponse. */ + interface IMsgSetWithdrawAddressResponse {} + + /** Represents a MsgSetWithdrawAddressResponse. */ + class MsgSetWithdrawAddressResponse implements IMsgSetWithdrawAddressResponse { + /** + * Constructs a new MsgSetWithdrawAddressResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IMsgSetWithdrawAddressResponse); + + /** + * Creates a new MsgSetWithdrawAddressResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgSetWithdrawAddressResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IMsgSetWithdrawAddressResponse, + ): cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse; + + /** + * Encodes the specified MsgSetWithdrawAddressResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.verify|verify} messages. + * @param m MsgSetWithdrawAddressResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IMsgSetWithdrawAddressResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgSetWithdrawAddressResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns MsgSetWithdrawAddressResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse; + } + + /** Properties of a MsgWithdrawDelegatorReward. */ + interface IMsgWithdrawDelegatorReward { + /** MsgWithdrawDelegatorReward delegatorAddress */ + delegatorAddress?: string | null; + + /** MsgWithdrawDelegatorReward validatorAddress */ + validatorAddress?: string | null; + } + + /** Represents a MsgWithdrawDelegatorReward. */ + class MsgWithdrawDelegatorReward implements IMsgWithdrawDelegatorReward { + /** + * Constructs a new MsgWithdrawDelegatorReward. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward); + + /** MsgWithdrawDelegatorReward delegatorAddress. */ + public delegatorAddress: string; + + /** MsgWithdrawDelegatorReward validatorAddress. */ + public validatorAddress: string; + + /** + * Creates a new MsgWithdrawDelegatorReward instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgWithdrawDelegatorReward instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward, + ): cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward; + + /** + * Encodes the specified MsgWithdrawDelegatorReward message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.verify|verify} messages. + * @param m MsgWithdrawDelegatorReward message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgWithdrawDelegatorReward message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns MsgWithdrawDelegatorReward + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward; + } + + /** Properties of a MsgWithdrawDelegatorRewardResponse. */ + interface IMsgWithdrawDelegatorRewardResponse {} + + /** Represents a MsgWithdrawDelegatorRewardResponse. */ + class MsgWithdrawDelegatorRewardResponse implements IMsgWithdrawDelegatorRewardResponse { + /** + * Constructs a new MsgWithdrawDelegatorRewardResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IMsgWithdrawDelegatorRewardResponse); + + /** + * Creates a new MsgWithdrawDelegatorRewardResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgWithdrawDelegatorRewardResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IMsgWithdrawDelegatorRewardResponse, + ): cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse; + + /** + * Encodes the specified MsgWithdrawDelegatorRewardResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.verify|verify} messages. + * @param m MsgWithdrawDelegatorRewardResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IMsgWithdrawDelegatorRewardResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgWithdrawDelegatorRewardResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns MsgWithdrawDelegatorRewardResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse; + } + + /** Properties of a MsgWithdrawValidatorCommission. */ + interface IMsgWithdrawValidatorCommission { + /** MsgWithdrawValidatorCommission validatorAddress */ + validatorAddress?: string | null; + } + + /** Represents a MsgWithdrawValidatorCommission. */ + class MsgWithdrawValidatorCommission implements IMsgWithdrawValidatorCommission { + /** + * Constructs a new MsgWithdrawValidatorCommission. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission); + + /** MsgWithdrawValidatorCommission validatorAddress. */ + public validatorAddress: string; + + /** + * Creates a new MsgWithdrawValidatorCommission instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgWithdrawValidatorCommission instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission, + ): cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission; + + /** + * Encodes the specified MsgWithdrawValidatorCommission message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.verify|verify} messages. + * @param m MsgWithdrawValidatorCommission message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgWithdrawValidatorCommission message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns MsgWithdrawValidatorCommission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission; + } + + /** Properties of a MsgWithdrawValidatorCommissionResponse. */ + interface IMsgWithdrawValidatorCommissionResponse {} + + /** Represents a MsgWithdrawValidatorCommissionResponse. */ + class MsgWithdrawValidatorCommissionResponse implements IMsgWithdrawValidatorCommissionResponse { + /** + * Constructs a new MsgWithdrawValidatorCommissionResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommissionResponse); + + /** + * Creates a new MsgWithdrawValidatorCommissionResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgWithdrawValidatorCommissionResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommissionResponse, + ): cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse; + + /** + * Encodes the specified MsgWithdrawValidatorCommissionResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.verify|verify} messages. + * @param m MsgWithdrawValidatorCommissionResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommissionResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgWithdrawValidatorCommissionResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns MsgWithdrawValidatorCommissionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse; + } + + /** Properties of a MsgFundCommunityPool. */ + interface IMsgFundCommunityPool { + /** MsgFundCommunityPool amount */ + amount?: cosmos.base.v1beta1.ICoin[] | null; + + /** MsgFundCommunityPool depositor */ + depositor?: string | null; + } + + /** Represents a MsgFundCommunityPool. */ + class MsgFundCommunityPool implements IMsgFundCommunityPool { + /** + * Constructs a new MsgFundCommunityPool. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IMsgFundCommunityPool); + + /** MsgFundCommunityPool amount. */ + public amount: cosmos.base.v1beta1.ICoin[]; + + /** MsgFundCommunityPool depositor. */ + public depositor: string; + + /** + * Creates a new MsgFundCommunityPool instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgFundCommunityPool instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IMsgFundCommunityPool, + ): cosmos.distribution.v1beta1.MsgFundCommunityPool; + + /** + * Encodes the specified MsgFundCommunityPool message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgFundCommunityPool.verify|verify} messages. + * @param m MsgFundCommunityPool message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IMsgFundCommunityPool, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgFundCommunityPool message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns MsgFundCommunityPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.MsgFundCommunityPool; + } + + /** Properties of a MsgFundCommunityPoolResponse. */ + interface IMsgFundCommunityPoolResponse {} + + /** Represents a MsgFundCommunityPoolResponse. */ + class MsgFundCommunityPoolResponse implements IMsgFundCommunityPoolResponse { + /** + * Constructs a new MsgFundCommunityPoolResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IMsgFundCommunityPoolResponse); + + /** + * Creates a new MsgFundCommunityPoolResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgFundCommunityPoolResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IMsgFundCommunityPoolResponse, + ): cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse; + + /** + * Encodes the specified MsgFundCommunityPoolResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.verify|verify} messages. + * @param m MsgFundCommunityPoolResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IMsgFundCommunityPoolResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgFundCommunityPoolResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns MsgFundCommunityPoolResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse; + } + } + } + /** Namespace staking. */ namespace staking { /** Namespace v1beta1. */ namespace v1beta1 { + /** Represents a Query */ + class Query extends $protobuf.rpc.Service { + /** + * Constructs a new Query service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Query service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create( + rpcImpl: $protobuf.RPCImpl, + requestDelimited?: boolean, + responseDelimited?: boolean, + ): Query; + + /** + * Calls Validators. + * @param request QueryValidatorsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryValidatorsResponse + */ + public validators( + request: cosmos.staking.v1beta1.IQueryValidatorsRequest, + callback: cosmos.staking.v1beta1.Query.ValidatorsCallback, + ): void; + + /** + * Calls Validators. + * @param request QueryValidatorsRequest message or plain object + * @returns Promise + */ + public validators( + request: cosmos.staking.v1beta1.IQueryValidatorsRequest, + ): Promise; + + /** + * Calls Validator. + * @param request QueryValidatorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryValidatorResponse + */ + public validator( + request: cosmos.staking.v1beta1.IQueryValidatorRequest, + callback: cosmos.staking.v1beta1.Query.ValidatorCallback, + ): void; + + /** + * Calls Validator. + * @param request QueryValidatorRequest message or plain object + * @returns Promise + */ + public validator( + request: cosmos.staking.v1beta1.IQueryValidatorRequest, + ): Promise; + + /** + * Calls ValidatorDelegations. + * @param request QueryValidatorDelegationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryValidatorDelegationsResponse + */ + public validatorDelegations( + request: cosmos.staking.v1beta1.IQueryValidatorDelegationsRequest, + callback: cosmos.staking.v1beta1.Query.ValidatorDelegationsCallback, + ): void; + + /** + * Calls ValidatorDelegations. + * @param request QueryValidatorDelegationsRequest message or plain object + * @returns Promise + */ + public validatorDelegations( + request: cosmos.staking.v1beta1.IQueryValidatorDelegationsRequest, + ): Promise; + + /** + * Calls ValidatorUnbondingDelegations. + * @param request QueryValidatorUnbondingDelegationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryValidatorUnbondingDelegationsResponse + */ + public validatorUnbondingDelegations( + request: cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsRequest, + callback: cosmos.staking.v1beta1.Query.ValidatorUnbondingDelegationsCallback, + ): void; + + /** + * Calls ValidatorUnbondingDelegations. + * @param request QueryValidatorUnbondingDelegationsRequest message or plain object + * @returns Promise + */ + public validatorUnbondingDelegations( + request: cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsRequest, + ): Promise; + + /** + * Calls Delegation. + * @param request QueryDelegationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryDelegationResponse + */ + public delegation( + request: cosmos.staking.v1beta1.IQueryDelegationRequest, + callback: cosmos.staking.v1beta1.Query.DelegationCallback, + ): void; + + /** + * Calls Delegation. + * @param request QueryDelegationRequest message or plain object + * @returns Promise + */ + public delegation( + request: cosmos.staking.v1beta1.IQueryDelegationRequest, + ): Promise; + + /** + * Calls UnbondingDelegation. + * @param request QueryUnbondingDelegationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryUnbondingDelegationResponse + */ + public unbondingDelegation( + request: cosmos.staking.v1beta1.IQueryUnbondingDelegationRequest, + callback: cosmos.staking.v1beta1.Query.UnbondingDelegationCallback, + ): void; + + /** + * Calls UnbondingDelegation. + * @param request QueryUnbondingDelegationRequest message or plain object + * @returns Promise + */ + public unbondingDelegation( + request: cosmos.staking.v1beta1.IQueryUnbondingDelegationRequest, + ): Promise; + + /** + * Calls DelegatorDelegations. + * @param request QueryDelegatorDelegationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryDelegatorDelegationsResponse + */ + public delegatorDelegations( + request: cosmos.staking.v1beta1.IQueryDelegatorDelegationsRequest, + callback: cosmos.staking.v1beta1.Query.DelegatorDelegationsCallback, + ): void; + + /** + * Calls DelegatorDelegations. + * @param request QueryDelegatorDelegationsRequest message or plain object + * @returns Promise + */ + public delegatorDelegations( + request: cosmos.staking.v1beta1.IQueryDelegatorDelegationsRequest, + ): Promise; + + /** + * Calls DelegatorUnbondingDelegations. + * @param request QueryDelegatorUnbondingDelegationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryDelegatorUnbondingDelegationsResponse + */ + public delegatorUnbondingDelegations( + request: cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsRequest, + callback: cosmos.staking.v1beta1.Query.DelegatorUnbondingDelegationsCallback, + ): void; + + /** + * Calls DelegatorUnbondingDelegations. + * @param request QueryDelegatorUnbondingDelegationsRequest message or plain object + * @returns Promise + */ + public delegatorUnbondingDelegations( + request: cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsRequest, + ): Promise; + + /** + * Calls Redelegations. + * @param request QueryRedelegationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryRedelegationsResponse + */ + public redelegations( + request: cosmos.staking.v1beta1.IQueryRedelegationsRequest, + callback: cosmos.staking.v1beta1.Query.RedelegationsCallback, + ): void; + + /** + * Calls Redelegations. + * @param request QueryRedelegationsRequest message or plain object + * @returns Promise + */ + public redelegations( + request: cosmos.staking.v1beta1.IQueryRedelegationsRequest, + ): Promise; + + /** + * Calls DelegatorValidators. + * @param request QueryDelegatorValidatorsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryDelegatorValidatorsResponse + */ + public delegatorValidators( + request: cosmos.staking.v1beta1.IQueryDelegatorValidatorsRequest, + callback: cosmos.staking.v1beta1.Query.DelegatorValidatorsCallback, + ): void; + + /** + * Calls DelegatorValidators. + * @param request QueryDelegatorValidatorsRequest message or plain object + * @returns Promise + */ + public delegatorValidators( + request: cosmos.staking.v1beta1.IQueryDelegatorValidatorsRequest, + ): Promise; + + /** + * Calls DelegatorValidator. + * @param request QueryDelegatorValidatorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryDelegatorValidatorResponse + */ + public delegatorValidator( + request: cosmos.staking.v1beta1.IQueryDelegatorValidatorRequest, + callback: cosmos.staking.v1beta1.Query.DelegatorValidatorCallback, + ): void; + + /** + * Calls DelegatorValidator. + * @param request QueryDelegatorValidatorRequest message or plain object + * @returns Promise + */ + public delegatorValidator( + request: cosmos.staking.v1beta1.IQueryDelegatorValidatorRequest, + ): Promise; + + /** + * Calls HistoricalInfo. + * @param request QueryHistoricalInfoRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryHistoricalInfoResponse + */ + public historicalInfo( + request: cosmos.staking.v1beta1.IQueryHistoricalInfoRequest, + callback: cosmos.staking.v1beta1.Query.HistoricalInfoCallback, + ): void; + + /** + * Calls HistoricalInfo. + * @param request QueryHistoricalInfoRequest message or plain object + * @returns Promise + */ + public historicalInfo( + request: cosmos.staking.v1beta1.IQueryHistoricalInfoRequest, + ): Promise; + + /** + * Calls Pool. + * @param request QueryPoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryPoolResponse + */ + public pool( + request: cosmos.staking.v1beta1.IQueryPoolRequest, + callback: cosmos.staking.v1beta1.Query.PoolCallback, + ): void; + + /** + * Calls Pool. + * @param request QueryPoolRequest message or plain object + * @returns Promise + */ + public pool( + request: cosmos.staking.v1beta1.IQueryPoolRequest, + ): Promise; + + /** + * Calls Params. + * @param request QueryParamsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryParamsResponse + */ + public params( + request: cosmos.staking.v1beta1.IQueryParamsRequest, + callback: cosmos.staking.v1beta1.Query.ParamsCallback, + ): void; + + /** + * Calls Params. + * @param request QueryParamsRequest message or plain object + * @returns Promise + */ + public params( + request: cosmos.staking.v1beta1.IQueryParamsRequest, + ): Promise; + } + + namespace Query { + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#validators}. + * @param error Error, if any + * @param [response] QueryValidatorsResponse + */ + type ValidatorsCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryValidatorsResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#validator}. + * @param error Error, if any + * @param [response] QueryValidatorResponse + */ + type ValidatorCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryValidatorResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#validatorDelegations}. + * @param error Error, if any + * @param [response] QueryValidatorDelegationsResponse + */ + type ValidatorDelegationsCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryValidatorDelegationsResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#validatorUnbondingDelegations}. + * @param error Error, if any + * @param [response] QueryValidatorUnbondingDelegationsResponse + */ + type ValidatorUnbondingDelegationsCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#delegation}. + * @param error Error, if any + * @param [response] QueryDelegationResponse + */ + type DelegationCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryDelegationResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#unbondingDelegation}. + * @param error Error, if any + * @param [response] QueryUnbondingDelegationResponse + */ + type UnbondingDelegationCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryUnbondingDelegationResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#delegatorDelegations}. + * @param error Error, if any + * @param [response] QueryDelegatorDelegationsResponse + */ + type DelegatorDelegationsCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#delegatorUnbondingDelegations}. + * @param error Error, if any + * @param [response] QueryDelegatorUnbondingDelegationsResponse + */ + type DelegatorUnbondingDelegationsCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#redelegations}. + * @param error Error, if any + * @param [response] QueryRedelegationsResponse + */ + type RedelegationsCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryRedelegationsResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#delegatorValidators}. + * @param error Error, if any + * @param [response] QueryDelegatorValidatorsResponse + */ + type DelegatorValidatorsCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#delegatorValidator}. + * @param error Error, if any + * @param [response] QueryDelegatorValidatorResponse + */ + type DelegatorValidatorCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryDelegatorValidatorResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#historicalInfo}. + * @param error Error, if any + * @param [response] QueryHistoricalInfoResponse + */ + type HistoricalInfoCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryHistoricalInfoResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#pool}. + * @param error Error, if any + * @param [response] QueryPoolResponse + */ + type PoolCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryPoolResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#params}. + * @param error Error, if any + * @param [response] QueryParamsResponse + */ + type ParamsCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryParamsResponse, + ) => void; + } + + /** Properties of a QueryValidatorsRequest. */ + interface IQueryValidatorsRequest { + /** QueryValidatorsRequest status */ + status?: string | null; + + /** QueryValidatorsRequest pagination */ + pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + } + + /** Represents a QueryValidatorsRequest. */ + class QueryValidatorsRequest implements IQueryValidatorsRequest { + /** + * Constructs a new QueryValidatorsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryValidatorsRequest); + + /** QueryValidatorsRequest status. */ + public status: string; + + /** QueryValidatorsRequest pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + + /** + * Creates a new QueryValidatorsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorsRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryValidatorsRequest, + ): cosmos.staking.v1beta1.QueryValidatorsRequest; + + /** + * Encodes the specified QueryValidatorsRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorsRequest.verify|verify} messages. + * @param m QueryValidatorsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryValidatorsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryValidatorsRequest; + } + + /** Properties of a QueryValidatorsResponse. */ + interface IQueryValidatorsResponse { + /** QueryValidatorsResponse validators */ + validators?: cosmos.staking.v1beta1.IValidator[] | null; + + /** QueryValidatorsResponse pagination */ + pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + } + + /** Represents a QueryValidatorsResponse. */ + class QueryValidatorsResponse implements IQueryValidatorsResponse { + /** + * Constructs a new QueryValidatorsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryValidatorsResponse); + + /** QueryValidatorsResponse validators. */ + public validators: cosmos.staking.v1beta1.IValidator[]; + + /** QueryValidatorsResponse pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + + /** + * Creates a new QueryValidatorsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorsResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryValidatorsResponse, + ): cosmos.staking.v1beta1.QueryValidatorsResponse; + + /** + * Encodes the specified QueryValidatorsResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorsResponse.verify|verify} messages. + * @param m QueryValidatorsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryValidatorsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryValidatorsResponse; + } + + /** Properties of a QueryValidatorRequest. */ + interface IQueryValidatorRequest { + /** QueryValidatorRequest validatorAddr */ + validatorAddr?: string | null; + } + + /** Represents a QueryValidatorRequest. */ + class QueryValidatorRequest implements IQueryValidatorRequest { + /** + * Constructs a new QueryValidatorRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryValidatorRequest); + + /** QueryValidatorRequest validatorAddr. */ + public validatorAddr: string; + + /** + * Creates a new QueryValidatorRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryValidatorRequest, + ): cosmos.staking.v1beta1.QueryValidatorRequest; + + /** + * Encodes the specified QueryValidatorRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorRequest.verify|verify} messages. + * @param m QueryValidatorRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryValidatorRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryValidatorRequest; + } + + /** Properties of a QueryValidatorResponse. */ + interface IQueryValidatorResponse { + /** QueryValidatorResponse validator */ + validator?: cosmos.staking.v1beta1.IValidator | null; + } + + /** Represents a QueryValidatorResponse. */ + class QueryValidatorResponse implements IQueryValidatorResponse { + /** + * Constructs a new QueryValidatorResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryValidatorResponse); + + /** QueryValidatorResponse validator. */ + public validator?: cosmos.staking.v1beta1.IValidator | null; + + /** + * Creates a new QueryValidatorResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryValidatorResponse, + ): cosmos.staking.v1beta1.QueryValidatorResponse; + + /** + * Encodes the specified QueryValidatorResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorResponse.verify|verify} messages. + * @param m QueryValidatorResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryValidatorResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryValidatorResponse; + } + + /** Properties of a QueryValidatorDelegationsRequest. */ + interface IQueryValidatorDelegationsRequest { + /** QueryValidatorDelegationsRequest validatorAddr */ + validatorAddr?: string | null; + + /** QueryValidatorDelegationsRequest pagination */ + pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + } + + /** Represents a QueryValidatorDelegationsRequest. */ + class QueryValidatorDelegationsRequest implements IQueryValidatorDelegationsRequest { + /** + * Constructs a new QueryValidatorDelegationsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryValidatorDelegationsRequest); + + /** QueryValidatorDelegationsRequest validatorAddr. */ + public validatorAddr: string; + + /** QueryValidatorDelegationsRequest pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + + /** + * Creates a new QueryValidatorDelegationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorDelegationsRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryValidatorDelegationsRequest, + ): cosmos.staking.v1beta1.QueryValidatorDelegationsRequest; + + /** + * Encodes the specified QueryValidatorDelegationsRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.verify|verify} messages. + * @param m QueryValidatorDelegationsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryValidatorDelegationsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorDelegationsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorDelegationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryValidatorDelegationsRequest; + } + + /** Properties of a QueryValidatorDelegationsResponse. */ + interface IQueryValidatorDelegationsResponse { + /** QueryValidatorDelegationsResponse delegationResponses */ + delegationResponses?: cosmos.staking.v1beta1.IDelegationResponse[] | null; + + /** QueryValidatorDelegationsResponse pagination */ + pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + } + + /** Represents a QueryValidatorDelegationsResponse. */ + class QueryValidatorDelegationsResponse implements IQueryValidatorDelegationsResponse { + /** + * Constructs a new QueryValidatorDelegationsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryValidatorDelegationsResponse); + + /** QueryValidatorDelegationsResponse delegationResponses. */ + public delegationResponses: cosmos.staking.v1beta1.IDelegationResponse[]; + + /** QueryValidatorDelegationsResponse pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + + /** + * Creates a new QueryValidatorDelegationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorDelegationsResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryValidatorDelegationsResponse, + ): cosmos.staking.v1beta1.QueryValidatorDelegationsResponse; + + /** + * Encodes the specified QueryValidatorDelegationsResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.verify|verify} messages. + * @param m QueryValidatorDelegationsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryValidatorDelegationsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorDelegationsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorDelegationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryValidatorDelegationsResponse; + } + + /** Properties of a QueryValidatorUnbondingDelegationsRequest. */ + interface IQueryValidatorUnbondingDelegationsRequest { + /** QueryValidatorUnbondingDelegationsRequest validatorAddr */ + validatorAddr?: string | null; + + /** QueryValidatorUnbondingDelegationsRequest pagination */ + pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + } + + /** Represents a QueryValidatorUnbondingDelegationsRequest. */ + class QueryValidatorUnbondingDelegationsRequest implements IQueryValidatorUnbondingDelegationsRequest { + /** + * Constructs a new QueryValidatorUnbondingDelegationsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsRequest); + + /** QueryValidatorUnbondingDelegationsRequest validatorAddr. */ + public validatorAddr: string; + + /** QueryValidatorUnbondingDelegationsRequest pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + + /** + * Creates a new QueryValidatorUnbondingDelegationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorUnbondingDelegationsRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsRequest, + ): cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest; + + /** + * Encodes the specified QueryValidatorUnbondingDelegationsRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.verify|verify} messages. + * @param m QueryValidatorUnbondingDelegationsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorUnbondingDelegationsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorUnbondingDelegationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest; + } + + /** Properties of a QueryValidatorUnbondingDelegationsResponse. */ + interface IQueryValidatorUnbondingDelegationsResponse { + /** QueryValidatorUnbondingDelegationsResponse unbondingResponses */ + unbondingResponses?: cosmos.staking.v1beta1.IUnbondingDelegation[] | null; + + /** QueryValidatorUnbondingDelegationsResponse pagination */ + pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + } + + /** Represents a QueryValidatorUnbondingDelegationsResponse. */ + class QueryValidatorUnbondingDelegationsResponse + implements IQueryValidatorUnbondingDelegationsResponse { + /** + * Constructs a new QueryValidatorUnbondingDelegationsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsResponse); + + /** QueryValidatorUnbondingDelegationsResponse unbondingResponses. */ + public unbondingResponses: cosmos.staking.v1beta1.IUnbondingDelegation[]; + + /** QueryValidatorUnbondingDelegationsResponse pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + + /** + * Creates a new QueryValidatorUnbondingDelegationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorUnbondingDelegationsResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsResponse, + ): cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse; + + /** + * Encodes the specified QueryValidatorUnbondingDelegationsResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.verify|verify} messages. + * @param m QueryValidatorUnbondingDelegationsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorUnbondingDelegationsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorUnbondingDelegationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse; + } + + /** Properties of a QueryDelegationRequest. */ + interface IQueryDelegationRequest { + /** QueryDelegationRequest delegatorAddr */ + delegatorAddr?: string | null; + + /** QueryDelegationRequest validatorAddr */ + validatorAddr?: string | null; + } + + /** Represents a QueryDelegationRequest. */ + class QueryDelegationRequest implements IQueryDelegationRequest { + /** + * Constructs a new QueryDelegationRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryDelegationRequest); + + /** QueryDelegationRequest delegatorAddr. */ + public delegatorAddr: string; + + /** QueryDelegationRequest validatorAddr. */ + public validatorAddr: string; + + /** + * Creates a new QueryDelegationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegationRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryDelegationRequest, + ): cosmos.staking.v1beta1.QueryDelegationRequest; + + /** + * Encodes the specified QueryDelegationRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegationRequest.verify|verify} messages. + * @param m QueryDelegationRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryDelegationRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegationRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryDelegationRequest; + } + + /** Properties of a QueryDelegationResponse. */ + interface IQueryDelegationResponse { + /** QueryDelegationResponse delegationResponse */ + delegationResponse?: cosmos.staking.v1beta1.IDelegationResponse | null; + } + + /** Represents a QueryDelegationResponse. */ + class QueryDelegationResponse implements IQueryDelegationResponse { + /** + * Constructs a new QueryDelegationResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryDelegationResponse); + + /** QueryDelegationResponse delegationResponse. */ + public delegationResponse?: cosmos.staking.v1beta1.IDelegationResponse | null; + + /** + * Creates a new QueryDelegationResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegationResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryDelegationResponse, + ): cosmos.staking.v1beta1.QueryDelegationResponse; + + /** + * Encodes the specified QueryDelegationResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegationResponse.verify|verify} messages. + * @param m QueryDelegationResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryDelegationResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegationResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryDelegationResponse; + } + + /** Properties of a QueryUnbondingDelegationRequest. */ + interface IQueryUnbondingDelegationRequest { + /** QueryUnbondingDelegationRequest delegatorAddr */ + delegatorAddr?: string | null; + + /** QueryUnbondingDelegationRequest validatorAddr */ + validatorAddr?: string | null; + } + + /** Represents a QueryUnbondingDelegationRequest. */ + class QueryUnbondingDelegationRequest implements IQueryUnbondingDelegationRequest { + /** + * Constructs a new QueryUnbondingDelegationRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryUnbondingDelegationRequest); + + /** QueryUnbondingDelegationRequest delegatorAddr. */ + public delegatorAddr: string; + + /** QueryUnbondingDelegationRequest validatorAddr. */ + public validatorAddr: string; + + /** + * Creates a new QueryUnbondingDelegationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryUnbondingDelegationRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryUnbondingDelegationRequest, + ): cosmos.staking.v1beta1.QueryUnbondingDelegationRequest; + + /** + * Encodes the specified QueryUnbondingDelegationRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.verify|verify} messages. + * @param m QueryUnbondingDelegationRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryUnbondingDelegationRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryUnbondingDelegationRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryUnbondingDelegationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryUnbondingDelegationRequest; + } + + /** Properties of a QueryUnbondingDelegationResponse. */ + interface IQueryUnbondingDelegationResponse { + /** QueryUnbondingDelegationResponse unbond */ + unbond?: cosmos.staking.v1beta1.IUnbondingDelegation | null; + } + + /** Represents a QueryUnbondingDelegationResponse. */ + class QueryUnbondingDelegationResponse implements IQueryUnbondingDelegationResponse { + /** + * Constructs a new QueryUnbondingDelegationResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryUnbondingDelegationResponse); + + /** QueryUnbondingDelegationResponse unbond. */ + public unbond?: cosmos.staking.v1beta1.IUnbondingDelegation | null; + + /** + * Creates a new QueryUnbondingDelegationResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryUnbondingDelegationResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryUnbondingDelegationResponse, + ): cosmos.staking.v1beta1.QueryUnbondingDelegationResponse; + + /** + * Encodes the specified QueryUnbondingDelegationResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.verify|verify} messages. + * @param m QueryUnbondingDelegationResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryUnbondingDelegationResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryUnbondingDelegationResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryUnbondingDelegationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryUnbondingDelegationResponse; + } + + /** Properties of a QueryDelegatorDelegationsRequest. */ + interface IQueryDelegatorDelegationsRequest { + /** QueryDelegatorDelegationsRequest delegatorAddr */ + delegatorAddr?: string | null; + + /** QueryDelegatorDelegationsRequest pagination */ + pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + } + + /** Represents a QueryDelegatorDelegationsRequest. */ + class QueryDelegatorDelegationsRequest implements IQueryDelegatorDelegationsRequest { + /** + * Constructs a new QueryDelegatorDelegationsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryDelegatorDelegationsRequest); + + /** QueryDelegatorDelegationsRequest delegatorAddr. */ + public delegatorAddr: string; + + /** QueryDelegatorDelegationsRequest pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + + /** + * Creates a new QueryDelegatorDelegationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegatorDelegationsRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryDelegatorDelegationsRequest, + ): cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest; + + /** + * Encodes the specified QueryDelegatorDelegationsRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.verify|verify} messages. + * @param m QueryDelegatorDelegationsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryDelegatorDelegationsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegatorDelegationsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegatorDelegationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest; + } + + /** Properties of a QueryDelegatorDelegationsResponse. */ + interface IQueryDelegatorDelegationsResponse { + /** QueryDelegatorDelegationsResponse delegationResponses */ + delegationResponses?: cosmos.staking.v1beta1.IDelegationResponse[] | null; + + /** QueryDelegatorDelegationsResponse pagination */ + pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + } + + /** Represents a QueryDelegatorDelegationsResponse. */ + class QueryDelegatorDelegationsResponse implements IQueryDelegatorDelegationsResponse { + /** + * Constructs a new QueryDelegatorDelegationsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryDelegatorDelegationsResponse); + + /** QueryDelegatorDelegationsResponse delegationResponses. */ + public delegationResponses: cosmos.staking.v1beta1.IDelegationResponse[]; + + /** QueryDelegatorDelegationsResponse pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + + /** + * Creates a new QueryDelegatorDelegationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegatorDelegationsResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryDelegatorDelegationsResponse, + ): cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse; + + /** + * Encodes the specified QueryDelegatorDelegationsResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.verify|verify} messages. + * @param m QueryDelegatorDelegationsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryDelegatorDelegationsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegatorDelegationsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegatorDelegationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse; + } + + /** Properties of a QueryDelegatorUnbondingDelegationsRequest. */ + interface IQueryDelegatorUnbondingDelegationsRequest { + /** QueryDelegatorUnbondingDelegationsRequest delegatorAddr */ + delegatorAddr?: string | null; + + /** QueryDelegatorUnbondingDelegationsRequest pagination */ + pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + } + + /** Represents a QueryDelegatorUnbondingDelegationsRequest. */ + class QueryDelegatorUnbondingDelegationsRequest implements IQueryDelegatorUnbondingDelegationsRequest { + /** + * Constructs a new QueryDelegatorUnbondingDelegationsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsRequest); + + /** QueryDelegatorUnbondingDelegationsRequest delegatorAddr. */ + public delegatorAddr: string; + + /** QueryDelegatorUnbondingDelegationsRequest pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + + /** + * Creates a new QueryDelegatorUnbondingDelegationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegatorUnbondingDelegationsRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsRequest, + ): cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest; + + /** + * Encodes the specified QueryDelegatorUnbondingDelegationsRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.verify|verify} messages. + * @param m QueryDelegatorUnbondingDelegationsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegatorUnbondingDelegationsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegatorUnbondingDelegationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest; + } + + /** Properties of a QueryDelegatorUnbondingDelegationsResponse. */ + interface IQueryDelegatorUnbondingDelegationsResponse { + /** QueryDelegatorUnbondingDelegationsResponse unbondingResponses */ + unbondingResponses?: cosmos.staking.v1beta1.IUnbondingDelegation[] | null; + + /** QueryDelegatorUnbondingDelegationsResponse pagination */ + pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + } + + /** Represents a QueryDelegatorUnbondingDelegationsResponse. */ + class QueryDelegatorUnbondingDelegationsResponse + implements IQueryDelegatorUnbondingDelegationsResponse { + /** + * Constructs a new QueryDelegatorUnbondingDelegationsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsResponse); + + /** QueryDelegatorUnbondingDelegationsResponse unbondingResponses. */ + public unbondingResponses: cosmos.staking.v1beta1.IUnbondingDelegation[]; + + /** QueryDelegatorUnbondingDelegationsResponse pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + + /** + * Creates a new QueryDelegatorUnbondingDelegationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegatorUnbondingDelegationsResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsResponse, + ): cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse; + + /** + * Encodes the specified QueryDelegatorUnbondingDelegationsResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.verify|verify} messages. + * @param m QueryDelegatorUnbondingDelegationsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegatorUnbondingDelegationsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegatorUnbondingDelegationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse; + } + + /** Properties of a QueryRedelegationsRequest. */ + interface IQueryRedelegationsRequest { + /** QueryRedelegationsRequest delegatorAddr */ + delegatorAddr?: string | null; + + /** QueryRedelegationsRequest srcValidatorAddr */ + srcValidatorAddr?: string | null; + + /** QueryRedelegationsRequest dstValidatorAddr */ + dstValidatorAddr?: string | null; + + /** QueryRedelegationsRequest pagination */ + pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + } + + /** Represents a QueryRedelegationsRequest. */ + class QueryRedelegationsRequest implements IQueryRedelegationsRequest { + /** + * Constructs a new QueryRedelegationsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryRedelegationsRequest); + + /** QueryRedelegationsRequest delegatorAddr. */ + public delegatorAddr: string; + + /** QueryRedelegationsRequest srcValidatorAddr. */ + public srcValidatorAddr: string; + + /** QueryRedelegationsRequest dstValidatorAddr. */ + public dstValidatorAddr: string; + + /** QueryRedelegationsRequest pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + + /** + * Creates a new QueryRedelegationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryRedelegationsRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryRedelegationsRequest, + ): cosmos.staking.v1beta1.QueryRedelegationsRequest; + + /** + * Encodes the specified QueryRedelegationsRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryRedelegationsRequest.verify|verify} messages. + * @param m QueryRedelegationsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryRedelegationsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryRedelegationsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryRedelegationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryRedelegationsRequest; + } + + /** Properties of a QueryRedelegationsResponse. */ + interface IQueryRedelegationsResponse { + /** QueryRedelegationsResponse redelegationResponses */ + redelegationResponses?: cosmos.staking.v1beta1.IRedelegationResponse[] | null; + + /** QueryRedelegationsResponse pagination */ + pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + } + + /** Represents a QueryRedelegationsResponse. */ + class QueryRedelegationsResponse implements IQueryRedelegationsResponse { + /** + * Constructs a new QueryRedelegationsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryRedelegationsResponse); + + /** QueryRedelegationsResponse redelegationResponses. */ + public redelegationResponses: cosmos.staking.v1beta1.IRedelegationResponse[]; + + /** QueryRedelegationsResponse pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + + /** + * Creates a new QueryRedelegationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryRedelegationsResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryRedelegationsResponse, + ): cosmos.staking.v1beta1.QueryRedelegationsResponse; + + /** + * Encodes the specified QueryRedelegationsResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryRedelegationsResponse.verify|verify} messages. + * @param m QueryRedelegationsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryRedelegationsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryRedelegationsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryRedelegationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryRedelegationsResponse; + } + + /** Properties of a QueryDelegatorValidatorsRequest. */ + interface IQueryDelegatorValidatorsRequest { + /** QueryDelegatorValidatorsRequest delegatorAddr */ + delegatorAddr?: string | null; + + /** QueryDelegatorValidatorsRequest pagination */ + pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + } + + /** Represents a QueryDelegatorValidatorsRequest. */ + class QueryDelegatorValidatorsRequest implements IQueryDelegatorValidatorsRequest { + /** + * Constructs a new QueryDelegatorValidatorsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryDelegatorValidatorsRequest); + + /** QueryDelegatorValidatorsRequest delegatorAddr. */ + public delegatorAddr: string; + + /** QueryDelegatorValidatorsRequest pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + + /** + * Creates a new QueryDelegatorValidatorsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegatorValidatorsRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryDelegatorValidatorsRequest, + ): cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest; + + /** + * Encodes the specified QueryDelegatorValidatorsRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.verify|verify} messages. + * @param m QueryDelegatorValidatorsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryDelegatorValidatorsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegatorValidatorsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegatorValidatorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest; + } + + /** Properties of a QueryDelegatorValidatorsResponse. */ + interface IQueryDelegatorValidatorsResponse { + /** QueryDelegatorValidatorsResponse validators */ + validators?: cosmos.staking.v1beta1.IValidator[] | null; + + /** QueryDelegatorValidatorsResponse pagination */ + pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + } + + /** Represents a QueryDelegatorValidatorsResponse. */ + class QueryDelegatorValidatorsResponse implements IQueryDelegatorValidatorsResponse { + /** + * Constructs a new QueryDelegatorValidatorsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryDelegatorValidatorsResponse); + + /** QueryDelegatorValidatorsResponse validators. */ + public validators: cosmos.staking.v1beta1.IValidator[]; + + /** QueryDelegatorValidatorsResponse pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + + /** + * Creates a new QueryDelegatorValidatorsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegatorValidatorsResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryDelegatorValidatorsResponse, + ): cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse; + + /** + * Encodes the specified QueryDelegatorValidatorsResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.verify|verify} messages. + * @param m QueryDelegatorValidatorsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryDelegatorValidatorsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegatorValidatorsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegatorValidatorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse; + } + + /** Properties of a QueryDelegatorValidatorRequest. */ + interface IQueryDelegatorValidatorRequest { + /** QueryDelegatorValidatorRequest delegatorAddr */ + delegatorAddr?: string | null; + + /** QueryDelegatorValidatorRequest validatorAddr */ + validatorAddr?: string | null; + } + + /** Represents a QueryDelegatorValidatorRequest. */ + class QueryDelegatorValidatorRequest implements IQueryDelegatorValidatorRequest { + /** + * Constructs a new QueryDelegatorValidatorRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryDelegatorValidatorRequest); + + /** QueryDelegatorValidatorRequest delegatorAddr. */ + public delegatorAddr: string; + + /** QueryDelegatorValidatorRequest validatorAddr. */ + public validatorAddr: string; + + /** + * Creates a new QueryDelegatorValidatorRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegatorValidatorRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryDelegatorValidatorRequest, + ): cosmos.staking.v1beta1.QueryDelegatorValidatorRequest; + + /** + * Encodes the specified QueryDelegatorValidatorRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.verify|verify} messages. + * @param m QueryDelegatorValidatorRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryDelegatorValidatorRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegatorValidatorRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegatorValidatorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryDelegatorValidatorRequest; + } + + /** Properties of a QueryDelegatorValidatorResponse. */ + interface IQueryDelegatorValidatorResponse { + /** QueryDelegatorValidatorResponse validator */ + validator?: cosmos.staking.v1beta1.IValidator | null; + } + + /** Represents a QueryDelegatorValidatorResponse. */ + class QueryDelegatorValidatorResponse implements IQueryDelegatorValidatorResponse { + /** + * Constructs a new QueryDelegatorValidatorResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryDelegatorValidatorResponse); + + /** QueryDelegatorValidatorResponse validator. */ + public validator?: cosmos.staking.v1beta1.IValidator | null; + + /** + * Creates a new QueryDelegatorValidatorResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegatorValidatorResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryDelegatorValidatorResponse, + ): cosmos.staking.v1beta1.QueryDelegatorValidatorResponse; + + /** + * Encodes the specified QueryDelegatorValidatorResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.verify|verify} messages. + * @param m QueryDelegatorValidatorResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryDelegatorValidatorResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegatorValidatorResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegatorValidatorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryDelegatorValidatorResponse; + } + + /** Properties of a QueryHistoricalInfoRequest. */ + interface IQueryHistoricalInfoRequest { + /** QueryHistoricalInfoRequest height */ + height?: Long | null; + } + + /** Represents a QueryHistoricalInfoRequest. */ + class QueryHistoricalInfoRequest implements IQueryHistoricalInfoRequest { + /** + * Constructs a new QueryHistoricalInfoRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryHistoricalInfoRequest); + + /** QueryHistoricalInfoRequest height. */ + public height: Long; + + /** + * Creates a new QueryHistoricalInfoRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryHistoricalInfoRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryHistoricalInfoRequest, + ): cosmos.staking.v1beta1.QueryHistoricalInfoRequest; + + /** + * Encodes the specified QueryHistoricalInfoRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryHistoricalInfoRequest.verify|verify} messages. + * @param m QueryHistoricalInfoRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryHistoricalInfoRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryHistoricalInfoRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryHistoricalInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryHistoricalInfoRequest; + } + + /** Properties of a QueryHistoricalInfoResponse. */ + interface IQueryHistoricalInfoResponse { + /** QueryHistoricalInfoResponse hist */ + hist?: cosmos.staking.v1beta1.IHistoricalInfo | null; + } + + /** Represents a QueryHistoricalInfoResponse. */ + class QueryHistoricalInfoResponse implements IQueryHistoricalInfoResponse { + /** + * Constructs a new QueryHistoricalInfoResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryHistoricalInfoResponse); + + /** QueryHistoricalInfoResponse hist. */ + public hist?: cosmos.staking.v1beta1.IHistoricalInfo | null; + + /** + * Creates a new QueryHistoricalInfoResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryHistoricalInfoResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryHistoricalInfoResponse, + ): cosmos.staking.v1beta1.QueryHistoricalInfoResponse; + + /** + * Encodes the specified QueryHistoricalInfoResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryHistoricalInfoResponse.verify|verify} messages. + * @param m QueryHistoricalInfoResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryHistoricalInfoResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryHistoricalInfoResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryHistoricalInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryHistoricalInfoResponse; + } + + /** Properties of a QueryPoolRequest. */ + interface IQueryPoolRequest {} + + /** Represents a QueryPoolRequest. */ + class QueryPoolRequest implements IQueryPoolRequest { + /** + * Constructs a new QueryPoolRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryPoolRequest); + + /** + * Creates a new QueryPoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryPoolRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryPoolRequest, + ): cosmos.staking.v1beta1.QueryPoolRequest; + + /** + * Encodes the specified QueryPoolRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryPoolRequest.verify|verify} messages. + * @param m QueryPoolRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryPoolRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryPoolRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryPoolRequest; + } + + /** Properties of a QueryPoolResponse. */ + interface IQueryPoolResponse { + /** QueryPoolResponse pool */ + pool?: cosmos.staking.v1beta1.IPool | null; + } + + /** Represents a QueryPoolResponse. */ + class QueryPoolResponse implements IQueryPoolResponse { + /** + * Constructs a new QueryPoolResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryPoolResponse); + + /** QueryPoolResponse pool. */ + public pool?: cosmos.staking.v1beta1.IPool | null; + + /** + * Creates a new QueryPoolResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryPoolResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryPoolResponse, + ): cosmos.staking.v1beta1.QueryPoolResponse; + + /** + * Encodes the specified QueryPoolResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryPoolResponse.verify|verify} messages. + * @param m QueryPoolResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryPoolResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryPoolResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryPoolResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryPoolResponse; + } + + /** Properties of a QueryParamsRequest. */ + interface IQueryParamsRequest {} + + /** Represents a QueryParamsRequest. */ + class QueryParamsRequest implements IQueryParamsRequest { + /** + * Constructs a new QueryParamsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryParamsRequest); + + /** + * Creates a new QueryParamsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryParamsRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryParamsRequest, + ): cosmos.staking.v1beta1.QueryParamsRequest; + + /** + * Encodes the specified QueryParamsRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryParamsRequest.verify|verify} messages. + * @param m QueryParamsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryParamsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryParamsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryParamsRequest; + } + + /** Properties of a QueryParamsResponse. */ + interface IQueryParamsResponse { + /** QueryParamsResponse params */ + params?: cosmos.staking.v1beta1.IParams | null; + } + + /** Represents a QueryParamsResponse. */ + class QueryParamsResponse implements IQueryParamsResponse { + /** + * Constructs a new QueryParamsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryParamsResponse); + + /** QueryParamsResponse params. */ + public params?: cosmos.staking.v1beta1.IParams | null; + + /** + * Creates a new QueryParamsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryParamsResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryParamsResponse, + ): cosmos.staking.v1beta1.QueryParamsResponse; + + /** + * Encodes the specified QueryParamsResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryParamsResponse.verify|verify} messages. + * @param m QueryParamsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryParamsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryParamsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryParamsResponse; + } + /** Properties of a HistoricalInfo. */ interface IHistoricalInfo { /** HistoricalInfo header */ diff --git a/packages/stargate/src/codec/generated/codecimpl.js b/packages/stargate/src/codec/generated/codecimpl.js index 44242999..256d09e5 100644 --- a/packages/stargate/src/codec/generated/codecimpl.js +++ b/packages/stargate/src/codec/generated/codecimpl.js @@ -2227,10 +2227,3077 @@ exports.cosmos = $root.cosmos = (() => { })(); return crypto; })(); + cosmos.distribution = (function () { + const distribution = {}; + distribution.v1beta1 = (function () { + const v1beta1 = {}; + v1beta1.Params = (function () { + function Params(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + Params.prototype.communityTax = ""; + Params.prototype.baseProposerReward = ""; + Params.prototype.bonusProposerReward = ""; + Params.prototype.withdrawAddrEnabled = false; + Params.create = function create(properties) { + return new Params(properties); + }; + Params.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.communityTax != null && Object.hasOwnProperty.call(m, "communityTax")) + w.uint32(10).string(m.communityTax); + if (m.baseProposerReward != null && Object.hasOwnProperty.call(m, "baseProposerReward")) + w.uint32(18).string(m.baseProposerReward); + if (m.bonusProposerReward != null && Object.hasOwnProperty.call(m, "bonusProposerReward")) + w.uint32(26).string(m.bonusProposerReward); + if (m.withdrawAddrEnabled != null && Object.hasOwnProperty.call(m, "withdrawAddrEnabled")) + w.uint32(32).bool(m.withdrawAddrEnabled); + return w; + }; + Params.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.Params(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.communityTax = r.string(); + break; + case 2: + m.baseProposerReward = r.string(); + break; + case 3: + m.bonusProposerReward = r.string(); + break; + case 4: + m.withdrawAddrEnabled = r.bool(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return Params; + })(); + v1beta1.ValidatorHistoricalRewards = (function () { + function ValidatorHistoricalRewards(p) { + this.cumulativeRewardRatio = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + ValidatorHistoricalRewards.prototype.cumulativeRewardRatio = $util.emptyArray; + ValidatorHistoricalRewards.prototype.referenceCount = 0; + ValidatorHistoricalRewards.create = function create(properties) { + return new ValidatorHistoricalRewards(properties); + }; + ValidatorHistoricalRewards.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.cumulativeRewardRatio != null && m.cumulativeRewardRatio.length) { + for (var i = 0; i < m.cumulativeRewardRatio.length; ++i) + $root.cosmos.base.v1beta1.DecCoin.encode( + m.cumulativeRewardRatio[i], + w.uint32(10).fork(), + ).ldelim(); + } + if (m.referenceCount != null && Object.hasOwnProperty.call(m, "referenceCount")) + w.uint32(16).uint32(m.referenceCount); + return w; + }; + ValidatorHistoricalRewards.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.ValidatorHistoricalRewards(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.cumulativeRewardRatio && m.cumulativeRewardRatio.length)) + m.cumulativeRewardRatio = []; + m.cumulativeRewardRatio.push($root.cosmos.base.v1beta1.DecCoin.decode(r, r.uint32())); + break; + case 2: + m.referenceCount = r.uint32(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return ValidatorHistoricalRewards; + })(); + v1beta1.ValidatorCurrentRewards = (function () { + function ValidatorCurrentRewards(p) { + this.rewards = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + ValidatorCurrentRewards.prototype.rewards = $util.emptyArray; + ValidatorCurrentRewards.prototype.period = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; + ValidatorCurrentRewards.create = function create(properties) { + return new ValidatorCurrentRewards(properties); + }; + ValidatorCurrentRewards.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.rewards != null && m.rewards.length) { + for (var i = 0; i < m.rewards.length; ++i) + $root.cosmos.base.v1beta1.DecCoin.encode(m.rewards[i], w.uint32(10).fork()).ldelim(); + } + if (m.period != null && Object.hasOwnProperty.call(m, "period")) w.uint32(16).uint64(m.period); + return w; + }; + ValidatorCurrentRewards.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.ValidatorCurrentRewards(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.rewards && m.rewards.length)) m.rewards = []; + m.rewards.push($root.cosmos.base.v1beta1.DecCoin.decode(r, r.uint32())); + break; + case 2: + m.period = r.uint64(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return ValidatorCurrentRewards; + })(); + v1beta1.ValidatorAccumulatedCommission = (function () { + function ValidatorAccumulatedCommission(p) { + this.commission = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + ValidatorAccumulatedCommission.prototype.commission = $util.emptyArray; + ValidatorAccumulatedCommission.create = function create(properties) { + return new ValidatorAccumulatedCommission(properties); + }; + ValidatorAccumulatedCommission.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.commission != null && m.commission.length) { + for (var i = 0; i < m.commission.length; ++i) + $root.cosmos.base.v1beta1.DecCoin.encode(m.commission[i], w.uint32(10).fork()).ldelim(); + } + return w; + }; + ValidatorAccumulatedCommission.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.commission && m.commission.length)) m.commission = []; + m.commission.push($root.cosmos.base.v1beta1.DecCoin.decode(r, r.uint32())); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return ValidatorAccumulatedCommission; + })(); + v1beta1.ValidatorOutstandingRewards = (function () { + function ValidatorOutstandingRewards(p) { + this.rewards = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + ValidatorOutstandingRewards.prototype.rewards = $util.emptyArray; + ValidatorOutstandingRewards.create = function create(properties) { + return new ValidatorOutstandingRewards(properties); + }; + ValidatorOutstandingRewards.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.rewards != null && m.rewards.length) { + for (var i = 0; i < m.rewards.length; ++i) + $root.cosmos.base.v1beta1.DecCoin.encode(m.rewards[i], w.uint32(10).fork()).ldelim(); + } + return w; + }; + ValidatorOutstandingRewards.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.ValidatorOutstandingRewards(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.rewards && m.rewards.length)) m.rewards = []; + m.rewards.push($root.cosmos.base.v1beta1.DecCoin.decode(r, r.uint32())); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return ValidatorOutstandingRewards; + })(); + v1beta1.ValidatorSlashEvent = (function () { + function ValidatorSlashEvent(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + ValidatorSlashEvent.prototype.validatorPeriod = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; + ValidatorSlashEvent.prototype.fraction = ""; + ValidatorSlashEvent.create = function create(properties) { + return new ValidatorSlashEvent(properties); + }; + ValidatorSlashEvent.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.validatorPeriod != null && Object.hasOwnProperty.call(m, "validatorPeriod")) + w.uint32(8).uint64(m.validatorPeriod); + if (m.fraction != null && Object.hasOwnProperty.call(m, "fraction")) + w.uint32(18).string(m.fraction); + return w; + }; + ValidatorSlashEvent.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.ValidatorSlashEvent(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.validatorPeriod = r.uint64(); + break; + case 2: + m.fraction = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return ValidatorSlashEvent; + })(); + v1beta1.ValidatorSlashEvents = (function () { + function ValidatorSlashEvents(p) { + this.validatorSlashEvents = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + ValidatorSlashEvents.prototype.validatorSlashEvents = $util.emptyArray; + ValidatorSlashEvents.create = function create(properties) { + return new ValidatorSlashEvents(properties); + }; + ValidatorSlashEvents.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.validatorSlashEvents != null && m.validatorSlashEvents.length) { + for (var i = 0; i < m.validatorSlashEvents.length; ++i) + $root.cosmos.distribution.v1beta1.ValidatorSlashEvent.encode( + m.validatorSlashEvents[i], + w.uint32(10).fork(), + ).ldelim(); + } + return w; + }; + ValidatorSlashEvents.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.ValidatorSlashEvents(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.validatorSlashEvents && m.validatorSlashEvents.length)) m.validatorSlashEvents = []; + m.validatorSlashEvents.push( + $root.cosmos.distribution.v1beta1.ValidatorSlashEvent.decode(r, r.uint32()), + ); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return ValidatorSlashEvents; + })(); + v1beta1.FeePool = (function () { + function FeePool(p) { + this.communityPool = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + FeePool.prototype.communityPool = $util.emptyArray; + FeePool.create = function create(properties) { + return new FeePool(properties); + }; + FeePool.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.communityPool != null && m.communityPool.length) { + for (var i = 0; i < m.communityPool.length; ++i) + $root.cosmos.base.v1beta1.DecCoin.encode(m.communityPool[i], w.uint32(10).fork()).ldelim(); + } + return w; + }; + FeePool.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.FeePool(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.communityPool && m.communityPool.length)) m.communityPool = []; + m.communityPool.push($root.cosmos.base.v1beta1.DecCoin.decode(r, r.uint32())); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return FeePool; + })(); + v1beta1.CommunityPoolSpendProposal = (function () { + function CommunityPoolSpendProposal(p) { + this.amount = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + CommunityPoolSpendProposal.prototype.title = ""; + CommunityPoolSpendProposal.prototype.description = ""; + CommunityPoolSpendProposal.prototype.recipient = ""; + CommunityPoolSpendProposal.prototype.amount = $util.emptyArray; + CommunityPoolSpendProposal.create = function create(properties) { + return new CommunityPoolSpendProposal(properties); + }; + CommunityPoolSpendProposal.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.title != null && Object.hasOwnProperty.call(m, "title")) w.uint32(10).string(m.title); + if (m.description != null && Object.hasOwnProperty.call(m, "description")) + w.uint32(18).string(m.description); + if (m.recipient != null && Object.hasOwnProperty.call(m, "recipient")) + w.uint32(26).string(m.recipient); + if (m.amount != null && m.amount.length) { + for (var i = 0; i < m.amount.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(m.amount[i], w.uint32(34).fork()).ldelim(); + } + return w; + }; + CommunityPoolSpendProposal.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.CommunityPoolSpendProposal(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.title = r.string(); + break; + case 2: + m.description = r.string(); + break; + case 3: + m.recipient = r.string(); + break; + case 4: + if (!(m.amount && m.amount.length)) m.amount = []; + m.amount.push($root.cosmos.base.v1beta1.Coin.decode(r, r.uint32())); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return CommunityPoolSpendProposal; + })(); + v1beta1.DelegatorStartingInfo = (function () { + function DelegatorStartingInfo(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + DelegatorStartingInfo.prototype.previousPeriod = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; + DelegatorStartingInfo.prototype.stake = ""; + DelegatorStartingInfo.prototype.height = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; + DelegatorStartingInfo.create = function create(properties) { + return new DelegatorStartingInfo(properties); + }; + DelegatorStartingInfo.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.previousPeriod != null && Object.hasOwnProperty.call(m, "previousPeriod")) + w.uint32(8).uint64(m.previousPeriod); + if (m.stake != null && Object.hasOwnProperty.call(m, "stake")) w.uint32(18).string(m.stake); + if (m.height != null && Object.hasOwnProperty.call(m, "height")) w.uint32(24).uint64(m.height); + return w; + }; + DelegatorStartingInfo.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.DelegatorStartingInfo(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.previousPeriod = r.uint64(); + break; + case 2: + m.stake = r.string(); + break; + case 3: + m.height = r.uint64(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return DelegatorStartingInfo; + })(); + v1beta1.DelegationDelegatorReward = (function () { + function DelegationDelegatorReward(p) { + this.reward = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + DelegationDelegatorReward.prototype.validatorAddress = ""; + DelegationDelegatorReward.prototype.reward = $util.emptyArray; + DelegationDelegatorReward.create = function create(properties) { + return new DelegationDelegatorReward(properties); + }; + DelegationDelegatorReward.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.validatorAddress != null && Object.hasOwnProperty.call(m, "validatorAddress")) + w.uint32(10).string(m.validatorAddress); + if (m.reward != null && m.reward.length) { + for (var i = 0; i < m.reward.length; ++i) + $root.cosmos.base.v1beta1.DecCoin.encode(m.reward[i], w.uint32(18).fork()).ldelim(); + } + return w; + }; + DelegationDelegatorReward.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.DelegationDelegatorReward(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.validatorAddress = r.string(); + break; + case 2: + if (!(m.reward && m.reward.length)) m.reward = []; + m.reward.push($root.cosmos.base.v1beta1.DecCoin.decode(r, r.uint32())); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return DelegationDelegatorReward; + })(); + v1beta1.CommunityPoolSpendProposalWithDeposit = (function () { + function CommunityPoolSpendProposalWithDeposit(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + CommunityPoolSpendProposalWithDeposit.prototype.title = ""; + CommunityPoolSpendProposalWithDeposit.prototype.description = ""; + CommunityPoolSpendProposalWithDeposit.prototype.recipient = ""; + CommunityPoolSpendProposalWithDeposit.prototype.amount = ""; + CommunityPoolSpendProposalWithDeposit.prototype.deposit = ""; + CommunityPoolSpendProposalWithDeposit.create = function create(properties) { + return new CommunityPoolSpendProposalWithDeposit(properties); + }; + CommunityPoolSpendProposalWithDeposit.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.title != null && Object.hasOwnProperty.call(m, "title")) w.uint32(10).string(m.title); + if (m.description != null && Object.hasOwnProperty.call(m, "description")) + w.uint32(18).string(m.description); + if (m.recipient != null && Object.hasOwnProperty.call(m, "recipient")) + w.uint32(26).string(m.recipient); + if (m.amount != null && Object.hasOwnProperty.call(m, "amount")) w.uint32(34).string(m.amount); + if (m.deposit != null && Object.hasOwnProperty.call(m, "deposit")) w.uint32(42).string(m.deposit); + return w; + }; + CommunityPoolSpendProposalWithDeposit.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.title = r.string(); + break; + case 2: + m.description = r.string(); + break; + case 3: + m.recipient = r.string(); + break; + case 4: + m.amount = r.string(); + break; + case 5: + m.deposit = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return CommunityPoolSpendProposalWithDeposit; + })(); + v1beta1.Query = (function () { + function Query(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + (Query.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Query; + Query.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + Object.defineProperty( + (Query.prototype.params = function params(request, callback) { + return this.rpcCall( + params, + $root.cosmos.distribution.v1beta1.QueryParamsRequest, + $root.cosmos.distribution.v1beta1.QueryParamsResponse, + request, + callback, + ); + }), + "name", + { value: "Params" }, + ); + Object.defineProperty( + (Query.prototype.validatorOutstandingRewards = function validatorOutstandingRewards( + request, + callback, + ) { + return this.rpcCall( + validatorOutstandingRewards, + $root.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest, + $root.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse, + request, + callback, + ); + }), + "name", + { value: "ValidatorOutstandingRewards" }, + ); + Object.defineProperty( + (Query.prototype.validatorCommission = function validatorCommission(request, callback) { + return this.rpcCall( + validatorCommission, + $root.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest, + $root.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse, + request, + callback, + ); + }), + "name", + { value: "ValidatorCommission" }, + ); + Object.defineProperty( + (Query.prototype.validatorSlashes = function validatorSlashes(request, callback) { + return this.rpcCall( + validatorSlashes, + $root.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest, + $root.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse, + request, + callback, + ); + }), + "name", + { value: "ValidatorSlashes" }, + ); + Object.defineProperty( + (Query.prototype.delegationRewards = function delegationRewards(request, callback) { + return this.rpcCall( + delegationRewards, + $root.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest, + $root.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse, + request, + callback, + ); + }), + "name", + { value: "DelegationRewards" }, + ); + Object.defineProperty( + (Query.prototype.delegationTotalRewards = function delegationTotalRewards(request, callback) { + return this.rpcCall( + delegationTotalRewards, + $root.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest, + $root.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse, + request, + callback, + ); + }), + "name", + { value: "DelegationTotalRewards" }, + ); + Object.defineProperty( + (Query.prototype.delegatorValidators = function delegatorValidators(request, callback) { + return this.rpcCall( + delegatorValidators, + $root.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest, + $root.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse, + request, + callback, + ); + }), + "name", + { value: "DelegatorValidators" }, + ); + Object.defineProperty( + (Query.prototype.delegatorWithdrawAddress = function delegatorWithdrawAddress(request, callback) { + return this.rpcCall( + delegatorWithdrawAddress, + $root.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest, + $root.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse, + request, + callback, + ); + }), + "name", + { value: "DelegatorWithdrawAddress" }, + ); + Object.defineProperty( + (Query.prototype.communityPool = function communityPool(request, callback) { + return this.rpcCall( + communityPool, + $root.cosmos.distribution.v1beta1.QueryCommunityPoolRequest, + $root.cosmos.distribution.v1beta1.QueryCommunityPoolResponse, + request, + callback, + ); + }), + "name", + { value: "CommunityPool" }, + ); + return Query; + })(); + v1beta1.QueryParamsRequest = (function () { + function QueryParamsRequest(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryParamsRequest.create = function create(properties) { + return new QueryParamsRequest(properties); + }; + QueryParamsRequest.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + return w; + }; + QueryParamsRequest.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.QueryParamsRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryParamsRequest; + })(); + v1beta1.QueryParamsResponse = (function () { + function QueryParamsResponse(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryParamsResponse.prototype.params = null; + QueryParamsResponse.create = function create(properties) { + return new QueryParamsResponse(properties); + }; + QueryParamsResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.params != null && Object.hasOwnProperty.call(m, "params")) + $root.cosmos.distribution.v1beta1.Params.encode(m.params, w.uint32(10).fork()).ldelim(); + return w; + }; + QueryParamsResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.QueryParamsResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.params = $root.cosmos.distribution.v1beta1.Params.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryParamsResponse; + })(); + v1beta1.QueryValidatorOutstandingRewardsRequest = (function () { + function QueryValidatorOutstandingRewardsRequest(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryValidatorOutstandingRewardsRequest.prototype.validatorAddress = ""; + QueryValidatorOutstandingRewardsRequest.create = function create(properties) { + return new QueryValidatorOutstandingRewardsRequest(properties); + }; + QueryValidatorOutstandingRewardsRequest.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.validatorAddress != null && Object.hasOwnProperty.call(m, "validatorAddress")) + w.uint32(10).string(m.validatorAddress); + return w; + }; + QueryValidatorOutstandingRewardsRequest.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.validatorAddress = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryValidatorOutstandingRewardsRequest; + })(); + v1beta1.QueryValidatorOutstandingRewardsResponse = (function () { + function QueryValidatorOutstandingRewardsResponse(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryValidatorOutstandingRewardsResponse.prototype.rewards = null; + QueryValidatorOutstandingRewardsResponse.create = function create(properties) { + return new QueryValidatorOutstandingRewardsResponse(properties); + }; + QueryValidatorOutstandingRewardsResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.rewards != null && Object.hasOwnProperty.call(m, "rewards")) + $root.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.encode( + m.rewards, + w.uint32(10).fork(), + ).ldelim(); + return w; + }; + QueryValidatorOutstandingRewardsResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.rewards = $root.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.decode( + r, + r.uint32(), + ); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryValidatorOutstandingRewardsResponse; + })(); + v1beta1.QueryValidatorCommissionRequest = (function () { + function QueryValidatorCommissionRequest(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryValidatorCommissionRequest.prototype.validatorAddress = ""; + QueryValidatorCommissionRequest.create = function create(properties) { + return new QueryValidatorCommissionRequest(properties); + }; + QueryValidatorCommissionRequest.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.validatorAddress != null && Object.hasOwnProperty.call(m, "validatorAddress")) + w.uint32(10).string(m.validatorAddress); + return w; + }; + QueryValidatorCommissionRequest.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.validatorAddress = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryValidatorCommissionRequest; + })(); + v1beta1.QueryValidatorCommissionResponse = (function () { + function QueryValidatorCommissionResponse(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryValidatorCommissionResponse.prototype.commission = null; + QueryValidatorCommissionResponse.create = function create(properties) { + return new QueryValidatorCommissionResponse(properties); + }; + QueryValidatorCommissionResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.commission != null && Object.hasOwnProperty.call(m, "commission")) + $root.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.encode( + m.commission, + w.uint32(10).fork(), + ).ldelim(); + return w; + }; + QueryValidatorCommissionResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.commission = $root.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.decode( + r, + r.uint32(), + ); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryValidatorCommissionResponse; + })(); + v1beta1.QueryValidatorSlashesRequest = (function () { + function QueryValidatorSlashesRequest(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryValidatorSlashesRequest.prototype.validatorAddress = ""; + QueryValidatorSlashesRequest.prototype.startingHeight = $util.Long + ? $util.Long.fromBits(0, 0, true) + : 0; + QueryValidatorSlashesRequest.prototype.endingHeight = $util.Long + ? $util.Long.fromBits(0, 0, true) + : 0; + QueryValidatorSlashesRequest.prototype.pagination = null; + QueryValidatorSlashesRequest.create = function create(properties) { + return new QueryValidatorSlashesRequest(properties); + }; + QueryValidatorSlashesRequest.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.validatorAddress != null && Object.hasOwnProperty.call(m, "validatorAddress")) + w.uint32(10).string(m.validatorAddress); + if (m.startingHeight != null && Object.hasOwnProperty.call(m, "startingHeight")) + w.uint32(16).uint64(m.startingHeight); + if (m.endingHeight != null && Object.hasOwnProperty.call(m, "endingHeight")) + w.uint32(24).uint64(m.endingHeight); + if (m.pagination != null && Object.hasOwnProperty.call(m, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(m.pagination, w.uint32(34).fork()).ldelim(); + return w; + }; + QueryValidatorSlashesRequest.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.validatorAddress = r.string(); + break; + case 2: + m.startingHeight = r.uint64(); + break; + case 3: + m.endingHeight = r.uint64(); + break; + case 4: + m.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryValidatorSlashesRequest; + })(); + v1beta1.QueryValidatorSlashesResponse = (function () { + function QueryValidatorSlashesResponse(p) { + this.slashes = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryValidatorSlashesResponse.prototype.slashes = $util.emptyArray; + QueryValidatorSlashesResponse.prototype.pagination = null; + QueryValidatorSlashesResponse.create = function create(properties) { + return new QueryValidatorSlashesResponse(properties); + }; + QueryValidatorSlashesResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.slashes != null && m.slashes.length) { + for (var i = 0; i < m.slashes.length; ++i) + $root.cosmos.distribution.v1beta1.ValidatorSlashEvent.encode( + m.slashes[i], + w.uint32(10).fork(), + ).ldelim(); + } + if (m.pagination != null && Object.hasOwnProperty.call(m, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(m.pagination, w.uint32(18).fork()).ldelim(); + return w; + }; + QueryValidatorSlashesResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.slashes && m.slashes.length)) m.slashes = []; + m.slashes.push($root.cosmos.distribution.v1beta1.ValidatorSlashEvent.decode(r, r.uint32())); + break; + case 2: + m.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryValidatorSlashesResponse; + })(); + v1beta1.QueryDelegationRewardsRequest = (function () { + function QueryDelegationRewardsRequest(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryDelegationRewardsRequest.prototype.delegatorAddress = ""; + QueryDelegationRewardsRequest.prototype.validatorAddress = ""; + QueryDelegationRewardsRequest.create = function create(properties) { + return new QueryDelegationRewardsRequest(properties); + }; + QueryDelegationRewardsRequest.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) + w.uint32(10).string(m.delegatorAddress); + if (m.validatorAddress != null && Object.hasOwnProperty.call(m, "validatorAddress")) + w.uint32(18).string(m.validatorAddress); + return w; + }; + QueryDelegationRewardsRequest.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.delegatorAddress = r.string(); + break; + case 2: + m.validatorAddress = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryDelegationRewardsRequest; + })(); + v1beta1.QueryDelegationRewardsResponse = (function () { + function QueryDelegationRewardsResponse(p) { + this.rewards = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryDelegationRewardsResponse.prototype.rewards = $util.emptyArray; + QueryDelegationRewardsResponse.create = function create(properties) { + return new QueryDelegationRewardsResponse(properties); + }; + QueryDelegationRewardsResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.rewards != null && m.rewards.length) { + for (var i = 0; i < m.rewards.length; ++i) + $root.cosmos.base.v1beta1.DecCoin.encode(m.rewards[i], w.uint32(10).fork()).ldelim(); + } + return w; + }; + QueryDelegationRewardsResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.rewards && m.rewards.length)) m.rewards = []; + m.rewards.push($root.cosmos.base.v1beta1.DecCoin.decode(r, r.uint32())); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryDelegationRewardsResponse; + })(); + v1beta1.QueryDelegationTotalRewardsRequest = (function () { + function QueryDelegationTotalRewardsRequest(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryDelegationTotalRewardsRequest.prototype.delegatorAddress = ""; + QueryDelegationTotalRewardsRequest.create = function create(properties) { + return new QueryDelegationTotalRewardsRequest(properties); + }; + QueryDelegationTotalRewardsRequest.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) + w.uint32(10).string(m.delegatorAddress); + return w; + }; + QueryDelegationTotalRewardsRequest.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.delegatorAddress = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryDelegationTotalRewardsRequest; + })(); + v1beta1.QueryDelegationTotalRewardsResponse = (function () { + function QueryDelegationTotalRewardsResponse(p) { + this.rewards = []; + this.total = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryDelegationTotalRewardsResponse.prototype.rewards = $util.emptyArray; + QueryDelegationTotalRewardsResponse.prototype.total = $util.emptyArray; + QueryDelegationTotalRewardsResponse.create = function create(properties) { + return new QueryDelegationTotalRewardsResponse(properties); + }; + QueryDelegationTotalRewardsResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.rewards != null && m.rewards.length) { + for (var i = 0; i < m.rewards.length; ++i) + $root.cosmos.distribution.v1beta1.DelegationDelegatorReward.encode( + m.rewards[i], + w.uint32(10).fork(), + ).ldelim(); + } + if (m.total != null && m.total.length) { + for (var i = 0; i < m.total.length; ++i) + $root.cosmos.base.v1beta1.DecCoin.encode(m.total[i], w.uint32(18).fork()).ldelim(); + } + return w; + }; + QueryDelegationTotalRewardsResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.rewards && m.rewards.length)) m.rewards = []; + m.rewards.push( + $root.cosmos.distribution.v1beta1.DelegationDelegatorReward.decode(r, r.uint32()), + ); + break; + case 2: + if (!(m.total && m.total.length)) m.total = []; + m.total.push($root.cosmos.base.v1beta1.DecCoin.decode(r, r.uint32())); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryDelegationTotalRewardsResponse; + })(); + v1beta1.QueryDelegatorValidatorsRequest = (function () { + function QueryDelegatorValidatorsRequest(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryDelegatorValidatorsRequest.prototype.delegatorAddress = ""; + QueryDelegatorValidatorsRequest.create = function create(properties) { + return new QueryDelegatorValidatorsRequest(properties); + }; + QueryDelegatorValidatorsRequest.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) + w.uint32(10).string(m.delegatorAddress); + return w; + }; + QueryDelegatorValidatorsRequest.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.delegatorAddress = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryDelegatorValidatorsRequest; + })(); + v1beta1.QueryDelegatorValidatorsResponse = (function () { + function QueryDelegatorValidatorsResponse(p) { + this.validators = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryDelegatorValidatorsResponse.prototype.validators = $util.emptyArray; + QueryDelegatorValidatorsResponse.create = function create(properties) { + return new QueryDelegatorValidatorsResponse(properties); + }; + QueryDelegatorValidatorsResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.validators != null && m.validators.length) { + for (var i = 0; i < m.validators.length; ++i) w.uint32(10).string(m.validators[i]); + } + return w; + }; + QueryDelegatorValidatorsResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.validators && m.validators.length)) m.validators = []; + m.validators.push(r.string()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryDelegatorValidatorsResponse; + })(); + v1beta1.QueryDelegatorWithdrawAddressRequest = (function () { + function QueryDelegatorWithdrawAddressRequest(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryDelegatorWithdrawAddressRequest.prototype.delegatorAddress = ""; + QueryDelegatorWithdrawAddressRequest.create = function create(properties) { + return new QueryDelegatorWithdrawAddressRequest(properties); + }; + QueryDelegatorWithdrawAddressRequest.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) + w.uint32(10).string(m.delegatorAddress); + return w; + }; + QueryDelegatorWithdrawAddressRequest.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.delegatorAddress = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryDelegatorWithdrawAddressRequest; + })(); + v1beta1.QueryDelegatorWithdrawAddressResponse = (function () { + function QueryDelegatorWithdrawAddressResponse(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryDelegatorWithdrawAddressResponse.prototype.withdrawAddress = ""; + QueryDelegatorWithdrawAddressResponse.create = function create(properties) { + return new QueryDelegatorWithdrawAddressResponse(properties); + }; + QueryDelegatorWithdrawAddressResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.withdrawAddress != null && Object.hasOwnProperty.call(m, "withdrawAddress")) + w.uint32(10).string(m.withdrawAddress); + return w; + }; + QueryDelegatorWithdrawAddressResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.withdrawAddress = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryDelegatorWithdrawAddressResponse; + })(); + v1beta1.QueryCommunityPoolRequest = (function () { + function QueryCommunityPoolRequest(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryCommunityPoolRequest.create = function create(properties) { + return new QueryCommunityPoolRequest(properties); + }; + QueryCommunityPoolRequest.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + return w; + }; + QueryCommunityPoolRequest.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.QueryCommunityPoolRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryCommunityPoolRequest; + })(); + v1beta1.QueryCommunityPoolResponse = (function () { + function QueryCommunityPoolResponse(p) { + this.pool = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryCommunityPoolResponse.prototype.pool = $util.emptyArray; + QueryCommunityPoolResponse.create = function create(properties) { + return new QueryCommunityPoolResponse(properties); + }; + QueryCommunityPoolResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.pool != null && m.pool.length) { + for (var i = 0; i < m.pool.length; ++i) + $root.cosmos.base.v1beta1.DecCoin.encode(m.pool[i], w.uint32(10).fork()).ldelim(); + } + return w; + }; + QueryCommunityPoolResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.QueryCommunityPoolResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.pool && m.pool.length)) m.pool = []; + m.pool.push($root.cosmos.base.v1beta1.DecCoin.decode(r, r.uint32())); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryCommunityPoolResponse; + })(); + v1beta1.Msg = (function () { + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + Object.defineProperty( + (Msg.prototype.setWithdrawAddress = function setWithdrawAddress(request, callback) { + return this.rpcCall( + setWithdrawAddress, + $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddress, + $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse, + request, + callback, + ); + }), + "name", + { value: "SetWithdrawAddress" }, + ); + Object.defineProperty( + (Msg.prototype.withdrawDelegatorReward = function withdrawDelegatorReward(request, callback) { + return this.rpcCall( + withdrawDelegatorReward, + $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward, + $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse, + request, + callback, + ); + }), + "name", + { value: "WithdrawDelegatorReward" }, + ); + Object.defineProperty( + (Msg.prototype.withdrawValidatorCommission = function withdrawValidatorCommission( + request, + callback, + ) { + return this.rpcCall( + withdrawValidatorCommission, + $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission, + $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse, + request, + callback, + ); + }), + "name", + { value: "WithdrawValidatorCommission" }, + ); + Object.defineProperty( + (Msg.prototype.fundCommunityPool = function fundCommunityPool(request, callback) { + return this.rpcCall( + fundCommunityPool, + $root.cosmos.distribution.v1beta1.MsgFundCommunityPool, + $root.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse, + request, + callback, + ); + }), + "name", + { value: "FundCommunityPool" }, + ); + return Msg; + })(); + v1beta1.MsgSetWithdrawAddress = (function () { + function MsgSetWithdrawAddress(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + MsgSetWithdrawAddress.prototype.delegatorAddress = ""; + MsgSetWithdrawAddress.prototype.withdrawAddress = ""; + MsgSetWithdrawAddress.create = function create(properties) { + return new MsgSetWithdrawAddress(properties); + }; + MsgSetWithdrawAddress.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) + w.uint32(10).string(m.delegatorAddress); + if (m.withdrawAddress != null && Object.hasOwnProperty.call(m, "withdrawAddress")) + w.uint32(18).string(m.withdrawAddress); + return w; + }; + MsgSetWithdrawAddress.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddress(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.delegatorAddress = r.string(); + break; + case 2: + m.withdrawAddress = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return MsgSetWithdrawAddress; + })(); + v1beta1.MsgSetWithdrawAddressResponse = (function () { + function MsgSetWithdrawAddressResponse(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + MsgSetWithdrawAddressResponse.create = function create(properties) { + return new MsgSetWithdrawAddressResponse(properties); + }; + MsgSetWithdrawAddressResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + return w; + }; + MsgSetWithdrawAddressResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return MsgSetWithdrawAddressResponse; + })(); + v1beta1.MsgWithdrawDelegatorReward = (function () { + function MsgWithdrawDelegatorReward(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + MsgWithdrawDelegatorReward.prototype.delegatorAddress = ""; + MsgWithdrawDelegatorReward.prototype.validatorAddress = ""; + MsgWithdrawDelegatorReward.create = function create(properties) { + return new MsgWithdrawDelegatorReward(properties); + }; + MsgWithdrawDelegatorReward.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) + w.uint32(10).string(m.delegatorAddress); + if (m.validatorAddress != null && Object.hasOwnProperty.call(m, "validatorAddress")) + w.uint32(18).string(m.validatorAddress); + return w; + }; + MsgWithdrawDelegatorReward.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.delegatorAddress = r.string(); + break; + case 2: + m.validatorAddress = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return MsgWithdrawDelegatorReward; + })(); + v1beta1.MsgWithdrawDelegatorRewardResponse = (function () { + function MsgWithdrawDelegatorRewardResponse(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + MsgWithdrawDelegatorRewardResponse.create = function create(properties) { + return new MsgWithdrawDelegatorRewardResponse(properties); + }; + MsgWithdrawDelegatorRewardResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + return w; + }; + MsgWithdrawDelegatorRewardResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return MsgWithdrawDelegatorRewardResponse; + })(); + v1beta1.MsgWithdrawValidatorCommission = (function () { + function MsgWithdrawValidatorCommission(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + MsgWithdrawValidatorCommission.prototype.validatorAddress = ""; + MsgWithdrawValidatorCommission.create = function create(properties) { + return new MsgWithdrawValidatorCommission(properties); + }; + MsgWithdrawValidatorCommission.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.validatorAddress != null && Object.hasOwnProperty.call(m, "validatorAddress")) + w.uint32(10).string(m.validatorAddress); + return w; + }; + MsgWithdrawValidatorCommission.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.validatorAddress = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return MsgWithdrawValidatorCommission; + })(); + v1beta1.MsgWithdrawValidatorCommissionResponse = (function () { + function MsgWithdrawValidatorCommissionResponse(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + MsgWithdrawValidatorCommissionResponse.create = function create(properties) { + return new MsgWithdrawValidatorCommissionResponse(properties); + }; + MsgWithdrawValidatorCommissionResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + return w; + }; + MsgWithdrawValidatorCommissionResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return MsgWithdrawValidatorCommissionResponse; + })(); + v1beta1.MsgFundCommunityPool = (function () { + function MsgFundCommunityPool(p) { + this.amount = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + MsgFundCommunityPool.prototype.amount = $util.emptyArray; + MsgFundCommunityPool.prototype.depositor = ""; + MsgFundCommunityPool.create = function create(properties) { + return new MsgFundCommunityPool(properties); + }; + MsgFundCommunityPool.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.amount != null && m.amount.length) { + for (var i = 0; i < m.amount.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(m.amount[i], w.uint32(10).fork()).ldelim(); + } + if (m.depositor != null && Object.hasOwnProperty.call(m, "depositor")) + w.uint32(18).string(m.depositor); + return w; + }; + MsgFundCommunityPool.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.MsgFundCommunityPool(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.amount && m.amount.length)) m.amount = []; + m.amount.push($root.cosmos.base.v1beta1.Coin.decode(r, r.uint32())); + break; + case 2: + m.depositor = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return MsgFundCommunityPool; + })(); + v1beta1.MsgFundCommunityPoolResponse = (function () { + function MsgFundCommunityPoolResponse(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + MsgFundCommunityPoolResponse.create = function create(properties) { + return new MsgFundCommunityPoolResponse(properties); + }; + MsgFundCommunityPoolResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + return w; + }; + MsgFundCommunityPoolResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return MsgFundCommunityPoolResponse; + })(); + return v1beta1; + })(); + return distribution; + })(); cosmos.staking = (function () { const staking = {}; staking.v1beta1 = (function () { const v1beta1 = {}; + v1beta1.Query = (function () { + function Query(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + (Query.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Query; + Query.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + Object.defineProperty( + (Query.prototype.validators = function validators(request, callback) { + return this.rpcCall( + validators, + $root.cosmos.staking.v1beta1.QueryValidatorsRequest, + $root.cosmos.staking.v1beta1.QueryValidatorsResponse, + request, + callback, + ); + }), + "name", + { value: "Validators" }, + ); + Object.defineProperty( + (Query.prototype.validator = function validator(request, callback) { + return this.rpcCall( + validator, + $root.cosmos.staking.v1beta1.QueryValidatorRequest, + $root.cosmos.staking.v1beta1.QueryValidatorResponse, + request, + callback, + ); + }), + "name", + { value: "Validator" }, + ); + Object.defineProperty( + (Query.prototype.validatorDelegations = function validatorDelegations(request, callback) { + return this.rpcCall( + validatorDelegations, + $root.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest, + $root.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse, + request, + callback, + ); + }), + "name", + { value: "ValidatorDelegations" }, + ); + Object.defineProperty( + (Query.prototype.validatorUnbondingDelegations = function validatorUnbondingDelegations( + request, + callback, + ) { + return this.rpcCall( + validatorUnbondingDelegations, + $root.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest, + $root.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse, + request, + callback, + ); + }), + "name", + { value: "ValidatorUnbondingDelegations" }, + ); + Object.defineProperty( + (Query.prototype.delegation = function delegation(request, callback) { + return this.rpcCall( + delegation, + $root.cosmos.staking.v1beta1.QueryDelegationRequest, + $root.cosmos.staking.v1beta1.QueryDelegationResponse, + request, + callback, + ); + }), + "name", + { value: "Delegation" }, + ); + Object.defineProperty( + (Query.prototype.unbondingDelegation = function unbondingDelegation(request, callback) { + return this.rpcCall( + unbondingDelegation, + $root.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest, + $root.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse, + request, + callback, + ); + }), + "name", + { value: "UnbondingDelegation" }, + ); + Object.defineProperty( + (Query.prototype.delegatorDelegations = function delegatorDelegations(request, callback) { + return this.rpcCall( + delegatorDelegations, + $root.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest, + $root.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse, + request, + callback, + ); + }), + "name", + { value: "DelegatorDelegations" }, + ); + Object.defineProperty( + (Query.prototype.delegatorUnbondingDelegations = function delegatorUnbondingDelegations( + request, + callback, + ) { + return this.rpcCall( + delegatorUnbondingDelegations, + $root.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest, + $root.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse, + request, + callback, + ); + }), + "name", + { value: "DelegatorUnbondingDelegations" }, + ); + Object.defineProperty( + (Query.prototype.redelegations = function redelegations(request, callback) { + return this.rpcCall( + redelegations, + $root.cosmos.staking.v1beta1.QueryRedelegationsRequest, + $root.cosmos.staking.v1beta1.QueryRedelegationsResponse, + request, + callback, + ); + }), + "name", + { value: "Redelegations" }, + ); + Object.defineProperty( + (Query.prototype.delegatorValidators = function delegatorValidators(request, callback) { + return this.rpcCall( + delegatorValidators, + $root.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest, + $root.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse, + request, + callback, + ); + }), + "name", + { value: "DelegatorValidators" }, + ); + Object.defineProperty( + (Query.prototype.delegatorValidator = function delegatorValidator(request, callback) { + return this.rpcCall( + delegatorValidator, + $root.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest, + $root.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse, + request, + callback, + ); + }), + "name", + { value: "DelegatorValidator" }, + ); + Object.defineProperty( + (Query.prototype.historicalInfo = function historicalInfo(request, callback) { + return this.rpcCall( + historicalInfo, + $root.cosmos.staking.v1beta1.QueryHistoricalInfoRequest, + $root.cosmos.staking.v1beta1.QueryHistoricalInfoResponse, + request, + callback, + ); + }), + "name", + { value: "HistoricalInfo" }, + ); + Object.defineProperty( + (Query.prototype.pool = function pool(request, callback) { + return this.rpcCall( + pool, + $root.cosmos.staking.v1beta1.QueryPoolRequest, + $root.cosmos.staking.v1beta1.QueryPoolResponse, + request, + callback, + ); + }), + "name", + { value: "Pool" }, + ); + Object.defineProperty( + (Query.prototype.params = function params(request, callback) { + return this.rpcCall( + params, + $root.cosmos.staking.v1beta1.QueryParamsRequest, + $root.cosmos.staking.v1beta1.QueryParamsResponse, + request, + callback, + ); + }), + "name", + { value: "Params" }, + ); + return Query; + })(); + v1beta1.QueryValidatorsRequest = (function () { + function QueryValidatorsRequest(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryValidatorsRequest.prototype.status = ""; + QueryValidatorsRequest.prototype.pagination = null; + QueryValidatorsRequest.create = function create(properties) { + return new QueryValidatorsRequest(properties); + }; + QueryValidatorsRequest.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.status != null && Object.hasOwnProperty.call(m, "status")) w.uint32(10).string(m.status); + if (m.pagination != null && Object.hasOwnProperty.call(m, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(m.pagination, w.uint32(18).fork()).ldelim(); + return w; + }; + QueryValidatorsRequest.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryValidatorsRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.status = r.string(); + break; + case 2: + m.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryValidatorsRequest; + })(); + v1beta1.QueryValidatorsResponse = (function () { + function QueryValidatorsResponse(p) { + this.validators = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryValidatorsResponse.prototype.validators = $util.emptyArray; + QueryValidatorsResponse.prototype.pagination = null; + QueryValidatorsResponse.create = function create(properties) { + return new QueryValidatorsResponse(properties); + }; + QueryValidatorsResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.validators != null && m.validators.length) { + for (var i = 0; i < m.validators.length; ++i) + $root.cosmos.staking.v1beta1.Validator.encode(m.validators[i], w.uint32(10).fork()).ldelim(); + } + if (m.pagination != null && Object.hasOwnProperty.call(m, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(m.pagination, w.uint32(18).fork()).ldelim(); + return w; + }; + QueryValidatorsResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryValidatorsResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.validators && m.validators.length)) m.validators = []; + m.validators.push($root.cosmos.staking.v1beta1.Validator.decode(r, r.uint32())); + break; + case 2: + m.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryValidatorsResponse; + })(); + v1beta1.QueryValidatorRequest = (function () { + function QueryValidatorRequest(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryValidatorRequest.prototype.validatorAddr = ""; + QueryValidatorRequest.create = function create(properties) { + return new QueryValidatorRequest(properties); + }; + QueryValidatorRequest.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.validatorAddr != null && Object.hasOwnProperty.call(m, "validatorAddr")) + w.uint32(10).string(m.validatorAddr); + return w; + }; + QueryValidatorRequest.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryValidatorRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.validatorAddr = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryValidatorRequest; + })(); + v1beta1.QueryValidatorResponse = (function () { + function QueryValidatorResponse(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryValidatorResponse.prototype.validator = null; + QueryValidatorResponse.create = function create(properties) { + return new QueryValidatorResponse(properties); + }; + QueryValidatorResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.validator != null && Object.hasOwnProperty.call(m, "validator")) + $root.cosmos.staking.v1beta1.Validator.encode(m.validator, w.uint32(10).fork()).ldelim(); + return w; + }; + QueryValidatorResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryValidatorResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.validator = $root.cosmos.staking.v1beta1.Validator.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryValidatorResponse; + })(); + v1beta1.QueryValidatorDelegationsRequest = (function () { + function QueryValidatorDelegationsRequest(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryValidatorDelegationsRequest.prototype.validatorAddr = ""; + QueryValidatorDelegationsRequest.prototype.pagination = null; + QueryValidatorDelegationsRequest.create = function create(properties) { + return new QueryValidatorDelegationsRequest(properties); + }; + QueryValidatorDelegationsRequest.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.validatorAddr != null && Object.hasOwnProperty.call(m, "validatorAddr")) + w.uint32(10).string(m.validatorAddr); + if (m.pagination != null && Object.hasOwnProperty.call(m, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(m.pagination, w.uint32(18).fork()).ldelim(); + return w; + }; + QueryValidatorDelegationsRequest.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.validatorAddr = r.string(); + break; + case 2: + m.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryValidatorDelegationsRequest; + })(); + v1beta1.QueryValidatorDelegationsResponse = (function () { + function QueryValidatorDelegationsResponse(p) { + this.delegationResponses = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryValidatorDelegationsResponse.prototype.delegationResponses = $util.emptyArray; + QueryValidatorDelegationsResponse.prototype.pagination = null; + QueryValidatorDelegationsResponse.create = function create(properties) { + return new QueryValidatorDelegationsResponse(properties); + }; + QueryValidatorDelegationsResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.delegationResponses != null && m.delegationResponses.length) { + for (var i = 0; i < m.delegationResponses.length; ++i) + $root.cosmos.staking.v1beta1.DelegationResponse.encode( + m.delegationResponses[i], + w.uint32(10).fork(), + ).ldelim(); + } + if (m.pagination != null && Object.hasOwnProperty.call(m, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(m.pagination, w.uint32(18).fork()).ldelim(); + return w; + }; + QueryValidatorDelegationsResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.delegationResponses && m.delegationResponses.length)) m.delegationResponses = []; + m.delegationResponses.push( + $root.cosmos.staking.v1beta1.DelegationResponse.decode(r, r.uint32()), + ); + break; + case 2: + m.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryValidatorDelegationsResponse; + })(); + v1beta1.QueryValidatorUnbondingDelegationsRequest = (function () { + function QueryValidatorUnbondingDelegationsRequest(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryValidatorUnbondingDelegationsRequest.prototype.validatorAddr = ""; + QueryValidatorUnbondingDelegationsRequest.prototype.pagination = null; + QueryValidatorUnbondingDelegationsRequest.create = function create(properties) { + return new QueryValidatorUnbondingDelegationsRequest(properties); + }; + QueryValidatorUnbondingDelegationsRequest.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.validatorAddr != null && Object.hasOwnProperty.call(m, "validatorAddr")) + w.uint32(10).string(m.validatorAddr); + if (m.pagination != null && Object.hasOwnProperty.call(m, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(m.pagination, w.uint32(18).fork()).ldelim(); + return w; + }; + QueryValidatorUnbondingDelegationsRequest.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.validatorAddr = r.string(); + break; + case 2: + m.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryValidatorUnbondingDelegationsRequest; + })(); + v1beta1.QueryValidatorUnbondingDelegationsResponse = (function () { + function QueryValidatorUnbondingDelegationsResponse(p) { + this.unbondingResponses = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryValidatorUnbondingDelegationsResponse.prototype.unbondingResponses = $util.emptyArray; + QueryValidatorUnbondingDelegationsResponse.prototype.pagination = null; + QueryValidatorUnbondingDelegationsResponse.create = function create(properties) { + return new QueryValidatorUnbondingDelegationsResponse(properties); + }; + QueryValidatorUnbondingDelegationsResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.unbondingResponses != null && m.unbondingResponses.length) { + for (var i = 0; i < m.unbondingResponses.length; ++i) + $root.cosmos.staking.v1beta1.UnbondingDelegation.encode( + m.unbondingResponses[i], + w.uint32(10).fork(), + ).ldelim(); + } + if (m.pagination != null && Object.hasOwnProperty.call(m, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(m.pagination, w.uint32(18).fork()).ldelim(); + return w; + }; + QueryValidatorUnbondingDelegationsResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.unbondingResponses && m.unbondingResponses.length)) m.unbondingResponses = []; + m.unbondingResponses.push( + $root.cosmos.staking.v1beta1.UnbondingDelegation.decode(r, r.uint32()), + ); + break; + case 2: + m.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryValidatorUnbondingDelegationsResponse; + })(); + v1beta1.QueryDelegationRequest = (function () { + function QueryDelegationRequest(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryDelegationRequest.prototype.delegatorAddr = ""; + QueryDelegationRequest.prototype.validatorAddr = ""; + QueryDelegationRequest.create = function create(properties) { + return new QueryDelegationRequest(properties); + }; + QueryDelegationRequest.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.delegatorAddr != null && Object.hasOwnProperty.call(m, "delegatorAddr")) + w.uint32(10).string(m.delegatorAddr); + if (m.validatorAddr != null && Object.hasOwnProperty.call(m, "validatorAddr")) + w.uint32(18).string(m.validatorAddr); + return w; + }; + QueryDelegationRequest.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryDelegationRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.delegatorAddr = r.string(); + break; + case 2: + m.validatorAddr = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryDelegationRequest; + })(); + v1beta1.QueryDelegationResponse = (function () { + function QueryDelegationResponse(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryDelegationResponse.prototype.delegationResponse = null; + QueryDelegationResponse.create = function create(properties) { + return new QueryDelegationResponse(properties); + }; + QueryDelegationResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.delegationResponse != null && Object.hasOwnProperty.call(m, "delegationResponse")) + $root.cosmos.staking.v1beta1.DelegationResponse.encode( + m.delegationResponse, + w.uint32(10).fork(), + ).ldelim(); + return w; + }; + QueryDelegationResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryDelegationResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.delegationResponse = $root.cosmos.staking.v1beta1.DelegationResponse.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryDelegationResponse; + })(); + v1beta1.QueryUnbondingDelegationRequest = (function () { + function QueryUnbondingDelegationRequest(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryUnbondingDelegationRequest.prototype.delegatorAddr = ""; + QueryUnbondingDelegationRequest.prototype.validatorAddr = ""; + QueryUnbondingDelegationRequest.create = function create(properties) { + return new QueryUnbondingDelegationRequest(properties); + }; + QueryUnbondingDelegationRequest.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.delegatorAddr != null && Object.hasOwnProperty.call(m, "delegatorAddr")) + w.uint32(10).string(m.delegatorAddr); + if (m.validatorAddr != null && Object.hasOwnProperty.call(m, "validatorAddr")) + w.uint32(18).string(m.validatorAddr); + return w; + }; + QueryUnbondingDelegationRequest.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.delegatorAddr = r.string(); + break; + case 2: + m.validatorAddr = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryUnbondingDelegationRequest; + })(); + v1beta1.QueryUnbondingDelegationResponse = (function () { + function QueryUnbondingDelegationResponse(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryUnbondingDelegationResponse.prototype.unbond = null; + QueryUnbondingDelegationResponse.create = function create(properties) { + return new QueryUnbondingDelegationResponse(properties); + }; + QueryUnbondingDelegationResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.unbond != null && Object.hasOwnProperty.call(m, "unbond")) + $root.cosmos.staking.v1beta1.UnbondingDelegation.encode(m.unbond, w.uint32(10).fork()).ldelim(); + return w; + }; + QueryUnbondingDelegationResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.unbond = $root.cosmos.staking.v1beta1.UnbondingDelegation.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryUnbondingDelegationResponse; + })(); + v1beta1.QueryDelegatorDelegationsRequest = (function () { + function QueryDelegatorDelegationsRequest(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryDelegatorDelegationsRequest.prototype.delegatorAddr = ""; + QueryDelegatorDelegationsRequest.prototype.pagination = null; + QueryDelegatorDelegationsRequest.create = function create(properties) { + return new QueryDelegatorDelegationsRequest(properties); + }; + QueryDelegatorDelegationsRequest.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.delegatorAddr != null && Object.hasOwnProperty.call(m, "delegatorAddr")) + w.uint32(10).string(m.delegatorAddr); + if (m.pagination != null && Object.hasOwnProperty.call(m, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(m.pagination, w.uint32(18).fork()).ldelim(); + return w; + }; + QueryDelegatorDelegationsRequest.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.delegatorAddr = r.string(); + break; + case 2: + m.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryDelegatorDelegationsRequest; + })(); + v1beta1.QueryDelegatorDelegationsResponse = (function () { + function QueryDelegatorDelegationsResponse(p) { + this.delegationResponses = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryDelegatorDelegationsResponse.prototype.delegationResponses = $util.emptyArray; + QueryDelegatorDelegationsResponse.prototype.pagination = null; + QueryDelegatorDelegationsResponse.create = function create(properties) { + return new QueryDelegatorDelegationsResponse(properties); + }; + QueryDelegatorDelegationsResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.delegationResponses != null && m.delegationResponses.length) { + for (var i = 0; i < m.delegationResponses.length; ++i) + $root.cosmos.staking.v1beta1.DelegationResponse.encode( + m.delegationResponses[i], + w.uint32(10).fork(), + ).ldelim(); + } + if (m.pagination != null && Object.hasOwnProperty.call(m, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(m.pagination, w.uint32(18).fork()).ldelim(); + return w; + }; + QueryDelegatorDelegationsResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.delegationResponses && m.delegationResponses.length)) m.delegationResponses = []; + m.delegationResponses.push( + $root.cosmos.staking.v1beta1.DelegationResponse.decode(r, r.uint32()), + ); + break; + case 2: + m.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryDelegatorDelegationsResponse; + })(); + v1beta1.QueryDelegatorUnbondingDelegationsRequest = (function () { + function QueryDelegatorUnbondingDelegationsRequest(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryDelegatorUnbondingDelegationsRequest.prototype.delegatorAddr = ""; + QueryDelegatorUnbondingDelegationsRequest.prototype.pagination = null; + QueryDelegatorUnbondingDelegationsRequest.create = function create(properties) { + return new QueryDelegatorUnbondingDelegationsRequest(properties); + }; + QueryDelegatorUnbondingDelegationsRequest.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.delegatorAddr != null && Object.hasOwnProperty.call(m, "delegatorAddr")) + w.uint32(10).string(m.delegatorAddr); + if (m.pagination != null && Object.hasOwnProperty.call(m, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(m.pagination, w.uint32(18).fork()).ldelim(); + return w; + }; + QueryDelegatorUnbondingDelegationsRequest.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.delegatorAddr = r.string(); + break; + case 2: + m.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryDelegatorUnbondingDelegationsRequest; + })(); + v1beta1.QueryDelegatorUnbondingDelegationsResponse = (function () { + function QueryDelegatorUnbondingDelegationsResponse(p) { + this.unbondingResponses = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryDelegatorUnbondingDelegationsResponse.prototype.unbondingResponses = $util.emptyArray; + QueryDelegatorUnbondingDelegationsResponse.prototype.pagination = null; + QueryDelegatorUnbondingDelegationsResponse.create = function create(properties) { + return new QueryDelegatorUnbondingDelegationsResponse(properties); + }; + QueryDelegatorUnbondingDelegationsResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.unbondingResponses != null && m.unbondingResponses.length) { + for (var i = 0; i < m.unbondingResponses.length; ++i) + $root.cosmos.staking.v1beta1.UnbondingDelegation.encode( + m.unbondingResponses[i], + w.uint32(10).fork(), + ).ldelim(); + } + if (m.pagination != null && Object.hasOwnProperty.call(m, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(m.pagination, w.uint32(18).fork()).ldelim(); + return w; + }; + QueryDelegatorUnbondingDelegationsResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.unbondingResponses && m.unbondingResponses.length)) m.unbondingResponses = []; + m.unbondingResponses.push( + $root.cosmos.staking.v1beta1.UnbondingDelegation.decode(r, r.uint32()), + ); + break; + case 2: + m.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryDelegatorUnbondingDelegationsResponse; + })(); + v1beta1.QueryRedelegationsRequest = (function () { + function QueryRedelegationsRequest(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryRedelegationsRequest.prototype.delegatorAddr = ""; + QueryRedelegationsRequest.prototype.srcValidatorAddr = ""; + QueryRedelegationsRequest.prototype.dstValidatorAddr = ""; + QueryRedelegationsRequest.prototype.pagination = null; + QueryRedelegationsRequest.create = function create(properties) { + return new QueryRedelegationsRequest(properties); + }; + QueryRedelegationsRequest.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.delegatorAddr != null && Object.hasOwnProperty.call(m, "delegatorAddr")) + w.uint32(10).string(m.delegatorAddr); + if (m.srcValidatorAddr != null && Object.hasOwnProperty.call(m, "srcValidatorAddr")) + w.uint32(18).string(m.srcValidatorAddr); + if (m.dstValidatorAddr != null && Object.hasOwnProperty.call(m, "dstValidatorAddr")) + w.uint32(26).string(m.dstValidatorAddr); + if (m.pagination != null && Object.hasOwnProperty.call(m, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(m.pagination, w.uint32(34).fork()).ldelim(); + return w; + }; + QueryRedelegationsRequest.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryRedelegationsRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.delegatorAddr = r.string(); + break; + case 2: + m.srcValidatorAddr = r.string(); + break; + case 3: + m.dstValidatorAddr = r.string(); + break; + case 4: + m.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryRedelegationsRequest; + })(); + v1beta1.QueryRedelegationsResponse = (function () { + function QueryRedelegationsResponse(p) { + this.redelegationResponses = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryRedelegationsResponse.prototype.redelegationResponses = $util.emptyArray; + QueryRedelegationsResponse.prototype.pagination = null; + QueryRedelegationsResponse.create = function create(properties) { + return new QueryRedelegationsResponse(properties); + }; + QueryRedelegationsResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.redelegationResponses != null && m.redelegationResponses.length) { + for (var i = 0; i < m.redelegationResponses.length; ++i) + $root.cosmos.staking.v1beta1.RedelegationResponse.encode( + m.redelegationResponses[i], + w.uint32(10).fork(), + ).ldelim(); + } + if (m.pagination != null && Object.hasOwnProperty.call(m, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(m.pagination, w.uint32(18).fork()).ldelim(); + return w; + }; + QueryRedelegationsResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryRedelegationsResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.redelegationResponses && m.redelegationResponses.length)) + m.redelegationResponses = []; + m.redelegationResponses.push( + $root.cosmos.staking.v1beta1.RedelegationResponse.decode(r, r.uint32()), + ); + break; + case 2: + m.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryRedelegationsResponse; + })(); + v1beta1.QueryDelegatorValidatorsRequest = (function () { + function QueryDelegatorValidatorsRequest(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryDelegatorValidatorsRequest.prototype.delegatorAddr = ""; + QueryDelegatorValidatorsRequest.prototype.pagination = null; + QueryDelegatorValidatorsRequest.create = function create(properties) { + return new QueryDelegatorValidatorsRequest(properties); + }; + QueryDelegatorValidatorsRequest.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.delegatorAddr != null && Object.hasOwnProperty.call(m, "delegatorAddr")) + w.uint32(10).string(m.delegatorAddr); + if (m.pagination != null && Object.hasOwnProperty.call(m, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(m.pagination, w.uint32(18).fork()).ldelim(); + return w; + }; + QueryDelegatorValidatorsRequest.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.delegatorAddr = r.string(); + break; + case 2: + m.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryDelegatorValidatorsRequest; + })(); + v1beta1.QueryDelegatorValidatorsResponse = (function () { + function QueryDelegatorValidatorsResponse(p) { + this.validators = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryDelegatorValidatorsResponse.prototype.validators = $util.emptyArray; + QueryDelegatorValidatorsResponse.prototype.pagination = null; + QueryDelegatorValidatorsResponse.create = function create(properties) { + return new QueryDelegatorValidatorsResponse(properties); + }; + QueryDelegatorValidatorsResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.validators != null && m.validators.length) { + for (var i = 0; i < m.validators.length; ++i) + $root.cosmos.staking.v1beta1.Validator.encode(m.validators[i], w.uint32(10).fork()).ldelim(); + } + if (m.pagination != null && Object.hasOwnProperty.call(m, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(m.pagination, w.uint32(18).fork()).ldelim(); + return w; + }; + QueryDelegatorValidatorsResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.validators && m.validators.length)) m.validators = []; + m.validators.push($root.cosmos.staking.v1beta1.Validator.decode(r, r.uint32())); + break; + case 2: + m.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryDelegatorValidatorsResponse; + })(); + v1beta1.QueryDelegatorValidatorRequest = (function () { + function QueryDelegatorValidatorRequest(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryDelegatorValidatorRequest.prototype.delegatorAddr = ""; + QueryDelegatorValidatorRequest.prototype.validatorAddr = ""; + QueryDelegatorValidatorRequest.create = function create(properties) { + return new QueryDelegatorValidatorRequest(properties); + }; + QueryDelegatorValidatorRequest.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.delegatorAddr != null && Object.hasOwnProperty.call(m, "delegatorAddr")) + w.uint32(10).string(m.delegatorAddr); + if (m.validatorAddr != null && Object.hasOwnProperty.call(m, "validatorAddr")) + w.uint32(18).string(m.validatorAddr); + return w; + }; + QueryDelegatorValidatorRequest.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.delegatorAddr = r.string(); + break; + case 2: + m.validatorAddr = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryDelegatorValidatorRequest; + })(); + v1beta1.QueryDelegatorValidatorResponse = (function () { + function QueryDelegatorValidatorResponse(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryDelegatorValidatorResponse.prototype.validator = null; + QueryDelegatorValidatorResponse.create = function create(properties) { + return new QueryDelegatorValidatorResponse(properties); + }; + QueryDelegatorValidatorResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.validator != null && Object.hasOwnProperty.call(m, "validator")) + $root.cosmos.staking.v1beta1.Validator.encode(m.validator, w.uint32(10).fork()).ldelim(); + return w; + }; + QueryDelegatorValidatorResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.validator = $root.cosmos.staking.v1beta1.Validator.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryDelegatorValidatorResponse; + })(); + v1beta1.QueryHistoricalInfoRequest = (function () { + function QueryHistoricalInfoRequest(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryHistoricalInfoRequest.prototype.height = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; + QueryHistoricalInfoRequest.create = function create(properties) { + return new QueryHistoricalInfoRequest(properties); + }; + QueryHistoricalInfoRequest.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.height != null && Object.hasOwnProperty.call(m, "height")) w.uint32(8).int64(m.height); + return w; + }; + QueryHistoricalInfoRequest.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryHistoricalInfoRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.height = r.int64(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryHistoricalInfoRequest; + })(); + v1beta1.QueryHistoricalInfoResponse = (function () { + function QueryHistoricalInfoResponse(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryHistoricalInfoResponse.prototype.hist = null; + QueryHistoricalInfoResponse.create = function create(properties) { + return new QueryHistoricalInfoResponse(properties); + }; + QueryHistoricalInfoResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.hist != null && Object.hasOwnProperty.call(m, "hist")) + $root.cosmos.staking.v1beta1.HistoricalInfo.encode(m.hist, w.uint32(10).fork()).ldelim(); + return w; + }; + QueryHistoricalInfoResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryHistoricalInfoResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.hist = $root.cosmos.staking.v1beta1.HistoricalInfo.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryHistoricalInfoResponse; + })(); + v1beta1.QueryPoolRequest = (function () { + function QueryPoolRequest(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryPoolRequest.create = function create(properties) { + return new QueryPoolRequest(properties); + }; + QueryPoolRequest.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + return w; + }; + QueryPoolRequest.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryPoolRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryPoolRequest; + })(); + v1beta1.QueryPoolResponse = (function () { + function QueryPoolResponse(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryPoolResponse.prototype.pool = null; + QueryPoolResponse.create = function create(properties) { + return new QueryPoolResponse(properties); + }; + QueryPoolResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.pool != null && Object.hasOwnProperty.call(m, "pool")) + $root.cosmos.staking.v1beta1.Pool.encode(m.pool, w.uint32(10).fork()).ldelim(); + return w; + }; + QueryPoolResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryPoolResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.pool = $root.cosmos.staking.v1beta1.Pool.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryPoolResponse; + })(); + v1beta1.QueryParamsRequest = (function () { + function QueryParamsRequest(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryParamsRequest.create = function create(properties) { + return new QueryParamsRequest(properties); + }; + QueryParamsRequest.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + return w; + }; + QueryParamsRequest.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryParamsRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryParamsRequest; + })(); + v1beta1.QueryParamsResponse = (function () { + function QueryParamsResponse(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + QueryParamsResponse.prototype.params = null; + QueryParamsResponse.create = function create(properties) { + return new QueryParamsResponse(properties); + }; + QueryParamsResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.params != null && Object.hasOwnProperty.call(m, "params")) + $root.cosmos.staking.v1beta1.Params.encode(m.params, w.uint32(10).fork()).ldelim(); + return w; + }; + QueryParamsResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.staking.v1beta1.QueryParamsResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.params = $root.cosmos.staking.v1beta1.Params.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return QueryParamsResponse; + })(); v1beta1.HistoricalInfo = (function () { function HistoricalInfo(p) { this.valset = []; diff --git a/packages/stargate/types/codec/generated/codecimpl.d.ts b/packages/stargate/types/codec/generated/codecimpl.d.ts index 32dd36f8..ec980e21 100644 --- a/packages/stargate/types/codec/generated/codecimpl.d.ts +++ b/packages/stargate/types/codec/generated/codecimpl.d.ts @@ -2976,10 +2976,4455 @@ export namespace cosmos { } } + /** Namespace distribution. */ + namespace distribution { + /** Namespace v1beta1. */ + namespace v1beta1 { + /** Properties of a Params. */ + interface IParams { + /** Params communityTax */ + communityTax?: string | null; + + /** Params baseProposerReward */ + baseProposerReward?: string | null; + + /** Params bonusProposerReward */ + bonusProposerReward?: string | null; + + /** Params withdrawAddrEnabled */ + withdrawAddrEnabled?: boolean | null; + } + + /** Represents a Params. */ + class Params implements IParams { + /** + * Constructs a new Params. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IParams); + + /** Params communityTax. */ + public communityTax: string; + + /** Params baseProposerReward. */ + public baseProposerReward: string; + + /** Params bonusProposerReward. */ + public bonusProposerReward: string; + + /** Params withdrawAddrEnabled. */ + public withdrawAddrEnabled: boolean; + + /** + * Creates a new Params instance using the specified properties. + * @param [properties] Properties to set + * @returns Params instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IParams, + ): cosmos.distribution.v1beta1.Params; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos.distribution.v1beta1.Params.verify|verify} messages. + * @param m Params message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.distribution.v1beta1.IParams, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Params message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.Params; + } + + /** Properties of a ValidatorHistoricalRewards. */ + interface IValidatorHistoricalRewards { + /** ValidatorHistoricalRewards cumulativeRewardRatio */ + cumulativeRewardRatio?: cosmos.base.v1beta1.IDecCoin[] | null; + + /** ValidatorHistoricalRewards referenceCount */ + referenceCount?: number | null; + } + + /** Represents a ValidatorHistoricalRewards. */ + class ValidatorHistoricalRewards implements IValidatorHistoricalRewards { + /** + * Constructs a new ValidatorHistoricalRewards. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IValidatorHistoricalRewards); + + /** ValidatorHistoricalRewards cumulativeRewardRatio. */ + public cumulativeRewardRatio: cosmos.base.v1beta1.IDecCoin[]; + + /** ValidatorHistoricalRewards referenceCount. */ + public referenceCount: number; + + /** + * Creates a new ValidatorHistoricalRewards instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorHistoricalRewards instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IValidatorHistoricalRewards, + ): cosmos.distribution.v1beta1.ValidatorHistoricalRewards; + + /** + * Encodes the specified ValidatorHistoricalRewards message. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorHistoricalRewards.verify|verify} messages. + * @param m ValidatorHistoricalRewards message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IValidatorHistoricalRewards, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValidatorHistoricalRewards message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ValidatorHistoricalRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.ValidatorHistoricalRewards; + } + + /** Properties of a ValidatorCurrentRewards. */ + interface IValidatorCurrentRewards { + /** ValidatorCurrentRewards rewards */ + rewards?: cosmos.base.v1beta1.IDecCoin[] | null; + + /** ValidatorCurrentRewards period */ + period?: Long | null; + } + + /** Represents a ValidatorCurrentRewards. */ + class ValidatorCurrentRewards implements IValidatorCurrentRewards { + /** + * Constructs a new ValidatorCurrentRewards. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IValidatorCurrentRewards); + + /** ValidatorCurrentRewards rewards. */ + public rewards: cosmos.base.v1beta1.IDecCoin[]; + + /** ValidatorCurrentRewards period. */ + public period: Long; + + /** + * Creates a new ValidatorCurrentRewards instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorCurrentRewards instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IValidatorCurrentRewards, + ): cosmos.distribution.v1beta1.ValidatorCurrentRewards; + + /** + * Encodes the specified ValidatorCurrentRewards message. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorCurrentRewards.verify|verify} messages. + * @param m ValidatorCurrentRewards message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IValidatorCurrentRewards, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValidatorCurrentRewards message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ValidatorCurrentRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.ValidatorCurrentRewards; + } + + /** Properties of a ValidatorAccumulatedCommission. */ + interface IValidatorAccumulatedCommission { + /** ValidatorAccumulatedCommission commission */ + commission?: cosmos.base.v1beta1.IDecCoin[] | null; + } + + /** Represents a ValidatorAccumulatedCommission. */ + class ValidatorAccumulatedCommission implements IValidatorAccumulatedCommission { + /** + * Constructs a new ValidatorAccumulatedCommission. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IValidatorAccumulatedCommission); + + /** ValidatorAccumulatedCommission commission. */ + public commission: cosmos.base.v1beta1.IDecCoin[]; + + /** + * Creates a new ValidatorAccumulatedCommission instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorAccumulatedCommission instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IValidatorAccumulatedCommission, + ): cosmos.distribution.v1beta1.ValidatorAccumulatedCommission; + + /** + * Encodes the specified ValidatorAccumulatedCommission message. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.verify|verify} messages. + * @param m ValidatorAccumulatedCommission message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IValidatorAccumulatedCommission, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValidatorAccumulatedCommission message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ValidatorAccumulatedCommission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.ValidatorAccumulatedCommission; + } + + /** Properties of a ValidatorOutstandingRewards. */ + interface IValidatorOutstandingRewards { + /** ValidatorOutstandingRewards rewards */ + rewards?: cosmos.base.v1beta1.IDecCoin[] | null; + } + + /** Represents a ValidatorOutstandingRewards. */ + class ValidatorOutstandingRewards implements IValidatorOutstandingRewards { + /** + * Constructs a new ValidatorOutstandingRewards. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IValidatorOutstandingRewards); + + /** ValidatorOutstandingRewards rewards. */ + public rewards: cosmos.base.v1beta1.IDecCoin[]; + + /** + * Creates a new ValidatorOutstandingRewards instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorOutstandingRewards instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IValidatorOutstandingRewards, + ): cosmos.distribution.v1beta1.ValidatorOutstandingRewards; + + /** + * Encodes the specified ValidatorOutstandingRewards message. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorOutstandingRewards.verify|verify} messages. + * @param m ValidatorOutstandingRewards message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IValidatorOutstandingRewards, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValidatorOutstandingRewards message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ValidatorOutstandingRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.ValidatorOutstandingRewards; + } + + /** Properties of a ValidatorSlashEvent. */ + interface IValidatorSlashEvent { + /** ValidatorSlashEvent validatorPeriod */ + validatorPeriod?: Long | null; + + /** ValidatorSlashEvent fraction */ + fraction?: string | null; + } + + /** Represents a ValidatorSlashEvent. */ + class ValidatorSlashEvent implements IValidatorSlashEvent { + /** + * Constructs a new ValidatorSlashEvent. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IValidatorSlashEvent); + + /** ValidatorSlashEvent validatorPeriod. */ + public validatorPeriod: Long; + + /** ValidatorSlashEvent fraction. */ + public fraction: string; + + /** + * Creates a new ValidatorSlashEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorSlashEvent instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IValidatorSlashEvent, + ): cosmos.distribution.v1beta1.ValidatorSlashEvent; + + /** + * Encodes the specified ValidatorSlashEvent message. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorSlashEvent.verify|verify} messages. + * @param m ValidatorSlashEvent message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IValidatorSlashEvent, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValidatorSlashEvent message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ValidatorSlashEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.ValidatorSlashEvent; + } + + /** Properties of a ValidatorSlashEvents. */ + interface IValidatorSlashEvents { + /** ValidatorSlashEvents validatorSlashEvents */ + validatorSlashEvents?: cosmos.distribution.v1beta1.IValidatorSlashEvent[] | null; + } + + /** Represents a ValidatorSlashEvents. */ + class ValidatorSlashEvents implements IValidatorSlashEvents { + /** + * Constructs a new ValidatorSlashEvents. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IValidatorSlashEvents); + + /** ValidatorSlashEvents validatorSlashEvents. */ + public validatorSlashEvents: cosmos.distribution.v1beta1.IValidatorSlashEvent[]; + + /** + * Creates a new ValidatorSlashEvents instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorSlashEvents instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IValidatorSlashEvents, + ): cosmos.distribution.v1beta1.ValidatorSlashEvents; + + /** + * Encodes the specified ValidatorSlashEvents message. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorSlashEvents.verify|verify} messages. + * @param m ValidatorSlashEvents message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IValidatorSlashEvents, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValidatorSlashEvents message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ValidatorSlashEvents + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.ValidatorSlashEvents; + } + + /** Properties of a FeePool. */ + interface IFeePool { + /** FeePool communityPool */ + communityPool?: cosmos.base.v1beta1.IDecCoin[] | null; + } + + /** Represents a FeePool. */ + class FeePool implements IFeePool { + /** + * Constructs a new FeePool. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IFeePool); + + /** FeePool communityPool. */ + public communityPool: cosmos.base.v1beta1.IDecCoin[]; + + /** + * Creates a new FeePool instance using the specified properties. + * @param [properties] Properties to set + * @returns FeePool instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IFeePool, + ): cosmos.distribution.v1beta1.FeePool; + + /** + * Encodes the specified FeePool message. Does not implicitly {@link cosmos.distribution.v1beta1.FeePool.verify|verify} messages. + * @param m FeePool message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.distribution.v1beta1.IFeePool, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeePool message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns FeePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.FeePool; + } + + /** Properties of a CommunityPoolSpendProposal. */ + interface ICommunityPoolSpendProposal { + /** CommunityPoolSpendProposal title */ + title?: string | null; + + /** CommunityPoolSpendProposal description */ + description?: string | null; + + /** CommunityPoolSpendProposal recipient */ + recipient?: string | null; + + /** CommunityPoolSpendProposal amount */ + amount?: cosmos.base.v1beta1.ICoin[] | null; + } + + /** Represents a CommunityPoolSpendProposal. */ + class CommunityPoolSpendProposal implements ICommunityPoolSpendProposal { + /** + * Constructs a new CommunityPoolSpendProposal. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.ICommunityPoolSpendProposal); + + /** CommunityPoolSpendProposal title. */ + public title: string; + + /** CommunityPoolSpendProposal description. */ + public description: string; + + /** CommunityPoolSpendProposal recipient. */ + public recipient: string; + + /** CommunityPoolSpendProposal amount. */ + public amount: cosmos.base.v1beta1.ICoin[]; + + /** + * Creates a new CommunityPoolSpendProposal instance using the specified properties. + * @param [properties] Properties to set + * @returns CommunityPoolSpendProposal instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.ICommunityPoolSpendProposal, + ): cosmos.distribution.v1beta1.CommunityPoolSpendProposal; + + /** + * Encodes the specified CommunityPoolSpendProposal message. Does not implicitly {@link cosmos.distribution.v1beta1.CommunityPoolSpendProposal.verify|verify} messages. + * @param m CommunityPoolSpendProposal message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.ICommunityPoolSpendProposal, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a CommunityPoolSpendProposal message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns CommunityPoolSpendProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.CommunityPoolSpendProposal; + } + + /** Properties of a DelegatorStartingInfo. */ + interface IDelegatorStartingInfo { + /** DelegatorStartingInfo previousPeriod */ + previousPeriod?: Long | null; + + /** DelegatorStartingInfo stake */ + stake?: string | null; + + /** DelegatorStartingInfo height */ + height?: Long | null; + } + + /** Represents a DelegatorStartingInfo. */ + class DelegatorStartingInfo implements IDelegatorStartingInfo { + /** + * Constructs a new DelegatorStartingInfo. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IDelegatorStartingInfo); + + /** DelegatorStartingInfo previousPeriod. */ + public previousPeriod: Long; + + /** DelegatorStartingInfo stake. */ + public stake: string; + + /** DelegatorStartingInfo height. */ + public height: Long; + + /** + * Creates a new DelegatorStartingInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DelegatorStartingInfo instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IDelegatorStartingInfo, + ): cosmos.distribution.v1beta1.DelegatorStartingInfo; + + /** + * Encodes the specified DelegatorStartingInfo message. Does not implicitly {@link cosmos.distribution.v1beta1.DelegatorStartingInfo.verify|verify} messages. + * @param m DelegatorStartingInfo message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IDelegatorStartingInfo, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a DelegatorStartingInfo message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns DelegatorStartingInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.DelegatorStartingInfo; + } + + /** Properties of a DelegationDelegatorReward. */ + interface IDelegationDelegatorReward { + /** DelegationDelegatorReward validatorAddress */ + validatorAddress?: string | null; + + /** DelegationDelegatorReward reward */ + reward?: cosmos.base.v1beta1.IDecCoin[] | null; + } + + /** Represents a DelegationDelegatorReward. */ + class DelegationDelegatorReward implements IDelegationDelegatorReward { + /** + * Constructs a new DelegationDelegatorReward. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IDelegationDelegatorReward); + + /** DelegationDelegatorReward validatorAddress. */ + public validatorAddress: string; + + /** DelegationDelegatorReward reward. */ + public reward: cosmos.base.v1beta1.IDecCoin[]; + + /** + * Creates a new DelegationDelegatorReward instance using the specified properties. + * @param [properties] Properties to set + * @returns DelegationDelegatorReward instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IDelegationDelegatorReward, + ): cosmos.distribution.v1beta1.DelegationDelegatorReward; + + /** + * Encodes the specified DelegationDelegatorReward message. Does not implicitly {@link cosmos.distribution.v1beta1.DelegationDelegatorReward.verify|verify} messages. + * @param m DelegationDelegatorReward message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IDelegationDelegatorReward, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a DelegationDelegatorReward message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns DelegationDelegatorReward + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.DelegationDelegatorReward; + } + + /** Properties of a CommunityPoolSpendProposalWithDeposit. */ + interface ICommunityPoolSpendProposalWithDeposit { + /** CommunityPoolSpendProposalWithDeposit title */ + title?: string | null; + + /** CommunityPoolSpendProposalWithDeposit description */ + description?: string | null; + + /** CommunityPoolSpendProposalWithDeposit recipient */ + recipient?: string | null; + + /** CommunityPoolSpendProposalWithDeposit amount */ + amount?: string | null; + + /** CommunityPoolSpendProposalWithDeposit deposit */ + deposit?: string | null; + } + + /** Represents a CommunityPoolSpendProposalWithDeposit. */ + class CommunityPoolSpendProposalWithDeposit implements ICommunityPoolSpendProposalWithDeposit { + /** + * Constructs a new CommunityPoolSpendProposalWithDeposit. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.ICommunityPoolSpendProposalWithDeposit); + + /** CommunityPoolSpendProposalWithDeposit title. */ + public title: string; + + /** CommunityPoolSpendProposalWithDeposit description. */ + public description: string; + + /** CommunityPoolSpendProposalWithDeposit recipient. */ + public recipient: string; + + /** CommunityPoolSpendProposalWithDeposit amount. */ + public amount: string; + + /** CommunityPoolSpendProposalWithDeposit deposit. */ + public deposit: string; + + /** + * Creates a new CommunityPoolSpendProposalWithDeposit instance using the specified properties. + * @param [properties] Properties to set + * @returns CommunityPoolSpendProposalWithDeposit instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.ICommunityPoolSpendProposalWithDeposit, + ): cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit; + + /** + * Encodes the specified CommunityPoolSpendProposalWithDeposit message. Does not implicitly {@link cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.verify|verify} messages. + * @param m CommunityPoolSpendProposalWithDeposit message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.ICommunityPoolSpendProposalWithDeposit, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a CommunityPoolSpendProposalWithDeposit message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns CommunityPoolSpendProposalWithDeposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit; + } + + /** Represents a Query */ + class Query extends $protobuf.rpc.Service { + /** + * Constructs a new Query service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Query service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create( + rpcImpl: $protobuf.RPCImpl, + requestDelimited?: boolean, + responseDelimited?: boolean, + ): Query; + + /** + * Calls Params. + * @param request QueryParamsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryParamsResponse + */ + public params( + request: cosmos.distribution.v1beta1.IQueryParamsRequest, + callback: cosmos.distribution.v1beta1.Query.ParamsCallback, + ): void; + + /** + * Calls Params. + * @param request QueryParamsRequest message or plain object + * @returns Promise + */ + public params( + request: cosmos.distribution.v1beta1.IQueryParamsRequest, + ): Promise; + + /** + * Calls ValidatorOutstandingRewards. + * @param request QueryValidatorOutstandingRewardsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryValidatorOutstandingRewardsResponse + */ + public validatorOutstandingRewards( + request: cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsRequest, + callback: cosmos.distribution.v1beta1.Query.ValidatorOutstandingRewardsCallback, + ): void; + + /** + * Calls ValidatorOutstandingRewards. + * @param request QueryValidatorOutstandingRewardsRequest message or plain object + * @returns Promise + */ + public validatorOutstandingRewards( + request: cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsRequest, + ): Promise; + + /** + * Calls ValidatorCommission. + * @param request QueryValidatorCommissionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryValidatorCommissionResponse + */ + public validatorCommission( + request: cosmos.distribution.v1beta1.IQueryValidatorCommissionRequest, + callback: cosmos.distribution.v1beta1.Query.ValidatorCommissionCallback, + ): void; + + /** + * Calls ValidatorCommission. + * @param request QueryValidatorCommissionRequest message or plain object + * @returns Promise + */ + public validatorCommission( + request: cosmos.distribution.v1beta1.IQueryValidatorCommissionRequest, + ): Promise; + + /** + * Calls ValidatorSlashes. + * @param request QueryValidatorSlashesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryValidatorSlashesResponse + */ + public validatorSlashes( + request: cosmos.distribution.v1beta1.IQueryValidatorSlashesRequest, + callback: cosmos.distribution.v1beta1.Query.ValidatorSlashesCallback, + ): void; + + /** + * Calls ValidatorSlashes. + * @param request QueryValidatorSlashesRequest message or plain object + * @returns Promise + */ + public validatorSlashes( + request: cosmos.distribution.v1beta1.IQueryValidatorSlashesRequest, + ): Promise; + + /** + * Calls DelegationRewards. + * @param request QueryDelegationRewardsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryDelegationRewardsResponse + */ + public delegationRewards( + request: cosmos.distribution.v1beta1.IQueryDelegationRewardsRequest, + callback: cosmos.distribution.v1beta1.Query.DelegationRewardsCallback, + ): void; + + /** + * Calls DelegationRewards. + * @param request QueryDelegationRewardsRequest message or plain object + * @returns Promise + */ + public delegationRewards( + request: cosmos.distribution.v1beta1.IQueryDelegationRewardsRequest, + ): Promise; + + /** + * Calls DelegationTotalRewards. + * @param request QueryDelegationTotalRewardsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryDelegationTotalRewardsResponse + */ + public delegationTotalRewards( + request: cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsRequest, + callback: cosmos.distribution.v1beta1.Query.DelegationTotalRewardsCallback, + ): void; + + /** + * Calls DelegationTotalRewards. + * @param request QueryDelegationTotalRewardsRequest message or plain object + * @returns Promise + */ + public delegationTotalRewards( + request: cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsRequest, + ): Promise; + + /** + * Calls DelegatorValidators. + * @param request QueryDelegatorValidatorsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryDelegatorValidatorsResponse + */ + public delegatorValidators( + request: cosmos.distribution.v1beta1.IQueryDelegatorValidatorsRequest, + callback: cosmos.distribution.v1beta1.Query.DelegatorValidatorsCallback, + ): void; + + /** + * Calls DelegatorValidators. + * @param request QueryDelegatorValidatorsRequest message or plain object + * @returns Promise + */ + public delegatorValidators( + request: cosmos.distribution.v1beta1.IQueryDelegatorValidatorsRequest, + ): Promise; + + /** + * Calls DelegatorWithdrawAddress. + * @param request QueryDelegatorWithdrawAddressRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryDelegatorWithdrawAddressResponse + */ + public delegatorWithdrawAddress( + request: cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressRequest, + callback: cosmos.distribution.v1beta1.Query.DelegatorWithdrawAddressCallback, + ): void; + + /** + * Calls DelegatorWithdrawAddress. + * @param request QueryDelegatorWithdrawAddressRequest message or plain object + * @returns Promise + */ + public delegatorWithdrawAddress( + request: cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressRequest, + ): Promise; + + /** + * Calls CommunityPool. + * @param request QueryCommunityPoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryCommunityPoolResponse + */ + public communityPool( + request: cosmos.distribution.v1beta1.IQueryCommunityPoolRequest, + callback: cosmos.distribution.v1beta1.Query.CommunityPoolCallback, + ): void; + + /** + * Calls CommunityPool. + * @param request QueryCommunityPoolRequest message or plain object + * @returns Promise + */ + public communityPool( + request: cosmos.distribution.v1beta1.IQueryCommunityPoolRequest, + ): Promise; + } + + namespace Query { + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#params}. + * @param error Error, if any + * @param [response] QueryParamsResponse + */ + type ParamsCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.QueryParamsResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#validatorOutstandingRewards}. + * @param error Error, if any + * @param [response] QueryValidatorOutstandingRewardsResponse + */ + type ValidatorOutstandingRewardsCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#validatorCommission}. + * @param error Error, if any + * @param [response] QueryValidatorCommissionResponse + */ + type ValidatorCommissionCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.QueryValidatorCommissionResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#validatorSlashes}. + * @param error Error, if any + * @param [response] QueryValidatorSlashesResponse + */ + type ValidatorSlashesCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.QueryValidatorSlashesResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#delegationRewards}. + * @param error Error, if any + * @param [response] QueryDelegationRewardsResponse + */ + type DelegationRewardsCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.QueryDelegationRewardsResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#delegationTotalRewards}. + * @param error Error, if any + * @param [response] QueryDelegationTotalRewardsResponse + */ + type DelegationTotalRewardsCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#delegatorValidators}. + * @param error Error, if any + * @param [response] QueryDelegatorValidatorsResponse + */ + type DelegatorValidatorsCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#delegatorWithdrawAddress}. + * @param error Error, if any + * @param [response] QueryDelegatorWithdrawAddressResponse + */ + type DelegatorWithdrawAddressCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#communityPool}. + * @param error Error, if any + * @param [response] QueryCommunityPoolResponse + */ + type CommunityPoolCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.QueryCommunityPoolResponse, + ) => void; + } + + /** Properties of a QueryParamsRequest. */ + interface IQueryParamsRequest {} + + /** Represents a QueryParamsRequest. */ + class QueryParamsRequest implements IQueryParamsRequest { + /** + * Constructs a new QueryParamsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryParamsRequest); + + /** + * Creates a new QueryParamsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryParamsRequest instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryParamsRequest, + ): cosmos.distribution.v1beta1.QueryParamsRequest; + + /** + * Encodes the specified QueryParamsRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryParamsRequest.verify|verify} messages. + * @param m QueryParamsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryParamsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryParamsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryParamsRequest; + } + + /** Properties of a QueryParamsResponse. */ + interface IQueryParamsResponse { + /** QueryParamsResponse params */ + params?: cosmos.distribution.v1beta1.IParams | null; + } + + /** Represents a QueryParamsResponse. */ + class QueryParamsResponse implements IQueryParamsResponse { + /** + * Constructs a new QueryParamsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryParamsResponse); + + /** QueryParamsResponse params. */ + public params?: cosmos.distribution.v1beta1.IParams | null; + + /** + * Creates a new QueryParamsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryParamsResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryParamsResponse, + ): cosmos.distribution.v1beta1.QueryParamsResponse; + + /** + * Encodes the specified QueryParamsResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryParamsResponse.verify|verify} messages. + * @param m QueryParamsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryParamsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryParamsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryParamsResponse; + } + + /** Properties of a QueryValidatorOutstandingRewardsRequest. */ + interface IQueryValidatorOutstandingRewardsRequest { + /** QueryValidatorOutstandingRewardsRequest validatorAddress */ + validatorAddress?: string | null; + } + + /** Represents a QueryValidatorOutstandingRewardsRequest. */ + class QueryValidatorOutstandingRewardsRequest implements IQueryValidatorOutstandingRewardsRequest { + /** + * Constructs a new QueryValidatorOutstandingRewardsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsRequest); + + /** QueryValidatorOutstandingRewardsRequest validatorAddress. */ + public validatorAddress: string; + + /** + * Creates a new QueryValidatorOutstandingRewardsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorOutstandingRewardsRequest instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsRequest, + ): cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest; + + /** + * Encodes the specified QueryValidatorOutstandingRewardsRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.verify|verify} messages. + * @param m QueryValidatorOutstandingRewardsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorOutstandingRewardsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorOutstandingRewardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest; + } + + /** Properties of a QueryValidatorOutstandingRewardsResponse. */ + interface IQueryValidatorOutstandingRewardsResponse { + /** QueryValidatorOutstandingRewardsResponse rewards */ + rewards?: cosmos.distribution.v1beta1.IValidatorOutstandingRewards | null; + } + + /** Represents a QueryValidatorOutstandingRewardsResponse. */ + class QueryValidatorOutstandingRewardsResponse implements IQueryValidatorOutstandingRewardsResponse { + /** + * Constructs a new QueryValidatorOutstandingRewardsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsResponse); + + /** QueryValidatorOutstandingRewardsResponse rewards. */ + public rewards?: cosmos.distribution.v1beta1.IValidatorOutstandingRewards | null; + + /** + * Creates a new QueryValidatorOutstandingRewardsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorOutstandingRewardsResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsResponse, + ): cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse; + + /** + * Encodes the specified QueryValidatorOutstandingRewardsResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.verify|verify} messages. + * @param m QueryValidatorOutstandingRewardsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorOutstandingRewardsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorOutstandingRewardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse; + } + + /** Properties of a QueryValidatorCommissionRequest. */ + interface IQueryValidatorCommissionRequest { + /** QueryValidatorCommissionRequest validatorAddress */ + validatorAddress?: string | null; + } + + /** Represents a QueryValidatorCommissionRequest. */ + class QueryValidatorCommissionRequest implements IQueryValidatorCommissionRequest { + /** + * Constructs a new QueryValidatorCommissionRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryValidatorCommissionRequest); + + /** QueryValidatorCommissionRequest validatorAddress. */ + public validatorAddress: string; + + /** + * Creates a new QueryValidatorCommissionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorCommissionRequest instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryValidatorCommissionRequest, + ): cosmos.distribution.v1beta1.QueryValidatorCommissionRequest; + + /** + * Encodes the specified QueryValidatorCommissionRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.verify|verify} messages. + * @param m QueryValidatorCommissionRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryValidatorCommissionRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorCommissionRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorCommissionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryValidatorCommissionRequest; + } + + /** Properties of a QueryValidatorCommissionResponse. */ + interface IQueryValidatorCommissionResponse { + /** QueryValidatorCommissionResponse commission */ + commission?: cosmos.distribution.v1beta1.IValidatorAccumulatedCommission | null; + } + + /** Represents a QueryValidatorCommissionResponse. */ + class QueryValidatorCommissionResponse implements IQueryValidatorCommissionResponse { + /** + * Constructs a new QueryValidatorCommissionResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryValidatorCommissionResponse); + + /** QueryValidatorCommissionResponse commission. */ + public commission?: cosmos.distribution.v1beta1.IValidatorAccumulatedCommission | null; + + /** + * Creates a new QueryValidatorCommissionResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorCommissionResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryValidatorCommissionResponse, + ): cosmos.distribution.v1beta1.QueryValidatorCommissionResponse; + + /** + * Encodes the specified QueryValidatorCommissionResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.verify|verify} messages. + * @param m QueryValidatorCommissionResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryValidatorCommissionResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorCommissionResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorCommissionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryValidatorCommissionResponse; + } + + /** Properties of a QueryValidatorSlashesRequest. */ + interface IQueryValidatorSlashesRequest { + /** QueryValidatorSlashesRequest validatorAddress */ + validatorAddress?: string | null; + + /** QueryValidatorSlashesRequest startingHeight */ + startingHeight?: Long | null; + + /** QueryValidatorSlashesRequest endingHeight */ + endingHeight?: Long | null; + + /** QueryValidatorSlashesRequest pagination */ + pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + } + + /** Represents a QueryValidatorSlashesRequest. */ + class QueryValidatorSlashesRequest implements IQueryValidatorSlashesRequest { + /** + * Constructs a new QueryValidatorSlashesRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryValidatorSlashesRequest); + + /** QueryValidatorSlashesRequest validatorAddress. */ + public validatorAddress: string; + + /** QueryValidatorSlashesRequest startingHeight. */ + public startingHeight: Long; + + /** QueryValidatorSlashesRequest endingHeight. */ + public endingHeight: Long; + + /** QueryValidatorSlashesRequest pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + + /** + * Creates a new QueryValidatorSlashesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorSlashesRequest instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryValidatorSlashesRequest, + ): cosmos.distribution.v1beta1.QueryValidatorSlashesRequest; + + /** + * Encodes the specified QueryValidatorSlashesRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.verify|verify} messages. + * @param m QueryValidatorSlashesRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryValidatorSlashesRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorSlashesRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorSlashesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryValidatorSlashesRequest; + } + + /** Properties of a QueryValidatorSlashesResponse. */ + interface IQueryValidatorSlashesResponse { + /** QueryValidatorSlashesResponse slashes */ + slashes?: cosmos.distribution.v1beta1.IValidatorSlashEvent[] | null; + + /** QueryValidatorSlashesResponse pagination */ + pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + } + + /** Represents a QueryValidatorSlashesResponse. */ + class QueryValidatorSlashesResponse implements IQueryValidatorSlashesResponse { + /** + * Constructs a new QueryValidatorSlashesResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryValidatorSlashesResponse); + + /** QueryValidatorSlashesResponse slashes. */ + public slashes: cosmos.distribution.v1beta1.IValidatorSlashEvent[]; + + /** QueryValidatorSlashesResponse pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + + /** + * Creates a new QueryValidatorSlashesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorSlashesResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryValidatorSlashesResponse, + ): cosmos.distribution.v1beta1.QueryValidatorSlashesResponse; + + /** + * Encodes the specified QueryValidatorSlashesResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.verify|verify} messages. + * @param m QueryValidatorSlashesResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryValidatorSlashesResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorSlashesResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorSlashesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryValidatorSlashesResponse; + } + + /** Properties of a QueryDelegationRewardsRequest. */ + interface IQueryDelegationRewardsRequest { + /** QueryDelegationRewardsRequest delegatorAddress */ + delegatorAddress?: string | null; + + /** QueryDelegationRewardsRequest validatorAddress */ + validatorAddress?: string | null; + } + + /** Represents a QueryDelegationRewardsRequest. */ + class QueryDelegationRewardsRequest implements IQueryDelegationRewardsRequest { + /** + * Constructs a new QueryDelegationRewardsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryDelegationRewardsRequest); + + /** QueryDelegationRewardsRequest delegatorAddress. */ + public delegatorAddress: string; + + /** QueryDelegationRewardsRequest validatorAddress. */ + public validatorAddress: string; + + /** + * Creates a new QueryDelegationRewardsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegationRewardsRequest instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryDelegationRewardsRequest, + ): cosmos.distribution.v1beta1.QueryDelegationRewardsRequest; + + /** + * Encodes the specified QueryDelegationRewardsRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.verify|verify} messages. + * @param m QueryDelegationRewardsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryDelegationRewardsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegationRewardsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegationRewardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryDelegationRewardsRequest; + } + + /** Properties of a QueryDelegationRewardsResponse. */ + interface IQueryDelegationRewardsResponse { + /** QueryDelegationRewardsResponse rewards */ + rewards?: cosmos.base.v1beta1.IDecCoin[] | null; + } + + /** Represents a QueryDelegationRewardsResponse. */ + class QueryDelegationRewardsResponse implements IQueryDelegationRewardsResponse { + /** + * Constructs a new QueryDelegationRewardsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryDelegationRewardsResponse); + + /** QueryDelegationRewardsResponse rewards. */ + public rewards: cosmos.base.v1beta1.IDecCoin[]; + + /** + * Creates a new QueryDelegationRewardsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegationRewardsResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryDelegationRewardsResponse, + ): cosmos.distribution.v1beta1.QueryDelegationRewardsResponse; + + /** + * Encodes the specified QueryDelegationRewardsResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.verify|verify} messages. + * @param m QueryDelegationRewardsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryDelegationRewardsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegationRewardsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegationRewardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryDelegationRewardsResponse; + } + + /** Properties of a QueryDelegationTotalRewardsRequest. */ + interface IQueryDelegationTotalRewardsRequest { + /** QueryDelegationTotalRewardsRequest delegatorAddress */ + delegatorAddress?: string | null; + } + + /** Represents a QueryDelegationTotalRewardsRequest. */ + class QueryDelegationTotalRewardsRequest implements IQueryDelegationTotalRewardsRequest { + /** + * Constructs a new QueryDelegationTotalRewardsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsRequest); + + /** QueryDelegationTotalRewardsRequest delegatorAddress. */ + public delegatorAddress: string; + + /** + * Creates a new QueryDelegationTotalRewardsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegationTotalRewardsRequest instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsRequest, + ): cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest; + + /** + * Encodes the specified QueryDelegationTotalRewardsRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.verify|verify} messages. + * @param m QueryDelegationTotalRewardsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegationTotalRewardsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegationTotalRewardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest; + } + + /** Properties of a QueryDelegationTotalRewardsResponse. */ + interface IQueryDelegationTotalRewardsResponse { + /** QueryDelegationTotalRewardsResponse rewards */ + rewards?: cosmos.distribution.v1beta1.IDelegationDelegatorReward[] | null; + + /** QueryDelegationTotalRewardsResponse total */ + total?: cosmos.base.v1beta1.IDecCoin[] | null; + } + + /** Represents a QueryDelegationTotalRewardsResponse. */ + class QueryDelegationTotalRewardsResponse implements IQueryDelegationTotalRewardsResponse { + /** + * Constructs a new QueryDelegationTotalRewardsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsResponse); + + /** QueryDelegationTotalRewardsResponse rewards. */ + public rewards: cosmos.distribution.v1beta1.IDelegationDelegatorReward[]; + + /** QueryDelegationTotalRewardsResponse total. */ + public total: cosmos.base.v1beta1.IDecCoin[]; + + /** + * Creates a new QueryDelegationTotalRewardsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegationTotalRewardsResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsResponse, + ): cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse; + + /** + * Encodes the specified QueryDelegationTotalRewardsResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.verify|verify} messages. + * @param m QueryDelegationTotalRewardsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegationTotalRewardsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegationTotalRewardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse; + } + + /** Properties of a QueryDelegatorValidatorsRequest. */ + interface IQueryDelegatorValidatorsRequest { + /** QueryDelegatorValidatorsRequest delegatorAddress */ + delegatorAddress?: string | null; + } + + /** Represents a QueryDelegatorValidatorsRequest. */ + class QueryDelegatorValidatorsRequest implements IQueryDelegatorValidatorsRequest { + /** + * Constructs a new QueryDelegatorValidatorsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryDelegatorValidatorsRequest); + + /** QueryDelegatorValidatorsRequest delegatorAddress. */ + public delegatorAddress: string; + + /** + * Creates a new QueryDelegatorValidatorsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegatorValidatorsRequest instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryDelegatorValidatorsRequest, + ): cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest; + + /** + * Encodes the specified QueryDelegatorValidatorsRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.verify|verify} messages. + * @param m QueryDelegatorValidatorsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryDelegatorValidatorsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegatorValidatorsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegatorValidatorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest; + } + + /** Properties of a QueryDelegatorValidatorsResponse. */ + interface IQueryDelegatorValidatorsResponse { + /** QueryDelegatorValidatorsResponse validators */ + validators?: string[] | null; + } + + /** Represents a QueryDelegatorValidatorsResponse. */ + class QueryDelegatorValidatorsResponse implements IQueryDelegatorValidatorsResponse { + /** + * Constructs a new QueryDelegatorValidatorsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryDelegatorValidatorsResponse); + + /** QueryDelegatorValidatorsResponse validators. */ + public validators: string[]; + + /** + * Creates a new QueryDelegatorValidatorsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegatorValidatorsResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryDelegatorValidatorsResponse, + ): cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse; + + /** + * Encodes the specified QueryDelegatorValidatorsResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.verify|verify} messages. + * @param m QueryDelegatorValidatorsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryDelegatorValidatorsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegatorValidatorsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegatorValidatorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse; + } + + /** Properties of a QueryDelegatorWithdrawAddressRequest. */ + interface IQueryDelegatorWithdrawAddressRequest { + /** QueryDelegatorWithdrawAddressRequest delegatorAddress */ + delegatorAddress?: string | null; + } + + /** Represents a QueryDelegatorWithdrawAddressRequest. */ + class QueryDelegatorWithdrawAddressRequest implements IQueryDelegatorWithdrawAddressRequest { + /** + * Constructs a new QueryDelegatorWithdrawAddressRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressRequest); + + /** QueryDelegatorWithdrawAddressRequest delegatorAddress. */ + public delegatorAddress: string; + + /** + * Creates a new QueryDelegatorWithdrawAddressRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegatorWithdrawAddressRequest instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressRequest, + ): cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest; + + /** + * Encodes the specified QueryDelegatorWithdrawAddressRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.verify|verify} messages. + * @param m QueryDelegatorWithdrawAddressRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegatorWithdrawAddressRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegatorWithdrawAddressRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest; + } + + /** Properties of a QueryDelegatorWithdrawAddressResponse. */ + interface IQueryDelegatorWithdrawAddressResponse { + /** QueryDelegatorWithdrawAddressResponse withdrawAddress */ + withdrawAddress?: string | null; + } + + /** Represents a QueryDelegatorWithdrawAddressResponse. */ + class QueryDelegatorWithdrawAddressResponse implements IQueryDelegatorWithdrawAddressResponse { + /** + * Constructs a new QueryDelegatorWithdrawAddressResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressResponse); + + /** QueryDelegatorWithdrawAddressResponse withdrawAddress. */ + public withdrawAddress: string; + + /** + * Creates a new QueryDelegatorWithdrawAddressResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegatorWithdrawAddressResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressResponse, + ): cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse; + + /** + * Encodes the specified QueryDelegatorWithdrawAddressResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.verify|verify} messages. + * @param m QueryDelegatorWithdrawAddressResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegatorWithdrawAddressResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegatorWithdrawAddressResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse; + } + + /** Properties of a QueryCommunityPoolRequest. */ + interface IQueryCommunityPoolRequest {} + + /** Represents a QueryCommunityPoolRequest. */ + class QueryCommunityPoolRequest implements IQueryCommunityPoolRequest { + /** + * Constructs a new QueryCommunityPoolRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryCommunityPoolRequest); + + /** + * Creates a new QueryCommunityPoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryCommunityPoolRequest instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryCommunityPoolRequest, + ): cosmos.distribution.v1beta1.QueryCommunityPoolRequest; + + /** + * Encodes the specified QueryCommunityPoolRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryCommunityPoolRequest.verify|verify} messages. + * @param m QueryCommunityPoolRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryCommunityPoolRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryCommunityPoolRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryCommunityPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryCommunityPoolRequest; + } + + /** Properties of a QueryCommunityPoolResponse. */ + interface IQueryCommunityPoolResponse { + /** QueryCommunityPoolResponse pool */ + pool?: cosmos.base.v1beta1.IDecCoin[] | null; + } + + /** Represents a QueryCommunityPoolResponse. */ + class QueryCommunityPoolResponse implements IQueryCommunityPoolResponse { + /** + * Constructs a new QueryCommunityPoolResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IQueryCommunityPoolResponse); + + /** QueryCommunityPoolResponse pool. */ + public pool: cosmos.base.v1beta1.IDecCoin[]; + + /** + * Creates a new QueryCommunityPoolResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryCommunityPoolResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IQueryCommunityPoolResponse, + ): cosmos.distribution.v1beta1.QueryCommunityPoolResponse; + + /** + * Encodes the specified QueryCommunityPoolResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryCommunityPoolResponse.verify|verify} messages. + * @param m QueryCommunityPoolResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IQueryCommunityPoolResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryCommunityPoolResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryCommunityPoolResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.QueryCommunityPoolResponse; + } + + /** Represents a Msg */ + class Msg extends $protobuf.rpc.Service { + /** + * Constructs a new Msg service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Msg service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create( + rpcImpl: $protobuf.RPCImpl, + requestDelimited?: boolean, + responseDelimited?: boolean, + ): Msg; + + /** + * Calls SetWithdrawAddress. + * @param request MsgSetWithdrawAddress message or plain object + * @param callback Node-style callback called with the error, if any, and MsgSetWithdrawAddressResponse + */ + public setWithdrawAddress( + request: cosmos.distribution.v1beta1.IMsgSetWithdrawAddress, + callback: cosmos.distribution.v1beta1.Msg.SetWithdrawAddressCallback, + ): void; + + /** + * Calls SetWithdrawAddress. + * @param request MsgSetWithdrawAddress message or plain object + * @returns Promise + */ + public setWithdrawAddress( + request: cosmos.distribution.v1beta1.IMsgSetWithdrawAddress, + ): Promise; + + /** + * Calls WithdrawDelegatorReward. + * @param request MsgWithdrawDelegatorReward message or plain object + * @param callback Node-style callback called with the error, if any, and MsgWithdrawDelegatorRewardResponse + */ + public withdrawDelegatorReward( + request: cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward, + callback: cosmos.distribution.v1beta1.Msg.WithdrawDelegatorRewardCallback, + ): void; + + /** + * Calls WithdrawDelegatorReward. + * @param request MsgWithdrawDelegatorReward message or plain object + * @returns Promise + */ + public withdrawDelegatorReward( + request: cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward, + ): Promise; + + /** + * Calls WithdrawValidatorCommission. + * @param request MsgWithdrawValidatorCommission message or plain object + * @param callback Node-style callback called with the error, if any, and MsgWithdrawValidatorCommissionResponse + */ + public withdrawValidatorCommission( + request: cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission, + callback: cosmos.distribution.v1beta1.Msg.WithdrawValidatorCommissionCallback, + ): void; + + /** + * Calls WithdrawValidatorCommission. + * @param request MsgWithdrawValidatorCommission message or plain object + * @returns Promise + */ + public withdrawValidatorCommission( + request: cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission, + ): Promise; + + /** + * Calls FundCommunityPool. + * @param request MsgFundCommunityPool message or plain object + * @param callback Node-style callback called with the error, if any, and MsgFundCommunityPoolResponse + */ + public fundCommunityPool( + request: cosmos.distribution.v1beta1.IMsgFundCommunityPool, + callback: cosmos.distribution.v1beta1.Msg.FundCommunityPoolCallback, + ): void; + + /** + * Calls FundCommunityPool. + * @param request MsgFundCommunityPool message or plain object + * @returns Promise + */ + public fundCommunityPool( + request: cosmos.distribution.v1beta1.IMsgFundCommunityPool, + ): Promise; + } + + namespace Msg { + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Msg#setWithdrawAddress}. + * @param error Error, if any + * @param [response] MsgSetWithdrawAddressResponse + */ + type SetWithdrawAddressCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Msg#withdrawDelegatorReward}. + * @param error Error, if any + * @param [response] MsgWithdrawDelegatorRewardResponse + */ + type WithdrawDelegatorRewardCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Msg#withdrawValidatorCommission}. + * @param error Error, if any + * @param [response] MsgWithdrawValidatorCommissionResponse + */ + type WithdrawValidatorCommissionCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Msg#fundCommunityPool}. + * @param error Error, if any + * @param [response] MsgFundCommunityPoolResponse + */ + type FundCommunityPoolCallback = ( + error: Error | null, + response?: cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse, + ) => void; + } + + /** Properties of a MsgSetWithdrawAddress. */ + interface IMsgSetWithdrawAddress { + /** MsgSetWithdrawAddress delegatorAddress */ + delegatorAddress?: string | null; + + /** MsgSetWithdrawAddress withdrawAddress */ + withdrawAddress?: string | null; + } + + /** Represents a MsgSetWithdrawAddress. */ + class MsgSetWithdrawAddress implements IMsgSetWithdrawAddress { + /** + * Constructs a new MsgSetWithdrawAddress. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IMsgSetWithdrawAddress); + + /** MsgSetWithdrawAddress delegatorAddress. */ + public delegatorAddress: string; + + /** MsgSetWithdrawAddress withdrawAddress. */ + public withdrawAddress: string; + + /** + * Creates a new MsgSetWithdrawAddress instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgSetWithdrawAddress instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IMsgSetWithdrawAddress, + ): cosmos.distribution.v1beta1.MsgSetWithdrawAddress; + + /** + * Encodes the specified MsgSetWithdrawAddress message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgSetWithdrawAddress.verify|verify} messages. + * @param m MsgSetWithdrawAddress message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IMsgSetWithdrawAddress, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgSetWithdrawAddress message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns MsgSetWithdrawAddress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.MsgSetWithdrawAddress; + } + + /** Properties of a MsgSetWithdrawAddressResponse. */ + interface IMsgSetWithdrawAddressResponse {} + + /** Represents a MsgSetWithdrawAddressResponse. */ + class MsgSetWithdrawAddressResponse implements IMsgSetWithdrawAddressResponse { + /** + * Constructs a new MsgSetWithdrawAddressResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IMsgSetWithdrawAddressResponse); + + /** + * Creates a new MsgSetWithdrawAddressResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgSetWithdrawAddressResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IMsgSetWithdrawAddressResponse, + ): cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse; + + /** + * Encodes the specified MsgSetWithdrawAddressResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.verify|verify} messages. + * @param m MsgSetWithdrawAddressResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IMsgSetWithdrawAddressResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgSetWithdrawAddressResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns MsgSetWithdrawAddressResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse; + } + + /** Properties of a MsgWithdrawDelegatorReward. */ + interface IMsgWithdrawDelegatorReward { + /** MsgWithdrawDelegatorReward delegatorAddress */ + delegatorAddress?: string | null; + + /** MsgWithdrawDelegatorReward validatorAddress */ + validatorAddress?: string | null; + } + + /** Represents a MsgWithdrawDelegatorReward. */ + class MsgWithdrawDelegatorReward implements IMsgWithdrawDelegatorReward { + /** + * Constructs a new MsgWithdrawDelegatorReward. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward); + + /** MsgWithdrawDelegatorReward delegatorAddress. */ + public delegatorAddress: string; + + /** MsgWithdrawDelegatorReward validatorAddress. */ + public validatorAddress: string; + + /** + * Creates a new MsgWithdrawDelegatorReward instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgWithdrawDelegatorReward instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward, + ): cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward; + + /** + * Encodes the specified MsgWithdrawDelegatorReward message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.verify|verify} messages. + * @param m MsgWithdrawDelegatorReward message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgWithdrawDelegatorReward message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns MsgWithdrawDelegatorReward + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward; + } + + /** Properties of a MsgWithdrawDelegatorRewardResponse. */ + interface IMsgWithdrawDelegatorRewardResponse {} + + /** Represents a MsgWithdrawDelegatorRewardResponse. */ + class MsgWithdrawDelegatorRewardResponse implements IMsgWithdrawDelegatorRewardResponse { + /** + * Constructs a new MsgWithdrawDelegatorRewardResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IMsgWithdrawDelegatorRewardResponse); + + /** + * Creates a new MsgWithdrawDelegatorRewardResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgWithdrawDelegatorRewardResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IMsgWithdrawDelegatorRewardResponse, + ): cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse; + + /** + * Encodes the specified MsgWithdrawDelegatorRewardResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.verify|verify} messages. + * @param m MsgWithdrawDelegatorRewardResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IMsgWithdrawDelegatorRewardResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgWithdrawDelegatorRewardResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns MsgWithdrawDelegatorRewardResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse; + } + + /** Properties of a MsgWithdrawValidatorCommission. */ + interface IMsgWithdrawValidatorCommission { + /** MsgWithdrawValidatorCommission validatorAddress */ + validatorAddress?: string | null; + } + + /** Represents a MsgWithdrawValidatorCommission. */ + class MsgWithdrawValidatorCommission implements IMsgWithdrawValidatorCommission { + /** + * Constructs a new MsgWithdrawValidatorCommission. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission); + + /** MsgWithdrawValidatorCommission validatorAddress. */ + public validatorAddress: string; + + /** + * Creates a new MsgWithdrawValidatorCommission instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgWithdrawValidatorCommission instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission, + ): cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission; + + /** + * Encodes the specified MsgWithdrawValidatorCommission message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.verify|verify} messages. + * @param m MsgWithdrawValidatorCommission message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgWithdrawValidatorCommission message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns MsgWithdrawValidatorCommission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission; + } + + /** Properties of a MsgWithdrawValidatorCommissionResponse. */ + interface IMsgWithdrawValidatorCommissionResponse {} + + /** Represents a MsgWithdrawValidatorCommissionResponse. */ + class MsgWithdrawValidatorCommissionResponse implements IMsgWithdrawValidatorCommissionResponse { + /** + * Constructs a new MsgWithdrawValidatorCommissionResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommissionResponse); + + /** + * Creates a new MsgWithdrawValidatorCommissionResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgWithdrawValidatorCommissionResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommissionResponse, + ): cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse; + + /** + * Encodes the specified MsgWithdrawValidatorCommissionResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.verify|verify} messages. + * @param m MsgWithdrawValidatorCommissionResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommissionResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgWithdrawValidatorCommissionResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns MsgWithdrawValidatorCommissionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse; + } + + /** Properties of a MsgFundCommunityPool. */ + interface IMsgFundCommunityPool { + /** MsgFundCommunityPool amount */ + amount?: cosmos.base.v1beta1.ICoin[] | null; + + /** MsgFundCommunityPool depositor */ + depositor?: string | null; + } + + /** Represents a MsgFundCommunityPool. */ + class MsgFundCommunityPool implements IMsgFundCommunityPool { + /** + * Constructs a new MsgFundCommunityPool. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IMsgFundCommunityPool); + + /** MsgFundCommunityPool amount. */ + public amount: cosmos.base.v1beta1.ICoin[]; + + /** MsgFundCommunityPool depositor. */ + public depositor: string; + + /** + * Creates a new MsgFundCommunityPool instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgFundCommunityPool instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IMsgFundCommunityPool, + ): cosmos.distribution.v1beta1.MsgFundCommunityPool; + + /** + * Encodes the specified MsgFundCommunityPool message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgFundCommunityPool.verify|verify} messages. + * @param m MsgFundCommunityPool message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IMsgFundCommunityPool, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgFundCommunityPool message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns MsgFundCommunityPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.MsgFundCommunityPool; + } + + /** Properties of a MsgFundCommunityPoolResponse. */ + interface IMsgFundCommunityPoolResponse {} + + /** Represents a MsgFundCommunityPoolResponse. */ + class MsgFundCommunityPoolResponse implements IMsgFundCommunityPoolResponse { + /** + * Constructs a new MsgFundCommunityPoolResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.distribution.v1beta1.IMsgFundCommunityPoolResponse); + + /** + * Creates a new MsgFundCommunityPoolResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgFundCommunityPoolResponse instance + */ + public static create( + properties?: cosmos.distribution.v1beta1.IMsgFundCommunityPoolResponse, + ): cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse; + + /** + * Encodes the specified MsgFundCommunityPoolResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.verify|verify} messages. + * @param m MsgFundCommunityPoolResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.distribution.v1beta1.IMsgFundCommunityPoolResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgFundCommunityPoolResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns MsgFundCommunityPoolResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse; + } + } + } + /** Namespace staking. */ namespace staking { /** Namespace v1beta1. */ namespace v1beta1 { + /** Represents a Query */ + class Query extends $protobuf.rpc.Service { + /** + * Constructs a new Query service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Query service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create( + rpcImpl: $protobuf.RPCImpl, + requestDelimited?: boolean, + responseDelimited?: boolean, + ): Query; + + /** + * Calls Validators. + * @param request QueryValidatorsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryValidatorsResponse + */ + public validators( + request: cosmos.staking.v1beta1.IQueryValidatorsRequest, + callback: cosmos.staking.v1beta1.Query.ValidatorsCallback, + ): void; + + /** + * Calls Validators. + * @param request QueryValidatorsRequest message or plain object + * @returns Promise + */ + public validators( + request: cosmos.staking.v1beta1.IQueryValidatorsRequest, + ): Promise; + + /** + * Calls Validator. + * @param request QueryValidatorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryValidatorResponse + */ + public validator( + request: cosmos.staking.v1beta1.IQueryValidatorRequest, + callback: cosmos.staking.v1beta1.Query.ValidatorCallback, + ): void; + + /** + * Calls Validator. + * @param request QueryValidatorRequest message or plain object + * @returns Promise + */ + public validator( + request: cosmos.staking.v1beta1.IQueryValidatorRequest, + ): Promise; + + /** + * Calls ValidatorDelegations. + * @param request QueryValidatorDelegationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryValidatorDelegationsResponse + */ + public validatorDelegations( + request: cosmos.staking.v1beta1.IQueryValidatorDelegationsRequest, + callback: cosmos.staking.v1beta1.Query.ValidatorDelegationsCallback, + ): void; + + /** + * Calls ValidatorDelegations. + * @param request QueryValidatorDelegationsRequest message or plain object + * @returns Promise + */ + public validatorDelegations( + request: cosmos.staking.v1beta1.IQueryValidatorDelegationsRequest, + ): Promise; + + /** + * Calls ValidatorUnbondingDelegations. + * @param request QueryValidatorUnbondingDelegationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryValidatorUnbondingDelegationsResponse + */ + public validatorUnbondingDelegations( + request: cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsRequest, + callback: cosmos.staking.v1beta1.Query.ValidatorUnbondingDelegationsCallback, + ): void; + + /** + * Calls ValidatorUnbondingDelegations. + * @param request QueryValidatorUnbondingDelegationsRequest message or plain object + * @returns Promise + */ + public validatorUnbondingDelegations( + request: cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsRequest, + ): Promise; + + /** + * Calls Delegation. + * @param request QueryDelegationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryDelegationResponse + */ + public delegation( + request: cosmos.staking.v1beta1.IQueryDelegationRequest, + callback: cosmos.staking.v1beta1.Query.DelegationCallback, + ): void; + + /** + * Calls Delegation. + * @param request QueryDelegationRequest message or plain object + * @returns Promise + */ + public delegation( + request: cosmos.staking.v1beta1.IQueryDelegationRequest, + ): Promise; + + /** + * Calls UnbondingDelegation. + * @param request QueryUnbondingDelegationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryUnbondingDelegationResponse + */ + public unbondingDelegation( + request: cosmos.staking.v1beta1.IQueryUnbondingDelegationRequest, + callback: cosmos.staking.v1beta1.Query.UnbondingDelegationCallback, + ): void; + + /** + * Calls UnbondingDelegation. + * @param request QueryUnbondingDelegationRequest message or plain object + * @returns Promise + */ + public unbondingDelegation( + request: cosmos.staking.v1beta1.IQueryUnbondingDelegationRequest, + ): Promise; + + /** + * Calls DelegatorDelegations. + * @param request QueryDelegatorDelegationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryDelegatorDelegationsResponse + */ + public delegatorDelegations( + request: cosmos.staking.v1beta1.IQueryDelegatorDelegationsRequest, + callback: cosmos.staking.v1beta1.Query.DelegatorDelegationsCallback, + ): void; + + /** + * Calls DelegatorDelegations. + * @param request QueryDelegatorDelegationsRequest message or plain object + * @returns Promise + */ + public delegatorDelegations( + request: cosmos.staking.v1beta1.IQueryDelegatorDelegationsRequest, + ): Promise; + + /** + * Calls DelegatorUnbondingDelegations. + * @param request QueryDelegatorUnbondingDelegationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryDelegatorUnbondingDelegationsResponse + */ + public delegatorUnbondingDelegations( + request: cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsRequest, + callback: cosmos.staking.v1beta1.Query.DelegatorUnbondingDelegationsCallback, + ): void; + + /** + * Calls DelegatorUnbondingDelegations. + * @param request QueryDelegatorUnbondingDelegationsRequest message or plain object + * @returns Promise + */ + public delegatorUnbondingDelegations( + request: cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsRequest, + ): Promise; + + /** + * Calls Redelegations. + * @param request QueryRedelegationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryRedelegationsResponse + */ + public redelegations( + request: cosmos.staking.v1beta1.IQueryRedelegationsRequest, + callback: cosmos.staking.v1beta1.Query.RedelegationsCallback, + ): void; + + /** + * Calls Redelegations. + * @param request QueryRedelegationsRequest message or plain object + * @returns Promise + */ + public redelegations( + request: cosmos.staking.v1beta1.IQueryRedelegationsRequest, + ): Promise; + + /** + * Calls DelegatorValidators. + * @param request QueryDelegatorValidatorsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryDelegatorValidatorsResponse + */ + public delegatorValidators( + request: cosmos.staking.v1beta1.IQueryDelegatorValidatorsRequest, + callback: cosmos.staking.v1beta1.Query.DelegatorValidatorsCallback, + ): void; + + /** + * Calls DelegatorValidators. + * @param request QueryDelegatorValidatorsRequest message or plain object + * @returns Promise + */ + public delegatorValidators( + request: cosmos.staking.v1beta1.IQueryDelegatorValidatorsRequest, + ): Promise; + + /** + * Calls DelegatorValidator. + * @param request QueryDelegatorValidatorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryDelegatorValidatorResponse + */ + public delegatorValidator( + request: cosmos.staking.v1beta1.IQueryDelegatorValidatorRequest, + callback: cosmos.staking.v1beta1.Query.DelegatorValidatorCallback, + ): void; + + /** + * Calls DelegatorValidator. + * @param request QueryDelegatorValidatorRequest message or plain object + * @returns Promise + */ + public delegatorValidator( + request: cosmos.staking.v1beta1.IQueryDelegatorValidatorRequest, + ): Promise; + + /** + * Calls HistoricalInfo. + * @param request QueryHistoricalInfoRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryHistoricalInfoResponse + */ + public historicalInfo( + request: cosmos.staking.v1beta1.IQueryHistoricalInfoRequest, + callback: cosmos.staking.v1beta1.Query.HistoricalInfoCallback, + ): void; + + /** + * Calls HistoricalInfo. + * @param request QueryHistoricalInfoRequest message or plain object + * @returns Promise + */ + public historicalInfo( + request: cosmos.staking.v1beta1.IQueryHistoricalInfoRequest, + ): Promise; + + /** + * Calls Pool. + * @param request QueryPoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryPoolResponse + */ + public pool( + request: cosmos.staking.v1beta1.IQueryPoolRequest, + callback: cosmos.staking.v1beta1.Query.PoolCallback, + ): void; + + /** + * Calls Pool. + * @param request QueryPoolRequest message or plain object + * @returns Promise + */ + public pool( + request: cosmos.staking.v1beta1.IQueryPoolRequest, + ): Promise; + + /** + * Calls Params. + * @param request QueryParamsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryParamsResponse + */ + public params( + request: cosmos.staking.v1beta1.IQueryParamsRequest, + callback: cosmos.staking.v1beta1.Query.ParamsCallback, + ): void; + + /** + * Calls Params. + * @param request QueryParamsRequest message or plain object + * @returns Promise + */ + public params( + request: cosmos.staking.v1beta1.IQueryParamsRequest, + ): Promise; + } + + namespace Query { + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#validators}. + * @param error Error, if any + * @param [response] QueryValidatorsResponse + */ + type ValidatorsCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryValidatorsResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#validator}. + * @param error Error, if any + * @param [response] QueryValidatorResponse + */ + type ValidatorCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryValidatorResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#validatorDelegations}. + * @param error Error, if any + * @param [response] QueryValidatorDelegationsResponse + */ + type ValidatorDelegationsCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryValidatorDelegationsResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#validatorUnbondingDelegations}. + * @param error Error, if any + * @param [response] QueryValidatorUnbondingDelegationsResponse + */ + type ValidatorUnbondingDelegationsCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#delegation}. + * @param error Error, if any + * @param [response] QueryDelegationResponse + */ + type DelegationCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryDelegationResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#unbondingDelegation}. + * @param error Error, if any + * @param [response] QueryUnbondingDelegationResponse + */ + type UnbondingDelegationCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryUnbondingDelegationResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#delegatorDelegations}. + * @param error Error, if any + * @param [response] QueryDelegatorDelegationsResponse + */ + type DelegatorDelegationsCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#delegatorUnbondingDelegations}. + * @param error Error, if any + * @param [response] QueryDelegatorUnbondingDelegationsResponse + */ + type DelegatorUnbondingDelegationsCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#redelegations}. + * @param error Error, if any + * @param [response] QueryRedelegationsResponse + */ + type RedelegationsCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryRedelegationsResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#delegatorValidators}. + * @param error Error, if any + * @param [response] QueryDelegatorValidatorsResponse + */ + type DelegatorValidatorsCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#delegatorValidator}. + * @param error Error, if any + * @param [response] QueryDelegatorValidatorResponse + */ + type DelegatorValidatorCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryDelegatorValidatorResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#historicalInfo}. + * @param error Error, if any + * @param [response] QueryHistoricalInfoResponse + */ + type HistoricalInfoCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryHistoricalInfoResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#pool}. + * @param error Error, if any + * @param [response] QueryPoolResponse + */ + type PoolCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryPoolResponse, + ) => void; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#params}. + * @param error Error, if any + * @param [response] QueryParamsResponse + */ + type ParamsCallback = ( + error: Error | null, + response?: cosmos.staking.v1beta1.QueryParamsResponse, + ) => void; + } + + /** Properties of a QueryValidatorsRequest. */ + interface IQueryValidatorsRequest { + /** QueryValidatorsRequest status */ + status?: string | null; + + /** QueryValidatorsRequest pagination */ + pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + } + + /** Represents a QueryValidatorsRequest. */ + class QueryValidatorsRequest implements IQueryValidatorsRequest { + /** + * Constructs a new QueryValidatorsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryValidatorsRequest); + + /** QueryValidatorsRequest status. */ + public status: string; + + /** QueryValidatorsRequest pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + + /** + * Creates a new QueryValidatorsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorsRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryValidatorsRequest, + ): cosmos.staking.v1beta1.QueryValidatorsRequest; + + /** + * Encodes the specified QueryValidatorsRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorsRequest.verify|verify} messages. + * @param m QueryValidatorsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryValidatorsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryValidatorsRequest; + } + + /** Properties of a QueryValidatorsResponse. */ + interface IQueryValidatorsResponse { + /** QueryValidatorsResponse validators */ + validators?: cosmos.staking.v1beta1.IValidator[] | null; + + /** QueryValidatorsResponse pagination */ + pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + } + + /** Represents a QueryValidatorsResponse. */ + class QueryValidatorsResponse implements IQueryValidatorsResponse { + /** + * Constructs a new QueryValidatorsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryValidatorsResponse); + + /** QueryValidatorsResponse validators. */ + public validators: cosmos.staking.v1beta1.IValidator[]; + + /** QueryValidatorsResponse pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + + /** + * Creates a new QueryValidatorsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorsResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryValidatorsResponse, + ): cosmos.staking.v1beta1.QueryValidatorsResponse; + + /** + * Encodes the specified QueryValidatorsResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorsResponse.verify|verify} messages. + * @param m QueryValidatorsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryValidatorsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryValidatorsResponse; + } + + /** Properties of a QueryValidatorRequest. */ + interface IQueryValidatorRequest { + /** QueryValidatorRequest validatorAddr */ + validatorAddr?: string | null; + } + + /** Represents a QueryValidatorRequest. */ + class QueryValidatorRequest implements IQueryValidatorRequest { + /** + * Constructs a new QueryValidatorRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryValidatorRequest); + + /** QueryValidatorRequest validatorAddr. */ + public validatorAddr: string; + + /** + * Creates a new QueryValidatorRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryValidatorRequest, + ): cosmos.staking.v1beta1.QueryValidatorRequest; + + /** + * Encodes the specified QueryValidatorRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorRequest.verify|verify} messages. + * @param m QueryValidatorRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryValidatorRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryValidatorRequest; + } + + /** Properties of a QueryValidatorResponse. */ + interface IQueryValidatorResponse { + /** QueryValidatorResponse validator */ + validator?: cosmos.staking.v1beta1.IValidator | null; + } + + /** Represents a QueryValidatorResponse. */ + class QueryValidatorResponse implements IQueryValidatorResponse { + /** + * Constructs a new QueryValidatorResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryValidatorResponse); + + /** QueryValidatorResponse validator. */ + public validator?: cosmos.staking.v1beta1.IValidator | null; + + /** + * Creates a new QueryValidatorResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryValidatorResponse, + ): cosmos.staking.v1beta1.QueryValidatorResponse; + + /** + * Encodes the specified QueryValidatorResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorResponse.verify|verify} messages. + * @param m QueryValidatorResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryValidatorResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryValidatorResponse; + } + + /** Properties of a QueryValidatorDelegationsRequest. */ + interface IQueryValidatorDelegationsRequest { + /** QueryValidatorDelegationsRequest validatorAddr */ + validatorAddr?: string | null; + + /** QueryValidatorDelegationsRequest pagination */ + pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + } + + /** Represents a QueryValidatorDelegationsRequest. */ + class QueryValidatorDelegationsRequest implements IQueryValidatorDelegationsRequest { + /** + * Constructs a new QueryValidatorDelegationsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryValidatorDelegationsRequest); + + /** QueryValidatorDelegationsRequest validatorAddr. */ + public validatorAddr: string; + + /** QueryValidatorDelegationsRequest pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + + /** + * Creates a new QueryValidatorDelegationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorDelegationsRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryValidatorDelegationsRequest, + ): cosmos.staking.v1beta1.QueryValidatorDelegationsRequest; + + /** + * Encodes the specified QueryValidatorDelegationsRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.verify|verify} messages. + * @param m QueryValidatorDelegationsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryValidatorDelegationsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorDelegationsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorDelegationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryValidatorDelegationsRequest; + } + + /** Properties of a QueryValidatorDelegationsResponse. */ + interface IQueryValidatorDelegationsResponse { + /** QueryValidatorDelegationsResponse delegationResponses */ + delegationResponses?: cosmos.staking.v1beta1.IDelegationResponse[] | null; + + /** QueryValidatorDelegationsResponse pagination */ + pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + } + + /** Represents a QueryValidatorDelegationsResponse. */ + class QueryValidatorDelegationsResponse implements IQueryValidatorDelegationsResponse { + /** + * Constructs a new QueryValidatorDelegationsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryValidatorDelegationsResponse); + + /** QueryValidatorDelegationsResponse delegationResponses. */ + public delegationResponses: cosmos.staking.v1beta1.IDelegationResponse[]; + + /** QueryValidatorDelegationsResponse pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + + /** + * Creates a new QueryValidatorDelegationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorDelegationsResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryValidatorDelegationsResponse, + ): cosmos.staking.v1beta1.QueryValidatorDelegationsResponse; + + /** + * Encodes the specified QueryValidatorDelegationsResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.verify|verify} messages. + * @param m QueryValidatorDelegationsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryValidatorDelegationsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorDelegationsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorDelegationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryValidatorDelegationsResponse; + } + + /** Properties of a QueryValidatorUnbondingDelegationsRequest. */ + interface IQueryValidatorUnbondingDelegationsRequest { + /** QueryValidatorUnbondingDelegationsRequest validatorAddr */ + validatorAddr?: string | null; + + /** QueryValidatorUnbondingDelegationsRequest pagination */ + pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + } + + /** Represents a QueryValidatorUnbondingDelegationsRequest. */ + class QueryValidatorUnbondingDelegationsRequest implements IQueryValidatorUnbondingDelegationsRequest { + /** + * Constructs a new QueryValidatorUnbondingDelegationsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsRequest); + + /** QueryValidatorUnbondingDelegationsRequest validatorAddr. */ + public validatorAddr: string; + + /** QueryValidatorUnbondingDelegationsRequest pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + + /** + * Creates a new QueryValidatorUnbondingDelegationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorUnbondingDelegationsRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsRequest, + ): cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest; + + /** + * Encodes the specified QueryValidatorUnbondingDelegationsRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.verify|verify} messages. + * @param m QueryValidatorUnbondingDelegationsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorUnbondingDelegationsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorUnbondingDelegationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest; + } + + /** Properties of a QueryValidatorUnbondingDelegationsResponse. */ + interface IQueryValidatorUnbondingDelegationsResponse { + /** QueryValidatorUnbondingDelegationsResponse unbondingResponses */ + unbondingResponses?: cosmos.staking.v1beta1.IUnbondingDelegation[] | null; + + /** QueryValidatorUnbondingDelegationsResponse pagination */ + pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + } + + /** Represents a QueryValidatorUnbondingDelegationsResponse. */ + class QueryValidatorUnbondingDelegationsResponse + implements IQueryValidatorUnbondingDelegationsResponse { + /** + * Constructs a new QueryValidatorUnbondingDelegationsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsResponse); + + /** QueryValidatorUnbondingDelegationsResponse unbondingResponses. */ + public unbondingResponses: cosmos.staking.v1beta1.IUnbondingDelegation[]; + + /** QueryValidatorUnbondingDelegationsResponse pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + + /** + * Creates a new QueryValidatorUnbondingDelegationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryValidatorUnbondingDelegationsResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsResponse, + ): cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse; + + /** + * Encodes the specified QueryValidatorUnbondingDelegationsResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.verify|verify} messages. + * @param m QueryValidatorUnbondingDelegationsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryValidatorUnbondingDelegationsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryValidatorUnbondingDelegationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse; + } + + /** Properties of a QueryDelegationRequest. */ + interface IQueryDelegationRequest { + /** QueryDelegationRequest delegatorAddr */ + delegatorAddr?: string | null; + + /** QueryDelegationRequest validatorAddr */ + validatorAddr?: string | null; + } + + /** Represents a QueryDelegationRequest. */ + class QueryDelegationRequest implements IQueryDelegationRequest { + /** + * Constructs a new QueryDelegationRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryDelegationRequest); + + /** QueryDelegationRequest delegatorAddr. */ + public delegatorAddr: string; + + /** QueryDelegationRequest validatorAddr. */ + public validatorAddr: string; + + /** + * Creates a new QueryDelegationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegationRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryDelegationRequest, + ): cosmos.staking.v1beta1.QueryDelegationRequest; + + /** + * Encodes the specified QueryDelegationRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegationRequest.verify|verify} messages. + * @param m QueryDelegationRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryDelegationRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegationRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryDelegationRequest; + } + + /** Properties of a QueryDelegationResponse. */ + interface IQueryDelegationResponse { + /** QueryDelegationResponse delegationResponse */ + delegationResponse?: cosmos.staking.v1beta1.IDelegationResponse | null; + } + + /** Represents a QueryDelegationResponse. */ + class QueryDelegationResponse implements IQueryDelegationResponse { + /** + * Constructs a new QueryDelegationResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryDelegationResponse); + + /** QueryDelegationResponse delegationResponse. */ + public delegationResponse?: cosmos.staking.v1beta1.IDelegationResponse | null; + + /** + * Creates a new QueryDelegationResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegationResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryDelegationResponse, + ): cosmos.staking.v1beta1.QueryDelegationResponse; + + /** + * Encodes the specified QueryDelegationResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegationResponse.verify|verify} messages. + * @param m QueryDelegationResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryDelegationResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegationResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryDelegationResponse; + } + + /** Properties of a QueryUnbondingDelegationRequest. */ + interface IQueryUnbondingDelegationRequest { + /** QueryUnbondingDelegationRequest delegatorAddr */ + delegatorAddr?: string | null; + + /** QueryUnbondingDelegationRequest validatorAddr */ + validatorAddr?: string | null; + } + + /** Represents a QueryUnbondingDelegationRequest. */ + class QueryUnbondingDelegationRequest implements IQueryUnbondingDelegationRequest { + /** + * Constructs a new QueryUnbondingDelegationRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryUnbondingDelegationRequest); + + /** QueryUnbondingDelegationRequest delegatorAddr. */ + public delegatorAddr: string; + + /** QueryUnbondingDelegationRequest validatorAddr. */ + public validatorAddr: string; + + /** + * Creates a new QueryUnbondingDelegationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryUnbondingDelegationRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryUnbondingDelegationRequest, + ): cosmos.staking.v1beta1.QueryUnbondingDelegationRequest; + + /** + * Encodes the specified QueryUnbondingDelegationRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.verify|verify} messages. + * @param m QueryUnbondingDelegationRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryUnbondingDelegationRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryUnbondingDelegationRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryUnbondingDelegationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryUnbondingDelegationRequest; + } + + /** Properties of a QueryUnbondingDelegationResponse. */ + interface IQueryUnbondingDelegationResponse { + /** QueryUnbondingDelegationResponse unbond */ + unbond?: cosmos.staking.v1beta1.IUnbondingDelegation | null; + } + + /** Represents a QueryUnbondingDelegationResponse. */ + class QueryUnbondingDelegationResponse implements IQueryUnbondingDelegationResponse { + /** + * Constructs a new QueryUnbondingDelegationResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryUnbondingDelegationResponse); + + /** QueryUnbondingDelegationResponse unbond. */ + public unbond?: cosmos.staking.v1beta1.IUnbondingDelegation | null; + + /** + * Creates a new QueryUnbondingDelegationResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryUnbondingDelegationResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryUnbondingDelegationResponse, + ): cosmos.staking.v1beta1.QueryUnbondingDelegationResponse; + + /** + * Encodes the specified QueryUnbondingDelegationResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.verify|verify} messages. + * @param m QueryUnbondingDelegationResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryUnbondingDelegationResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryUnbondingDelegationResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryUnbondingDelegationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryUnbondingDelegationResponse; + } + + /** Properties of a QueryDelegatorDelegationsRequest. */ + interface IQueryDelegatorDelegationsRequest { + /** QueryDelegatorDelegationsRequest delegatorAddr */ + delegatorAddr?: string | null; + + /** QueryDelegatorDelegationsRequest pagination */ + pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + } + + /** Represents a QueryDelegatorDelegationsRequest. */ + class QueryDelegatorDelegationsRequest implements IQueryDelegatorDelegationsRequest { + /** + * Constructs a new QueryDelegatorDelegationsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryDelegatorDelegationsRequest); + + /** QueryDelegatorDelegationsRequest delegatorAddr. */ + public delegatorAddr: string; + + /** QueryDelegatorDelegationsRequest pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + + /** + * Creates a new QueryDelegatorDelegationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegatorDelegationsRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryDelegatorDelegationsRequest, + ): cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest; + + /** + * Encodes the specified QueryDelegatorDelegationsRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.verify|verify} messages. + * @param m QueryDelegatorDelegationsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryDelegatorDelegationsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegatorDelegationsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegatorDelegationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest; + } + + /** Properties of a QueryDelegatorDelegationsResponse. */ + interface IQueryDelegatorDelegationsResponse { + /** QueryDelegatorDelegationsResponse delegationResponses */ + delegationResponses?: cosmos.staking.v1beta1.IDelegationResponse[] | null; + + /** QueryDelegatorDelegationsResponse pagination */ + pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + } + + /** Represents a QueryDelegatorDelegationsResponse. */ + class QueryDelegatorDelegationsResponse implements IQueryDelegatorDelegationsResponse { + /** + * Constructs a new QueryDelegatorDelegationsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryDelegatorDelegationsResponse); + + /** QueryDelegatorDelegationsResponse delegationResponses. */ + public delegationResponses: cosmos.staking.v1beta1.IDelegationResponse[]; + + /** QueryDelegatorDelegationsResponse pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + + /** + * Creates a new QueryDelegatorDelegationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegatorDelegationsResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryDelegatorDelegationsResponse, + ): cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse; + + /** + * Encodes the specified QueryDelegatorDelegationsResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.verify|verify} messages. + * @param m QueryDelegatorDelegationsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryDelegatorDelegationsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegatorDelegationsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegatorDelegationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse; + } + + /** Properties of a QueryDelegatorUnbondingDelegationsRequest. */ + interface IQueryDelegatorUnbondingDelegationsRequest { + /** QueryDelegatorUnbondingDelegationsRequest delegatorAddr */ + delegatorAddr?: string | null; + + /** QueryDelegatorUnbondingDelegationsRequest pagination */ + pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + } + + /** Represents a QueryDelegatorUnbondingDelegationsRequest. */ + class QueryDelegatorUnbondingDelegationsRequest implements IQueryDelegatorUnbondingDelegationsRequest { + /** + * Constructs a new QueryDelegatorUnbondingDelegationsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsRequest); + + /** QueryDelegatorUnbondingDelegationsRequest delegatorAddr. */ + public delegatorAddr: string; + + /** QueryDelegatorUnbondingDelegationsRequest pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + + /** + * Creates a new QueryDelegatorUnbondingDelegationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegatorUnbondingDelegationsRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsRequest, + ): cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest; + + /** + * Encodes the specified QueryDelegatorUnbondingDelegationsRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.verify|verify} messages. + * @param m QueryDelegatorUnbondingDelegationsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegatorUnbondingDelegationsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegatorUnbondingDelegationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest; + } + + /** Properties of a QueryDelegatorUnbondingDelegationsResponse. */ + interface IQueryDelegatorUnbondingDelegationsResponse { + /** QueryDelegatorUnbondingDelegationsResponse unbondingResponses */ + unbondingResponses?: cosmos.staking.v1beta1.IUnbondingDelegation[] | null; + + /** QueryDelegatorUnbondingDelegationsResponse pagination */ + pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + } + + /** Represents a QueryDelegatorUnbondingDelegationsResponse. */ + class QueryDelegatorUnbondingDelegationsResponse + implements IQueryDelegatorUnbondingDelegationsResponse { + /** + * Constructs a new QueryDelegatorUnbondingDelegationsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsResponse); + + /** QueryDelegatorUnbondingDelegationsResponse unbondingResponses. */ + public unbondingResponses: cosmos.staking.v1beta1.IUnbondingDelegation[]; + + /** QueryDelegatorUnbondingDelegationsResponse pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + + /** + * Creates a new QueryDelegatorUnbondingDelegationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegatorUnbondingDelegationsResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsResponse, + ): cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse; + + /** + * Encodes the specified QueryDelegatorUnbondingDelegationsResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.verify|verify} messages. + * @param m QueryDelegatorUnbondingDelegationsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegatorUnbondingDelegationsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegatorUnbondingDelegationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse; + } + + /** Properties of a QueryRedelegationsRequest. */ + interface IQueryRedelegationsRequest { + /** QueryRedelegationsRequest delegatorAddr */ + delegatorAddr?: string | null; + + /** QueryRedelegationsRequest srcValidatorAddr */ + srcValidatorAddr?: string | null; + + /** QueryRedelegationsRequest dstValidatorAddr */ + dstValidatorAddr?: string | null; + + /** QueryRedelegationsRequest pagination */ + pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + } + + /** Represents a QueryRedelegationsRequest. */ + class QueryRedelegationsRequest implements IQueryRedelegationsRequest { + /** + * Constructs a new QueryRedelegationsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryRedelegationsRequest); + + /** QueryRedelegationsRequest delegatorAddr. */ + public delegatorAddr: string; + + /** QueryRedelegationsRequest srcValidatorAddr. */ + public srcValidatorAddr: string; + + /** QueryRedelegationsRequest dstValidatorAddr. */ + public dstValidatorAddr: string; + + /** QueryRedelegationsRequest pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + + /** + * Creates a new QueryRedelegationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryRedelegationsRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryRedelegationsRequest, + ): cosmos.staking.v1beta1.QueryRedelegationsRequest; + + /** + * Encodes the specified QueryRedelegationsRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryRedelegationsRequest.verify|verify} messages. + * @param m QueryRedelegationsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryRedelegationsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryRedelegationsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryRedelegationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryRedelegationsRequest; + } + + /** Properties of a QueryRedelegationsResponse. */ + interface IQueryRedelegationsResponse { + /** QueryRedelegationsResponse redelegationResponses */ + redelegationResponses?: cosmos.staking.v1beta1.IRedelegationResponse[] | null; + + /** QueryRedelegationsResponse pagination */ + pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + } + + /** Represents a QueryRedelegationsResponse. */ + class QueryRedelegationsResponse implements IQueryRedelegationsResponse { + /** + * Constructs a new QueryRedelegationsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryRedelegationsResponse); + + /** QueryRedelegationsResponse redelegationResponses. */ + public redelegationResponses: cosmos.staking.v1beta1.IRedelegationResponse[]; + + /** QueryRedelegationsResponse pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + + /** + * Creates a new QueryRedelegationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryRedelegationsResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryRedelegationsResponse, + ): cosmos.staking.v1beta1.QueryRedelegationsResponse; + + /** + * Encodes the specified QueryRedelegationsResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryRedelegationsResponse.verify|verify} messages. + * @param m QueryRedelegationsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryRedelegationsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryRedelegationsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryRedelegationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryRedelegationsResponse; + } + + /** Properties of a QueryDelegatorValidatorsRequest. */ + interface IQueryDelegatorValidatorsRequest { + /** QueryDelegatorValidatorsRequest delegatorAddr */ + delegatorAddr?: string | null; + + /** QueryDelegatorValidatorsRequest pagination */ + pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + } + + /** Represents a QueryDelegatorValidatorsRequest. */ + class QueryDelegatorValidatorsRequest implements IQueryDelegatorValidatorsRequest { + /** + * Constructs a new QueryDelegatorValidatorsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryDelegatorValidatorsRequest); + + /** QueryDelegatorValidatorsRequest delegatorAddr. */ + public delegatorAddr: string; + + /** QueryDelegatorValidatorsRequest pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageRequest | null; + + /** + * Creates a new QueryDelegatorValidatorsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegatorValidatorsRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryDelegatorValidatorsRequest, + ): cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest; + + /** + * Encodes the specified QueryDelegatorValidatorsRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.verify|verify} messages. + * @param m QueryDelegatorValidatorsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryDelegatorValidatorsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegatorValidatorsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegatorValidatorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest; + } + + /** Properties of a QueryDelegatorValidatorsResponse. */ + interface IQueryDelegatorValidatorsResponse { + /** QueryDelegatorValidatorsResponse validators */ + validators?: cosmos.staking.v1beta1.IValidator[] | null; + + /** QueryDelegatorValidatorsResponse pagination */ + pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + } + + /** Represents a QueryDelegatorValidatorsResponse. */ + class QueryDelegatorValidatorsResponse implements IQueryDelegatorValidatorsResponse { + /** + * Constructs a new QueryDelegatorValidatorsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryDelegatorValidatorsResponse); + + /** QueryDelegatorValidatorsResponse validators. */ + public validators: cosmos.staking.v1beta1.IValidator[]; + + /** QueryDelegatorValidatorsResponse pagination. */ + public pagination?: cosmos.base.query.v1beta1.IPageResponse | null; + + /** + * Creates a new QueryDelegatorValidatorsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegatorValidatorsResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryDelegatorValidatorsResponse, + ): cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse; + + /** + * Encodes the specified QueryDelegatorValidatorsResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.verify|verify} messages. + * @param m QueryDelegatorValidatorsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryDelegatorValidatorsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegatorValidatorsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegatorValidatorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse; + } + + /** Properties of a QueryDelegatorValidatorRequest. */ + interface IQueryDelegatorValidatorRequest { + /** QueryDelegatorValidatorRequest delegatorAddr */ + delegatorAddr?: string | null; + + /** QueryDelegatorValidatorRequest validatorAddr */ + validatorAddr?: string | null; + } + + /** Represents a QueryDelegatorValidatorRequest. */ + class QueryDelegatorValidatorRequest implements IQueryDelegatorValidatorRequest { + /** + * Constructs a new QueryDelegatorValidatorRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryDelegatorValidatorRequest); + + /** QueryDelegatorValidatorRequest delegatorAddr. */ + public delegatorAddr: string; + + /** QueryDelegatorValidatorRequest validatorAddr. */ + public validatorAddr: string; + + /** + * Creates a new QueryDelegatorValidatorRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegatorValidatorRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryDelegatorValidatorRequest, + ): cosmos.staking.v1beta1.QueryDelegatorValidatorRequest; + + /** + * Encodes the specified QueryDelegatorValidatorRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.verify|verify} messages. + * @param m QueryDelegatorValidatorRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryDelegatorValidatorRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegatorValidatorRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegatorValidatorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryDelegatorValidatorRequest; + } + + /** Properties of a QueryDelegatorValidatorResponse. */ + interface IQueryDelegatorValidatorResponse { + /** QueryDelegatorValidatorResponse validator */ + validator?: cosmos.staking.v1beta1.IValidator | null; + } + + /** Represents a QueryDelegatorValidatorResponse. */ + class QueryDelegatorValidatorResponse implements IQueryDelegatorValidatorResponse { + /** + * Constructs a new QueryDelegatorValidatorResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryDelegatorValidatorResponse); + + /** QueryDelegatorValidatorResponse validator. */ + public validator?: cosmos.staking.v1beta1.IValidator | null; + + /** + * Creates a new QueryDelegatorValidatorResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDelegatorValidatorResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryDelegatorValidatorResponse, + ): cosmos.staking.v1beta1.QueryDelegatorValidatorResponse; + + /** + * Encodes the specified QueryDelegatorValidatorResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.verify|verify} messages. + * @param m QueryDelegatorValidatorResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryDelegatorValidatorResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryDelegatorValidatorResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryDelegatorValidatorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryDelegatorValidatorResponse; + } + + /** Properties of a QueryHistoricalInfoRequest. */ + interface IQueryHistoricalInfoRequest { + /** QueryHistoricalInfoRequest height */ + height?: Long | null; + } + + /** Represents a QueryHistoricalInfoRequest. */ + class QueryHistoricalInfoRequest implements IQueryHistoricalInfoRequest { + /** + * Constructs a new QueryHistoricalInfoRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryHistoricalInfoRequest); + + /** QueryHistoricalInfoRequest height. */ + public height: Long; + + /** + * Creates a new QueryHistoricalInfoRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryHistoricalInfoRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryHistoricalInfoRequest, + ): cosmos.staking.v1beta1.QueryHistoricalInfoRequest; + + /** + * Encodes the specified QueryHistoricalInfoRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryHistoricalInfoRequest.verify|verify} messages. + * @param m QueryHistoricalInfoRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryHistoricalInfoRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryHistoricalInfoRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryHistoricalInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryHistoricalInfoRequest; + } + + /** Properties of a QueryHistoricalInfoResponse. */ + interface IQueryHistoricalInfoResponse { + /** QueryHistoricalInfoResponse hist */ + hist?: cosmos.staking.v1beta1.IHistoricalInfo | null; + } + + /** Represents a QueryHistoricalInfoResponse. */ + class QueryHistoricalInfoResponse implements IQueryHistoricalInfoResponse { + /** + * Constructs a new QueryHistoricalInfoResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryHistoricalInfoResponse); + + /** QueryHistoricalInfoResponse hist. */ + public hist?: cosmos.staking.v1beta1.IHistoricalInfo | null; + + /** + * Creates a new QueryHistoricalInfoResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryHistoricalInfoResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryHistoricalInfoResponse, + ): cosmos.staking.v1beta1.QueryHistoricalInfoResponse; + + /** + * Encodes the specified QueryHistoricalInfoResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryHistoricalInfoResponse.verify|verify} messages. + * @param m QueryHistoricalInfoResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryHistoricalInfoResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryHistoricalInfoResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryHistoricalInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryHistoricalInfoResponse; + } + + /** Properties of a QueryPoolRequest. */ + interface IQueryPoolRequest {} + + /** Represents a QueryPoolRequest. */ + class QueryPoolRequest implements IQueryPoolRequest { + /** + * Constructs a new QueryPoolRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryPoolRequest); + + /** + * Creates a new QueryPoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryPoolRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryPoolRequest, + ): cosmos.staking.v1beta1.QueryPoolRequest; + + /** + * Encodes the specified QueryPoolRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryPoolRequest.verify|verify} messages. + * @param m QueryPoolRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryPoolRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryPoolRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryPoolRequest; + } + + /** Properties of a QueryPoolResponse. */ + interface IQueryPoolResponse { + /** QueryPoolResponse pool */ + pool?: cosmos.staking.v1beta1.IPool | null; + } + + /** Represents a QueryPoolResponse. */ + class QueryPoolResponse implements IQueryPoolResponse { + /** + * Constructs a new QueryPoolResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryPoolResponse); + + /** QueryPoolResponse pool. */ + public pool?: cosmos.staking.v1beta1.IPool | null; + + /** + * Creates a new QueryPoolResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryPoolResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryPoolResponse, + ): cosmos.staking.v1beta1.QueryPoolResponse; + + /** + * Encodes the specified QueryPoolResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryPoolResponse.verify|verify} messages. + * @param m QueryPoolResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryPoolResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryPoolResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryPoolResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryPoolResponse; + } + + /** Properties of a QueryParamsRequest. */ + interface IQueryParamsRequest {} + + /** Represents a QueryParamsRequest. */ + class QueryParamsRequest implements IQueryParamsRequest { + /** + * Constructs a new QueryParamsRequest. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryParamsRequest); + + /** + * Creates a new QueryParamsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryParamsRequest instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryParamsRequest, + ): cosmos.staking.v1beta1.QueryParamsRequest; + + /** + * Encodes the specified QueryParamsRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryParamsRequest.verify|verify} messages. + * @param m QueryParamsRequest message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryParamsRequest, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryParamsRequest message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryParamsRequest; + } + + /** Properties of a QueryParamsResponse. */ + interface IQueryParamsResponse { + /** QueryParamsResponse params */ + params?: cosmos.staking.v1beta1.IParams | null; + } + + /** Represents a QueryParamsResponse. */ + class QueryParamsResponse implements IQueryParamsResponse { + /** + * Constructs a new QueryParamsResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.staking.v1beta1.IQueryParamsResponse); + + /** QueryParamsResponse params. */ + public params?: cosmos.staking.v1beta1.IParams | null; + + /** + * Creates a new QueryParamsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryParamsResponse instance + */ + public static create( + properties?: cosmos.staking.v1beta1.IQueryParamsResponse, + ): cosmos.staking.v1beta1.QueryParamsResponse; + + /** + * Encodes the specified QueryParamsResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryParamsResponse.verify|verify} messages. + * @param m QueryParamsResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos.staking.v1beta1.IQueryParamsResponse, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryParamsResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns QueryParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.staking.v1beta1.QueryParamsResponse; + } + /** Properties of a HistoricalInfo. */ interface IHistoricalInfo { /** HistoricalInfo header */ From 4e85ac482e3b89e1e665b73217e16ae5abbe896b Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 26 Jan 2021 10:41:35 +0000 Subject: [PATCH 2/7] stargate: Add distribution msgs to default type registry --- packages/stargate/src/signingstargateclient.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/stargate/src/signingstargateclient.ts b/packages/stargate/src/signingstargateclient.ts index 6a6d8f49..256a0b0d 100644 --- a/packages/stargate/src/signingstargateclient.ts +++ b/packages/stargate/src/signingstargateclient.ts @@ -28,6 +28,12 @@ import { cosmos } from "./codec"; import { BroadcastTxResponse, StargateClient } from "./stargateclient"; const { MsgMultiSend } = cosmos.bank.v1beta1; +const { + MsgFundCommunityPool, + MsgSetWithdrawAddress, + MsgWithdrawDelegatorReward, + MsgWithdrawValidatorCommission, +} = cosmos.distribution.v1beta1; const { MsgBeginRedelegate, MsgCreateValidator, @@ -48,6 +54,10 @@ function createDefaultRegistry(): Registry { ["/cosmos.staking.v1beta1.MsgDelegate", MsgDelegate], ["/cosmos.staking.v1beta1.MsgEditValidator", MsgEditValidator], ["/cosmos.staking.v1beta1.MsgUndelegate", MsgUndelegate], + ["/cosmos.distribution.v1beta1.MsgFundCommunityPool", MsgFundCommunityPool], + ["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", MsgSetWithdrawAddress], + ["/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", MsgWithdrawDelegatorReward], + ["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", MsgWithdrawValidatorCommission], ]); } From 20b9b2d00eaa06113feee3d90fd5a006902dd935 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 26 Jan 2021 12:06:42 +0000 Subject: [PATCH 3/7] stargate: Add staking queries --- packages/stargate/src/index.ts | 2 + packages/stargate/src/queries/index.ts | 1 + packages/stargate/src/queries/staking.ts | 185 +++++++++++++++++++ packages/stargate/types/index.d.ts | 2 + packages/stargate/types/queries/index.d.ts | 1 + packages/stargate/types/queries/staking.d.ts | 64 +++++++ 6 files changed, 255 insertions(+) create mode 100644 packages/stargate/src/queries/staking.ts create mode 100644 packages/stargate/types/queries/staking.d.ts diff --git a/packages/stargate/src/index.ts b/packages/stargate/src/index.ts index a278448a..a6b93190 100644 --- a/packages/stargate/src/index.ts +++ b/packages/stargate/src/index.ts @@ -9,6 +9,8 @@ export { setupAuthExtension, setupBankExtension, setupIbcExtension, + setupStakingExtension, + StakingExtension, } from "./queries"; export { Account, diff --git a/packages/stargate/src/queries/index.ts b/packages/stargate/src/queries/index.ts index 40ab4c10..c3c817b5 100644 --- a/packages/stargate/src/queries/index.ts +++ b/packages/stargate/src/queries/index.ts @@ -7,3 +7,4 @@ export { QueryClient } from "./queryclient"; export { AuthExtension, setupAuthExtension } from "./auth"; export { BankExtension, setupBankExtension } from "./bank"; export { IbcExtension, setupIbcExtension } from "./ibc"; +export { setupStakingExtension, StakingExtension } from "./staking"; diff --git a/packages/stargate/src/queries/staking.ts b/packages/stargate/src/queries/staking.ts new file mode 100644 index 00000000..471befaf --- /dev/null +++ b/packages/stargate/src/queries/staking.ts @@ -0,0 +1,185 @@ +/* eslint-disable @typescript-eslint/naming-convention */ +import Long from "long"; + +import { cosmos } from "../codec"; +import { QueryClient } from "./queryclient"; +import { toObject } from "./utils"; + +type IQueryDelegationResponse = cosmos.staking.v1beta1.IQueryDelegationResponse; +type IQueryDelegatorDelegationsResponse = cosmos.staking.v1beta1.IQueryDelegatorDelegationsResponse; +type IQueryDelegatorUnbondingDelegationsResponse = cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsResponse; +type IQueryDelegatorValidatorResponse = cosmos.staking.v1beta1.IQueryDelegatorValidatorResponse; +type IQueryDelegatorValidatorsResponse = cosmos.staking.v1beta1.IQueryDelegatorValidatorsResponse; +type IQueryHistoricalInfoResponse = cosmos.staking.v1beta1.IQueryHistoricalInfoResponse; +type IQueryParamsResponse = cosmos.staking.v1beta1.IQueryParamsResponse; +type IQueryPoolResponse = cosmos.staking.v1beta1.IQueryPoolResponse; +type IQueryRedelegationsResponse = cosmos.staking.v1beta1.IQueryRedelegationsResponse; +type IQueryUnbondingDelegationResponse = cosmos.staking.v1beta1.IQueryUnbondingDelegationResponse; +type IQueryValidatorResponse = cosmos.staking.v1beta1.IQueryValidatorResponse; +type IQueryValidatorDelegationsResponse = cosmos.staking.v1beta1.IQueryValidatorDelegationsResponse; +type IQueryValidatorsResponse = cosmos.staking.v1beta1.IQueryValidatorsResponse; +type IQueryValidatorUnbondingDelegationsResponse = cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsResponse; + +const { Query } = cosmos.staking.v1beta1; + +export interface StakingExtension { + readonly staking: { + readonly unverified: { + delegation: (delegatorAddress: string, validatorAddress: string) => Promise; + delegatorDelegations: ( + delegatorAddress: string, + paginationKey?: Uint8Array, + ) => Promise; + delegatorUnbondingDelegations: ( + delegatorAddress: string, + paginationKey?: Uint8Array, + ) => Promise; + delegatorValidator: ( + delegatorAddress: string, + validatorAddress: string, + ) => Promise; + delegatorValidators: ( + delegatorAddress: string, + paginationKey?: Uint8Array, + ) => Promise; + historicalInfo: (height: number) => Promise; + params: () => Promise; + pool: () => Promise; + redelegations: ( + delegatorAddress: string, + sourceValidatorAddress: string, + destinationValidatorAddress: string, + paginationKey?: Uint8Array, + ) => Promise; + unbondingDelegation: ( + delegatorAddress: string, + validatorAddress: string, + ) => Promise; + validator: (validatorAddress: string) => Promise; + validatorDelegations: ( + validatorAddress: string, + paginationKey?: Uint8Array, + ) => Promise; + validators: (status: string, paginationKey?: Uint8Array) => Promise; + validatorUnbondingDelegations: ( + validatorAddress: string, + paginationKey?: Uint8Array, + ) => Promise; + }; + }; +} + +export function setupStakingExtension(base: QueryClient): StakingExtension { + // Use this service to get easy typed access to query methods + // This cannot be used to for proof verification + const queryService = Query.create((method: any, requestData, callback) => { + // Parts of the path are unavailable, so we hardcode them here. See https://github.com/protobufjs/protobuf.js/issues/1229 + const path = `/cosmos.staking.v1beta1.Query/${method.name}`; + base + .queryUnverified(path, requestData) + .then((response) => callback(null, response)) + .catch((error) => callback(error)); + }); + + return { + staking: { + unverified: { + delegation: async (delegatorAddress: string, validatorAddress: string) => { + const response = await queryService.delegation({ + delegatorAddr: delegatorAddress, + validatorAddr: validatorAddress, + }); + return toObject(response); + }, + delegatorDelegations: async (delegatorAddress: string, paginationKey?: Uint8Array) => { + const response = await queryService.delegatorDelegations({ + delegatorAddr: delegatorAddress, + pagination: paginationKey ? { key: paginationKey } : undefined, + }); + return toObject(response); + }, + delegatorUnbondingDelegations: async (delegatorAddress: string, paginationKey?: Uint8Array) => { + const response = await queryService.delegatorUnbondingDelegations({ + delegatorAddr: delegatorAddress, + pagination: paginationKey ? { key: paginationKey } : undefined, + }); + return toObject(response); + }, + delegatorValidator: async (delegatorAddress: string, validatorAddress: string) => { + const response = queryService.delegatorValidator({ + delegatorAddr: delegatorAddress, + validatorAddr: validatorAddress, + }); + return toObject(response); + }, + delegatorValidators: async (delegatorAddress: string, paginationKey?: Uint8Array) => { + const response = queryService.delegatorValidators({ + delegatorAddr: delegatorAddress, + pagination: paginationKey ? { key: paginationKey } : undefined, + }); + return toObject(response); + }, + historicalInfo: async (height: number) => { + const response = queryService.historicalInfo({ + height: Long.fromNumber(height), + }); + return toObject(response); + }, + params: async () => { + const response = queryService.params({}); + return toObject(response); + }, + pool: async () => { + const response = queryService.pool({}); + return toObject(response); + }, + redelegations: async ( + delegatorAddress: string, + sourceValidatorAddress: string, + destinationValidatorAddress: string, + paginationKey?: Uint8Array, + ) => { + const response = queryService.redelegations({ + delegatorAddr: delegatorAddress, + srcValidatorAddr: sourceValidatorAddress, + dstValidatorAddr: destinationValidatorAddress, + pagination: paginationKey ? { key: paginationKey } : undefined, + }); + return toObject(response); + }, + unbondingDelegation: async (delegatorAddress: string, validatorAddress: string) => { + const response = queryService.unbondingDelegation({ + delegatorAddr: delegatorAddress, + validatorAddr: validatorAddress, + }); + return toObject(response); + }, + validator: async (validatorAddress: string) => { + const response = queryService.validator({ validatorAddr: validatorAddress }); + return toObject(response); + }, + validatorDelegations: async (validatorAddress: string, paginationKey?: Uint8Array) => { + const response = queryService.validatorDelegations({ + validatorAddr: validatorAddress, + pagination: paginationKey ? { key: paginationKey } : undefined, + }); + return toObject(response); + }, + validators: async (status: string, paginationKey?: Uint8Array) => { + const response = queryService.validators({ + status: status, + pagination: paginationKey ? { key: paginationKey } : undefined, + }); + return toObject(response); + }, + validatorUnbondingDelegations: async (validatorAddress: string, paginationKey?: Uint8Array) => { + const response = queryService.validatorUnbondingDelegations({ + validatorAddr: validatorAddress, + pagination: paginationKey ? { key: paginationKey } : undefined, + }); + return toObject(response); + }, + }, + }, + }; +} diff --git a/packages/stargate/types/index.d.ts b/packages/stargate/types/index.d.ts index a278448a..a6b93190 100644 --- a/packages/stargate/types/index.d.ts +++ b/packages/stargate/types/index.d.ts @@ -9,6 +9,8 @@ export { setupAuthExtension, setupBankExtension, setupIbcExtension, + setupStakingExtension, + StakingExtension, } from "./queries"; export { Account, diff --git a/packages/stargate/types/queries/index.d.ts b/packages/stargate/types/queries/index.d.ts index 2cc0699b..76b082da 100644 --- a/packages/stargate/types/queries/index.d.ts +++ b/packages/stargate/types/queries/index.d.ts @@ -2,3 +2,4 @@ export { QueryClient } from "./queryclient"; export { AuthExtension, setupAuthExtension } from "./auth"; export { BankExtension, setupBankExtension } from "./bank"; export { IbcExtension, setupIbcExtension } from "./ibc"; +export { setupStakingExtension, StakingExtension } from "./staking"; diff --git a/packages/stargate/types/queries/staking.d.ts b/packages/stargate/types/queries/staking.d.ts new file mode 100644 index 00000000..f9ab444c --- /dev/null +++ b/packages/stargate/types/queries/staking.d.ts @@ -0,0 +1,64 @@ +import { cosmos } from "../codec"; +import { QueryClient } from "./queryclient"; +declare type IQueryDelegationResponse = cosmos.staking.v1beta1.IQueryDelegationResponse; +declare type IQueryDelegatorDelegationsResponse = cosmos.staking.v1beta1.IQueryDelegatorDelegationsResponse; +declare type IQueryDelegatorUnbondingDelegationsResponse = cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsResponse; +declare type IQueryDelegatorValidatorResponse = cosmos.staking.v1beta1.IQueryDelegatorValidatorResponse; +declare type IQueryDelegatorValidatorsResponse = cosmos.staking.v1beta1.IQueryDelegatorValidatorsResponse; +declare type IQueryHistoricalInfoResponse = cosmos.staking.v1beta1.IQueryHistoricalInfoResponse; +declare type IQueryParamsResponse = cosmos.staking.v1beta1.IQueryParamsResponse; +declare type IQueryPoolResponse = cosmos.staking.v1beta1.IQueryPoolResponse; +declare type IQueryRedelegationsResponse = cosmos.staking.v1beta1.IQueryRedelegationsResponse; +declare type IQueryUnbondingDelegationResponse = cosmos.staking.v1beta1.IQueryUnbondingDelegationResponse; +declare type IQueryValidatorResponse = cosmos.staking.v1beta1.IQueryValidatorResponse; +declare type IQueryValidatorDelegationsResponse = cosmos.staking.v1beta1.IQueryValidatorDelegationsResponse; +declare type IQueryValidatorsResponse = cosmos.staking.v1beta1.IQueryValidatorsResponse; +declare type IQueryValidatorUnbondingDelegationsResponse = cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsResponse; +export interface StakingExtension { + readonly staking: { + readonly unverified: { + delegation: (delegatorAddress: string, validatorAddress: string) => Promise; + delegatorDelegations: ( + delegatorAddress: string, + paginationKey?: Uint8Array, + ) => Promise; + delegatorUnbondingDelegations: ( + delegatorAddress: string, + paginationKey?: Uint8Array, + ) => Promise; + delegatorValidator: ( + delegatorAddress: string, + validatorAddress: string, + ) => Promise; + delegatorValidators: ( + delegatorAddress: string, + paginationKey?: Uint8Array, + ) => Promise; + historicalInfo: (height: number) => Promise; + params: () => Promise; + pool: () => Promise; + redelegations: ( + delegatorAddress: string, + sourceValidatorAddress: string, + destinationValidatorAddress: string, + paginationKey?: Uint8Array, + ) => Promise; + unbondingDelegation: ( + delegatorAddress: string, + validatorAddress: string, + ) => Promise; + validator: (validatorAddress: string) => Promise; + validatorDelegations: ( + validatorAddress: string, + paginationKey?: Uint8Array, + ) => Promise; + validators: (status: string, paginationKey?: Uint8Array) => Promise; + validatorUnbondingDelegations: ( + validatorAddress: string, + paginationKey?: Uint8Array, + ) => Promise; + }; + }; +} +export declare function setupStakingExtension(base: QueryClient): StakingExtension; +export {}; From 4aa248ec63136753eefe826945fbc835f7f11606 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 26 Jan 2021 12:09:55 +0000 Subject: [PATCH 4/7] stargate: Add IBC and staking extensions to default Stargate client --- packages/stargate/src/stargateclient.ts | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/packages/stargate/src/stargateclient.ts b/packages/stargate/src/stargateclient.ts index 488ff285..402077ef 100644 --- a/packages/stargate/src/stargateclient.ts +++ b/packages/stargate/src/stargateclient.ts @@ -22,7 +22,17 @@ import { assert, assertDefinedAndNotNull } from "@cosmjs/utils"; import Long from "long"; import { cosmos } from "./codec"; -import { AuthExtension, BankExtension, QueryClient, setupAuthExtension, setupBankExtension } from "./queries"; +import { + AuthExtension, + BankExtension, + IbcExtension, + QueryClient, + setupAuthExtension, + setupBankExtension, + setupIbcExtension, + setupStakingExtension, + StakingExtension, +} from "./queries"; type IBaseAccount = cosmos.auth.v1beta1.IBaseAccount; type IMsgData = cosmos.base.abci.v1beta1.IMsgData; @@ -125,7 +135,7 @@ export interface PrivateStargateClient { export class StargateClient { private readonly tmClient: TendermintClient; - private readonly queryClient: QueryClient & AuthExtension & BankExtension; + private readonly queryClient: QueryClient & AuthExtension & BankExtension & IbcExtension & StakingExtension; private chainId: string | undefined; public static async connect(endpoint: string): Promise { @@ -135,7 +145,13 @@ export class StargateClient { protected constructor(tmClient: TendermintClient) { this.tmClient = tmClient; - this.queryClient = QueryClient.withExtensions(tmClient, setupAuthExtension, setupBankExtension); + this.queryClient = QueryClient.withExtensions( + tmClient, + setupAuthExtension, + setupBankExtension, + setupIbcExtension, + setupStakingExtension, + ); } public async getChainId(): Promise { From 486e6aa8c40bdd54e004bc31eaafe46d887cec83 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 26 Jan 2021 13:03:06 +0000 Subject: [PATCH 5/7] stargate: Add distribution queries --- packages/stargate/src/index.ts | 2 + packages/stargate/src/queries/distribution.ts | 122 ++++++++++++++++++ packages/stargate/src/queries/index.ts | 1 + packages/stargate/types/index.d.ts | 2 + .../stargate/types/queries/distribution.d.ts | 38 ++++++ packages/stargate/types/queries/index.d.ts | 1 + 6 files changed, 166 insertions(+) create mode 100644 packages/stargate/src/queries/distribution.ts create mode 100644 packages/stargate/types/queries/distribution.d.ts diff --git a/packages/stargate/src/index.ts b/packages/stargate/src/index.ts index a6b93190..1d72d8f4 100644 --- a/packages/stargate/src/index.ts +++ b/packages/stargate/src/index.ts @@ -4,10 +4,12 @@ export { parseRawLog } from "./logs"; export { AuthExtension, BankExtension, + DistributionExtension, IbcExtension, QueryClient, setupAuthExtension, setupBankExtension, + setupDistributionExtension, setupIbcExtension, setupStakingExtension, StakingExtension, diff --git a/packages/stargate/src/queries/distribution.ts b/packages/stargate/src/queries/distribution.ts new file mode 100644 index 00000000..da3c809c --- /dev/null +++ b/packages/stargate/src/queries/distribution.ts @@ -0,0 +1,122 @@ +/* eslint-disable @typescript-eslint/naming-convention */ +import Long from "long"; + +import { cosmos } from "../codec"; +import { QueryClient } from "./queryclient"; +import { toObject } from "./utils"; + +type IQueryCommunityPoolResponse = cosmos.distribution.v1beta1.IQueryCommunityPoolResponse; +type IQueryDelegationRewardsResponse = cosmos.distribution.v1beta1.IQueryDelegationRewardsResponse; +type IQueryDelegationTotalRewardsResponse = cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsResponse; +type IQueryDelegatorValidatorsResponse = cosmos.distribution.v1beta1.IQueryDelegatorValidatorsResponse; +type IQueryDelegatorWithdrawAddressResponse = cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressResponse; +type IQueryParamsResponse = cosmos.distribution.v1beta1.IQueryParamsResponse; +type IQueryValidatorCommissionResponse = cosmos.distribution.v1beta1.IQueryValidatorCommissionResponse; +type IQueryValidatorOutstandingRewardsResponse = cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsResponse; +type IQueryValidatorSlashesResponse = cosmos.distribution.v1beta1.IQueryValidatorSlashesResponse; + +const { Query } = cosmos.distribution.v1beta1; + +export interface DistributionExtension { + readonly distribution: { + unverified: { + communityPool: () => Promise; + delegationRewards: ( + delegatorAddress: string, + validatorAddress: string, + ) => Promise; + delegationTotalRewards: (delegatorAddress: string) => Promise; + delegatorValidators: (delegatorAddress: string) => Promise; + delegatorWithdrawAddress: (delegatorAddress: string) => Promise; + params: () => Promise; + validatorCommission: (validatorAddress: string) => Promise; + validatorOutstandingRewards: ( + validatorAddress: string, + ) => Promise; + validatorSlashes: ( + validatorAddress: string, + startingHeight: number, + endingHeight: number, + paginationKey?: Uint8Array, + ) => Promise; + }; + }; +} + +export function setupDistributionExtension(base: QueryClient): DistributionExtension { + // Use this service to get easy typed access to query methods + // This cannot be used to for proof verification + const queryService = Query.create((method: any, requestData, callback) => { + // Parts of the path are unavailable, so we hardcode them here. See https://github.com/protobufjs/protobuf.js/issues/1229 + const path = `/cosmos.distribution.v1beta1.Query/${method.name}`; + base + .queryUnverified(path, requestData) + .then((response) => callback(null, response)) + .catch((error) => callback(error)); + }); + return { + distribution: { + unverified: { + communityPool: async () => { + const response = await queryService.communityPool({}); + return toObject(response); + }, + delegationRewards: async (delegatorAddress: string, validatorAddress: string) => { + const response = await queryService.delegationRewards({ + delegatorAddress: delegatorAddress, + validatorAddress: validatorAddress, + }); + return toObject(response); + }, + delegationTotalRewards: async (delegatorAddress: string) => { + const response = await queryService.delegationTotalRewards({ + delegatorAddress: delegatorAddress, + }); + return toObject(response); + }, + delegatorValidators: async (delegatorAddress: string) => { + const response = await queryService.delegatorValidators({ + delegatorAddress: delegatorAddress, + }); + return toObject(response); + }, + delegatorWithdrawAddress: async (delegatorAddress: string) => { + const response = await queryService.delegatorWithdrawAddress({ + delegatorAddress: delegatorAddress, + }); + return toObject(response); + }, + params: async () => { + const response = await queryService.params({}); + return toObject(response); + }, + validatorCommission: async (validatorAddress: string) => { + const response = await queryService.validatorCommission({ + validatorAddress: validatorAddress, + }); + return toObject(response); + }, + validatorOutstandingRewards: async (validatorAddress: string) => { + const response = await queryService.validatorOutstandingRewards({ + validatorAddress: validatorAddress, + }); + return toObject(response); + }, + validatorSlashes: async ( + validatorAddress: string, + startingHeight: number, + endingHeight: number, + paginationKey?: Uint8Array, + ) => { + const response = await queryService.validatorSlashes({ + validatorAddress: validatorAddress, + startingHeight: Long.fromNumber(startingHeight), + endingHeight: Long.fromNumber(endingHeight), + pagination: paginationKey ? { key: paginationKey } : undefined, + }); + return toObject(response); + }, + }, + }, + }; +} diff --git a/packages/stargate/src/queries/index.ts b/packages/stargate/src/queries/index.ts index c3c817b5..5161cd5c 100644 --- a/packages/stargate/src/queries/index.ts +++ b/packages/stargate/src/queries/index.ts @@ -6,5 +6,6 @@ export { QueryClient } from "./queryclient"; export { AuthExtension, setupAuthExtension } from "./auth"; export { BankExtension, setupBankExtension } from "./bank"; +export { DistributionExtension, setupDistributionExtension } from "./distribution"; export { IbcExtension, setupIbcExtension } from "./ibc"; export { setupStakingExtension, StakingExtension } from "./staking"; diff --git a/packages/stargate/types/index.d.ts b/packages/stargate/types/index.d.ts index a6b93190..1d72d8f4 100644 --- a/packages/stargate/types/index.d.ts +++ b/packages/stargate/types/index.d.ts @@ -4,10 +4,12 @@ export { parseRawLog } from "./logs"; export { AuthExtension, BankExtension, + DistributionExtension, IbcExtension, QueryClient, setupAuthExtension, setupBankExtension, + setupDistributionExtension, setupIbcExtension, setupStakingExtension, StakingExtension, diff --git a/packages/stargate/types/queries/distribution.d.ts b/packages/stargate/types/queries/distribution.d.ts new file mode 100644 index 00000000..afe453dc --- /dev/null +++ b/packages/stargate/types/queries/distribution.d.ts @@ -0,0 +1,38 @@ +import { cosmos } from "../codec"; +import { QueryClient } from "./queryclient"; +declare type IQueryCommunityPoolResponse = cosmos.distribution.v1beta1.IQueryCommunityPoolResponse; +declare type IQueryDelegationRewardsResponse = cosmos.distribution.v1beta1.IQueryDelegationRewardsResponse; +declare type IQueryDelegationTotalRewardsResponse = cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsResponse; +declare type IQueryDelegatorValidatorsResponse = cosmos.distribution.v1beta1.IQueryDelegatorValidatorsResponse; +declare type IQueryDelegatorWithdrawAddressResponse = cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressResponse; +declare type IQueryParamsResponse = cosmos.distribution.v1beta1.IQueryParamsResponse; +declare type IQueryValidatorCommissionResponse = cosmos.distribution.v1beta1.IQueryValidatorCommissionResponse; +declare type IQueryValidatorOutstandingRewardsResponse = cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsResponse; +declare type IQueryValidatorSlashesResponse = cosmos.distribution.v1beta1.IQueryValidatorSlashesResponse; +export interface DistributionExtension { + readonly distribution: { + unverified: { + communityPool: () => Promise; + delegationRewards: ( + delegatorAddress: string, + validatorAddress: string, + ) => Promise; + delegationTotalRewards: (delegatorAddress: string) => Promise; + delegatorValidators: (delegatorAddress: string) => Promise; + delegatorWithdrawAddress: (delegatorAddress: string) => Promise; + params: () => Promise; + validatorCommission: (validatorAddress: string) => Promise; + validatorOutstandingRewards: ( + validatorAddress: string, + ) => Promise; + validatorSlashes: ( + validatorAddress: string, + startingHeight: number, + endingHeight: number, + paginationKey?: Uint8Array, + ) => Promise; + }; + }; +} +export declare function setupDistributionExtension(base: QueryClient): DistributionExtension; +export {}; diff --git a/packages/stargate/types/queries/index.d.ts b/packages/stargate/types/queries/index.d.ts index 76b082da..1958b382 100644 --- a/packages/stargate/types/queries/index.d.ts +++ b/packages/stargate/types/queries/index.d.ts @@ -1,5 +1,6 @@ export { QueryClient } from "./queryclient"; export { AuthExtension, setupAuthExtension } from "./auth"; export { BankExtension, setupBankExtension } from "./bank"; +export { DistributionExtension, setupDistributionExtension } from "./distribution"; export { IbcExtension, setupIbcExtension } from "./ibc"; export { setupStakingExtension, StakingExtension } from "./staking"; From 844b2a568205823c2246d3e12b744c6a553f6379 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 26 Jan 2021 13:06:22 +0000 Subject: [PATCH 6/7] stargate: Add distribution extension to default Stargate client --- packages/stargate/src/stargateclient.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/stargate/src/stargateclient.ts b/packages/stargate/src/stargateclient.ts index 402077ef..c336a198 100644 --- a/packages/stargate/src/stargateclient.ts +++ b/packages/stargate/src/stargateclient.ts @@ -25,10 +25,12 @@ import { cosmos } from "./codec"; import { AuthExtension, BankExtension, + DistributionExtension, IbcExtension, QueryClient, setupAuthExtension, setupBankExtension, + setupDistributionExtension, setupIbcExtension, setupStakingExtension, StakingExtension, @@ -135,7 +137,12 @@ export interface PrivateStargateClient { export class StargateClient { private readonly tmClient: TendermintClient; - private readonly queryClient: QueryClient & AuthExtension & BankExtension & IbcExtension & StakingExtension; + private readonly queryClient: QueryClient & + AuthExtension & + BankExtension & + DistributionExtension & + IbcExtension & + StakingExtension; private chainId: string | undefined; public static async connect(endpoint: string): Promise { @@ -149,6 +156,7 @@ export class StargateClient { tmClient, setupAuthExtension, setupBankExtension, + setupDistributionExtension, setupIbcExtension, setupStakingExtension, ); From 9b8ed767bcffe63124742e2287a40d7939e45c3c Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 26 Jan 2021 14:09:59 +0000 Subject: [PATCH 7/7] stargate: Add basic tests for staking/distribution query extensions --- .../stargate/src/queries/distribution.spec.ts | 65 +++++++++++ packages/stargate/src/queries/staking.spec.ts | 102 ++++++++++++++++++ 2 files changed, 167 insertions(+) create mode 100644 packages/stargate/src/queries/distribution.spec.ts create mode 100644 packages/stargate/src/queries/staking.spec.ts diff --git a/packages/stargate/src/queries/distribution.spec.ts b/packages/stargate/src/queries/distribution.spec.ts new file mode 100644 index 00000000..c94841e1 --- /dev/null +++ b/packages/stargate/src/queries/distribution.spec.ts @@ -0,0 +1,65 @@ +/* eslint-disable @typescript-eslint/naming-convention */ +import { coin, coins } from "@cosmjs/launchpad"; +import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; +import { adaptor34, Client as TendermintClient } from "@cosmjs/tendermint-rpc"; +import { assertDefinedAndNotNull, sleep } from "@cosmjs/utils"; + +import { cosmos } from "../codec"; +import { SigningStargateClient } from "../signingstargateclient"; +import { assertIsBroadcastTxSuccess } from "../stargateclient"; +import { faucet, pendingWithoutSimapp, simapp, simappEnabled, validator } from "../testutils.spec"; +import { DistributionExtension, setupDistributionExtension } from "./distribution"; +import { QueryClient } from "./queryclient"; + +type IMsgDelegate = cosmos.staking.v1beta1.IMsgDelegate; + +async function makeClientWithDistribution( + rpcUrl: string, +): Promise<[QueryClient & DistributionExtension, TendermintClient]> { + const tmClient = await TendermintClient.connect(rpcUrl, adaptor34); + return [QueryClient.withExtensions(tmClient, setupDistributionExtension), tmClient]; +} + +describe("DistributionExtension", () => { + const defaultFee = { + amount: coins(25000, "ucosm"), + gas: "1500000", // 1.5 million + }; + + beforeAll(async () => { + if (simappEnabled()) { + const wallet = await DirectSecp256k1HdWallet.fromMnemonic(faucet.mnemonic); + const client = await SigningStargateClient.connectWithSigner(simapp.tendermintUrl, wallet); + + const msg: IMsgDelegate = { + delegatorAddress: faucet.address0, + validatorAddress: validator.validatorAddress, + amount: coin(25000, "ustake"), + }; + const msgAny = { + typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", + value: msg, + }; + const memo = "Test delegation for Stargate"; + const result = await client.signAndBroadcast(faucet.address0, [msgAny], defaultFee, memo); + assertIsBroadcastTxSuccess(result); + + await sleep(75); // wait until transactions are indexed + } + }); + + describe("unverified", () => { + describe("communityPool", () => { + it("works", async () => { + pendingWithoutSimapp(); + const [client, tmClient] = await makeClientWithDistribution(simapp.tendermintUrl); + + const response = await client.distribution.unverified.communityPool(); + assertDefinedAndNotNull(response.pool); + expect(response.pool.length).toBeGreaterThanOrEqual(1); + + tmClient.disconnect(); + }); + }); + }); +}); diff --git a/packages/stargate/src/queries/staking.spec.ts b/packages/stargate/src/queries/staking.spec.ts new file mode 100644 index 00000000..d8120eb2 --- /dev/null +++ b/packages/stargate/src/queries/staking.spec.ts @@ -0,0 +1,102 @@ +/* eslint-disable @typescript-eslint/naming-convention */ +import { coin, coins } from "@cosmjs/launchpad"; +import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; +import { adaptor34, Client as TendermintClient } from "@cosmjs/tendermint-rpc"; +import { assertDefinedAndNotNull, sleep } from "@cosmjs/utils"; + +import { cosmos } from "../codec"; +import { SigningStargateClient } from "../signingstargateclient"; +import { assertIsBroadcastTxSuccess } from "../stargateclient"; +import { + faucet, + nonNegativeIntegerMatcher, + pendingWithoutSimapp, + simapp, + simappEnabled, + validator, +} from "../testutils.spec"; +import { QueryClient } from "./queryclient"; +import { setupStakingExtension, StakingExtension } from "./staking"; + +type IMsgDelegate = cosmos.staking.v1beta1.IMsgDelegate; +type IMsgUndelegate = cosmos.staking.v1beta1.IMsgUndelegate; + +async function makeClientWithStaking( + rpcUrl: string, +): Promise<[QueryClient & StakingExtension, TendermintClient]> { + const tmClient = await TendermintClient.connect(rpcUrl, adaptor34); + return [QueryClient.withExtensions(tmClient, setupStakingExtension), tmClient]; +} + +describe("StakingExtension", () => { + const defaultFee = { + amount: coins(25000, "ucosm"), + gas: "1500000", // 1.5 million + }; + + beforeAll(async () => { + if (simappEnabled()) { + const wallet = await DirectSecp256k1HdWallet.fromMnemonic(faucet.mnemonic); + const client = await SigningStargateClient.connectWithSigner(simapp.tendermintUrl, wallet); + + { + const msg: IMsgDelegate = { + delegatorAddress: faucet.address0, + validatorAddress: validator.validatorAddress, + amount: coin(25000, "ustake"), + }; + const msgAny = { + typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", + value: msg, + }; + const memo = "Test delegation for Stargate"; + const result = await client.signAndBroadcast(faucet.address0, [msgAny], defaultFee, memo); + assertIsBroadcastTxSuccess(result); + } + { + const msg: IMsgUndelegate = { + delegatorAddress: faucet.address0, + validatorAddress: validator.validatorAddress, + amount: coin(100, "ustake"), + }; + const msgAny = { + typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", + value: msg, + }; + const memo = "Test undelegation for Stargate"; + const result = await client.signAndBroadcast(faucet.address0, [msgAny], defaultFee, memo); + assertIsBroadcastTxSuccess(result); + } + + await sleep(75); // wait until transactions are indexed + } + }); + + describe("unverified", () => { + describe("delegation", () => { + it("works", async () => { + pendingWithoutSimapp(); + const [client, tmClient] = await makeClientWithStaking(simapp.tendermintUrl); + + const response = await client.staking.unverified.delegation( + faucet.address0, + validator.validatorAddress, + ); + assertDefinedAndNotNull(response.delegationResponse); + assertDefinedAndNotNull(response.delegationResponse.delegation); + assertDefinedAndNotNull(response.delegationResponse.balance); + expect({ ...response.delegationResponse.delegation }).toEqual({ + delegatorAddress: faucet.address0, + validatorAddress: validator.validatorAddress, + shares: jasmine.stringMatching(nonNegativeIntegerMatcher), + }); + expect({ ...response.delegationResponse.balance }).toEqual({ + denom: "ustake", + amount: jasmine.stringMatching(nonNegativeIntegerMatcher), + }); + + tmClient.disconnect(); + }); + }); + }); +});