From 83a9d23080156882af32247723dda452db8a469e Mon Sep 17 00:00:00 2001 From: Mathieu Hofman Date: Tue, 20 Feb 2024 19:17:30 +0000 Subject: [PATCH 1/2] fix(cosmic-proto): do not git ignore all generated files --- .gitignore | 1 + packages/cosmic-proto/.gitignore | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 packages/cosmic-proto/.gitignore diff --git a/.gitignore b/.gitignore index 924317ab198..79937b351f2 100644 --- a/.gitignore +++ b/.gitignore @@ -56,6 +56,7 @@ bundles bundle-*.js compiled dist +!packages/cosmic-proto/dist api-docs # misc diff --git a/packages/cosmic-proto/.gitignore b/packages/cosmic-proto/.gitignore new file mode 100644 index 00000000000..784280d10f7 --- /dev/null +++ b/packages/cosmic-proto/.gitignore @@ -0,0 +1,2 @@ +dist/gogoproto +dist/google \ No newline at end of file From f6073b00d60af07eefab5e75960c48ed2d22a2a0 Mon Sep 17 00:00:00 2001 From: Mathieu Hofman Date: Tue, 20 Feb 2024 19:21:58 +0000 Subject: [PATCH 2/2] chore(cosmic-proto): rebuild --- .../dist/cosmos_proto/cosmos.d.ts | 99 ++++++++++ .../cosmic-proto/dist/cosmos_proto/cosmos.js | 176 ++++++++++++++++++ 2 files changed, 275 insertions(+) create mode 100644 packages/cosmic-proto/dist/cosmos_proto/cosmos.d.ts create mode 100644 packages/cosmic-proto/dist/cosmos_proto/cosmos.js diff --git a/packages/cosmic-proto/dist/cosmos_proto/cosmos.d.ts b/packages/cosmic-proto/dist/cosmos_proto/cosmos.d.ts new file mode 100644 index 00000000000..599ab7a0713 --- /dev/null +++ b/packages/cosmic-proto/dist/cosmos_proto/cosmos.d.ts @@ -0,0 +1,99 @@ +import Long from "long"; +import _m0 from "protobufjs/minimal.js"; +export declare const protobufPackage = "cosmos_proto"; +export declare enum ScalarType { + SCALAR_TYPE_UNSPECIFIED = 0, + SCALAR_TYPE_STRING = 1, + SCALAR_TYPE_BYTES = 2, + UNRECOGNIZED = -1 +} +export declare function scalarTypeFromJSON(object: any): ScalarType; +export declare function scalarTypeToJSON(object: ScalarType): string; +/** + * InterfaceDescriptor describes an interface type to be used with + * accepts_interface and implements_interface and declared by declare_interface. + */ +export interface InterfaceDescriptor { + /** + * name is the name of the interface. It should be a short-name (without + * a period) such that the fully qualified name of the interface will be + * package.name, ex. for the package a.b and interface named C, the + * fully-qualified name will be a.b.C. + */ + name: string; + /** + * description is a human-readable description of the interface and its + * purpose. + */ + description: string; +} +/** + * ScalarDescriptor describes an scalar type to be used with + * the scalar field option and declared by declare_scalar. + * Scalars extend simple protobuf built-in types with additional + * syntax and semantics, for instance to represent big integers. + * Scalars should ideally define an encoding such that there is only one + * valid syntactical representation for a given semantic meaning, + * i.e. the encoding should be deterministic. + */ +export interface ScalarDescriptor { + /** + * name is the name of the scalar. It should be a short-name (without + * a period) such that the fully qualified name of the scalar will be + * package.name, ex. for the package a.b and scalar named C, the + * fully-qualified name will be a.b.C. + */ + name: string; + /** + * description is a human-readable description of the scalar and its + * encoding format. For instance a big integer or decimal scalar should + * specify precisely the expected encoding format. + */ + description: string; + /** + * field_type is the type of field with which this scalar can be used. + * Scalars can be used with one and only one type of field so that + * encoding standards and simple and clear. Currently only string and + * bytes fields are supported for scalars. + */ + fieldType: ScalarType[]; +} +export declare const InterfaceDescriptor: { + encode(message: InterfaceDescriptor, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): InterfaceDescriptor; + fromJSON(object: any): InterfaceDescriptor; + toJSON(message: InterfaceDescriptor): unknown; + fromPartial]: never; }>(object: I): InterfaceDescriptor; +}; +export declare const ScalarDescriptor: { + encode(message: ScalarDescriptor, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ScalarDescriptor; + fromJSON(object: any): ScalarDescriptor; + toJSON(message: ScalarDescriptor): unknown; + fromPartial]: never; }) | undefined; + } & { [K_1 in Exclude]: never; }>(object: I): ScalarDescriptor; +}; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; +export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { + [K in keyof T]?: DeepPartial; +} : Partial; +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P : P & { + [K in keyof P]: Exact; +} & { + [K in Exclude>]: never; +}; +export {}; diff --git a/packages/cosmic-proto/dist/cosmos_proto/cosmos.js b/packages/cosmic-proto/dist/cosmos_proto/cosmos.js new file mode 100644 index 00000000000..9d1a08f3f20 --- /dev/null +++ b/packages/cosmic-proto/dist/cosmos_proto/cosmos.js @@ -0,0 +1,176 @@ +/* eslint-disable */ +import Long from "long"; +import _m0 from "protobufjs/minimal.js"; +export const protobufPackage = "cosmos_proto"; +export var ScalarType; +(function (ScalarType) { + ScalarType[ScalarType["SCALAR_TYPE_UNSPECIFIED"] = 0] = "SCALAR_TYPE_UNSPECIFIED"; + ScalarType[ScalarType["SCALAR_TYPE_STRING"] = 1] = "SCALAR_TYPE_STRING"; + ScalarType[ScalarType["SCALAR_TYPE_BYTES"] = 2] = "SCALAR_TYPE_BYTES"; + ScalarType[ScalarType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; +})(ScalarType || (ScalarType = {})); +export function scalarTypeFromJSON(object) { + switch (object) { + case 0: + case "SCALAR_TYPE_UNSPECIFIED": + return ScalarType.SCALAR_TYPE_UNSPECIFIED; + case 1: + case "SCALAR_TYPE_STRING": + return ScalarType.SCALAR_TYPE_STRING; + case 2: + case "SCALAR_TYPE_BYTES": + return ScalarType.SCALAR_TYPE_BYTES; + case -1: + case "UNRECOGNIZED": + default: + return ScalarType.UNRECOGNIZED; + } +} +export function scalarTypeToJSON(object) { + switch (object) { + case ScalarType.SCALAR_TYPE_UNSPECIFIED: + return "SCALAR_TYPE_UNSPECIFIED"; + case ScalarType.SCALAR_TYPE_STRING: + return "SCALAR_TYPE_STRING"; + case ScalarType.SCALAR_TYPE_BYTES: + return "SCALAR_TYPE_BYTES"; + case ScalarType.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} +function createBaseInterfaceDescriptor() { + return { name: "", description: "" }; +} +export const InterfaceDescriptor = { + encode(message, writer = _m0.Writer.create()) { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.description !== "") { + writer.uint32(18).string(message.description); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseInterfaceDescriptor(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object) { + return { + name: isSet(object.name) ? String(object.name) : "", + description: isSet(object.description) ? String(object.description) : "", + }; + }, + toJSON(message) { + const obj = {}; + message.name !== undefined && (obj.name = message.name); + message.description !== undefined && (obj.description = message.description); + return obj; + }, + fromPartial(object) { + const message = createBaseInterfaceDescriptor(); + message.name = object.name ?? ""; + message.description = object.description ?? ""; + return message; + }, +}; +function createBaseScalarDescriptor() { + return { name: "", description: "", fieldType: [] }; +} +export const ScalarDescriptor = { + encode(message, writer = _m0.Writer.create()) { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.description !== "") { + writer.uint32(18).string(message.description); + } + writer.uint32(26).fork(); + for (const v of message.fieldType) { + writer.int32(v); + } + writer.ldelim(); + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseScalarDescriptor(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.fieldType.push(reader.int32()); + } + } + else { + message.fieldType.push(reader.int32()); + } + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object) { + return { + name: isSet(object.name) ? String(object.name) : "", + description: isSet(object.description) ? String(object.description) : "", + fieldType: Array.isArray(object?.fieldType) ? object.fieldType.map((e) => scalarTypeFromJSON(e)) : [], + }; + }, + toJSON(message) { + const obj = {}; + message.name !== undefined && (obj.name = message.name); + message.description !== undefined && (obj.description = message.description); + if (message.fieldType) { + obj.fieldType = message.fieldType.map((e) => scalarTypeToJSON(e)); + } + else { + obj.fieldType = []; + } + return obj; + }, + fromPartial(object) { + const message = createBaseScalarDescriptor(); + message.name = object.name ?? ""; + message.description = object.description ?? ""; + message.fieldType = object.fieldType?.map((e) => e) || []; + return message; + }, +}; +if (_m0.util.Long !== Long) { + _m0.util.Long = Long; + _m0.configure(); +} +function isSet(value) { + return value !== null && value !== undefined; +}