//@ts-nocheck import { Coin, CoinAmino, CoinSDKType } from "../../base/v1beta1/coin"; import { Input, InputAmino, InputSDKType, Output, OutputAmino, OutputSDKType, Params, ParamsAmino, ParamsSDKType, SendEnabled, SendEnabledAmino, SendEnabledSDKType } from "./bank"; import { BinaryReader, BinaryWriter } from "../../../binary"; /** MsgSend represents a message to send coins from one account to another. */ export interface MsgSend { fromAddress: string; toAddress: string; amount: Coin[]; } export interface MsgSendProtoMsg { typeUrl: "/cosmos.bank.v1beta1.MsgSend"; value: Uint8Array; } /** * MsgSend represents a message to send coins from one account to another. * @name MsgSendAmino * @package cosmos.bank.v1beta1 * @see proto type: cosmos.bank.v1beta1.MsgSend */ export interface MsgSendAmino { from_address?: string; to_address?: string; amount: CoinAmino[]; } export interface MsgSendAminoMsg { type: "cosmos-sdk/MsgSend"; value: MsgSendAmino; } /** MsgSend represents a message to send coins from one account to another. */ export interface MsgSendSDKType { from_address: string; to_address: string; amount: CoinSDKType[]; } /** MsgSendResponse defines the Msg/Send response type. */ export interface MsgSendResponse {} export interface MsgSendResponseProtoMsg { typeUrl: "/cosmos.bank.v1beta1.MsgSendResponse"; value: Uint8Array; } /** * MsgSendResponse defines the Msg/Send response type. * @name MsgSendResponseAmino * @package cosmos.bank.v1beta1 * @see proto type: cosmos.bank.v1beta1.MsgSendResponse */ export interface MsgSendResponseAmino {} export interface MsgSendResponseAminoMsg { type: "cosmos-sdk/MsgSendResponse"; value: MsgSendResponseAmino; } /** MsgSendResponse defines the Msg/Send response type. */ export interface MsgSendResponseSDKType {} /** MsgMultiSend represents an arbitrary multi-in, multi-out send message. */ export interface MsgMultiSend { /** * Inputs, despite being `repeated`, only allows one sender input. This is * checked in MsgMultiSend's ValidateBasic. */ inputs: Input[]; outputs: Output[]; } export interface MsgMultiSendProtoMsg { typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend"; value: Uint8Array; } /** * MsgMultiSend represents an arbitrary multi-in, multi-out send message. * @name MsgMultiSendAmino * @package cosmos.bank.v1beta1 * @see proto type: cosmos.bank.v1beta1.MsgMultiSend */ export interface MsgMultiSendAmino { /** * Inputs, despite being `repeated`, only allows one sender input. This is * checked in MsgMultiSend's ValidateBasic. */ inputs: InputAmino[]; outputs: OutputAmino[]; } export interface MsgMultiSendAminoMsg { type: "cosmos-sdk/MsgMultiSend"; value: MsgMultiSendAmino; } /** MsgMultiSend represents an arbitrary multi-in, multi-out send message. */ export interface MsgMultiSendSDKType { inputs: InputSDKType[]; outputs: OutputSDKType[]; } /** MsgMultiSendResponse defines the Msg/MultiSend response type. */ export interface MsgMultiSendResponse {} export interface MsgMultiSendResponseProtoMsg { typeUrl: "/cosmos.bank.v1beta1.MsgMultiSendResponse"; value: Uint8Array; } /** * MsgMultiSendResponse defines the Msg/MultiSend response type. * @name MsgMultiSendResponseAmino * @package cosmos.bank.v1beta1 * @see proto type: cosmos.bank.v1beta1.MsgMultiSendResponse */ export interface MsgMultiSendResponseAmino {} export interface MsgMultiSendResponseAminoMsg { type: "cosmos-sdk/MsgMultiSendResponse"; value: MsgMultiSendResponseAmino; } /** MsgMultiSendResponse defines the Msg/MultiSend response type. */ export interface MsgMultiSendResponseSDKType {} /** * 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/bank parameters to update. * * NOTE: All parameters must be supplied. */ params: Params; } export interface MsgUpdateParamsProtoMsg { typeUrl: "/cosmos.bank.v1beta1.MsgUpdateParams"; value: Uint8Array; } /** * MsgUpdateParams is the Msg/UpdateParams request type. * * Since: cosmos-sdk 0.47 * @name MsgUpdateParamsAmino * @package cosmos.bank.v1beta1 * @see proto type: cosmos.bank.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/bank parameters to update. * * NOTE: All parameters must be supplied. */ params: ParamsAmino; } export interface MsgUpdateParamsAminoMsg { type: "cosmos-sdk/x/bank/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.bank.v1beta1.MsgUpdateParamsResponse"; value: Uint8Array; } /** * MsgUpdateParamsResponse defines the response structure for executing a * MsgUpdateParams message. * * Since: cosmos-sdk 0.47 * @name MsgUpdateParamsResponseAmino * @package cosmos.bank.v1beta1 * @see proto type: cosmos.bank.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 {} /** * MsgSetSendEnabled is the Msg/SetSendEnabled request type. * * Only entries to add/update/delete need to be included. * Existing SendEnabled entries that are not included in this * message are left unchanged. * * Since: cosmos-sdk 0.47 */ export interface MsgSetSendEnabled { /** authority is the address that controls the module. */ authority: string; /** send_enabled is the list of entries to add or update. */ sendEnabled: SendEnabled[]; /** * use_default_for is a list of denoms that should use the params.default_send_enabled value. * Denoms listed here will have their SendEnabled entries deleted. * If a denom is included that doesn't have a SendEnabled entry, * it will be ignored. */ useDefaultFor: string[]; } export interface MsgSetSendEnabledProtoMsg { typeUrl: "/cosmos.bank.v1beta1.MsgSetSendEnabled"; value: Uint8Array; } /** * MsgSetSendEnabled is the Msg/SetSendEnabled request type. * * Only entries to add/update/delete need to be included. * Existing SendEnabled entries that are not included in this * message are left unchanged. * * Since: cosmos-sdk 0.47 * @name MsgSetSendEnabledAmino * @package cosmos.bank.v1beta1 * @see proto type: cosmos.bank.v1beta1.MsgSetSendEnabled */ export interface MsgSetSendEnabledAmino { /** * authority is the address that controls the module. */ authority?: string; /** * send_enabled is the list of entries to add or update. */ send_enabled?: SendEnabledAmino[]; /** * use_default_for is a list of denoms that should use the params.default_send_enabled value. * Denoms listed here will have their SendEnabled entries deleted. * If a denom is included that doesn't have a SendEnabled entry, * it will be ignored. */ use_default_for?: string[]; } export interface MsgSetSendEnabledAminoMsg { type: "cosmos-sdk/MsgSetSendEnabled"; value: MsgSetSendEnabledAmino; } /** * MsgSetSendEnabled is the Msg/SetSendEnabled request type. * * Only entries to add/update/delete need to be included. * Existing SendEnabled entries that are not included in this * message are left unchanged. * * Since: cosmos-sdk 0.47 */ export interface MsgSetSendEnabledSDKType { authority: string; send_enabled: SendEnabledSDKType[]; use_default_for: string[]; } /** * MsgSetSendEnabledResponse defines the Msg/SetSendEnabled response type. * * Since: cosmos-sdk 0.47 */ export interface MsgSetSendEnabledResponse {} export interface MsgSetSendEnabledResponseProtoMsg { typeUrl: "/cosmos.bank.v1beta1.MsgSetSendEnabledResponse"; value: Uint8Array; } /** * MsgSetSendEnabledResponse defines the Msg/SetSendEnabled response type. * * Since: cosmos-sdk 0.47 * @name MsgSetSendEnabledResponseAmino * @package cosmos.bank.v1beta1 * @see proto type: cosmos.bank.v1beta1.MsgSetSendEnabledResponse */ export interface MsgSetSendEnabledResponseAmino {} export interface MsgSetSendEnabledResponseAminoMsg { type: "cosmos-sdk/MsgSetSendEnabledResponse"; value: MsgSetSendEnabledResponseAmino; } /** * MsgSetSendEnabledResponse defines the Msg/SetSendEnabled response type. * * Since: cosmos-sdk 0.47 */ export interface MsgSetSendEnabledResponseSDKType {} function createBaseMsgSend(): MsgSend { return { fromAddress: "", toAddress: "", amount: [] }; } export const MsgSend = { typeUrl: "/cosmos.bank.v1beta1.MsgSend", encode(message: MsgSend, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.fromAddress !== "") { writer.uint32(10).string(message.fromAddress); } if (message.toAddress !== "") { writer.uint32(18).string(message.toAddress); } for (const v of message.amount) { Coin.encode(v!, writer.uint32(26).fork()).ldelim(); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgSend { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSend(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.fromAddress = reader.string(); break; case 2: message.toAddress = 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): MsgSend { const message = createBaseMsgSend(); message.fromAddress = object.fromAddress ?? ""; message.toAddress = object.toAddress ?? ""; message.amount = object.amount?.map(e => Coin.fromPartial(e)) || []; return message; }, fromAmino(object: MsgSendAmino): MsgSend { const message = createBaseMsgSend(); if (object.from_address !== undefined && object.from_address !== null) { message.fromAddress = object.from_address; } if (object.to_address !== undefined && object.to_address !== null) { message.toAddress = object.to_address; } message.amount = object.amount?.map(e => Coin.fromAmino(e)) || []; return message; }, toAmino(message: MsgSend): MsgSendAmino { const obj: any = {}; obj.from_address = message.fromAddress === "" ? undefined : message.fromAddress; obj.to_address = message.toAddress === "" ? undefined : message.toAddress; if (message.amount) { obj.amount = message.amount.map(e => e ? Coin.toAmino(e) : undefined); } else { obj.amount = message.amount; } return obj; }, fromAminoMsg(object: MsgSendAminoMsg): MsgSend { return MsgSend.fromAmino(object.value); }, toAminoMsg(message: MsgSend): MsgSendAminoMsg { return { type: "cosmos-sdk/MsgSend", value: MsgSend.toAmino(message) }; }, fromProtoMsg(message: MsgSendProtoMsg): MsgSend { return MsgSend.decode(message.value); }, toProto(message: MsgSend): Uint8Array { return MsgSend.encode(message).finish(); }, toProtoMsg(message: MsgSend): MsgSendProtoMsg { return { typeUrl: "/cosmos.bank.v1beta1.MsgSend", value: MsgSend.encode(message).finish() }; } }; function createBaseMsgSendResponse(): MsgSendResponse { return {}; } export const MsgSendResponse = { typeUrl: "/cosmos.bank.v1beta1.MsgSendResponse", encode(_: MsgSendResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgSendResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSendResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_: Partial): MsgSendResponse { const message = createBaseMsgSendResponse(); return message; }, fromAmino(_: MsgSendResponseAmino): MsgSendResponse { const message = createBaseMsgSendResponse(); return message; }, toAmino(_: MsgSendResponse): MsgSendResponseAmino { const obj: any = {}; return obj; }, fromAminoMsg(object: MsgSendResponseAminoMsg): MsgSendResponse { return MsgSendResponse.fromAmino(object.value); }, toAminoMsg(message: MsgSendResponse): MsgSendResponseAminoMsg { return { type: "cosmos-sdk/MsgSendResponse", value: MsgSendResponse.toAmino(message) }; }, fromProtoMsg(message: MsgSendResponseProtoMsg): MsgSendResponse { return MsgSendResponse.decode(message.value); }, toProto(message: MsgSendResponse): Uint8Array { return MsgSendResponse.encode(message).finish(); }, toProtoMsg(message: MsgSendResponse): MsgSendResponseProtoMsg { return { typeUrl: "/cosmos.bank.v1beta1.MsgSendResponse", value: MsgSendResponse.encode(message).finish() }; } }; function createBaseMsgMultiSend(): MsgMultiSend { return { inputs: [], outputs: [] }; } export const MsgMultiSend = { typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", encode(message: MsgMultiSend, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.inputs) { Input.encode(v!, writer.uint32(10).fork()).ldelim(); } for (const v of message.outputs) { Output.encode(v!, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgMultiSend { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgMultiSend(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.inputs.push(Input.decode(reader, reader.uint32())); break; case 2: message.outputs.push(Output.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): MsgMultiSend { const message = createBaseMsgMultiSend(); message.inputs = object.inputs?.map(e => Input.fromPartial(e)) || []; message.outputs = object.outputs?.map(e => Output.fromPartial(e)) || []; return message; }, fromAmino(object: MsgMultiSendAmino): MsgMultiSend { const message = createBaseMsgMultiSend(); message.inputs = object.inputs?.map(e => Input.fromAmino(e)) || []; message.outputs = object.outputs?.map(e => Output.fromAmino(e)) || []; return message; }, toAmino(message: MsgMultiSend): MsgMultiSendAmino { const obj: any = {}; if (message.inputs) { obj.inputs = message.inputs.map(e => e ? Input.toAmino(e) : undefined); } else { obj.inputs = message.inputs; } if (message.outputs) { obj.outputs = message.outputs.map(e => e ? Output.toAmino(e) : undefined); } else { obj.outputs = message.outputs; } return obj; }, fromAminoMsg(object: MsgMultiSendAminoMsg): MsgMultiSend { return MsgMultiSend.fromAmino(object.value); }, toAminoMsg(message: MsgMultiSend): MsgMultiSendAminoMsg { return { type: "cosmos-sdk/MsgMultiSend", value: MsgMultiSend.toAmino(message) }; }, fromProtoMsg(message: MsgMultiSendProtoMsg): MsgMultiSend { return MsgMultiSend.decode(message.value); }, toProto(message: MsgMultiSend): Uint8Array { return MsgMultiSend.encode(message).finish(); }, toProtoMsg(message: MsgMultiSend): MsgMultiSendProtoMsg { return { typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", value: MsgMultiSend.encode(message).finish() }; } }; function createBaseMsgMultiSendResponse(): MsgMultiSendResponse { return {}; } export const MsgMultiSendResponse = { typeUrl: "/cosmos.bank.v1beta1.MsgMultiSendResponse", encode(_: MsgMultiSendResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgMultiSendResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgMultiSendResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_: Partial): MsgMultiSendResponse { const message = createBaseMsgMultiSendResponse(); return message; }, fromAmino(_: MsgMultiSendResponseAmino): MsgMultiSendResponse { const message = createBaseMsgMultiSendResponse(); return message; }, toAmino(_: MsgMultiSendResponse): MsgMultiSendResponseAmino { const obj: any = {}; return obj; }, fromAminoMsg(object: MsgMultiSendResponseAminoMsg): MsgMultiSendResponse { return MsgMultiSendResponse.fromAmino(object.value); }, toAminoMsg(message: MsgMultiSendResponse): MsgMultiSendResponseAminoMsg { return { type: "cosmos-sdk/MsgMultiSendResponse", value: MsgMultiSendResponse.toAmino(message) }; }, fromProtoMsg(message: MsgMultiSendResponseProtoMsg): MsgMultiSendResponse { return MsgMultiSendResponse.decode(message.value); }, toProto(message: MsgMultiSendResponse): Uint8Array { return MsgMultiSendResponse.encode(message).finish(); }, toProtoMsg(message: MsgMultiSendResponse): MsgMultiSendResponseProtoMsg { return { typeUrl: "/cosmos.bank.v1beta1.MsgMultiSendResponse", value: MsgMultiSendResponse.encode(message).finish() }; } }; function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", params: Params.fromPartial({}) }; } export const MsgUpdateParams = { typeUrl: "/cosmos.bank.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/x/bank/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.bank.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; } }; function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } export const MsgUpdateParamsResponse = { typeUrl: "/cosmos.bank.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.bank.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; } }; function createBaseMsgSetSendEnabled(): MsgSetSendEnabled { return { authority: "", sendEnabled: [], useDefaultFor: [] }; } export const MsgSetSendEnabled = { typeUrl: "/cosmos.bank.v1beta1.MsgSetSendEnabled", encode(message: MsgSetSendEnabled, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.authority !== "") { writer.uint32(10).string(message.authority); } for (const v of message.sendEnabled) { SendEnabled.encode(v!, writer.uint32(18).fork()).ldelim(); } for (const v of message.useDefaultFor) { writer.uint32(26).string(v!); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgSetSendEnabled { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSetSendEnabled(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.authority = reader.string(); break; case 2: message.sendEnabled.push(SendEnabled.decode(reader, reader.uint32())); break; case 3: message.useDefaultFor.push(reader.string()); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): MsgSetSendEnabled { const message = createBaseMsgSetSendEnabled(); message.authority = object.authority ?? ""; message.sendEnabled = object.sendEnabled?.map(e => SendEnabled.fromPartial(e)) || []; message.useDefaultFor = object.useDefaultFor?.map(e => e) || []; return message; }, fromAmino(object: MsgSetSendEnabledAmino): MsgSetSendEnabled { const message = createBaseMsgSetSendEnabled(); if (object.authority !== undefined && object.authority !== null) { message.authority = object.authority; } message.sendEnabled = object.send_enabled?.map(e => SendEnabled.fromAmino(e)) || []; message.useDefaultFor = object.use_default_for?.map(e => e) || []; return message; }, toAmino(message: MsgSetSendEnabled): MsgSetSendEnabledAmino { const obj: any = {}; obj.authority = message.authority === "" ? undefined : message.authority; if (message.sendEnabled) { obj.send_enabled = message.sendEnabled.map(e => e ? SendEnabled.toAmino(e) : undefined); } else { obj.send_enabled = message.sendEnabled; } if (message.useDefaultFor) { obj.use_default_for = message.useDefaultFor.map(e => e); } else { obj.use_default_for = message.useDefaultFor; } return obj; }, fromAminoMsg(object: MsgSetSendEnabledAminoMsg): MsgSetSendEnabled { return MsgSetSendEnabled.fromAmino(object.value); }, toAminoMsg(message: MsgSetSendEnabled): MsgSetSendEnabledAminoMsg { return { type: "cosmos-sdk/MsgSetSendEnabled", value: MsgSetSendEnabled.toAmino(message) }; }, fromProtoMsg(message: MsgSetSendEnabledProtoMsg): MsgSetSendEnabled { return MsgSetSendEnabled.decode(message.value); }, toProto(message: MsgSetSendEnabled): Uint8Array { return MsgSetSendEnabled.encode(message).finish(); }, toProtoMsg(message: MsgSetSendEnabled): MsgSetSendEnabledProtoMsg { return { typeUrl: "/cosmos.bank.v1beta1.MsgSetSendEnabled", value: MsgSetSendEnabled.encode(message).finish() }; } }; function createBaseMsgSetSendEnabledResponse(): MsgSetSendEnabledResponse { return {}; } export const MsgSetSendEnabledResponse = { typeUrl: "/cosmos.bank.v1beta1.MsgSetSendEnabledResponse", encode(_: MsgSetSendEnabledResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgSetSendEnabledResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSetSendEnabledResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_: Partial): MsgSetSendEnabledResponse { const message = createBaseMsgSetSendEnabledResponse(); return message; }, fromAmino(_: MsgSetSendEnabledResponseAmino): MsgSetSendEnabledResponse { const message = createBaseMsgSetSendEnabledResponse(); return message; }, toAmino(_: MsgSetSendEnabledResponse): MsgSetSendEnabledResponseAmino { const obj: any = {}; return obj; }, fromAminoMsg(object: MsgSetSendEnabledResponseAminoMsg): MsgSetSendEnabledResponse { return MsgSetSendEnabledResponse.fromAmino(object.value); }, toAminoMsg(message: MsgSetSendEnabledResponse): MsgSetSendEnabledResponseAminoMsg { return { type: "cosmos-sdk/MsgSetSendEnabledResponse", value: MsgSetSendEnabledResponse.toAmino(message) }; }, fromProtoMsg(message: MsgSetSendEnabledResponseProtoMsg): MsgSetSendEnabledResponse { return MsgSetSendEnabledResponse.decode(message.value); }, toProto(message: MsgSetSendEnabledResponse): Uint8Array { return MsgSetSendEnabledResponse.encode(message).finish(); }, toProtoMsg(message: MsgSetSendEnabledResponse): MsgSetSendEnabledResponseProtoMsg { return { typeUrl: "/cosmos.bank.v1beta1.MsgSetSendEnabledResponse", value: MsgSetSendEnabledResponse.encode(message).finish() }; } };