//@ts-nocheck import { Params, ParamsAmino, ParamsSDKType } from "./auth"; import { BinaryReader, BinaryWriter } from "../../../binary"; /** * 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/auth parameters to update. * * NOTE: All parameters must be supplied. */ params: Params; } export interface MsgUpdateParamsProtoMsg { typeUrl: "/cosmos.auth.v1beta1.MsgUpdateParams"; value: Uint8Array; } /** * MsgUpdateParams is the Msg/UpdateParams request type. * * Since: cosmos-sdk 0.47 * @name MsgUpdateParamsAmino * @package cosmos.auth.v1beta1 * @see proto type: cosmos.auth.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/auth parameters to update. * * NOTE: All parameters must be supplied. */ params: ParamsAmino; } export interface MsgUpdateParamsAminoMsg { type: "cosmos-sdk/x/auth/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.auth.v1beta1.MsgUpdateParamsResponse"; value: Uint8Array; } /** * MsgUpdateParamsResponse defines the response structure for executing a * MsgUpdateParams message. * * Since: cosmos-sdk 0.47 * @name MsgUpdateParamsResponseAmino * @package cosmos.auth.v1beta1 * @see proto type: cosmos.auth.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 {} function createBaseMsgUpdateParams(): MsgUpdateParams { return { authority: "", params: Params.fromPartial({}) }; } export const MsgUpdateParams = { typeUrl: "/cosmos.auth.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/auth/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.auth.v1beta1.MsgUpdateParams", value: MsgUpdateParams.encode(message).finish() }; } }; function createBaseMsgUpdateParamsResponse(): MsgUpdateParamsResponse { return {}; } export const MsgUpdateParamsResponse = { typeUrl: "/cosmos.auth.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.auth.v1beta1.MsgUpdateParamsResponse", value: MsgUpdateParamsResponse.encode(message).finish() }; } };