import * as _m0 from "protobufjs/minimal"; import { isSet } from "../../../../helpers"; /** ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. */ export interface ListAllInterfacesRequest {} export interface ListAllInterfacesRequestProtoMsg { typeUrl: "/cosmos.base.reflection.v1beta1.ListAllInterfacesRequest"; value: Uint8Array; } /** ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. */ export interface ListAllInterfacesRequestAmino {} export interface ListAllInterfacesRequestAminoMsg { type: "cosmos-sdk/ListAllInterfacesRequest"; value: ListAllInterfacesRequestAmino; } /** ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. */ export interface ListAllInterfacesRequestSDKType {} /** ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC. */ export interface ListAllInterfacesResponse { /** interface_names is an array of all the registered interfaces. */ interfaceNames: string[]; } export interface ListAllInterfacesResponseProtoMsg { typeUrl: "/cosmos.base.reflection.v1beta1.ListAllInterfacesResponse"; value: Uint8Array; } /** ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC. */ export interface ListAllInterfacesResponseAmino { /** interface_names is an array of all the registered interfaces. */ interface_names: string[]; } export interface ListAllInterfacesResponseAminoMsg { type: "cosmos-sdk/ListAllInterfacesResponse"; value: ListAllInterfacesResponseAmino; } /** ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC. */ export interface ListAllInterfacesResponseSDKType { interface_names: string[]; } /** * ListImplementationsRequest is the request type of the ListImplementations * RPC. */ export interface ListImplementationsRequest { /** interface_name defines the interface to query the implementations for. */ interfaceName: string; } export interface ListImplementationsRequestProtoMsg { typeUrl: "/cosmos.base.reflection.v1beta1.ListImplementationsRequest"; value: Uint8Array; } /** * ListImplementationsRequest is the request type of the ListImplementations * RPC. */ export interface ListImplementationsRequestAmino { /** interface_name defines the interface to query the implementations for. */ interface_name: string; } export interface ListImplementationsRequestAminoMsg { type: "cosmos-sdk/ListImplementationsRequest"; value: ListImplementationsRequestAmino; } /** * ListImplementationsRequest is the request type of the ListImplementations * RPC. */ export interface ListImplementationsRequestSDKType { interface_name: string; } /** * ListImplementationsResponse is the response type of the ListImplementations * RPC. */ export interface ListImplementationsResponse { implementationMessageNames: string[]; } export interface ListImplementationsResponseProtoMsg { typeUrl: "/cosmos.base.reflection.v1beta1.ListImplementationsResponse"; value: Uint8Array; } /** * ListImplementationsResponse is the response type of the ListImplementations * RPC. */ export interface ListImplementationsResponseAmino { implementation_message_names: string[]; } export interface ListImplementationsResponseAminoMsg { type: "cosmos-sdk/ListImplementationsResponse"; value: ListImplementationsResponseAmino; } /** * ListImplementationsResponse is the response type of the ListImplementations * RPC. */ export interface ListImplementationsResponseSDKType { implementation_message_names: string[]; } function createBaseListAllInterfacesRequest(): ListAllInterfacesRequest { return {}; } export const ListAllInterfacesRequest = { encode(_: ListAllInterfacesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): ListAllInterfacesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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; }, fromJSON(_: any): ListAllInterfacesRequest { return {}; }, toJSON(_: ListAllInterfacesRequest): unknown { const obj: any = {}; return obj; }, fromPartial(_: Partial): ListAllInterfacesRequest { const message = createBaseListAllInterfacesRequest(); return message; }, fromAmino(_: ListAllInterfacesRequestAmino): ListAllInterfacesRequest { return {}; }, toAmino(_: ListAllInterfacesRequest): ListAllInterfacesRequestAmino { const obj: any = {}; return obj; }, fromAminoMsg(object: ListAllInterfacesRequestAminoMsg): ListAllInterfacesRequest { return ListAllInterfacesRequest.fromAmino(object.value); }, toAminoMsg(message: ListAllInterfacesRequest): ListAllInterfacesRequestAminoMsg { return { type: "cosmos-sdk/ListAllInterfacesRequest", value: ListAllInterfacesRequest.toAmino(message) }; }, fromProtoMsg(message: ListAllInterfacesRequestProtoMsg): ListAllInterfacesRequest { return ListAllInterfacesRequest.decode(message.value); }, toProto(message: ListAllInterfacesRequest): Uint8Array { return ListAllInterfacesRequest.encode(message).finish(); }, toProtoMsg(message: ListAllInterfacesRequest): ListAllInterfacesRequestProtoMsg { return { typeUrl: "/cosmos.base.reflection.v1beta1.ListAllInterfacesRequest", value: ListAllInterfacesRequest.encode(message).finish() }; } }; function createBaseListAllInterfacesResponse(): ListAllInterfacesResponse { return { interfaceNames: [] }; } export const ListAllInterfacesResponse = { encode(message: ListAllInterfacesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.interfaceNames) { writer.uint32(10).string(v!); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): ListAllInterfacesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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; }, fromJSON(object: any): ListAllInterfacesResponse { return { interfaceNames: Array.isArray(object?.interfaceNames) ? object.interfaceNames.map((e: any) => String(e)) : [] }; }, toJSON(message: ListAllInterfacesResponse): unknown { const obj: any = {}; if (message.interfaceNames) { obj.interfaceNames = message.interfaceNames.map(e => e); } else { obj.interfaceNames = []; } return obj; }, fromPartial(object: Partial): ListAllInterfacesResponse { const message = createBaseListAllInterfacesResponse(); message.interfaceNames = object.interfaceNames?.map(e => e) || []; return message; }, fromAmino(object: ListAllInterfacesResponseAmino): ListAllInterfacesResponse { return { interfaceNames: Array.isArray(object?.interface_names) ? object.interface_names.map((e: any) => e) : [] }; }, toAmino(message: ListAllInterfacesResponse): ListAllInterfacesResponseAmino { const obj: any = {}; if (message.interfaceNames) { obj.interface_names = message.interfaceNames.map(e => e); } else { obj.interface_names = []; } return obj; }, fromAminoMsg(object: ListAllInterfacesResponseAminoMsg): ListAllInterfacesResponse { return ListAllInterfacesResponse.fromAmino(object.value); }, toAminoMsg(message: ListAllInterfacesResponse): ListAllInterfacesResponseAminoMsg { return { type: "cosmos-sdk/ListAllInterfacesResponse", value: ListAllInterfacesResponse.toAmino(message) }; }, fromProtoMsg(message: ListAllInterfacesResponseProtoMsg): ListAllInterfacesResponse { return ListAllInterfacesResponse.decode(message.value); }, toProto(message: ListAllInterfacesResponse): Uint8Array { return ListAllInterfacesResponse.encode(message).finish(); }, toProtoMsg(message: ListAllInterfacesResponse): ListAllInterfacesResponseProtoMsg { return { typeUrl: "/cosmos.base.reflection.v1beta1.ListAllInterfacesResponse", value: ListAllInterfacesResponse.encode(message).finish() }; } }; function createBaseListImplementationsRequest(): ListImplementationsRequest { return { interfaceName: "" }; } export const ListImplementationsRequest = { encode(message: ListImplementationsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.interfaceName !== "") { writer.uint32(10).string(message.interfaceName); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): ListImplementationsRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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; }, fromJSON(object: any): ListImplementationsRequest { return { interfaceName: isSet(object.interfaceName) ? String(object.interfaceName) : "" }; }, toJSON(message: ListImplementationsRequest): unknown { const obj: any = {}; message.interfaceName !== undefined && (obj.interfaceName = message.interfaceName); return obj; }, fromPartial(object: Partial): ListImplementationsRequest { const message = createBaseListImplementationsRequest(); message.interfaceName = object.interfaceName ?? ""; return message; }, fromAmino(object: ListImplementationsRequestAmino): ListImplementationsRequest { return { interfaceName: object.interface_name }; }, toAmino(message: ListImplementationsRequest): ListImplementationsRequestAmino { const obj: any = {}; obj.interface_name = message.interfaceName; return obj; }, fromAminoMsg(object: ListImplementationsRequestAminoMsg): ListImplementationsRequest { return ListImplementationsRequest.fromAmino(object.value); }, toAminoMsg(message: ListImplementationsRequest): ListImplementationsRequestAminoMsg { return { type: "cosmos-sdk/ListImplementationsRequest", value: ListImplementationsRequest.toAmino(message) }; }, fromProtoMsg(message: ListImplementationsRequestProtoMsg): ListImplementationsRequest { return ListImplementationsRequest.decode(message.value); }, toProto(message: ListImplementationsRequest): Uint8Array { return ListImplementationsRequest.encode(message).finish(); }, toProtoMsg(message: ListImplementationsRequest): ListImplementationsRequestProtoMsg { return { typeUrl: "/cosmos.base.reflection.v1beta1.ListImplementationsRequest", value: ListImplementationsRequest.encode(message).finish() }; } }; function createBaseListImplementationsResponse(): ListImplementationsResponse { return { implementationMessageNames: [] }; } export const ListImplementationsResponse = { encode(message: ListImplementationsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.implementationMessageNames) { writer.uint32(10).string(v!); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): ListImplementationsResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(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; }, fromJSON(object: any): ListImplementationsResponse { return { implementationMessageNames: Array.isArray(object?.implementationMessageNames) ? object.implementationMessageNames.map((e: any) => String(e)) : [] }; }, toJSON(message: ListImplementationsResponse): unknown { const obj: any = {}; if (message.implementationMessageNames) { obj.implementationMessageNames = message.implementationMessageNames.map(e => e); } else { obj.implementationMessageNames = []; } return obj; }, fromPartial(object: Partial): ListImplementationsResponse { const message = createBaseListImplementationsResponse(); message.implementationMessageNames = object.implementationMessageNames?.map(e => e) || []; return message; }, fromAmino(object: ListImplementationsResponseAmino): ListImplementationsResponse { return { implementationMessageNames: Array.isArray(object?.implementation_message_names) ? object.implementation_message_names.map((e: any) => e) : [] }; }, toAmino(message: ListImplementationsResponse): ListImplementationsResponseAmino { const obj: any = {}; if (message.implementationMessageNames) { obj.implementation_message_names = message.implementationMessageNames.map(e => e); } else { obj.implementation_message_names = []; } return obj; }, fromAminoMsg(object: ListImplementationsResponseAminoMsg): ListImplementationsResponse { return ListImplementationsResponse.fromAmino(object.value); }, toAminoMsg(message: ListImplementationsResponse): ListImplementationsResponseAminoMsg { return { type: "cosmos-sdk/ListImplementationsResponse", value: ListImplementationsResponse.toAmino(message) }; }, fromProtoMsg(message: ListImplementationsResponseProtoMsg): ListImplementationsResponse { return ListImplementationsResponse.decode(message.value); }, toProto(message: ListImplementationsResponse): Uint8Array { return ListImplementationsResponse.encode(message).finish(); }, toProtoMsg(message: ListImplementationsResponse): ListImplementationsResponseProtoMsg { return { typeUrl: "/cosmos.base.reflection.v1beta1.ListImplementationsResponse", value: ListImplementationsResponse.encode(message).finish() }; } };