Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include more generated cosmic-proto files #8952

Merged
merged 2 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ bundles
bundle-*.js
compiled
dist
!packages/cosmic-proto/dist
api-docs

# misc
Expand Down
2 changes: 2 additions & 0 deletions packages/cosmic-proto/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/gogoproto
dist/google
99 changes: 99 additions & 0 deletions packages/cosmic-proto/dist/cosmos_proto/cosmos.d.ts
Original file line number Diff line number Diff line change
@@ -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<I extends {
name?: string | undefined;
description?: string | undefined;
} & {
name?: string | undefined;
description?: string | undefined;
} & { [K in Exclude<keyof I, keyof InterfaceDescriptor>]: 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<I extends {
name?: string | undefined;
description?: string | undefined;
fieldType?: ScalarType[] | undefined;
} & {
name?: string | undefined;
description?: string | undefined;
fieldType?: (ScalarType[] & ScalarType[] & { [K in Exclude<keyof I["fieldType"], keyof ScalarType[]>]: never; }) | undefined;
} & { [K_1 in Exclude<keyof I, keyof ScalarDescriptor>]: never; }>(object: I): ScalarDescriptor;
};
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
[K in keyof T]?: DeepPartial<T[K]>;
} : Partial<T>;
type KeysOfUnion<T> = T extends T ? keyof T : never;
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
[K in keyof P]: Exact<P[K], I[K]>;
} & {
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
};
export {};
176 changes: 176 additions & 0 deletions packages/cosmic-proto/dist/cosmos_proto/cosmos.js
Original file line number Diff line number Diff line change
@@ -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;
}
Loading