UNPKG

interchainjs

Version:

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

165 lines (164 loc) 5.5 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.QueryConfigResponse = exports.QueryConfigRequest = void 0; const config_1 = require("./config"); const binary_1 = require("../../../binary"); const registry_1 = require("../../../registry"); function createBaseQueryConfigRequest() { return {}; } /** * QueryConfigRequest is the Query/Config request type. * @name QueryConfigRequest * @package cosmos.app.v1alpha1 * @see proto type: cosmos.app.v1alpha1.QueryConfigRequest */ exports.QueryConfigRequest = { typeUrl: "/cosmos.app.v1alpha1.QueryConfigRequest", aminoType: "cosmos-sdk/QueryConfigRequest", is(o) { return o && o.$typeUrl === exports.QueryConfigRequest.typeUrl; }, isAmino(o) { return o && o.$typeUrl === exports.QueryConfigRequest.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 = createBaseQueryConfigRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_) { const message = createBaseQueryConfigRequest(); return message; }, fromAmino(_) { const message = createBaseQueryConfigRequest(); return message; }, toAmino(_) { const obj = {}; return obj; }, fromAminoMsg(object) { return exports.QueryConfigRequest.fromAmino(object.value); }, toAminoMsg(message) { return { type: "cosmos-sdk/QueryConfigRequest", value: exports.QueryConfigRequest.toAmino(message) }; }, fromProtoMsg(message) { return exports.QueryConfigRequest.decode(message.value); }, toProto(message) { return exports.QueryConfigRequest.encode(message).finish(); }, toProtoMsg(message) { return { typeUrl: "/cosmos.app.v1alpha1.QueryConfigRequest", value: exports.QueryConfigRequest.encode(message).finish() }; }, registerTypeUrl() { } }; function createBaseQueryConfigResponse() { return { config: undefined }; } /** * QueryConfigRequest is the Query/Config response type. * @name QueryConfigResponse * @package cosmos.app.v1alpha1 * @see proto type: cosmos.app.v1alpha1.QueryConfigResponse */ exports.QueryConfigResponse = { typeUrl: "/cosmos.app.v1alpha1.QueryConfigResponse", aminoType: "cosmos-sdk/QueryConfigResponse", is(o) { return o && o.$typeUrl === exports.QueryConfigResponse.typeUrl; }, isAmino(o) { return o && o.$typeUrl === exports.QueryConfigResponse.typeUrl; }, encode(message, writer = binary_1.BinaryWriter.create()) { if (message.config !== undefined) { config_1.Config.encode(message.config, 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 = createBaseQueryConfigResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.config = config_1.Config.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object) { const message = createBaseQueryConfigResponse(); message.config = object.config !== undefined && object.config !== null ? config_1.Config.fromPartial(object.config) : undefined; return message; }, fromAmino(object) { const message = createBaseQueryConfigResponse(); if (object.config !== undefined && object.config !== null) { message.config = config_1.Config.fromAmino(object.config); } return message; }, toAmino(message) { const obj = {}; obj.config = message.config ? config_1.Config.toAmino(message.config) : undefined; return obj; }, fromAminoMsg(object) { return exports.QueryConfigResponse.fromAmino(object.value); }, toAminoMsg(message) { return { type: "cosmos-sdk/QueryConfigResponse", value: exports.QueryConfigResponse.toAmino(message) }; }, fromProtoMsg(message) { return exports.QueryConfigResponse.decode(message.value); }, toProto(message) { return exports.QueryConfigResponse.encode(message).finish(); }, toProtoMsg(message) { return { typeUrl: "/cosmos.app.v1alpha1.QueryConfigResponse", value: exports.QueryConfigResponse.encode(message).finish() }; }, registerTypeUrl() { if (!registry_1.GlobalDecoderRegistry.registerExistingTypeUrl(exports.QueryConfigResponse.typeUrl)) { return; } config_1.Config.registerTypeUrl(); } };