coreum-js 2.18.6 → 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/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/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
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.7.0
|
|
4
|
+
// protoc v6.32.0
|
|
5
|
+
// source: cosmos/cosmos-proto/proto/cosmos_proto/cosmos.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
8
|
+
export const protobufPackage = "cosmos_proto";
|
|
9
|
+
export var ScalarType;
|
|
10
|
+
(function (ScalarType) {
|
|
11
|
+
ScalarType[ScalarType["SCALAR_TYPE_UNSPECIFIED"] = 0] = "SCALAR_TYPE_UNSPECIFIED";
|
|
12
|
+
ScalarType[ScalarType["SCALAR_TYPE_STRING"] = 1] = "SCALAR_TYPE_STRING";
|
|
13
|
+
ScalarType[ScalarType["SCALAR_TYPE_BYTES"] = 2] = "SCALAR_TYPE_BYTES";
|
|
14
|
+
ScalarType[ScalarType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
15
|
+
})(ScalarType || (ScalarType = {}));
|
|
16
|
+
export function scalarTypeFromJSON(object) {
|
|
17
|
+
switch (object) {
|
|
18
|
+
case 0:
|
|
19
|
+
case "SCALAR_TYPE_UNSPECIFIED":
|
|
20
|
+
return ScalarType.SCALAR_TYPE_UNSPECIFIED;
|
|
21
|
+
case 1:
|
|
22
|
+
case "SCALAR_TYPE_STRING":
|
|
23
|
+
return ScalarType.SCALAR_TYPE_STRING;
|
|
24
|
+
case 2:
|
|
25
|
+
case "SCALAR_TYPE_BYTES":
|
|
26
|
+
return ScalarType.SCALAR_TYPE_BYTES;
|
|
27
|
+
case -1:
|
|
28
|
+
case "UNRECOGNIZED":
|
|
29
|
+
default:
|
|
30
|
+
return ScalarType.UNRECOGNIZED;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export function scalarTypeToJSON(object) {
|
|
34
|
+
switch (object) {
|
|
35
|
+
case ScalarType.SCALAR_TYPE_UNSPECIFIED:
|
|
36
|
+
return "SCALAR_TYPE_UNSPECIFIED";
|
|
37
|
+
case ScalarType.SCALAR_TYPE_STRING:
|
|
38
|
+
return "SCALAR_TYPE_STRING";
|
|
39
|
+
case ScalarType.SCALAR_TYPE_BYTES:
|
|
40
|
+
return "SCALAR_TYPE_BYTES";
|
|
41
|
+
case ScalarType.UNRECOGNIZED:
|
|
42
|
+
default:
|
|
43
|
+
return "UNRECOGNIZED";
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function createBaseInterfaceDescriptor() {
|
|
47
|
+
return { name: "", description: "" };
|
|
48
|
+
}
|
|
49
|
+
export const InterfaceDescriptor = {
|
|
50
|
+
encode(message, writer = new BinaryWriter()) {
|
|
51
|
+
if (message.name !== "") {
|
|
52
|
+
writer.uint32(10).string(message.name);
|
|
53
|
+
}
|
|
54
|
+
if (message.description !== "") {
|
|
55
|
+
writer.uint32(18).string(message.description);
|
|
56
|
+
}
|
|
57
|
+
return writer;
|
|
58
|
+
},
|
|
59
|
+
decode(input, length) {
|
|
60
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
61
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
62
|
+
const message = createBaseInterfaceDescriptor();
|
|
63
|
+
while (reader.pos < end) {
|
|
64
|
+
const tag = reader.uint32();
|
|
65
|
+
switch (tag >>> 3) {
|
|
66
|
+
case 1: {
|
|
67
|
+
if (tag !== 10) {
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
message.name = reader.string();
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
case 2: {
|
|
74
|
+
if (tag !== 18) {
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
message.description = reader.string();
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
reader.skip(tag & 7);
|
|
85
|
+
}
|
|
86
|
+
return message;
|
|
87
|
+
},
|
|
88
|
+
fromJSON(object) {
|
|
89
|
+
return {
|
|
90
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
91
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
92
|
+
};
|
|
93
|
+
},
|
|
94
|
+
toJSON(message) {
|
|
95
|
+
const obj = {};
|
|
96
|
+
if (message.name !== "") {
|
|
97
|
+
obj.name = message.name;
|
|
98
|
+
}
|
|
99
|
+
if (message.description !== "") {
|
|
100
|
+
obj.description = message.description;
|
|
101
|
+
}
|
|
102
|
+
return obj;
|
|
103
|
+
},
|
|
104
|
+
create(base) {
|
|
105
|
+
return InterfaceDescriptor.fromPartial(base ?? {});
|
|
106
|
+
},
|
|
107
|
+
fromPartial(object) {
|
|
108
|
+
const message = createBaseInterfaceDescriptor();
|
|
109
|
+
message.name = object.name ?? "";
|
|
110
|
+
message.description = object.description ?? "";
|
|
111
|
+
return message;
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
function createBaseScalarDescriptor() {
|
|
115
|
+
return { name: "", description: "", fieldType: [] };
|
|
116
|
+
}
|
|
117
|
+
export const ScalarDescriptor = {
|
|
118
|
+
encode(message, writer = new BinaryWriter()) {
|
|
119
|
+
if (message.name !== "") {
|
|
120
|
+
writer.uint32(10).string(message.name);
|
|
121
|
+
}
|
|
122
|
+
if (message.description !== "") {
|
|
123
|
+
writer.uint32(18).string(message.description);
|
|
124
|
+
}
|
|
125
|
+
writer.uint32(26).fork();
|
|
126
|
+
for (const v of message.fieldType) {
|
|
127
|
+
writer.int32(v);
|
|
128
|
+
}
|
|
129
|
+
writer.join();
|
|
130
|
+
return writer;
|
|
131
|
+
},
|
|
132
|
+
decode(input, length) {
|
|
133
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
134
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
135
|
+
const message = createBaseScalarDescriptor();
|
|
136
|
+
while (reader.pos < end) {
|
|
137
|
+
const tag = reader.uint32();
|
|
138
|
+
switch (tag >>> 3) {
|
|
139
|
+
case 1: {
|
|
140
|
+
if (tag !== 10) {
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
message.name = reader.string();
|
|
144
|
+
continue;
|
|
145
|
+
}
|
|
146
|
+
case 2: {
|
|
147
|
+
if (tag !== 18) {
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
message.description = reader.string();
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
case 3: {
|
|
154
|
+
if (tag === 24) {
|
|
155
|
+
message.fieldType.push(reader.int32());
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
if (tag === 26) {
|
|
159
|
+
const end2 = reader.uint32() + reader.pos;
|
|
160
|
+
while (reader.pos < end2) {
|
|
161
|
+
message.fieldType.push(reader.int32());
|
|
162
|
+
}
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
reader.skip(tag & 7);
|
|
172
|
+
}
|
|
173
|
+
return message;
|
|
174
|
+
},
|
|
175
|
+
fromJSON(object) {
|
|
176
|
+
return {
|
|
177
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
178
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
179
|
+
fieldType: globalThis.Array.isArray(object?.fieldType)
|
|
180
|
+
? object.fieldType.map((e) => scalarTypeFromJSON(e))
|
|
181
|
+
: [],
|
|
182
|
+
};
|
|
183
|
+
},
|
|
184
|
+
toJSON(message) {
|
|
185
|
+
const obj = {};
|
|
186
|
+
if (message.name !== "") {
|
|
187
|
+
obj.name = message.name;
|
|
188
|
+
}
|
|
189
|
+
if (message.description !== "") {
|
|
190
|
+
obj.description = message.description;
|
|
191
|
+
}
|
|
192
|
+
if (message.fieldType?.length) {
|
|
193
|
+
obj.fieldType = message.fieldType.map((e) => scalarTypeToJSON(e));
|
|
194
|
+
}
|
|
195
|
+
return obj;
|
|
196
|
+
},
|
|
197
|
+
create(base) {
|
|
198
|
+
return ScalarDescriptor.fromPartial(base ?? {});
|
|
199
|
+
},
|
|
200
|
+
fromPartial(object) {
|
|
201
|
+
const message = createBaseScalarDescriptor();
|
|
202
|
+
message.name = object.name ?? "";
|
|
203
|
+
message.description = object.description ?? "";
|
|
204
|
+
message.fieldType = object.fieldType?.map((e) => e) || [];
|
|
205
|
+
return message;
|
|
206
|
+
},
|
|
207
|
+
};
|
|
208
|
+
function isSet(value) {
|
|
209
|
+
return value !== null && value !== undefined;
|
|
210
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const protobufPackage = "amino";
|
package/dist/module/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/module/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/base/query/v1beta1/pagination.js
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.7.0
|
|
4
|
+
// protoc v6.32.0
|
|
5
|
+
// source: cosmos/cosmos-sdk/proto/cosmos/base/query/v1beta1/pagination.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
8
|
+
export const protobufPackage = "cosmos.base.query.v1beta1";
|
|
9
|
+
function createBasePageRequest() {
|
|
10
|
+
return { key: new Uint8Array(0), offset: 0, limit: 0, countTotal: false, reverse: false };
|
|
11
|
+
}
|
|
12
|
+
export const PageRequest = {
|
|
13
|
+
encode(message, writer = new BinaryWriter()) {
|
|
14
|
+
if (message.key.length !== 0) {
|
|
15
|
+
writer.uint32(10).bytes(message.key);
|
|
16
|
+
}
|
|
17
|
+
if (message.offset !== 0) {
|
|
18
|
+
writer.uint32(16).uint64(message.offset);
|
|
19
|
+
}
|
|
20
|
+
if (message.limit !== 0) {
|
|
21
|
+
writer.uint32(24).uint64(message.limit);
|
|
22
|
+
}
|
|
23
|
+
if (message.countTotal !== false) {
|
|
24
|
+
writer.uint32(32).bool(message.countTotal);
|
|
25
|
+
}
|
|
26
|
+
if (message.reverse !== false) {
|
|
27
|
+
writer.uint32(40).bool(message.reverse);
|
|
28
|
+
}
|
|
29
|
+
return writer;
|
|
30
|
+
},
|
|
31
|
+
decode(input, length) {
|
|
32
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
33
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
34
|
+
const message = createBasePageRequest();
|
|
35
|
+
while (reader.pos < end) {
|
|
36
|
+
const tag = reader.uint32();
|
|
37
|
+
switch (tag >>> 3) {
|
|
38
|
+
case 1: {
|
|
39
|
+
if (tag !== 10) {
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
message.key = reader.bytes();
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
case 2: {
|
|
46
|
+
if (tag !== 16) {
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
message.offset = longToNumber(reader.uint64());
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
case 3: {
|
|
53
|
+
if (tag !== 24) {
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
message.limit = longToNumber(reader.uint64());
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
case 4: {
|
|
60
|
+
if (tag !== 32) {
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
message.countTotal = reader.bool();
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
case 5: {
|
|
67
|
+
if (tag !== 40) {
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
message.reverse = reader.bool();
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
reader.skip(tag & 7);
|
|
78
|
+
}
|
|
79
|
+
return message;
|
|
80
|
+
},
|
|
81
|
+
fromJSON(object) {
|
|
82
|
+
return {
|
|
83
|
+
key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(0),
|
|
84
|
+
offset: isSet(object.offset) ? globalThis.Number(object.offset) : 0,
|
|
85
|
+
limit: isSet(object.limit) ? globalThis.Number(object.limit) : 0,
|
|
86
|
+
countTotal: isSet(object.countTotal) ? globalThis.Boolean(object.countTotal) : false,
|
|
87
|
+
reverse: isSet(object.reverse) ? globalThis.Boolean(object.reverse) : false,
|
|
88
|
+
};
|
|
89
|
+
},
|
|
90
|
+
toJSON(message) {
|
|
91
|
+
const obj = {};
|
|
92
|
+
if (message.key.length !== 0) {
|
|
93
|
+
obj.key = base64FromBytes(message.key);
|
|
94
|
+
}
|
|
95
|
+
if (message.offset !== 0) {
|
|
96
|
+
obj.offset = Math.round(message.offset);
|
|
97
|
+
}
|
|
98
|
+
if (message.limit !== 0) {
|
|
99
|
+
obj.limit = Math.round(message.limit);
|
|
100
|
+
}
|
|
101
|
+
if (message.countTotal !== false) {
|
|
102
|
+
obj.countTotal = message.countTotal;
|
|
103
|
+
}
|
|
104
|
+
if (message.reverse !== false) {
|
|
105
|
+
obj.reverse = message.reverse;
|
|
106
|
+
}
|
|
107
|
+
return obj;
|
|
108
|
+
},
|
|
109
|
+
create(base) {
|
|
110
|
+
return PageRequest.fromPartial(base ?? {});
|
|
111
|
+
},
|
|
112
|
+
fromPartial(object) {
|
|
113
|
+
const message = createBasePageRequest();
|
|
114
|
+
message.key = object.key ?? new Uint8Array(0);
|
|
115
|
+
message.offset = object.offset ?? 0;
|
|
116
|
+
message.limit = object.limit ?? 0;
|
|
117
|
+
message.countTotal = object.countTotal ?? false;
|
|
118
|
+
message.reverse = object.reverse ?? false;
|
|
119
|
+
return message;
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
function createBasePageResponse() {
|
|
123
|
+
return { nextKey: new Uint8Array(0), total: 0 };
|
|
124
|
+
}
|
|
125
|
+
export const PageResponse = {
|
|
126
|
+
encode(message, writer = new BinaryWriter()) {
|
|
127
|
+
if (message.nextKey.length !== 0) {
|
|
128
|
+
writer.uint32(10).bytes(message.nextKey);
|
|
129
|
+
}
|
|
130
|
+
if (message.total !== 0) {
|
|
131
|
+
writer.uint32(16).uint64(message.total);
|
|
132
|
+
}
|
|
133
|
+
return writer;
|
|
134
|
+
},
|
|
135
|
+
decode(input, length) {
|
|
136
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
137
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
138
|
+
const message = createBasePageResponse();
|
|
139
|
+
while (reader.pos < end) {
|
|
140
|
+
const tag = reader.uint32();
|
|
141
|
+
switch (tag >>> 3) {
|
|
142
|
+
case 1: {
|
|
143
|
+
if (tag !== 10) {
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
message.nextKey = reader.bytes();
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
case 2: {
|
|
150
|
+
if (tag !== 16) {
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
message.total = longToNumber(reader.uint64());
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
reader.skip(tag & 7);
|
|
161
|
+
}
|
|
162
|
+
return message;
|
|
163
|
+
},
|
|
164
|
+
fromJSON(object) {
|
|
165
|
+
return {
|
|
166
|
+
nextKey: isSet(object.nextKey) ? bytesFromBase64(object.nextKey) : new Uint8Array(0),
|
|
167
|
+
total: isSet(object.total) ? globalThis.Number(object.total) : 0,
|
|
168
|
+
};
|
|
169
|
+
},
|
|
170
|
+
toJSON(message) {
|
|
171
|
+
const obj = {};
|
|
172
|
+
if (message.nextKey.length !== 0) {
|
|
173
|
+
obj.nextKey = base64FromBytes(message.nextKey);
|
|
174
|
+
}
|
|
175
|
+
if (message.total !== 0) {
|
|
176
|
+
obj.total = Math.round(message.total);
|
|
177
|
+
}
|
|
178
|
+
return obj;
|
|
179
|
+
},
|
|
180
|
+
create(base) {
|
|
181
|
+
return PageResponse.fromPartial(base ?? {});
|
|
182
|
+
},
|
|
183
|
+
fromPartial(object) {
|
|
184
|
+
const message = createBasePageResponse();
|
|
185
|
+
message.nextKey = object.nextKey ?? new Uint8Array(0);
|
|
186
|
+
message.total = object.total ?? 0;
|
|
187
|
+
return message;
|
|
188
|
+
},
|
|
189
|
+
};
|
|
190
|
+
function bytesFromBase64(b64) {
|
|
191
|
+
if (globalThis.Buffer) {
|
|
192
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
const bin = globalThis.atob(b64);
|
|
196
|
+
const arr = new Uint8Array(bin.length);
|
|
197
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
198
|
+
arr[i] = bin.charCodeAt(i);
|
|
199
|
+
}
|
|
200
|
+
return arr;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
function base64FromBytes(arr) {
|
|
204
|
+
if (globalThis.Buffer) {
|
|
205
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
const bin = [];
|
|
209
|
+
arr.forEach((byte) => {
|
|
210
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
211
|
+
});
|
|
212
|
+
return globalThis.btoa(bin.join(""));
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
function longToNumber(int64) {
|
|
216
|
+
const num = globalThis.Number(int64.toString());
|
|
217
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
218
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
219
|
+
}
|
|
220
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
221
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
222
|
+
}
|
|
223
|
+
return num;
|
|
224
|
+
}
|
|
225
|
+
function isSet(value) {
|
|
226
|
+
return value !== null && value !== undefined;
|
|
227
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
export declare const protobufPackage = "cosmos.base.v1beta1";
|
|
3
|
+
/**
|
|
4
|
+
* Coin defines a token with a denomination and an amount.
|
|
5
|
+
*
|
|
6
|
+
* NOTE: The amount field is an Int which implements the custom method
|
|
7
|
+
* signatures required by gogoproto.
|
|
8
|
+
*/
|
|
9
|
+
export interface Coin {
|
|
10
|
+
denom: string;
|
|
11
|
+
amount: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* DecCoin defines a token with a denomination and a decimal amount.
|
|
15
|
+
*
|
|
16
|
+
* NOTE: The amount field is an Dec which implements the custom method
|
|
17
|
+
* signatures required by gogoproto.
|
|
18
|
+
*/
|
|
19
|
+
export interface DecCoin {
|
|
20
|
+
denom: string;
|
|
21
|
+
amount: string;
|
|
22
|
+
}
|
|
23
|
+
/** IntProto defines a Protobuf wrapper around an Int object. */
|
|
24
|
+
export interface IntProto {
|
|
25
|
+
int: string;
|
|
26
|
+
}
|
|
27
|
+
/** DecProto defines a Protobuf wrapper around a Dec object. */
|
|
28
|
+
export interface DecProto {
|
|
29
|
+
dec: string;
|
|
30
|
+
}
|
|
31
|
+
export declare const Coin: MessageFns<Coin>;
|
|
32
|
+
export declare const DecCoin: MessageFns<DecCoin>;
|
|
33
|
+
export declare const IntProto: MessageFns<IntProto>;
|
|
34
|
+
export declare const DecProto: MessageFns<DecProto>;
|
|
35
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
36
|
+
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 {} ? {
|
|
37
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
38
|
+
} : Partial<T>;
|
|
39
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
40
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
41
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
42
|
+
} & {
|
|
43
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
44
|
+
};
|
|
45
|
+
export interface MessageFns<T> {
|
|
46
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
47
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
48
|
+
fromJSON(object: any): T;
|
|
49
|
+
toJSON(message: T): unknown;
|
|
50
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
51
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
52
|
+
}
|
|
53
|
+
export {};
|