import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; 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). */ 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. */ 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. */ 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 { amount: Coin[]; } export interface MsgWithdrawDelegatorRewardResponseProtoMsg { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse"; value: Uint8Array; } /** MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. */ export interface MsgWithdrawDelegatorRewardResponseAmino { 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. */ 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 { amount: Coin[]; } export interface MsgWithdrawValidatorCommissionResponseProtoMsg { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse"; value: Uint8Array; } /** MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. */ export interface MsgWithdrawValidatorCommissionResponseAmino { 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. */ 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. */ export interface MsgFundCommunityPoolResponseAmino {} export interface MsgFundCommunityPoolResponseAminoMsg { type: "cosmos-sdk/MsgFundCommunityPoolResponse"; value: MsgFundCommunityPoolResponseAmino; } /** MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. */ export interface MsgFundCommunityPoolResponseSDKType {} 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; obj.withdraw_address = 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; obj.validator_address = 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 = []; } 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; 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 = []; } 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 = []; } obj.depositor = 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() }; } };