UNPKG

interchainjs

Version:

InterchainJS is a JavaScript library for interacting with Cosmos SDK based blockchains.

165 lines (164 loc) 5.74 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.QueryParamsResponse = exports.QueryParamsRequest = void 0; const host_1 = require("./host"); const binary_1 = require("../../../../../binary"); const registry_1 = require("../../../../../registry"); function createBaseQueryParamsRequest() { return {}; } /** * QueryParamsRequest is the request type for the Query/Params RPC method. * @name QueryParamsRequest * @package ibc.applications.interchain_accounts.host.v1 * @see proto type: ibc.applications.interchain_accounts.host.v1.QueryParamsRequest */ exports.QueryParamsRequest = { typeUrl: "/ibc.applications.interchain_accounts.host.v1.QueryParamsRequest", aminoType: "cosmos-sdk/QueryParamsRequest", is(o) { return o && o.$typeUrl === exports.QueryParamsRequest.typeUrl; }, isAmino(o) { return o && o.$typeUrl === exports.QueryParamsRequest.typeUrl; }, encode(_, writer = binary_1.BinaryWriter.create()) { return writer; }, decode(input, length) { const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_) { const message = createBaseQueryParamsRequest(); return message; }, fromAmino(_) { const message = createBaseQueryParamsRequest(); return message; }, toAmino(_) { const obj = {}; return obj; }, fromAminoMsg(object) { return exports.QueryParamsRequest.fromAmino(object.value); }, toAminoMsg(message) { return { type: "cosmos-sdk/QueryParamsRequest", value: exports.QueryParamsRequest.toAmino(message) }; }, fromProtoMsg(message) { return exports.QueryParamsRequest.decode(message.value); }, toProto(message) { return exports.QueryParamsRequest.encode(message).finish(); }, toProtoMsg(message) { return { typeUrl: "/ibc.applications.interchain_accounts.host.v1.QueryParamsRequest", value: exports.QueryParamsRequest.encode(message).finish() }; }, registerTypeUrl() { } }; function createBaseQueryParamsResponse() { return { params: undefined }; } /** * QueryParamsResponse is the response type for the Query/Params RPC method. * @name QueryParamsResponse * @package ibc.applications.interchain_accounts.host.v1 * @see proto type: ibc.applications.interchain_accounts.host.v1.QueryParamsResponse */ exports.QueryParamsResponse = { typeUrl: "/ibc.applications.interchain_accounts.host.v1.QueryParamsResponse", aminoType: "cosmos-sdk/QueryParamsResponse", is(o) { return o && o.$typeUrl === exports.QueryParamsResponse.typeUrl; }, isAmino(o) { return o && o.$typeUrl === exports.QueryParamsResponse.typeUrl; }, encode(message, writer = binary_1.BinaryWriter.create()) { if (message.params !== undefined) { host_1.Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } return writer; }, decode(input, length) { const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryParamsResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.params = host_1.Params.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object) { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? host_1.Params.fromPartial(object.params) : undefined; return message; }, fromAmino(object) { const message = createBaseQueryParamsResponse(); if (object.params !== undefined && object.params !== null) { message.params = host_1.Params.fromAmino(object.params); } return message; }, toAmino(message) { const obj = {}; obj.params = message.params ? host_1.Params.toAmino(message.params) : undefined; return obj; }, fromAminoMsg(object) { return exports.QueryParamsResponse.fromAmino(object.value); }, toAminoMsg(message) { return { type: "cosmos-sdk/QueryParamsResponse", value: exports.QueryParamsResponse.toAmino(message) }; }, fromProtoMsg(message) { return exports.QueryParamsResponse.decode(message.value); }, toProto(message) { return exports.QueryParamsResponse.encode(message).finish(); }, toProtoMsg(message) { return { typeUrl: "/ibc.applications.interchain_accounts.host.v1.QueryParamsResponse", value: exports.QueryParamsResponse.encode(message).finish() }; }, registerTypeUrl() { if (!registry_1.GlobalDecoderRegistry.registerExistingTypeUrl(exports.QueryParamsResponse.typeUrl)) { return; } host_1.Params.registerTypeUrl(); } };