coreum-js 2.18.5 → 2.18.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main/coreum/amino/types.js +22 -4
- package/dist/main/coreum/dex/v1/cosmos/cosmos-proto/proto/cosmos_proto/cosmos.d.ts +80 -0
- package/dist/main/coreum/dex/v1/cosmos/cosmos-proto/proto/cosmos_proto/cosmos.js +215 -0
- package/dist/main/coreum/dex/v1/cosmos/cosmos-sdk/proto/amino/amino.d.ts +1 -0
- package/dist/main/coreum/dex/v1/cosmos/cosmos-sdk/proto/amino/amino.js +10 -0
- package/dist/main/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/base/query/v1beta1/pagination.d.ts +86 -0
- package/dist/main/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/base/query/v1beta1/pagination.js +230 -0
- package/dist/main/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/base/v1beta1/coin.d.ts +53 -0
- package/dist/main/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/base/v1beta1/coin.js +252 -0
- package/dist/main/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/query/v1/query.d.ts +1 -0
- package/dist/main/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/query/v1/query.js +10 -0
- package/dist/main/coreum/dex/v1/cosmos/gogoproto/gogoproto/gogo.d.ts +1 -0
- package/dist/main/coreum/dex/v1/cosmos/gogoproto/gogoproto/gogo.js +10 -0
- package/dist/main/coreum/dex/v1/google/googleapis/google/api/annotations.d.ts +1 -0
- package/dist/main/coreum/dex/v1/google/googleapis/google/api/annotations.js +10 -0
- package/dist/main/coreum/dex/v1/google/googleapis/google/api/http.d.ts +379 -0
- package/dist/main/coreum/dex/v1/google/googleapis/google/api/http.js +355 -0
- package/dist/main/coreum/dex/v1/google/protobuf/descriptor.d.ts +1336 -0
- package/dist/main/coreum/dex/v1/google/protobuf/descriptor.js +5373 -0
- package/dist/main/coreum/dex/v1/google/protobuf/timestamp.d.ts +128 -0
- package/dist/main/coreum/dex/v1/google/protobuf/timestamp.js +92 -0
- package/dist/main/coreum/dex/v1/query.d.ts +23 -0
- package/dist/main/coreum/dex/v1/query.js +194 -3
- package/dist/module/coreum/amino/types.js +22 -4
- package/dist/module/coreum/dex/v1/cosmos/cosmos-proto/proto/cosmos_proto/cosmos.d.ts +80 -0
- package/dist/module/coreum/dex/v1/cosmos/cosmos-proto/proto/cosmos_proto/cosmos.js +210 -0
- package/dist/module/coreum/dex/v1/cosmos/cosmos-sdk/proto/amino/amino.d.ts +1 -0
- package/dist/module/coreum/dex/v1/cosmos/cosmos-sdk/proto/amino/amino.js +7 -0
- package/dist/module/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/base/query/v1beta1/pagination.d.ts +86 -0
- package/dist/module/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/base/query/v1beta1/pagination.js +227 -0
- package/dist/module/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/base/v1beta1/coin.d.ts +53 -0
- package/dist/module/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/base/v1beta1/coin.js +249 -0
- package/dist/module/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/query/v1/query.d.ts +1 -0
- package/dist/module/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/query/v1/query.js +7 -0
- package/dist/module/coreum/dex/v1/cosmos/gogoproto/gogoproto/gogo.d.ts +1 -0
- package/dist/module/coreum/dex/v1/cosmos/gogoproto/gogoproto/gogo.js +7 -0
- package/dist/module/coreum/dex/v1/google/googleapis/google/api/annotations.d.ts +1 -0
- package/dist/module/coreum/dex/v1/google/googleapis/google/api/annotations.js +7 -0
- package/dist/module/coreum/dex/v1/google/googleapis/google/api/http.d.ts +379 -0
- package/dist/module/coreum/dex/v1/google/googleapis/google/api/http.js +352 -0
- package/dist/module/coreum/dex/v1/google/protobuf/descriptor.d.ts +1336 -0
- package/dist/module/coreum/dex/v1/google/protobuf/descriptor.js +5329 -0
- package/dist/module/coreum/dex/v1/google/protobuf/timestamp.d.ts +128 -0
- package/dist/module/coreum/dex/v1/google/protobuf/timestamp.js +89 -0
- package/dist/module/coreum/dex/v1/query.d.ts +23 -0
- package/dist/module/coreum/dex/v1/query.js +193 -2
- package/package.json +1 -1
|
@@ -265,8 +265,14 @@ exports.dexAminoConverters = {
|
|
|
265
265
|
price,
|
|
266
266
|
quantity,
|
|
267
267
|
side,
|
|
268
|
-
good_til: goodTil
|
|
269
|
-
|
|
268
|
+
good_til: goodTil
|
|
269
|
+
? goodTil.goodTilBlockHeight != null
|
|
270
|
+
? { blocks: String(goodTil.goodTilBlockHeight) }
|
|
271
|
+
: goodTil.goodTilBlockTime
|
|
272
|
+
? { time: goodTil.goodTilBlockTime.toISOString() }
|
|
273
|
+
: undefined
|
|
274
|
+
: undefined,
|
|
275
|
+
time_in_force: timeInForce, // number
|
|
270
276
|
}),
|
|
271
277
|
fromAmino: ({ sender, type, id, base_denom, quote_denom, price, quantity, side, good_til, time_in_force, }) => ({
|
|
272
278
|
sender,
|
|
@@ -277,8 +283,20 @@ exports.dexAminoConverters = {
|
|
|
277
283
|
price,
|
|
278
284
|
quantity,
|
|
279
285
|
side,
|
|
280
|
-
goodTil: good_til
|
|
281
|
-
|
|
286
|
+
goodTil: good_til
|
|
287
|
+
? good_til.blocks != null
|
|
288
|
+
? {
|
|
289
|
+
goodTilBlockHeight: Number(good_til.blocks),
|
|
290
|
+
goodTilBlockTime: undefined,
|
|
291
|
+
}
|
|
292
|
+
: good_til.time != null
|
|
293
|
+
? {
|
|
294
|
+
goodTilBlockHeight: undefined,
|
|
295
|
+
goodTilBlockTime: new Date(good_til.time),
|
|
296
|
+
}
|
|
297
|
+
: undefined
|
|
298
|
+
: undefined,
|
|
299
|
+
timeInForce: time_in_force, // number -> enum
|
|
282
300
|
}),
|
|
283
301
|
},
|
|
284
302
|
// MsgCancelOrder - Cancel order
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
export declare const protobufPackage = "cosmos_proto";
|
|
3
|
+
export declare enum ScalarType {
|
|
4
|
+
SCALAR_TYPE_UNSPECIFIED = 0,
|
|
5
|
+
SCALAR_TYPE_STRING = 1,
|
|
6
|
+
SCALAR_TYPE_BYTES = 2,
|
|
7
|
+
UNRECOGNIZED = -1
|
|
8
|
+
}
|
|
9
|
+
export declare function scalarTypeFromJSON(object: any): ScalarType;
|
|
10
|
+
export declare function scalarTypeToJSON(object: ScalarType): string;
|
|
11
|
+
/**
|
|
12
|
+
* InterfaceDescriptor describes an interface type to be used with
|
|
13
|
+
* accepts_interface and implements_interface and declared by declare_interface.
|
|
14
|
+
*/
|
|
15
|
+
export interface InterfaceDescriptor {
|
|
16
|
+
/**
|
|
17
|
+
* name is the name of the interface. It should be a short-name (without
|
|
18
|
+
* a period) such that the fully qualified name of the interface will be
|
|
19
|
+
* package.name, ex. for the package a.b and interface named C, the
|
|
20
|
+
* fully-qualified name will be a.b.C.
|
|
21
|
+
*/
|
|
22
|
+
name: string;
|
|
23
|
+
/**
|
|
24
|
+
* description is a human-readable description of the interface and its
|
|
25
|
+
* purpose.
|
|
26
|
+
*/
|
|
27
|
+
description: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* ScalarDescriptor describes an scalar type to be used with
|
|
31
|
+
* the scalar field option and declared by declare_scalar.
|
|
32
|
+
* Scalars extend simple protobuf built-in types with additional
|
|
33
|
+
* syntax and semantics, for instance to represent big integers.
|
|
34
|
+
* Scalars should ideally define an encoding such that there is only one
|
|
35
|
+
* valid syntactical representation for a given semantic meaning,
|
|
36
|
+
* i.e. the encoding should be deterministic.
|
|
37
|
+
*/
|
|
38
|
+
export interface ScalarDescriptor {
|
|
39
|
+
/**
|
|
40
|
+
* name is the name of the scalar. It should be a short-name (without
|
|
41
|
+
* a period) such that the fully qualified name of the scalar will be
|
|
42
|
+
* package.name, ex. for the package a.b and scalar named C, the
|
|
43
|
+
* fully-qualified name will be a.b.C.
|
|
44
|
+
*/
|
|
45
|
+
name: string;
|
|
46
|
+
/**
|
|
47
|
+
* description is a human-readable description of the scalar and its
|
|
48
|
+
* encoding format. For instance a big integer or decimal scalar should
|
|
49
|
+
* specify precisely the expected encoding format.
|
|
50
|
+
*/
|
|
51
|
+
description: string;
|
|
52
|
+
/**
|
|
53
|
+
* field_type is the type of field with which this scalar can be used.
|
|
54
|
+
* Scalars can be used with one and only one type of field so that
|
|
55
|
+
* encoding standards and simple and clear. Currently only string and
|
|
56
|
+
* bytes fields are supported for scalars.
|
|
57
|
+
*/
|
|
58
|
+
fieldType: ScalarType[];
|
|
59
|
+
}
|
|
60
|
+
export declare const InterfaceDescriptor: MessageFns<InterfaceDescriptor>;
|
|
61
|
+
export declare const ScalarDescriptor: MessageFns<ScalarDescriptor>;
|
|
62
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
63
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
64
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
65
|
+
} : Partial<T>;
|
|
66
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
67
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
68
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
69
|
+
} & {
|
|
70
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
71
|
+
};
|
|
72
|
+
export interface MessageFns<T> {
|
|
73
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
74
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
75
|
+
fromJSON(object: any): T;
|
|
76
|
+
toJSON(message: T): unknown;
|
|
77
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
78
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
79
|
+
}
|
|
80
|
+
export {};
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.7.0
|
|
5
|
+
// protoc v6.32.0
|
|
6
|
+
// source: cosmos/cosmos-proto/proto/cosmos_proto/cosmos.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ScalarDescriptor = exports.InterfaceDescriptor = exports.scalarTypeToJSON = exports.scalarTypeFromJSON = exports.ScalarType = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
+
exports.protobufPackage = "cosmos_proto";
|
|
12
|
+
var ScalarType;
|
|
13
|
+
(function (ScalarType) {
|
|
14
|
+
ScalarType[ScalarType["SCALAR_TYPE_UNSPECIFIED"] = 0] = "SCALAR_TYPE_UNSPECIFIED";
|
|
15
|
+
ScalarType[ScalarType["SCALAR_TYPE_STRING"] = 1] = "SCALAR_TYPE_STRING";
|
|
16
|
+
ScalarType[ScalarType["SCALAR_TYPE_BYTES"] = 2] = "SCALAR_TYPE_BYTES";
|
|
17
|
+
ScalarType[ScalarType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
18
|
+
})(ScalarType || (exports.ScalarType = ScalarType = {}));
|
|
19
|
+
function scalarTypeFromJSON(object) {
|
|
20
|
+
switch (object) {
|
|
21
|
+
case 0:
|
|
22
|
+
case "SCALAR_TYPE_UNSPECIFIED":
|
|
23
|
+
return ScalarType.SCALAR_TYPE_UNSPECIFIED;
|
|
24
|
+
case 1:
|
|
25
|
+
case "SCALAR_TYPE_STRING":
|
|
26
|
+
return ScalarType.SCALAR_TYPE_STRING;
|
|
27
|
+
case 2:
|
|
28
|
+
case "SCALAR_TYPE_BYTES":
|
|
29
|
+
return ScalarType.SCALAR_TYPE_BYTES;
|
|
30
|
+
case -1:
|
|
31
|
+
case "UNRECOGNIZED":
|
|
32
|
+
default:
|
|
33
|
+
return ScalarType.UNRECOGNIZED;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.scalarTypeFromJSON = scalarTypeFromJSON;
|
|
37
|
+
function scalarTypeToJSON(object) {
|
|
38
|
+
switch (object) {
|
|
39
|
+
case ScalarType.SCALAR_TYPE_UNSPECIFIED:
|
|
40
|
+
return "SCALAR_TYPE_UNSPECIFIED";
|
|
41
|
+
case ScalarType.SCALAR_TYPE_STRING:
|
|
42
|
+
return "SCALAR_TYPE_STRING";
|
|
43
|
+
case ScalarType.SCALAR_TYPE_BYTES:
|
|
44
|
+
return "SCALAR_TYPE_BYTES";
|
|
45
|
+
case ScalarType.UNRECOGNIZED:
|
|
46
|
+
default:
|
|
47
|
+
return "UNRECOGNIZED";
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.scalarTypeToJSON = scalarTypeToJSON;
|
|
51
|
+
function createBaseInterfaceDescriptor() {
|
|
52
|
+
return { name: "", description: "" };
|
|
53
|
+
}
|
|
54
|
+
exports.InterfaceDescriptor = {
|
|
55
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
56
|
+
if (message.name !== "") {
|
|
57
|
+
writer.uint32(10).string(message.name);
|
|
58
|
+
}
|
|
59
|
+
if (message.description !== "") {
|
|
60
|
+
writer.uint32(18).string(message.description);
|
|
61
|
+
}
|
|
62
|
+
return writer;
|
|
63
|
+
},
|
|
64
|
+
decode(input, length) {
|
|
65
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
66
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
67
|
+
const message = createBaseInterfaceDescriptor();
|
|
68
|
+
while (reader.pos < end) {
|
|
69
|
+
const tag = reader.uint32();
|
|
70
|
+
switch (tag >>> 3) {
|
|
71
|
+
case 1: {
|
|
72
|
+
if (tag !== 10) {
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
message.name = reader.string();
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
case 2: {
|
|
79
|
+
if (tag !== 18) {
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
message.description = reader.string();
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
reader.skip(tag & 7);
|
|
90
|
+
}
|
|
91
|
+
return message;
|
|
92
|
+
},
|
|
93
|
+
fromJSON(object) {
|
|
94
|
+
return {
|
|
95
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
96
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
97
|
+
};
|
|
98
|
+
},
|
|
99
|
+
toJSON(message) {
|
|
100
|
+
const obj = {};
|
|
101
|
+
if (message.name !== "") {
|
|
102
|
+
obj.name = message.name;
|
|
103
|
+
}
|
|
104
|
+
if (message.description !== "") {
|
|
105
|
+
obj.description = message.description;
|
|
106
|
+
}
|
|
107
|
+
return obj;
|
|
108
|
+
},
|
|
109
|
+
create(base) {
|
|
110
|
+
return exports.InterfaceDescriptor.fromPartial(base ?? {});
|
|
111
|
+
},
|
|
112
|
+
fromPartial(object) {
|
|
113
|
+
const message = createBaseInterfaceDescriptor();
|
|
114
|
+
message.name = object.name ?? "";
|
|
115
|
+
message.description = object.description ?? "";
|
|
116
|
+
return message;
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
function createBaseScalarDescriptor() {
|
|
120
|
+
return { name: "", description: "", fieldType: [] };
|
|
121
|
+
}
|
|
122
|
+
exports.ScalarDescriptor = {
|
|
123
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
124
|
+
if (message.name !== "") {
|
|
125
|
+
writer.uint32(10).string(message.name);
|
|
126
|
+
}
|
|
127
|
+
if (message.description !== "") {
|
|
128
|
+
writer.uint32(18).string(message.description);
|
|
129
|
+
}
|
|
130
|
+
writer.uint32(26).fork();
|
|
131
|
+
for (const v of message.fieldType) {
|
|
132
|
+
writer.int32(v);
|
|
133
|
+
}
|
|
134
|
+
writer.join();
|
|
135
|
+
return writer;
|
|
136
|
+
},
|
|
137
|
+
decode(input, length) {
|
|
138
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
139
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
140
|
+
const message = createBaseScalarDescriptor();
|
|
141
|
+
while (reader.pos < end) {
|
|
142
|
+
const tag = reader.uint32();
|
|
143
|
+
switch (tag >>> 3) {
|
|
144
|
+
case 1: {
|
|
145
|
+
if (tag !== 10) {
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
message.name = reader.string();
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
case 2: {
|
|
152
|
+
if (tag !== 18) {
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
message.description = reader.string();
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
case 3: {
|
|
159
|
+
if (tag === 24) {
|
|
160
|
+
message.fieldType.push(reader.int32());
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
if (tag === 26) {
|
|
164
|
+
const end2 = reader.uint32() + reader.pos;
|
|
165
|
+
while (reader.pos < end2) {
|
|
166
|
+
message.fieldType.push(reader.int32());
|
|
167
|
+
}
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
reader.skip(tag & 7);
|
|
177
|
+
}
|
|
178
|
+
return message;
|
|
179
|
+
},
|
|
180
|
+
fromJSON(object) {
|
|
181
|
+
return {
|
|
182
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
183
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
184
|
+
fieldType: globalThis.Array.isArray(object?.fieldType)
|
|
185
|
+
? object.fieldType.map((e) => scalarTypeFromJSON(e))
|
|
186
|
+
: [],
|
|
187
|
+
};
|
|
188
|
+
},
|
|
189
|
+
toJSON(message) {
|
|
190
|
+
const obj = {};
|
|
191
|
+
if (message.name !== "") {
|
|
192
|
+
obj.name = message.name;
|
|
193
|
+
}
|
|
194
|
+
if (message.description !== "") {
|
|
195
|
+
obj.description = message.description;
|
|
196
|
+
}
|
|
197
|
+
if (message.fieldType?.length) {
|
|
198
|
+
obj.fieldType = message.fieldType.map((e) => scalarTypeToJSON(e));
|
|
199
|
+
}
|
|
200
|
+
return obj;
|
|
201
|
+
},
|
|
202
|
+
create(base) {
|
|
203
|
+
return exports.ScalarDescriptor.fromPartial(base ?? {});
|
|
204
|
+
},
|
|
205
|
+
fromPartial(object) {
|
|
206
|
+
const message = createBaseScalarDescriptor();
|
|
207
|
+
message.name = object.name ?? "";
|
|
208
|
+
message.description = object.description ?? "";
|
|
209
|
+
message.fieldType = object.fieldType?.map((e) => e) || [];
|
|
210
|
+
return message;
|
|
211
|
+
},
|
|
212
|
+
};
|
|
213
|
+
function isSet(value) {
|
|
214
|
+
return value !== null && value !== undefined;
|
|
215
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const protobufPackage = "amino";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.7.0
|
|
5
|
+
// protoc v6.32.0
|
|
6
|
+
// source: cosmos/cosmos-sdk/proto/amino/amino.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
exports.protobufPackage = "amino";
|
package/dist/main/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/base/query/v1beta1/pagination.d.ts
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
export declare const protobufPackage = "cosmos.base.query.v1beta1";
|
|
3
|
+
/**
|
|
4
|
+
* PageRequest is to be embedded in gRPC request messages for efficient
|
|
5
|
+
* pagination. Ex:
|
|
6
|
+
*
|
|
7
|
+
* message SomeRequest {
|
|
8
|
+
* Foo some_parameter = 1;
|
|
9
|
+
* PageRequest pagination = 2;
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface PageRequest {
|
|
13
|
+
/**
|
|
14
|
+
* key is a value returned in PageResponse.next_key to begin
|
|
15
|
+
* querying the next page most efficiently. Only one of offset or key
|
|
16
|
+
* should be set.
|
|
17
|
+
*/
|
|
18
|
+
key: Uint8Array;
|
|
19
|
+
/**
|
|
20
|
+
* offset is a numeric offset that can be used when key is unavailable.
|
|
21
|
+
* It is less efficient than using key. Only one of offset or key should
|
|
22
|
+
* be set.
|
|
23
|
+
*/
|
|
24
|
+
offset: number;
|
|
25
|
+
/**
|
|
26
|
+
* limit is the total number of results to be returned in the result page.
|
|
27
|
+
* If left empty it will default to a value to be set by each app.
|
|
28
|
+
*/
|
|
29
|
+
limit: number;
|
|
30
|
+
/**
|
|
31
|
+
* count_total is set to true to indicate that the result set should include
|
|
32
|
+
* a count of the total number of items available for pagination in UIs.
|
|
33
|
+
* count_total is only respected when offset is used. It is ignored when key
|
|
34
|
+
* is set.
|
|
35
|
+
*/
|
|
36
|
+
countTotal: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* reverse is set to true if results are to be returned in the descending order.
|
|
39
|
+
*
|
|
40
|
+
* Since: cosmos-sdk 0.43
|
|
41
|
+
*/
|
|
42
|
+
reverse: boolean;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* PageResponse is to be embedded in gRPC response messages where the
|
|
46
|
+
* corresponding request message has used PageRequest.
|
|
47
|
+
*
|
|
48
|
+
* message SomeResponse {
|
|
49
|
+
* repeated Bar results = 1;
|
|
50
|
+
* PageResponse page = 2;
|
|
51
|
+
* }
|
|
52
|
+
*/
|
|
53
|
+
export interface PageResponse {
|
|
54
|
+
/**
|
|
55
|
+
* next_key is the key to be passed to PageRequest.key to
|
|
56
|
+
* query the next page most efficiently. It will be empty if
|
|
57
|
+
* there are no more results.
|
|
58
|
+
*/
|
|
59
|
+
nextKey: Uint8Array;
|
|
60
|
+
/**
|
|
61
|
+
* total is total number of results available if PageRequest.count_total
|
|
62
|
+
* was set, its value is undefined otherwise
|
|
63
|
+
*/
|
|
64
|
+
total: number;
|
|
65
|
+
}
|
|
66
|
+
export declare const PageRequest: MessageFns<PageRequest>;
|
|
67
|
+
export declare const PageResponse: MessageFns<PageResponse>;
|
|
68
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
69
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
70
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
71
|
+
} : Partial<T>;
|
|
72
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
73
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
74
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
75
|
+
} & {
|
|
76
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
77
|
+
};
|
|
78
|
+
export interface MessageFns<T> {
|
|
79
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
80
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
81
|
+
fromJSON(object: any): T;
|
|
82
|
+
toJSON(message: T): unknown;
|
|
83
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
84
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
85
|
+
}
|
|
86
|
+
export {};
|
package/dist/main/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/base/query/v1beta1/pagination.js
ADDED
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.7.0
|
|
5
|
+
// protoc v6.32.0
|
|
6
|
+
// source: cosmos/cosmos-sdk/proto/cosmos/base/query/v1beta1/pagination.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.PageResponse = exports.PageRequest = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
+
exports.protobufPackage = "cosmos.base.query.v1beta1";
|
|
12
|
+
function createBasePageRequest() {
|
|
13
|
+
return { key: new Uint8Array(0), offset: 0, limit: 0, countTotal: false, reverse: false };
|
|
14
|
+
}
|
|
15
|
+
exports.PageRequest = {
|
|
16
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
17
|
+
if (message.key.length !== 0) {
|
|
18
|
+
writer.uint32(10).bytes(message.key);
|
|
19
|
+
}
|
|
20
|
+
if (message.offset !== 0) {
|
|
21
|
+
writer.uint32(16).uint64(message.offset);
|
|
22
|
+
}
|
|
23
|
+
if (message.limit !== 0) {
|
|
24
|
+
writer.uint32(24).uint64(message.limit);
|
|
25
|
+
}
|
|
26
|
+
if (message.countTotal !== false) {
|
|
27
|
+
writer.uint32(32).bool(message.countTotal);
|
|
28
|
+
}
|
|
29
|
+
if (message.reverse !== false) {
|
|
30
|
+
writer.uint32(40).bool(message.reverse);
|
|
31
|
+
}
|
|
32
|
+
return writer;
|
|
33
|
+
},
|
|
34
|
+
decode(input, length) {
|
|
35
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
36
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
37
|
+
const message = createBasePageRequest();
|
|
38
|
+
while (reader.pos < end) {
|
|
39
|
+
const tag = reader.uint32();
|
|
40
|
+
switch (tag >>> 3) {
|
|
41
|
+
case 1: {
|
|
42
|
+
if (tag !== 10) {
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
message.key = reader.bytes();
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
case 2: {
|
|
49
|
+
if (tag !== 16) {
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
message.offset = longToNumber(reader.uint64());
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
case 3: {
|
|
56
|
+
if (tag !== 24) {
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
message.limit = longToNumber(reader.uint64());
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
case 4: {
|
|
63
|
+
if (tag !== 32) {
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
message.countTotal = reader.bool();
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
case 5: {
|
|
70
|
+
if (tag !== 40) {
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
message.reverse = reader.bool();
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
reader.skip(tag & 7);
|
|
81
|
+
}
|
|
82
|
+
return message;
|
|
83
|
+
},
|
|
84
|
+
fromJSON(object) {
|
|
85
|
+
return {
|
|
86
|
+
key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(0),
|
|
87
|
+
offset: isSet(object.offset) ? globalThis.Number(object.offset) : 0,
|
|
88
|
+
limit: isSet(object.limit) ? globalThis.Number(object.limit) : 0,
|
|
89
|
+
countTotal: isSet(object.countTotal) ? globalThis.Boolean(object.countTotal) : false,
|
|
90
|
+
reverse: isSet(object.reverse) ? globalThis.Boolean(object.reverse) : false,
|
|
91
|
+
};
|
|
92
|
+
},
|
|
93
|
+
toJSON(message) {
|
|
94
|
+
const obj = {};
|
|
95
|
+
if (message.key.length !== 0) {
|
|
96
|
+
obj.key = base64FromBytes(message.key);
|
|
97
|
+
}
|
|
98
|
+
if (message.offset !== 0) {
|
|
99
|
+
obj.offset = Math.round(message.offset);
|
|
100
|
+
}
|
|
101
|
+
if (message.limit !== 0) {
|
|
102
|
+
obj.limit = Math.round(message.limit);
|
|
103
|
+
}
|
|
104
|
+
if (message.countTotal !== false) {
|
|
105
|
+
obj.countTotal = message.countTotal;
|
|
106
|
+
}
|
|
107
|
+
if (message.reverse !== false) {
|
|
108
|
+
obj.reverse = message.reverse;
|
|
109
|
+
}
|
|
110
|
+
return obj;
|
|
111
|
+
},
|
|
112
|
+
create(base) {
|
|
113
|
+
return exports.PageRequest.fromPartial(base ?? {});
|
|
114
|
+
},
|
|
115
|
+
fromPartial(object) {
|
|
116
|
+
const message = createBasePageRequest();
|
|
117
|
+
message.key = object.key ?? new Uint8Array(0);
|
|
118
|
+
message.offset = object.offset ?? 0;
|
|
119
|
+
message.limit = object.limit ?? 0;
|
|
120
|
+
message.countTotal = object.countTotal ?? false;
|
|
121
|
+
message.reverse = object.reverse ?? false;
|
|
122
|
+
return message;
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
function createBasePageResponse() {
|
|
126
|
+
return { nextKey: new Uint8Array(0), total: 0 };
|
|
127
|
+
}
|
|
128
|
+
exports.PageResponse = {
|
|
129
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
130
|
+
if (message.nextKey.length !== 0) {
|
|
131
|
+
writer.uint32(10).bytes(message.nextKey);
|
|
132
|
+
}
|
|
133
|
+
if (message.total !== 0) {
|
|
134
|
+
writer.uint32(16).uint64(message.total);
|
|
135
|
+
}
|
|
136
|
+
return writer;
|
|
137
|
+
},
|
|
138
|
+
decode(input, length) {
|
|
139
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
140
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
141
|
+
const message = createBasePageResponse();
|
|
142
|
+
while (reader.pos < end) {
|
|
143
|
+
const tag = reader.uint32();
|
|
144
|
+
switch (tag >>> 3) {
|
|
145
|
+
case 1: {
|
|
146
|
+
if (tag !== 10) {
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
149
|
+
message.nextKey = reader.bytes();
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
case 2: {
|
|
153
|
+
if (tag !== 16) {
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
message.total = longToNumber(reader.uint64());
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
reader.skip(tag & 7);
|
|
164
|
+
}
|
|
165
|
+
return message;
|
|
166
|
+
},
|
|
167
|
+
fromJSON(object) {
|
|
168
|
+
return {
|
|
169
|
+
nextKey: isSet(object.nextKey) ? bytesFromBase64(object.nextKey) : new Uint8Array(0),
|
|
170
|
+
total: isSet(object.total) ? globalThis.Number(object.total) : 0,
|
|
171
|
+
};
|
|
172
|
+
},
|
|
173
|
+
toJSON(message) {
|
|
174
|
+
const obj = {};
|
|
175
|
+
if (message.nextKey.length !== 0) {
|
|
176
|
+
obj.nextKey = base64FromBytes(message.nextKey);
|
|
177
|
+
}
|
|
178
|
+
if (message.total !== 0) {
|
|
179
|
+
obj.total = Math.round(message.total);
|
|
180
|
+
}
|
|
181
|
+
return obj;
|
|
182
|
+
},
|
|
183
|
+
create(base) {
|
|
184
|
+
return exports.PageResponse.fromPartial(base ?? {});
|
|
185
|
+
},
|
|
186
|
+
fromPartial(object) {
|
|
187
|
+
const message = createBasePageResponse();
|
|
188
|
+
message.nextKey = object.nextKey ?? new Uint8Array(0);
|
|
189
|
+
message.total = object.total ?? 0;
|
|
190
|
+
return message;
|
|
191
|
+
},
|
|
192
|
+
};
|
|
193
|
+
function bytesFromBase64(b64) {
|
|
194
|
+
if (globalThis.Buffer) {
|
|
195
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
const bin = globalThis.atob(b64);
|
|
199
|
+
const arr = new Uint8Array(bin.length);
|
|
200
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
201
|
+
arr[i] = bin.charCodeAt(i);
|
|
202
|
+
}
|
|
203
|
+
return arr;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
function base64FromBytes(arr) {
|
|
207
|
+
if (globalThis.Buffer) {
|
|
208
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
const bin = [];
|
|
212
|
+
arr.forEach((byte) => {
|
|
213
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
214
|
+
});
|
|
215
|
+
return globalThis.btoa(bin.join(""));
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
function longToNumber(int64) {
|
|
219
|
+
const num = globalThis.Number(int64.toString());
|
|
220
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
221
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
222
|
+
}
|
|
223
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
224
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
225
|
+
}
|
|
226
|
+
return num;
|
|
227
|
+
}
|
|
228
|
+
function isSet(value) {
|
|
229
|
+
return value !== null && value !== undefined;
|
|
230
|
+
}
|