//@ts-nocheck import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; import { Params, ParamsAmino, ParamsSDKType } from "./distribution"; import { BinaryReader, BinaryWriter } from "../../../binary"; /** * MsgSetWithdrawAddress sets the withdraw address for * a delegator (or validator self-delegation). */ export interface MsgSetWithdrawAddress { delegatorAddress: string; withdrawAddress: string; } export interface MsgSetWithdrawAddressProtoMsg { typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress"; value: Uint8Array; } /** * MsgSetWithdrawAddress sets the withdraw address for * a delegator (or validator self-delegation). * @name MsgSetWithdrawAddressAmino * @package cosmos.distribution.v1beta1 * @see proto type: cosmos.distribution.v1beta1.MsgSetWithdrawAddress */ export interface MsgSetWithdrawAddressAmino { delegator_address?: string; withdraw_address?: string; } export interface MsgSetWithdrawAddressAminoMsg { type: "cosmos-sdk/MsgModifyWithdrawAddress"; value: MsgSetWithdrawAddressAmino; } /** * MsgSetWithdrawAddress sets the withdraw address for * a delegator (or validator self-delegation). */ export interface MsgSetWithdrawAddressSDKType { delegator_address: string; withdraw_address: string; } /** * MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response * type. */ export interface MsgSetWithdrawAddressResponse {} export interface MsgSetWithdrawAddressResponseProtoMsg { typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse"; value: Uint8Array; } /** * MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response * type. * @name MsgSetWithdrawAddressResponseAmino * @package cosmos.distribution.v1beta1 * @see proto type: cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse */ export interface MsgSetWithdrawAddressResponseAmino {} export interface MsgSetWithdrawAddressResponseAminoMsg { type: "cosmos-sdk/MsgSetWithdrawAddressResponse"; value: MsgSetWithdrawAddressResponseAmino; } /** * MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response * type. */ export interface MsgSetWithdrawAddressResponseSDKType {} /** * MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator * from a single validator. */ export interface MsgWithdrawDelegatorReward { delegatorAddress: string; validatorAddress: string; } export interface MsgWithdrawDelegatorRewardProtoMsg { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward"; value: Uint8Array; } /** * MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator * from a single validator. * @name MsgWithdrawDelegatorRewardAmino * @package cosmos.distribution.v1beta1 * @see proto type: cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward */ export interface MsgWithdrawDelegatorRewardAmino { delegator_address?: string; validator_address?: string; } export interface MsgWithdrawDelegatorRewardAminoMsg { type: "cosmos-sdk/MsgWithdrawDelegationReward"; value: MsgWithdrawDelegatorRewardAmino; } /** * MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator * from a single validator. */ export interface MsgWithdrawDelegatorRewardSDKType { delegator_address: string; validator_address: string; } /** * MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward * response type. */ export interface MsgWithdrawDelegatorRewardResponse { /** Since: cosmos-sdk 0.46 */ amount: Coin[]; } export interface MsgWithdrawDelegatorRewardResponseProtoMsg { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse"; value: Uint8Array; } /** * MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward * response type. * @name MsgWithdrawDelegatorRewardResponseAmino * @package cosmos.distribution.v1beta1 * @see proto type: cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse */ export interface MsgWithdrawDelegatorRewardResponseAmino { /** * Since: cosmos-sdk 0.46 */ amount: CoinAmino[]; } export interface MsgWithdrawDelegatorRewardResponseAminoMsg { type: "cosmos-sdk/MsgWithdrawDelegatorRewardResponse"; value: MsgWithdrawDelegatorRewardResponseAmino; } /** * MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward * response type. */ export interface MsgWithdrawDelegatorRewardResponseSDKType { amount: CoinSDKType[]; } /** * MsgWithdrawValidatorCommission withdraws the full commission to the validator * address. */ export interface MsgWithdrawValidatorCommission { validatorAddress: string; } export interface MsgWithdrawValidatorCommissionProtoMsg { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission"; value: Uint8Array; } /** * MsgWithdrawValidatorCommission withdraws the full commission to the validator * address. * @name MsgWithdrawValidatorCommissionAmino * @package cosmos.distribution.v1beta1 * @see proto type: cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission */ export interface MsgWithdrawValidatorCommissionAmino { validator_address?: string; } export interface MsgWithdrawValidatorCommissionAminoMsg { type: "cosmos-sdk/MsgWithdrawValidatorCommission"; value: MsgWithdrawValidatorCommissionAmino; } /** * MsgWithdrawValidatorCommission withdraws the full commission to the validator * address. */ export interface MsgWithdrawValidatorCommissionSDKType { validator_address: string; } /** * MsgWithdrawValidatorCommissionResponse defines the * Msg/WithdrawValidatorCommission response type. */ export interface MsgWithdrawValidatorCommissionResponse { /** Since: cosmos-sdk 0.46 */ amount: Coin[]; } export interface MsgWithdrawValidatorCommissionResponseProtoMsg { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse"; value: Uint8Array; } /** * MsgWithdrawValidatorCommissionResponse defines the * Msg/WithdrawValidatorCommission response type. * @name MsgWithdrawValidatorCommissionResponseAmino * @package cosmos.distribution.v1beta1 * @see proto type: cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse */ export interface MsgWithdrawValidatorCommissionResponseAmino { /** * Since: cosmos-sdk 0.46 */ amount: CoinAmino[]; } export interface MsgWithdrawValidatorCommissionResponseAminoMsg { type: "cosmos-sdk/MsgWithdrawValidatorCommissionResponse"; value: MsgWithdrawValidatorCommissionResponseAmino; } /** * MsgWithdrawValidatorCommissionResponse defines the * Msg/WithdrawValidatorCommission response type. */ export interface MsgWithdrawValidatorCommissionResponseSDKType { amount: CoinSDKType[]; } /** * MsgFundCommunityPool allows an account to directly * fund the community pool. */ export interface MsgFundCommunityPool { amount: Coin[]; depositor: string; } export interface MsgFundCommunityPoolProtoMsg { typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool"; value: Uint8Array; } /** * MsgFundCommunityPool allows an account to directly * fund the community pool. * @name MsgFundCommunityPoolAmino * @package cosmos.distribution.v1beta1 * @see proto type: cosmos.distribution.v1beta1.MsgFundCommunityPool */ export interface MsgFundCommunityPoolAmino { amount: CoinAmino[]; depositor?: string; } export interface MsgFundCommunityPoolAminoMsg { type: "cosmos-sdk/MsgFundCommunityPool"; value: MsgFundCommunityPoolAmino; } /** * MsgFundCommunityPool allows an account to directly * fund the community pool. */ export interface MsgFundCommunityPoolSDKType { amount: CoinSDKType[]; depositor: string; } /** MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. */ export interface MsgFundCommunityPoolResponse {} export interface MsgFundCommunityPoolResponseProtoMsg { typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse"; value: Uint8Array; } /** * MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. * @name MsgFundCommunityPoolResponseAmino * @package cosmos.distribution.v1beta1 * @see proto type: cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse */ export interface MsgFundCommunityPoolResponseAmino {} export interface MsgFundCommunityPoolResponseAminoMsg { type: "cosmos-sdk/MsgFundCommunityPoolResponse"; value: MsgFundCommunityPoolResponseAmino; } /** MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. */ export interface MsgFundCommunityPoolResponseSDKType {} /** * MsgUpdateParams is the Msg/UpdateParams request type. * * Since: cosmos-sdk 0.47 */ export interface MsgUpdateParams { /** authority is the address that controls the module (defaults to x/gov unless overwritten). */ authority: string; /** * params defines the x/distribution parameters to update. * * NOTE: All parameters must be supplied. */ params: Params; } export interface MsgUpdateParamsProtoMsg { typeUrl: "/cosmos.distribution.v1beta1.MsgUpdateParams"; value: Uint8Array; } /** * MsgUpdateParams is the Msg/UpdateParams request type. * * Since: cosmos-sdk 0.47 * @name MsgUpdateParamsAmino * @package cosmos.distribution.v1beta1 * @see proto type: cosmos.distribution.v1beta1.MsgUpdateParams */ export interface MsgUpdateParamsAmino { /** * authority is the address that controls the module (defaults to x/gov unless overwritten). */ authority?: string; /** * params defines the x/distribution parameters to update. * * NOTE: All parameters must be supplied. */ params: ParamsAmino; } export interface MsgUpdateParamsAminoMsg { type: "cosmos-sdk/distribution/MsgUpdateParams"; value: MsgUpdateParamsAmino; } /** * MsgUpdateParams is the Msg/UpdateParams request type. * * Since: cosmos-sdk 0.47 */ export interface MsgUpdateParamsSDKType { authority: string; params: ParamsSDKType; } /** * MsgUpdateParamsResponse defines the response structure for executing a * MsgUpdateParams message. * * Since: cosmos-sdk 0.47 */ export interface MsgUpdateParamsResponse {} export interface MsgUpdateParamsResponseProtoMsg { typeUrl: "/cosmos.distribution.v1beta1.MsgUpdateParamsResponse"; value: Uint8Array; } /** * MsgUpdateParamsResponse defines the response structure for executing a * MsgUpdateParams message. * * Since: cosmos-sdk 0.47 * @name MsgUpdateParamsResponseAmino * @package cosmos.distribution.v1beta1 * @see proto type: cosmos.distribution.v1beta1.MsgUpdateParamsResponse */ export interface MsgUpdateParamsResponseAmino {} export interface MsgUpdateParamsResponseAminoMsg { type: "cosmos-sdk/MsgUpdateParamsResponse"; value: MsgUpdateParamsResponseAmino; } /** * MsgUpdateParamsResponse defines the response structure for executing a * MsgUpdateParams message. * * Since: cosmos-sdk 0.47 */ export interface MsgUpdateParamsResponseSDKType {} /** * MsgCommunityPoolSpend defines a message for sending tokens from the community * pool to another account. This message is typically executed via a governance * proposal with the governance module being the executing authority. * * Since: cosmos-sdk 0.47 */ export interface MsgCommunityPoolSpend { /** authority is the address that controls the module (defaults to x/gov unless overwritten). */ authority: string; recipient: string; amount: Coin[]; } export interface MsgCommunityPoolSpendProtoMsg { typeUrl: "/cosmos.distribution.v1beta1.MsgCommunityPoolSpend"; value: Uint8Array; } /** * MsgCommunityPoolSpend defines a message for sending tokens from the community * pool to another account. This message is typically executed via a governance * proposal with the governance module being the executing authority. * * Since: cosmos-sdk 0.47 * @name MsgCommunityPoolSpendAmino * @package cosmos.distribution.v1beta1 * @see proto type: cosmos.distribution.v1beta1.MsgCommunityPoolSpend */ export interface MsgCommunityPoolSpendAmino { /** * authority is the address that controls the module (defaults to x/gov unless overwritten). */ authority?: string; recipient?: string; amount: CoinAmino[]; } export interface MsgCommunityPoolSpendAminoMsg { type: "cosmos-sdk/distr/MsgCommunityPoolSpend"; value: MsgCommunityPoolSpendAmino; } /** * MsgCommunityPoolSpend defines a message for sending tokens from the community * pool to another account. This message is typically executed via a governance * proposal with the governance module being the executing authority. * * Since: cosmos-sdk 0.47 */ export interface MsgCommunityPoolSpendSDKType { authority: string; recipient: string; amount: CoinSDKType[]; } /** * MsgCommunityPoolSpendResponse defines the response to executing a * MsgCommunityPoolSpend message. * * Since: cosmos-sdk 0.47 */ export interface MsgCommunityPoolSpendResponse {} export interface MsgCommunityPoolSpendResponseProtoMsg { typeUrl: "/cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse"; value: Uint8Array; } /** * MsgCommunityPoolSpendResponse defines the response to executing a * MsgCommunityPoolSpend message. * * Since: cosmos-sdk 0.47 * @name MsgCommunityPoolSpendResponseAmino * @package cosmos.distribution.v1beta1 * @see proto type: cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse */ export interface MsgCommunityPoolSpendResponseAmino {} export interface MsgCommunityPoolSpendResponseAminoMsg { type: "cosmos-sdk/MsgCommunityPoolSpendResponse"; value: MsgCommunityPoolSpendResponseAmino; } /** * MsgCommunityPoolSpendResponse defines the response to executing a * MsgCommunityPoolSpend message. * * Since: cosmos-sdk 0.47 */ export interface MsgCommunityPoolSpendResponseSDKType {} /** * DepositValidatorRewardsPool defines the request structure to provide * additional rewards to delegators from a specific validator. * * Since: cosmos-sdk 0.50 */ export interface MsgDepositValidatorRewardsPool { depositor: string; validatorAddress: string; amount: Coin[]; } export interface MsgDepositValidatorRewardsPoolProtoMsg { typeUrl: "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool"; value: Uint8Array; } /** * DepositValidatorRewardsPool defines the request structure to provide * additional rewards to delegators from a specific validator. * * Since: cosmos-sdk 0.50 * @name MsgDepositValidatorRewardsPoolAmino * @package cosmos.distribution.v1beta1 * @see proto type: cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool */ export interface MsgDepositValidatorRewardsPoolAmino { depositor?: string; validator_address?: string; amount: CoinAmino[]; } export interface MsgDepositValidatorRewardsPoolAminoMsg { type: "cosmos-sdk/distr/MsgDepositValRewards"; value: MsgDepositValidatorRewardsPoolAmino; } /** * DepositValidatorRewardsPool defines the request structure to provide * additional rewards to delegators from a specific validator. * * Since: cosmos-sdk 0.50 */ export interface MsgDepositValidatorRewardsPoolSDKType { depositor: string; validator_address: string; amount: CoinSDKType[]; } /** * MsgDepositValidatorRewardsPoolResponse defines the response to executing a * MsgDepositValidatorRewardsPool message. * * Since: cosmos-sdk 0.50 */ export interface MsgDepositValidatorRewardsPoolResponse {} export interface MsgDepositValidatorRewardsPoolResponseProtoMsg { typeUrl: "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse"; value: Uint8Array; } /** * MsgDepositValidatorRewardsPoolResponse defines the response to executing a * MsgDepositValidatorRewardsPool message. * * Since: cosmos-sdk 0.50 * @name MsgDepositValidatorRewardsPoolResponseAmino * @package cosmos.distribution.v1beta1 * @see proto type: cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse */ export interface MsgDepositValidatorRewardsPoolResponseAmino {} export interface MsgDepositValidatorRewardsPoolResponseAminoMsg { type: "cosmos-sdk/MsgDepositValidatorRewardsPoolResponse"; value: MsgDepositValidatorRewardsPoolResponseAmino; } /** * MsgDepositValidatorRewardsPoolResponse defines the response to executing a * MsgDepositValidatorRewardsPool message. * * Since: cosmos-sdk 0.50 */ export interface MsgDepositValidatorRewardsPoolResponseSDKType {} function createBaseMsgSetWithdrawAddress(): MsgSetWithdrawAddress { return { delegatorAddress: "", withdrawAddress: "" }; } export const MsgSetWithdrawAddress = { typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", encode(message: MsgSetWithdrawAddress, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.delegatorAddress !== "") { writer.uint32(10).string(message.delegatorAddress); } if (message.withdrawAddress !== "") { writer.uint32(18).string(message.withdrawAddress); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgSetWithdrawAddress { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSetWithdrawAddress(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.delegatorAddress = reader.string(); break; case 2: message.withdrawAddress = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): MsgSetWithdrawAddress { const message = createBaseMsgSetWithdrawAddress(); message.delegatorAddress = object.delegatorAddress ?? ""; message.withdrawAddress = object.withdrawAddress ?? ""; return message; }, fromAmino(object: MsgSetWithdrawAddressAmino): MsgSetWithdrawAddress { const message = createBaseMsgSetWithdrawAddress(); if (object.delegator_address !== undefined && object.delegator_address !== null) { message.delegatorAddress = object.delegator_address; } if (object.withdraw_address !== undefined && object.withdraw_address !== null) { message.withdrawAddress = object.withdraw_address; } return message; }, toAmino(message: MsgSetWithdrawAddress): MsgSetWithdrawAddressAmino { const obj: any = {}; obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; obj.withdraw_address = message.withdrawAddress === "" ? undefined : message.withdrawAddress; return obj; }, fromAminoMsg(object: MsgSetWithdrawAddressAminoMsg): MsgSetWithdrawAddress { return MsgSetWithdrawAddress.fromAmino(object.value); }, toAminoMsg(message: MsgSetWithdrawAddress): MsgSetWithdrawAddressAminoMsg { return { type: "cosmos-sdk/MsgModifyWithdrawAddress", value: MsgSetWithdrawAddress.toAmino(message) }; }, fromProtoMsg(message: MsgSetWithdrawAddressProtoMsg): MsgSetWithdrawAddress { return MsgSetWithdrawAddress.decode(message.value); }, toProto(message: MsgSetWithdrawAddress): Uint8Array { return MsgSetWithdrawAddress.encode(message).finish(); }, toProtoMsg(message: MsgSetWithdrawAddress): MsgSetWithdrawAddressProtoMsg { return { typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", value: MsgSetWithdrawAddress.encode(message).finish() }; } }; function createBaseMsgSetWithdrawAddressResponse(): MsgSetWithdrawAddressResponse { return {}; } export const MsgSetWithdrawAddressResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse", encode(_: MsgSetWithdrawAddressResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgSetWithdrawAddressResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSetWithdrawAddressResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_: Partial): MsgSetWithdrawAddressResponse { const message = createBaseMsgSetWithdrawAddressResponse(); return message; }, fromAmino(_: MsgSetWithdrawAddressResponseAmino): MsgSetWithdrawAddressResponse { const message = createBaseMsgSetWithdrawAddressResponse(); return message; }, toAmino(_: MsgSetWithdrawAddressResponse): MsgSetWithdrawAddressResponseAmino { const obj: any = {}; return obj; }, fromAminoMsg(object: MsgSetWithdrawAddressResponseAminoMsg): MsgSetWithdrawAddressResponse { return MsgSetWithdrawAddressResponse.fromAmino(object.value); }, toAminoMsg(message: MsgSetWithdrawAddressResponse): MsgSetWithdrawAddressResponseAminoMsg { return { type: "cosmos-sdk/MsgSetWithdrawAddressResponse", value: MsgSetWithdrawAddressResponse.toAmino(message) }; }, fromProtoMsg(message: MsgSetWithdrawAddressResponseProtoMsg): MsgSetWithdrawAddressResponse { return MsgSetWithdrawAddressResponse.decode(message.value); }, toProto(message: MsgSetWithdrawAddressResponse): Uint8Array { return MsgSetWithdrawAddressResponse.encode(message).finish(); }, toProtoMsg(message: MsgSetWithdrawAddressResponse): MsgSetWithdrawAddressResponseProtoMsg { return { typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse", value: MsgSetWithdrawAddressResponse.encode(message).finish() }; } }; function createBaseMsgWithdrawDelegatorReward(): MsgWithdrawDelegatorReward { return { delegatorAddress: "", validatorAddress: "" }; } export const MsgWithdrawDelegatorReward = { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", encode(message: MsgWithdrawDelegatorReward, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.delegatorAddress !== "") { writer.uint32(10).string(message.delegatorAddress); } if (message.validatorAddress !== "") { writer.uint32(18).string(message.validatorAddress); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgWithdrawDelegatorReward { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgWithdrawDelegatorReward(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.delegatorAddress = reader.string(); break; case 2: message.validatorAddress = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): MsgWithdrawDelegatorReward { const message = createBaseMsgWithdrawDelegatorReward(); message.delegatorAddress = object.delegatorAddress ?? ""; message.validatorAddress = object.validatorAddress ?? ""; return message; }, fromAmino(object: MsgWithdrawDelegatorRewardAmino): MsgWithdrawDelegatorReward { const message = createBaseMsgWithdrawDelegatorReward(); if (object.delegator_address !== undefined && object.delegator_address !== null) { message.delegatorAddress = object.delegator_address; } if (object.validator_address !== undefined && object.validator_address !== null) { message.validatorAddress = object.validator_address; } return message; }, toAmino(message: MsgWithdrawDelegatorReward): MsgWithdrawDelegatorRewardAmino { const obj: any = {}; obj.delegator_address = message.delegatorAddress === "" ? undefined : message.delegatorAddress; obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; return obj; }, fromAminoMsg(object: MsgWithdrawDelegatorRewardAminoMsg): MsgWithdrawDelegatorReward { return MsgWithdrawDelegatorReward.fromAmino(object.value); }, toAminoMsg(message: MsgWithdrawDelegatorReward): MsgWithdrawDelegatorRewardAminoMsg { return { type: "cosmos-sdk/MsgWithdrawDelegationReward", value: MsgWithdrawDelegatorReward.toAmino(message) }; }, fromProtoMsg(message: MsgWithdrawDelegatorRewardProtoMsg): MsgWithdrawDelegatorReward { return MsgWithdrawDelegatorReward.decode(message.value); }, toProto(message: MsgWithdrawDelegatorReward): Uint8Array { return MsgWithdrawDelegatorReward.encode(message).finish(); }, toProtoMsg(message: MsgWithdrawDelegatorReward): MsgWithdrawDelegatorRewardProtoMsg { return { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", value: MsgWithdrawDelegatorReward.encode(message).finish() }; } }; function createBaseMsgWithdrawDelegatorRewardResponse(): MsgWithdrawDelegatorRewardResponse { return { amount: [] }; } export const MsgWithdrawDelegatorRewardResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse", encode(message: MsgWithdrawDelegatorRewardResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.amount) { Coin.encode(v!, writer.uint32(10).fork()).ldelim(); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgWithdrawDelegatorRewardResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgWithdrawDelegatorRewardResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.amount.push(Coin.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): MsgWithdrawDelegatorRewardResponse { const message = createBaseMsgWithdrawDelegatorRewardResponse(); message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; return message; }, fromAmino(object: MsgWithdrawDelegatorRewardResponseAmino): MsgWithdrawDelegatorRewardResponse { const message = createBaseMsgWithdrawDelegatorRewardResponse(); message.amount = object.amount?.map(e => Coin.fromAmino(e)) || []; return message; }, toAmino(message: MsgWithdrawDelegatorRewardResponse): MsgWithdrawDelegatorRewardResponseAmino { const obj: any = {}; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); } else { obj.amount = message.amount; } return obj; }, fromAminoMsg(object: MsgWithdrawDelegatorRewardResponseAminoMsg): MsgWithdrawDelegatorRewardResponse { return MsgWithdrawDelegatorRewardResponse.fromAmino(object.value); }, toAminoMsg(message: MsgWithdrawDelegatorRewardResponse): MsgWithdrawDelegatorRewardResponseAminoMsg { return { type: "cosmos-sdk/MsgWithdrawDelegatorRewardResponse", value: MsgWithdrawDelegatorRewardResponse.toAmino(message) }; }, fromProtoMsg(message: MsgWithdrawDelegatorRewardResponseProtoMsg): MsgWithdrawDelegatorRewardResponse { return MsgWithdrawDelegatorRewardResponse.decode(message.value); }, toProto(message: MsgWithdrawDelegatorRewardResponse): Uint8Array { return MsgWithdrawDelegatorRewardResponse.encode(message).finish(); }, toProtoMsg(message: MsgWithdrawDelegatorRewardResponse): MsgWithdrawDelegatorRewardResponseProtoMsg { return { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse", value: MsgWithdrawDelegatorRewardResponse.encode(message).finish() }; } }; function createBaseMsgWithdrawValidatorCommission(): MsgWithdrawValidatorCommission { return { validatorAddress: "" }; } export const MsgWithdrawValidatorCommission = { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", encode(message: MsgWithdrawValidatorCommission, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.validatorAddress !== "") { writer.uint32(10).string(message.validatorAddress); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgWithdrawValidatorCommission { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgWithdrawValidatorCommission(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.validatorAddress = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): MsgWithdrawValidatorCommission { const message = createBaseMsgWithdrawValidatorCommission(); message.validatorAddress = object.validatorAddress ?? ""; return message; }, fromAmino(object: MsgWithdrawValidatorCommissionAmino): MsgWithdrawValidatorCommission { const message = createBaseMsgWithdrawValidatorCommission(); if (object.validator_address !== undefined && object.validator_address !== null) { message.validatorAddress = object.validator_address; } return message; }, toAmino(message: MsgWithdrawValidatorCommission): MsgWithdrawValidatorCommissionAmino { const obj: any = {}; obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; return obj; }, fromAminoMsg(object: MsgWithdrawValidatorCommissionAminoMsg): MsgWithdrawValidatorCommission { return MsgWithdrawValidatorCommission.fromAmino(object.value); }, toAminoMsg(message: MsgWithdrawValidatorCommission): MsgWithdrawValidatorCommissionAminoMsg { return { type: "cosmos-sdk/MsgWithdrawValidatorCommission", value: MsgWithdrawValidatorCommission.toAmino(message) }; }, fromProtoMsg(message: MsgWithdrawValidatorCommissionProtoMsg): MsgWithdrawValidatorCommission { return MsgWithdrawValidatorCommission.decode(message.value); }, toProto(message: MsgWithdrawValidatorCommission): Uint8Array { return MsgWithdrawValidatorCommission.encode(message).finish(); }, toProtoMsg(message: MsgWithdrawValidatorCommission): MsgWithdrawValidatorCommissionProtoMsg { return { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", value: MsgWithdrawValidatorCommission.encode(message).finish() }; } }; function createBaseMsgWithdrawValidatorCommissionResponse(): MsgWithdrawValidatorCommissionResponse { return { amount: [] }; } export const MsgWithdrawValidatorCommissionResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse", encode(message: MsgWithdrawValidatorCommissionResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.amount) { Coin.encode(v!, writer.uint32(10).fork()).ldelim(); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgWithdrawValidatorCommissionResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgWithdrawValidatorCommissionResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.amount.push(Coin.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): MsgWithdrawValidatorCommissionResponse { const message = createBaseMsgWithdrawValidatorCommissionResponse(); message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; return message; }, fromAmino(object: MsgWithdrawValidatorCommissionResponseAmino): MsgWithdrawValidatorCommissionResponse { const message = createBaseMsgWithdrawValidatorCommissionResponse(); message.amount = object.amount?.map(e => Coin.fromAmino(e)) || []; return message; }, toAmino(message: MsgWithdrawValidatorCommissionResponse): MsgWithdrawValidatorCommissionResponseAmino { const obj: any = {}; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); } else { obj.amount = message.amount; } return obj; }, fromAminoMsg(object: MsgWithdrawValidatorCommissionResponseAminoMsg): MsgWithdrawValidatorCommissionResponse { return MsgWithdrawValidatorCommissionResponse.fromAmino(object.value); }, toAminoMsg(message: MsgWithdrawValidatorCommissionResponse): MsgWithdrawValidatorCommissionResponseAminoMsg { return { type: "cosmos-sdk/MsgWithdrawValidatorCommissionResponse", value: MsgWithdrawValidatorCommissionResponse.toAmino(message) }; }, fromProtoMsg(message: MsgWithdrawValidatorCommissionResponseProtoMsg): MsgWithdrawValidatorCommissionResponse { return MsgWithdrawValidatorCommissionResponse.decode(message.value); }, toProto(message: MsgWithdrawValidatorCommissionResponse): Uint8Array { return MsgWithdrawValidatorCommissionResponse.encode(message).finish(); }, toProtoMsg(message: MsgWithdrawValidatorCommissionResponse): MsgWithdrawValidatorCommissionResponseProtoMsg { return { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse", value: MsgWithdrawValidatorCommissionResponse.encode(message).finish() }; } }; function createBaseMsgFundCommunityPool(): MsgFundCommunityPool { return { amount: [], depositor: "" }; } export const MsgFundCommunityPool = { typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", encode(message: MsgFundCommunityPool, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.amount) { Coin.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.depositor !== "") { writer.uint32(18).string(message.depositor); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgFundCommunityPool { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgFundCommunityPool(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.amount.push(Coin.decode(reader, reader.uint32())); break; case 2: message.depositor = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): MsgFundCommunityPool { const message = createBaseMsgFundCommunityPool(); message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; message.depositor = object.depositor ?? ""; return message; }, fromAmino(object: MsgFundCommunityPoolAmino): MsgFundCommunityPool { const message = createBaseMsgFundCommunityPool(); message.amount = object.amount?.map(e => Coin.fromAmino(e)) || []; if (object.depositor !== undefined && object.depositor !== null) { message.depositor = object.depositor; } return message; }, toAmino(message: MsgFundCommunityPool): MsgFundCommunityPoolAmino { const obj: any = {}; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); } else { obj.amount = message.amount; } obj.depositor = message.depositor === "" ? undefined : message.depositor; return obj; }, fromAminoMsg(object: MsgFundCommunityPoolAminoMsg): MsgFundCommunityPool { return MsgFundCommunityPool.fromAmino(object.value); }, toAminoMsg(message: MsgFundCommunityPool): MsgFundCommunityPoolAminoMsg { return { type: "cosmos-sdk/MsgFundCommunityPool", value: MsgFundCommunityPool.toAmino(message) }; }, fromProtoMsg(message: MsgFundCommunityPoolProtoMsg): MsgFundCommunityPool { return MsgFundCommunityPool.decode(message.value); }, toProto(message: MsgFundCommunityPool): Uint8Array { return MsgFundCommunityPool.encode(message).finish(); }, toProtoMsg(message: MsgFundCommunityPool): MsgFundCommunityPoolProtoMsg { return { typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", value: MsgFundCommunityPool.encode(message).finish() }; } }; function createBaseMsgFundCommunityPoolResponse(): MsgFundCommunityPoolResponse { return {}; } export const MsgFundCommunityPoolResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse", encode(_: MsgFundCommunityPoolResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgFundCommunityPoolResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgFundCommunityPoolResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_: Partial): MsgFundCommunityPoolResponse { const message = createBaseMsgFundCommunityPoolResponse(); return message; }, fromAmino(_: MsgFundCommunityPoolResponseAmino): MsgFundCommunityPoolResponse { const message = createBaseMsgFundCommunityPoolResponse(); return message; }, toAmino(_: MsgFundCommunityPoolResponse): MsgFundCommunityPoolResponseAmino { const obj: any = {}; return obj; }, fromAminoMsg(object: MsgFundCommunityPoolResponseAminoMsg): MsgFundCommunityPoolResponse { return MsgFundCommunityPoolResponse.fromAmino(object.value); }, toAminoMsg(message: MsgFundCommunityPoolResponse): MsgFundCommunityPoolResponseAminoMsg { return { type: "cosmos-sdk/MsgFundCommunityPoolResponse", value: MsgFundCommunityPoolResponse.toAmino(message) }; }, fromProtoMsg(message: MsgFundCommunityPoolResponseProtoMsg): MsgFundCommunityPoolResponse { return MsgFundCommunityPoolResponse.decode(message.value); }, toProto(message: MsgFundCommunityPoolResponse): Uint8Array { return MsgFundCommunityPoolResponse.encode(message).finish(); }, toProtoMsg(message: MsgFundCommunityPoolResponse): MsgFundCommunityPoolResponseProtoMsg { return { typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse", value: MsgFundCommunityPoolResponse.encode(message).finish() }; } }; function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", params: Params.fromPartial({}) }; } export const MsgUpdateParams = { typeUrl: "/cosmos.distribution.v1beta1.MsgUpdateParams", encode(message: MsgUpdateParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.authority !== "") { writer.uint32(10).string(message.authority); } if (message.params !== undefined) { Params.encode(message.params, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateParams { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpdateParams(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.authority = reader.string(); break; case 2: message.params = Params.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): MsgUpdateParams { const message = createBaseMsgUpdateParams(); message.authority = object.authority ?? ""; message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; return message; }, fromAmino(object: MsgUpdateParamsAmino): MsgUpdateParams { const message = createBaseMsgUpdateParams(); if (object.authority !== undefined && object.authority !== null) { message.authority = object.authority; } if (object.params !== undefined && object.params !== null) { message.params = Params.fromAmino(object.params); } return message; }, toAmino(message: MsgUpdateParams): MsgUpdateParamsAmino { const obj: any = {}; obj.authority = message.authority === "" ? undefined : message.authority; obj.params = message.params ? Params.toAmino(message.params) : Params.toAmino(Params.fromPartial({})); return obj; }, fromAminoMsg(object: MsgUpdateParamsAminoMsg): MsgUpdateParams { return MsgUpdateParams.fromAmino(object.value); }, toAminoMsg(message: MsgUpdateParams): MsgUpdateParamsAminoMsg { return { type: "cosmos-sdk/distribution/MsgUpdateParams", value: MsgUpdateParams.toAmino(message) }; }, fromProtoMsg(message: MsgUpdateParamsProtoMsg): MsgUpdateParams { return MsgUpdateParams.decode(message.value); }, toProto(message: MsgUpdateParams): Uint8Array { return MsgUpdateParams.encode(message).finish(); }, toProtoMsg(message: MsgUpdateParams): MsgUpdateParamsProtoMsg { return { typeUrl: "/cosmos.distribution.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; } }; function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } export const MsgUpdateParamsResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgUpdateParamsResponse", encode(_: MsgUpdateParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateParamsResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpdateParamsResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_: Partial): MsgUpdateParamsResponse { const message = createBaseMsgUpdateParamsResponse(); return message; }, fromAmino(_: MsgUpdateParamsResponseAmino): MsgUpdateParamsResponse { const message = createBaseMsgUpdateParamsResponse(); return message; }, toAmino(_: MsgUpdateParamsResponse): MsgUpdateParamsResponseAmino { const obj: any = {}; return obj; }, fromAminoMsg(object: MsgUpdateParamsResponseAminoMsg): MsgUpdateParamsResponse { return MsgUpdateParamsResponse.fromAmino(object.value); }, toAminoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseAminoMsg { return { type: "cosmos-sdk/MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.toAmino(message) }; }, fromProtoMsg(message: MsgUpdateParamsResponseProtoMsg): MsgUpdateParamsResponse { return MsgUpdateParamsResponse.decode(message.value); }, toProto(message: MsgUpdateParamsResponse): Uint8Array { return MsgUpdateParamsResponse.encode(message).finish(); }, toProtoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseProtoMsg { return { typeUrl: "/cosmos.distribution.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; } }; function createBaseMsgCommunityPoolSpend(): MsgCommunityPoolSpend { return { authority: "", recipient: "", amount: [] }; } export const MsgCommunityPoolSpend = { typeUrl: "/cosmos.distribution.v1beta1.MsgCommunityPoolSpend", encode(message: MsgCommunityPoolSpend, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.authority !== "") { writer.uint32(10).string(message.authority); } if (message.recipient !== "") { writer.uint32(18).string(message.recipient); } for (const v of message.amount) { Coin.encode(v!, writer.uint32(26).fork()).ldelim(); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgCommunityPoolSpend { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCommunityPoolSpend(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.authority = reader.string(); break; case 2: message.recipient = reader.string(); break; case 3: message.amount.push(Coin.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): MsgCommunityPoolSpend { const message = createBaseMsgCommunityPoolSpend(); message.authority = object.authority ?? ""; message.recipient = object.recipient ?? ""; message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; return message; }, fromAmino(object: MsgCommunityPoolSpendAmino): MsgCommunityPoolSpend { const message = createBaseMsgCommunityPoolSpend(); if (object.authority !== undefined && object.authority !== null) { message.authority = object.authority; } if (object.recipient !== undefined && object.recipient !== null) { message.recipient = object.recipient; } message.amount = object.amount?.map(e => Coin.fromAmino(e)) || []; return message; }, toAmino(message: MsgCommunityPoolSpend): MsgCommunityPoolSpendAmino { const obj: any = {}; obj.authority = message.authority === "" ? undefined : message.authority; obj.recipient = message.recipient === "" ? undefined : message.recipient; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); } else { obj.amount = message.amount; } return obj; }, fromAminoMsg(object: MsgCommunityPoolSpendAminoMsg): MsgCommunityPoolSpend { return MsgCommunityPoolSpend.fromAmino(object.value); }, toAminoMsg(message: MsgCommunityPoolSpend): MsgCommunityPoolSpendAminoMsg { return { type: "cosmos-sdk/distr/MsgCommunityPoolSpend", value: MsgCommunityPoolSpend.toAmino(message) }; }, fromProtoMsg(message: MsgCommunityPoolSpendProtoMsg): MsgCommunityPoolSpend { return MsgCommunityPoolSpend.decode(message.value); }, toProto(message: MsgCommunityPoolSpend): Uint8Array { return MsgCommunityPoolSpend.encode(message).finish(); }, toProtoMsg(message: MsgCommunityPoolSpend): MsgCommunityPoolSpendProtoMsg { return { typeUrl: "/cosmos.distribution.v1beta1.MsgCommunityPoolSpend", value: MsgCommunityPoolSpend.encode(message).finish() }; } }; function createBaseMsgCommunityPoolSpendResponse(): MsgCommunityPoolSpendResponse { return {}; } export const MsgCommunityPoolSpendResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse", encode(_: MsgCommunityPoolSpendResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgCommunityPoolSpendResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCommunityPoolSpendResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_: Partial): MsgCommunityPoolSpendResponse { const message = createBaseMsgCommunityPoolSpendResponse(); return message; }, fromAmino(_: MsgCommunityPoolSpendResponseAmino): MsgCommunityPoolSpendResponse { const message = createBaseMsgCommunityPoolSpendResponse(); return message; }, toAmino(_: MsgCommunityPoolSpendResponse): MsgCommunityPoolSpendResponseAmino { const obj: any = {}; return obj; }, fromAminoMsg(object: MsgCommunityPoolSpendResponseAminoMsg): MsgCommunityPoolSpendResponse { return MsgCommunityPoolSpendResponse.fromAmino(object.value); }, toAminoMsg(message: MsgCommunityPoolSpendResponse): MsgCommunityPoolSpendResponseAminoMsg { return { type: "cosmos-sdk/MsgCommunityPoolSpendResponse", value: MsgCommunityPoolSpendResponse.toAmino(message) }; }, fromProtoMsg(message: MsgCommunityPoolSpendResponseProtoMsg): MsgCommunityPoolSpendResponse { return MsgCommunityPoolSpendResponse.decode(message.value); }, toProto(message: MsgCommunityPoolSpendResponse): Uint8Array { return MsgCommunityPoolSpendResponse.encode(message).finish(); }, toProtoMsg(message: MsgCommunityPoolSpendResponse): MsgCommunityPoolSpendResponseProtoMsg { return { typeUrl: "/cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse", value: MsgCommunityPoolSpendResponse.encode(message).finish() }; } }; function createBaseMsgDepositValidatorRewardsPool(): MsgDepositValidatorRewardsPool { return { depositor: "", validatorAddress: "", amount: [] }; } export const MsgDepositValidatorRewardsPool = { typeUrl: "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool", encode(message: MsgDepositValidatorRewardsPool, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.depositor !== "") { writer.uint32(10).string(message.depositor); } if (message.validatorAddress !== "") { writer.uint32(18).string(message.validatorAddress); } for (const v of message.amount) { Coin.encode(v!, writer.uint32(26).fork()).ldelim(); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgDepositValidatorRewardsPool { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDepositValidatorRewardsPool(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.depositor = reader.string(); break; case 2: message.validatorAddress = reader.string(); break; case 3: message.amount.push(Coin.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): MsgDepositValidatorRewardsPool { const message = createBaseMsgDepositValidatorRewardsPool(); message.depositor = object.depositor ?? ""; message.validatorAddress = object.validatorAddress ?? ""; message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; return message; }, fromAmino(object: MsgDepositValidatorRewardsPoolAmino): MsgDepositValidatorRewardsPool { const message = createBaseMsgDepositValidatorRewardsPool(); if (object.depositor !== undefined && object.depositor !== null) { message.depositor = object.depositor; } if (object.validator_address !== undefined && object.validator_address !== null) { message.validatorAddress = object.validator_address; } message.amount = object.amount?.map(e => Coin.fromAmino(e)) || []; return message; }, toAmino(message: MsgDepositValidatorRewardsPool): MsgDepositValidatorRewardsPoolAmino { const obj: any = {}; obj.depositor = message.depositor === "" ? undefined : message.depositor; obj.validator_address = message.validatorAddress === "" ? undefined : message.validatorAddress; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); } else { obj.amount = message.amount; } return obj; }, fromAminoMsg(object: MsgDepositValidatorRewardsPoolAminoMsg): MsgDepositValidatorRewardsPool { return MsgDepositValidatorRewardsPool.fromAmino(object.value); }, toAminoMsg(message: MsgDepositValidatorRewardsPool): MsgDepositValidatorRewardsPoolAminoMsg { return { type: "cosmos-sdk/distr/MsgDepositValRewards", value: MsgDepositValidatorRewardsPool.toAmino(message) }; }, fromProtoMsg(message: MsgDepositValidatorRewardsPoolProtoMsg): MsgDepositValidatorRewardsPool { return MsgDepositValidatorRewardsPool.decode(message.value); }, toProto(message: MsgDepositValidatorRewardsPool): Uint8Array { return MsgDepositValidatorRewardsPool.encode(message).finish(); }, toProtoMsg(message: MsgDepositValidatorRewardsPool): MsgDepositValidatorRewardsPoolProtoMsg { return { typeUrl: "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool", value: MsgDepositValidatorRewardsPool.encode(message).finish() }; } }; function createBaseMsgDepositValidatorRewardsPoolResponse(): MsgDepositValidatorRewardsPoolResponse { return {}; } export const MsgDepositValidatorRewardsPoolResponse = { typeUrl: "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse", encode(_: MsgDepositValidatorRewardsPoolResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgDepositValidatorRewardsPoolResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDepositValidatorRewardsPoolResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_: Partial): MsgDepositValidatorRewardsPoolResponse { const message = createBaseMsgDepositValidatorRewardsPoolResponse(); return message; }, fromAmino(_: MsgDepositValidatorRewardsPoolResponseAmino): MsgDepositValidatorRewardsPoolResponse { const message = createBaseMsgDepositValidatorRewardsPoolResponse(); return message; }, toAmino(_: MsgDepositValidatorRewardsPoolResponse): MsgDepositValidatorRewardsPoolResponseAmino { const obj: any = {}; return obj; }, fromAminoMsg(object: MsgDepositValidatorRewardsPoolResponseAminoMsg): MsgDepositValidatorRewardsPoolResponse { return MsgDepositValidatorRewardsPoolResponse.fromAmino(object.value); }, toAminoMsg(message: MsgDepositValidatorRewardsPoolResponse): MsgDepositValidatorRewardsPoolResponseAminoMsg { return { type: "cosmos-sdk/MsgDepositValidatorRewardsPoolResponse", value: MsgDepositValidatorRewardsPoolResponse.toAmino(message) }; }, fromProtoMsg(message: MsgDepositValidatorRewardsPoolResponseProtoMsg): MsgDepositValidatorRewardsPoolResponse { return MsgDepositValidatorRewardsPoolResponse.decode(message.value); }, toProto(message: MsgDepositValidatorRewardsPoolResponse): Uint8Array { return MsgDepositValidatorRewardsPoolResponse.encode(message).finish(); }, toProtoMsg(message: MsgDepositValidatorRewardsPoolResponse): MsgDepositValidatorRewardsPoolResponseProtoMsg { return { typeUrl: "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse", value: MsgDepositValidatorRewardsPoolResponse.encode(message).finish() }; } };