UNPKG

interchainjs

Version:

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

332 lines (331 loc) 12.3 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ListImplementationsResponse = exports.ListImplementationsRequest = exports.ListAllInterfacesResponse = exports.ListAllInterfacesRequest = void 0; const binary_1 = require("../../../../binary"); function createBaseListAllInterfacesRequest() { return {}; } /** * ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. * @name ListAllInterfacesRequest * @package cosmos.base.reflection.v1beta1 * @see proto type: cosmos.base.reflection.v1beta1.ListAllInterfacesRequest */ exports.ListAllInterfacesRequest = { typeUrl: "/cosmos.base.reflection.v1beta1.ListAllInterfacesRequest", aminoType: "cosmos-sdk/ListAllInterfacesRequest", is(o) { return o && o.$typeUrl === exports.ListAllInterfacesRequest.typeUrl; }, isAmino(o) { return o && o.$typeUrl === exports.ListAllInterfacesRequest.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 = createBaseListAllInterfacesRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_) { const message = createBaseListAllInterfacesRequest(); return message; }, fromAmino(_) { const message = createBaseListAllInterfacesRequest(); return message; }, toAmino(_) { const obj = {}; return obj; }, fromAminoMsg(object) { return exports.ListAllInterfacesRequest.fromAmino(object.value); }, toAminoMsg(message) { return { type: "cosmos-sdk/ListAllInterfacesRequest", value: exports.ListAllInterfacesRequest.toAmino(message) }; }, fromProtoMsg(message) { return exports.ListAllInterfacesRequest.decode(message.value); }, toProto(message) { return exports.ListAllInterfacesRequest.encode(message).finish(); }, toProtoMsg(message) { return { typeUrl: "/cosmos.base.reflection.v1beta1.ListAllInterfacesRequest", value: exports.ListAllInterfacesRequest.encode(message).finish() }; }, registerTypeUrl() { } }; function createBaseListAllInterfacesResponse() { return { interfaceNames: [] }; } /** * ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC. * @name ListAllInterfacesResponse * @package cosmos.base.reflection.v1beta1 * @see proto type: cosmos.base.reflection.v1beta1.ListAllInterfacesResponse */ exports.ListAllInterfacesResponse = { typeUrl: "/cosmos.base.reflection.v1beta1.ListAllInterfacesResponse", aminoType: "cosmos-sdk/ListAllInterfacesResponse", is(o) { return o && (o.$typeUrl === exports.ListAllInterfacesResponse.typeUrl || Array.isArray(o.interfaceNames) && (!o.interfaceNames.length || typeof o.interfaceNames[0] === "string")); }, isAmino(o) { return o && (o.$typeUrl === exports.ListAllInterfacesResponse.typeUrl || Array.isArray(o.interface_names) && (!o.interface_names.length || typeof o.interface_names[0] === "string")); }, encode(message, writer = binary_1.BinaryWriter.create()) { for (const v of message.interfaceNames) { writer.uint32(10).string(v); } 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 = createBaseListAllInterfacesResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.interfaceNames.push(reader.string()); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object) { const message = createBaseListAllInterfacesResponse(); message.interfaceNames = object.interfaceNames?.map(e => e) || []; return message; }, fromAmino(object) { const message = createBaseListAllInterfacesResponse(); message.interfaceNames = object.interface_names?.map(e => e) || []; return message; }, toAmino(message) { const obj = {}; if (message.interfaceNames) { obj.interface_names = message.interfaceNames.map(e => e); } else { obj.interface_names = message.interfaceNames; } return obj; }, fromAminoMsg(object) { return exports.ListAllInterfacesResponse.fromAmino(object.value); }, toAminoMsg(message) { return { type: "cosmos-sdk/ListAllInterfacesResponse", value: exports.ListAllInterfacesResponse.toAmino(message) }; }, fromProtoMsg(message) { return exports.ListAllInterfacesResponse.decode(message.value); }, toProto(message) { return exports.ListAllInterfacesResponse.encode(message).finish(); }, toProtoMsg(message) { return { typeUrl: "/cosmos.base.reflection.v1beta1.ListAllInterfacesResponse", value: exports.ListAllInterfacesResponse.encode(message).finish() }; }, registerTypeUrl() { } }; function createBaseListImplementationsRequest() { return { interfaceName: "" }; } /** * ListImplementationsRequest is the request type of the ListImplementations * RPC. * @name ListImplementationsRequest * @package cosmos.base.reflection.v1beta1 * @see proto type: cosmos.base.reflection.v1beta1.ListImplementationsRequest */ exports.ListImplementationsRequest = { typeUrl: "/cosmos.base.reflection.v1beta1.ListImplementationsRequest", aminoType: "cosmos-sdk/ListImplementationsRequest", is(o) { return o && (o.$typeUrl === exports.ListImplementationsRequest.typeUrl || typeof o.interfaceName === "string"); }, isAmino(o) { return o && (o.$typeUrl === exports.ListImplementationsRequest.typeUrl || typeof o.interface_name === "string"); }, encode(message, writer = binary_1.BinaryWriter.create()) { if (message.interfaceName !== "") { writer.uint32(10).string(message.interfaceName); } 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 = createBaseListImplementationsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.interfaceName = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object) { const message = createBaseListImplementationsRequest(); message.interfaceName = object.interfaceName ?? ""; return message; }, fromAmino(object) { const message = createBaseListImplementationsRequest(); if (object.interface_name !== undefined && object.interface_name !== null) { message.interfaceName = object.interface_name; } return message; }, toAmino(message) { const obj = {}; obj.interface_name = message.interfaceName === "" ? undefined : message.interfaceName; return obj; }, fromAminoMsg(object) { return exports.ListImplementationsRequest.fromAmino(object.value); }, toAminoMsg(message) { return { type: "cosmos-sdk/ListImplementationsRequest", value: exports.ListImplementationsRequest.toAmino(message) }; }, fromProtoMsg(message) { return exports.ListImplementationsRequest.decode(message.value); }, toProto(message) { return exports.ListImplementationsRequest.encode(message).finish(); }, toProtoMsg(message) { return { typeUrl: "/cosmos.base.reflection.v1beta1.ListImplementationsRequest", value: exports.ListImplementationsRequest.encode(message).finish() }; }, registerTypeUrl() { } }; function createBaseListImplementationsResponse() { return { implementationMessageNames: [] }; } /** * ListImplementationsResponse is the response type of the ListImplementations * RPC. * @name ListImplementationsResponse * @package cosmos.base.reflection.v1beta1 * @see proto type: cosmos.base.reflection.v1beta1.ListImplementationsResponse */ exports.ListImplementationsResponse = { typeUrl: "/cosmos.base.reflection.v1beta1.ListImplementationsResponse", aminoType: "cosmos-sdk/ListImplementationsResponse", is(o) { return o && (o.$typeUrl === exports.ListImplementationsResponse.typeUrl || Array.isArray(o.implementationMessageNames) && (!o.implementationMessageNames.length || typeof o.implementationMessageNames[0] === "string")); }, isAmino(o) { return o && (o.$typeUrl === exports.ListImplementationsResponse.typeUrl || Array.isArray(o.implementation_message_names) && (!o.implementation_message_names.length || typeof o.implementation_message_names[0] === "string")); }, encode(message, writer = binary_1.BinaryWriter.create()) { for (const v of message.implementationMessageNames) { writer.uint32(10).string(v); } 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 = createBaseListImplementationsResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.implementationMessageNames.push(reader.string()); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object) { const message = createBaseListImplementationsResponse(); message.implementationMessageNames = object.implementationMessageNames?.map(e => e) || []; return message; }, fromAmino(object) { const message = createBaseListImplementationsResponse(); message.implementationMessageNames = object.implementation_message_names?.map(e => e) || []; return message; }, toAmino(message) { const obj = {}; if (message.implementationMessageNames) { obj.implementation_message_names = message.implementationMessageNames.map(e => e); } else { obj.implementation_message_names = message.implementationMessageNames; } return obj; }, fromAminoMsg(object) { return exports.ListImplementationsResponse.fromAmino(object.value); }, toAminoMsg(message) { return { type: "cosmos-sdk/ListImplementationsResponse", value: exports.ListImplementationsResponse.toAmino(message) }; }, fromProtoMsg(message) { return exports.ListImplementationsResponse.decode(message.value); }, toProto(message) { return exports.ListImplementationsResponse.encode(message).finish(); }, toProtoMsg(message) { return { typeUrl: "/cosmos.base.reflection.v1beta1.ListImplementationsResponse", value: exports.ListImplementationsResponse.encode(message).finish() }; }, registerTypeUrl() { } };