@sentio/protos 3.9.0-rc.12 → 3.9.0-rc.13
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/lib/google/protobuf/empty.d.ts +10 -9
- package/lib/google/protobuf/empty.d.ts.map +1 -1
- package/lib/google/protobuf/empty.js +10 -5
- package/lib/google/protobuf/empty.js.map +1 -1
- package/lib/google/protobuf/struct.d.ts +23 -37
- package/lib/google/protobuf/struct.d.ts.map +1 -1
- package/lib/google/protobuf/struct.js +83 -44
- package/lib/google/protobuf/struct.js.map +1 -1
- package/lib/google/protobuf/timestamp.d.ts +10 -9
- package/lib/google/protobuf/timestamp.d.ts.map +1 -1
- package/lib/google/protobuf/timestamp.js +21 -22
- package/lib/google/protobuf/timestamp.js.map +1 -1
- package/lib/google/type/money.d.ts +10 -9
- package/lib/google/type/money.d.ts.map +1 -1
- package/lib/google/type/money.js +28 -24
- package/lib/google/type/money.js.map +1 -1
- package/lib/processor/protos/processor.d.ts +146 -1097
- package/lib/processor/protos/processor.d.ts.map +1 -1
- package/lib/processor/protos/processor.js +2688 -1467
- package/lib/processor/protos/processor.js.map +1 -1
- package/lib/service/common/protos/common.d.ts +127 -909
- package/lib/service/common/protos/common.d.ts.map +1 -1
- package/lib/service/common/protos/common.js +2822 -1537
- package/lib/service/common/protos/common.js.map +1 -1
- package/package.json +5 -6
- package/src/google/protobuf/empty.ts +22 -7
- package/src/google/protobuf/struct.ts +123 -56
- package/src/google/protobuf/timestamp.ts +33 -26
- package/src/google/type/money.ts +40 -28
- package/src/processor/protos/processor.ts +2941 -1686
- package/src/service/common/protos/common.ts +3272 -1904
- package/lib/chainquery/protos/chainquery.d.ts +0 -607
- package/lib/chainquery/protos/chainquery.d.ts.map +0 -1
- package/lib/chainquery/protos/chainquery.js +0 -1701
- package/lib/chainquery/protos/chainquery.js.map +0 -1
- package/src/chainquery/protos/chainquery.ts +0 -2126
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentio/protos",
|
|
3
|
-
"version": "3.9.0-rc.
|
|
3
|
+
"version": "3.9.0-rc.13",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -10,18 +10,17 @@
|
|
|
10
10
|
"type": "module",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": "./lib/index.js",
|
|
13
|
-
"./price": "./lib/service/price/protos/price.js"
|
|
14
|
-
"./chainquery": "./lib/chainquery/protos/chainquery.js"
|
|
13
|
+
"./price": "./lib/service/price/protos/price.js"
|
|
15
14
|
},
|
|
16
15
|
"files": [
|
|
17
16
|
"lib",
|
|
18
17
|
"src"
|
|
19
18
|
],
|
|
20
19
|
"dependencies": {
|
|
20
|
+
"@bufbuild/protobuf": "^2.12.0",
|
|
21
21
|
"long": "^5.2.3",
|
|
22
|
-
"nice-grpc": "^2.1.
|
|
23
|
-
"nice-grpc-common": "^2.0.
|
|
24
|
-
"protobufjs": "^7.5.4"
|
|
22
|
+
"nice-grpc": "^2.1.16",
|
|
23
|
+
"nice-grpc-common": "^2.0.3"
|
|
25
24
|
},
|
|
26
25
|
"engines": {
|
|
27
26
|
"node": ">=20"
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.8-patch.2
|
|
4
|
+
// protoc v6.33.5
|
|
5
|
+
// source: google/protobuf/empty.proto
|
|
6
|
+
|
|
1
7
|
/* eslint-disable */
|
|
2
|
-
import
|
|
8
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
3
9
|
|
|
4
10
|
export interface Empty {
|
|
5
11
|
}
|
|
@@ -8,14 +14,14 @@ function createBaseEmpty(): Empty {
|
|
|
8
14
|
return {};
|
|
9
15
|
}
|
|
10
16
|
|
|
11
|
-
export const Empty = {
|
|
12
|
-
encode(_: Empty, writer:
|
|
17
|
+
export const Empty: MessageFns<Empty> = {
|
|
18
|
+
encode(_: Empty, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
13
19
|
return writer;
|
|
14
20
|
},
|
|
15
21
|
|
|
16
|
-
decode(input:
|
|
17
|
-
const reader = input instanceof
|
|
18
|
-
|
|
22
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Empty {
|
|
23
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
24
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
19
25
|
const message = createBaseEmpty();
|
|
20
26
|
while (reader.pos < end) {
|
|
21
27
|
const tag = reader.uint32();
|
|
@@ -24,7 +30,7 @@ export const Empty = {
|
|
|
24
30
|
if ((tag & 7) === 4 || tag === 0) {
|
|
25
31
|
break;
|
|
26
32
|
}
|
|
27
|
-
reader.
|
|
33
|
+
reader.skip(tag & 7);
|
|
28
34
|
}
|
|
29
35
|
return message;
|
|
30
36
|
},
|
|
@@ -54,3 +60,12 @@ type DeepPartial<T> = T extends Builtin ? T
|
|
|
54
60
|
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
55
61
|
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
56
62
|
: Partial<T>;
|
|
63
|
+
|
|
64
|
+
interface MessageFns<T> {
|
|
65
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
66
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
67
|
+
fromJSON(object: any): T;
|
|
68
|
+
toJSON(message: T): unknown;
|
|
69
|
+
create(base?: DeepPartial<T>): T;
|
|
70
|
+
fromPartial(object: DeepPartial<T>): T;
|
|
71
|
+
}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.8-patch.2
|
|
4
|
+
// protoc v6.33.5
|
|
5
|
+
// source: google/protobuf/struct.proto
|
|
6
|
+
|
|
1
7
|
/* eslint-disable */
|
|
2
|
-
import
|
|
8
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
3
9
|
|
|
4
10
|
export enum NullValue {
|
|
5
11
|
NULL_VALUE = 0,
|
|
@@ -54,24 +60,24 @@ function createBaseStruct(): Struct {
|
|
|
54
60
|
return { fields: {} };
|
|
55
61
|
}
|
|
56
62
|
|
|
57
|
-
export const Struct = {
|
|
58
|
-
encode(message: Struct, writer:
|
|
59
|
-
Object.entries(message.fields).forEach(([key, value]) => {
|
|
63
|
+
export const Struct: MessageFns<Struct> & StructWrapperFns = {
|
|
64
|
+
encode(message: Struct, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
65
|
+
globalThis.Object.entries(message.fields).forEach(([key, value]: [string, any | undefined]) => {
|
|
60
66
|
if (value !== undefined) {
|
|
61
|
-
Struct_FieldsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).
|
|
67
|
+
Struct_FieldsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join();
|
|
62
68
|
}
|
|
63
69
|
});
|
|
64
70
|
return writer;
|
|
65
71
|
},
|
|
66
72
|
|
|
67
|
-
decode(input:
|
|
68
|
-
const reader = input instanceof
|
|
69
|
-
|
|
73
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Struct {
|
|
74
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
75
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
70
76
|
const message = createBaseStruct();
|
|
71
77
|
while (reader.pos < end) {
|
|
72
78
|
const tag = reader.uint32();
|
|
73
79
|
switch (tag >>> 3) {
|
|
74
|
-
case 1:
|
|
80
|
+
case 1: {
|
|
75
81
|
if (tag !== 10) {
|
|
76
82
|
break;
|
|
77
83
|
}
|
|
@@ -81,11 +87,12 @@ export const Struct = {
|
|
|
81
87
|
message.fields[entry1.key] = entry1.value;
|
|
82
88
|
}
|
|
83
89
|
continue;
|
|
90
|
+
}
|
|
84
91
|
}
|
|
85
92
|
if ((tag & 7) === 4 || tag === 0) {
|
|
86
93
|
break;
|
|
87
94
|
}
|
|
88
|
-
reader.
|
|
95
|
+
reader.skip(tag & 7);
|
|
89
96
|
}
|
|
90
97
|
return message;
|
|
91
98
|
},
|
|
@@ -93,10 +100,13 @@ export const Struct = {
|
|
|
93
100
|
fromJSON(object: any): Struct {
|
|
94
101
|
return {
|
|
95
102
|
fields: isObject(object.fields)
|
|
96
|
-
? Object.entries(object.fields)
|
|
97
|
-
acc[key]
|
|
98
|
-
|
|
99
|
-
|
|
103
|
+
? (globalThis.Object.entries(object.fields) as [string, any][]).reduce(
|
|
104
|
+
(acc: { [key: string]: any | undefined }, [key, value]: [string, any]) => {
|
|
105
|
+
acc[key] = value as any | undefined;
|
|
106
|
+
return acc;
|
|
107
|
+
},
|
|
108
|
+
{},
|
|
109
|
+
)
|
|
100
110
|
: {},
|
|
101
111
|
};
|
|
102
112
|
},
|
|
@@ -104,7 +114,7 @@ export const Struct = {
|
|
|
104
114
|
toJSON(message: Struct): unknown {
|
|
105
115
|
const obj: any = {};
|
|
106
116
|
if (message.fields) {
|
|
107
|
-
const entries = Object.entries(message.fields);
|
|
117
|
+
const entries = globalThis.Object.entries(message.fields) as [string, any | undefined][];
|
|
108
118
|
if (entries.length > 0) {
|
|
109
119
|
obj.fields = {};
|
|
110
120
|
entries.forEach(([k, v]) => {
|
|
@@ -120,8 +130,8 @@ export const Struct = {
|
|
|
120
130
|
},
|
|
121
131
|
fromPartial(object: DeepPartial<Struct>): Struct {
|
|
122
132
|
const message = createBaseStruct();
|
|
123
|
-
message.fields = Object.entries(object.fields ?? {})
|
|
124
|
-
(acc, [key, value]) => {
|
|
133
|
+
message.fields = (globalThis.Object.entries(object.fields ?? {}) as [string, any | undefined][]).reduce(
|
|
134
|
+
(acc: { [key: string]: any | undefined }, [key, value]: [string, any | undefined]) => {
|
|
125
135
|
if (value !== undefined) {
|
|
126
136
|
acc[key] = value;
|
|
127
137
|
}
|
|
@@ -136,7 +146,7 @@ export const Struct = {
|
|
|
136
146
|
const struct = createBaseStruct();
|
|
137
147
|
|
|
138
148
|
if (object !== undefined) {
|
|
139
|
-
for (const key of Object.keys(object)) {
|
|
149
|
+
for (const key of globalThis.Object.keys(object)) {
|
|
140
150
|
struct.fields[key] = object[key];
|
|
141
151
|
}
|
|
142
152
|
}
|
|
@@ -146,7 +156,7 @@ export const Struct = {
|
|
|
146
156
|
unwrap(message: Struct): { [key: string]: any } {
|
|
147
157
|
const object: { [key: string]: any } = {};
|
|
148
158
|
if (message.fields) {
|
|
149
|
-
for (const key of Object.keys(message.fields)) {
|
|
159
|
+
for (const key of globalThis.Object.keys(message.fields)) {
|
|
150
160
|
object[key] = message.fields[key];
|
|
151
161
|
}
|
|
152
162
|
}
|
|
@@ -158,43 +168,45 @@ function createBaseStruct_FieldsEntry(): Struct_FieldsEntry {
|
|
|
158
168
|
return { key: "", value: undefined };
|
|
159
169
|
}
|
|
160
170
|
|
|
161
|
-
export const Struct_FieldsEntry = {
|
|
162
|
-
encode(message: Struct_FieldsEntry, writer:
|
|
171
|
+
export const Struct_FieldsEntry: MessageFns<Struct_FieldsEntry> = {
|
|
172
|
+
encode(message: Struct_FieldsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
163
173
|
if (message.key !== "") {
|
|
164
174
|
writer.uint32(10).string(message.key);
|
|
165
175
|
}
|
|
166
176
|
if (message.value !== undefined) {
|
|
167
|
-
Value.encode(Value.wrap(message.value), writer.uint32(18).fork()).
|
|
177
|
+
Value.encode(Value.wrap(message.value), writer.uint32(18).fork()).join();
|
|
168
178
|
}
|
|
169
179
|
return writer;
|
|
170
180
|
},
|
|
171
181
|
|
|
172
|
-
decode(input:
|
|
173
|
-
const reader = input instanceof
|
|
174
|
-
|
|
182
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Struct_FieldsEntry {
|
|
183
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
184
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
175
185
|
const message = createBaseStruct_FieldsEntry();
|
|
176
186
|
while (reader.pos < end) {
|
|
177
187
|
const tag = reader.uint32();
|
|
178
188
|
switch (tag >>> 3) {
|
|
179
|
-
case 1:
|
|
189
|
+
case 1: {
|
|
180
190
|
if (tag !== 10) {
|
|
181
191
|
break;
|
|
182
192
|
}
|
|
183
193
|
|
|
184
194
|
message.key = reader.string();
|
|
185
195
|
continue;
|
|
186
|
-
|
|
196
|
+
}
|
|
197
|
+
case 2: {
|
|
187
198
|
if (tag !== 18) {
|
|
188
199
|
break;
|
|
189
200
|
}
|
|
190
201
|
|
|
191
202
|
message.value = Value.unwrap(Value.decode(reader, reader.uint32()));
|
|
192
203
|
continue;
|
|
204
|
+
}
|
|
193
205
|
}
|
|
194
206
|
if ((tag & 7) === 4 || tag === 0) {
|
|
195
207
|
break;
|
|
196
208
|
}
|
|
197
|
-
reader.
|
|
209
|
+
reader.skip(tag & 7);
|
|
198
210
|
}
|
|
199
211
|
return message;
|
|
200
212
|
},
|
|
@@ -239,8 +251,8 @@ function createBaseValue(): Value {
|
|
|
239
251
|
};
|
|
240
252
|
}
|
|
241
253
|
|
|
242
|
-
export const Value = {
|
|
243
|
-
encode(message: Value, writer:
|
|
254
|
+
export const Value: MessageFns<Value> & AnyValueWrapperFns = {
|
|
255
|
+
encode(message: Value, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
244
256
|
if (message.nullValue !== undefined) {
|
|
245
257
|
writer.uint32(8).int32(message.nullValue);
|
|
246
258
|
}
|
|
@@ -254,80 +266,110 @@ export const Value = {
|
|
|
254
266
|
writer.uint32(32).bool(message.boolValue);
|
|
255
267
|
}
|
|
256
268
|
if (message.structValue !== undefined) {
|
|
257
|
-
Struct.encode(Struct.wrap(message.structValue), writer.uint32(42).fork()).
|
|
269
|
+
Struct.encode(Struct.wrap(message.structValue), writer.uint32(42).fork()).join();
|
|
258
270
|
}
|
|
259
271
|
if (message.listValue !== undefined) {
|
|
260
|
-
ListValue.encode(ListValue.wrap(message.listValue), writer.uint32(50).fork()).
|
|
272
|
+
ListValue.encode(ListValue.wrap(message.listValue), writer.uint32(50).fork()).join();
|
|
261
273
|
}
|
|
262
274
|
return writer;
|
|
263
275
|
},
|
|
264
276
|
|
|
265
|
-
decode(input:
|
|
266
|
-
const reader = input instanceof
|
|
267
|
-
|
|
277
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Value {
|
|
278
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
279
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
268
280
|
const message = createBaseValue();
|
|
269
281
|
while (reader.pos < end) {
|
|
270
282
|
const tag = reader.uint32();
|
|
271
283
|
switch (tag >>> 3) {
|
|
272
|
-
case 1:
|
|
284
|
+
case 1: {
|
|
273
285
|
if (tag !== 8) {
|
|
274
286
|
break;
|
|
275
287
|
}
|
|
276
288
|
|
|
277
289
|
message.nullValue = reader.int32() as any;
|
|
278
290
|
continue;
|
|
279
|
-
|
|
291
|
+
}
|
|
292
|
+
case 2: {
|
|
280
293
|
if (tag !== 17) {
|
|
281
294
|
break;
|
|
282
295
|
}
|
|
283
296
|
|
|
284
297
|
message.numberValue = reader.double();
|
|
285
298
|
continue;
|
|
286
|
-
|
|
299
|
+
}
|
|
300
|
+
case 3: {
|
|
287
301
|
if (tag !== 26) {
|
|
288
302
|
break;
|
|
289
303
|
}
|
|
290
304
|
|
|
291
305
|
message.stringValue = reader.string();
|
|
292
306
|
continue;
|
|
293
|
-
|
|
307
|
+
}
|
|
308
|
+
case 4: {
|
|
294
309
|
if (tag !== 32) {
|
|
295
310
|
break;
|
|
296
311
|
}
|
|
297
312
|
|
|
298
313
|
message.boolValue = reader.bool();
|
|
299
314
|
continue;
|
|
300
|
-
|
|
315
|
+
}
|
|
316
|
+
case 5: {
|
|
301
317
|
if (tag !== 42) {
|
|
302
318
|
break;
|
|
303
319
|
}
|
|
304
320
|
|
|
305
321
|
message.structValue = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
|
306
322
|
continue;
|
|
307
|
-
|
|
323
|
+
}
|
|
324
|
+
case 6: {
|
|
308
325
|
if (tag !== 50) {
|
|
309
326
|
break;
|
|
310
327
|
}
|
|
311
328
|
|
|
312
329
|
message.listValue = ListValue.unwrap(ListValue.decode(reader, reader.uint32()));
|
|
313
330
|
continue;
|
|
331
|
+
}
|
|
314
332
|
}
|
|
315
333
|
if ((tag & 7) === 4 || tag === 0) {
|
|
316
334
|
break;
|
|
317
335
|
}
|
|
318
|
-
reader.
|
|
336
|
+
reader.skip(tag & 7);
|
|
319
337
|
}
|
|
320
338
|
return message;
|
|
321
339
|
},
|
|
322
340
|
|
|
323
341
|
fromJSON(object: any): Value {
|
|
324
342
|
return {
|
|
325
|
-
nullValue: isSet(object.nullValue)
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
343
|
+
nullValue: isSet(object.nullValue)
|
|
344
|
+
? nullValueFromJSON(object.nullValue)
|
|
345
|
+
: isSet(object.null_value)
|
|
346
|
+
? nullValueFromJSON(object.null_value)
|
|
347
|
+
: undefined,
|
|
348
|
+
numberValue: isSet(object.numberValue)
|
|
349
|
+
? globalThis.Number(object.numberValue)
|
|
350
|
+
: isSet(object.number_value)
|
|
351
|
+
? globalThis.Number(object.number_value)
|
|
352
|
+
: undefined,
|
|
353
|
+
stringValue: isSet(object.stringValue)
|
|
354
|
+
? globalThis.String(object.stringValue)
|
|
355
|
+
: isSet(object.string_value)
|
|
356
|
+
? globalThis.String(object.string_value)
|
|
357
|
+
: undefined,
|
|
358
|
+
boolValue: isSet(object.boolValue)
|
|
359
|
+
? globalThis.Boolean(object.boolValue)
|
|
360
|
+
: isSet(object.bool_value)
|
|
361
|
+
? globalThis.Boolean(object.bool_value)
|
|
362
|
+
: undefined,
|
|
363
|
+
structValue: isObject(object.structValue)
|
|
364
|
+
? object.structValue
|
|
365
|
+
: isObject(object.struct_value)
|
|
366
|
+
? object.struct_value
|
|
367
|
+
: undefined,
|
|
368
|
+
listValue: globalThis.Array.isArray(object.listValue)
|
|
369
|
+
? [...object.listValue]
|
|
370
|
+
: globalThis.Array.isArray(object.list_value)
|
|
371
|
+
? [...object.list_value]
|
|
372
|
+
: undefined,
|
|
331
373
|
};
|
|
332
374
|
},
|
|
333
375
|
|
|
@@ -410,33 +452,34 @@ function createBaseListValue(): ListValue {
|
|
|
410
452
|
return { values: [] };
|
|
411
453
|
}
|
|
412
454
|
|
|
413
|
-
export const ListValue = {
|
|
414
|
-
encode(message: ListValue, writer:
|
|
455
|
+
export const ListValue: MessageFns<ListValue> & ListValueWrapperFns = {
|
|
456
|
+
encode(message: ListValue, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
415
457
|
for (const v of message.values) {
|
|
416
|
-
Value.encode(Value.wrap(v!), writer.uint32(10).fork()).
|
|
458
|
+
Value.encode(Value.wrap(v!), writer.uint32(10).fork()).join();
|
|
417
459
|
}
|
|
418
460
|
return writer;
|
|
419
461
|
},
|
|
420
462
|
|
|
421
|
-
decode(input:
|
|
422
|
-
const reader = input instanceof
|
|
423
|
-
|
|
463
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListValue {
|
|
464
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
465
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
424
466
|
const message = createBaseListValue();
|
|
425
467
|
while (reader.pos < end) {
|
|
426
468
|
const tag = reader.uint32();
|
|
427
469
|
switch (tag >>> 3) {
|
|
428
|
-
case 1:
|
|
470
|
+
case 1: {
|
|
429
471
|
if (tag !== 10) {
|
|
430
472
|
break;
|
|
431
473
|
}
|
|
432
474
|
|
|
433
475
|
message.values.push(Value.unwrap(Value.decode(reader, reader.uint32())));
|
|
434
476
|
continue;
|
|
477
|
+
}
|
|
435
478
|
}
|
|
436
479
|
if ((tag & 7) === 4 || tag === 0) {
|
|
437
480
|
break;
|
|
438
481
|
}
|
|
439
|
-
reader.
|
|
482
|
+
reader.skip(tag & 7);
|
|
440
483
|
}
|
|
441
484
|
return message;
|
|
442
485
|
},
|
|
@@ -492,3 +535,27 @@ function isObject(value: any): boolean {
|
|
|
492
535
|
function isSet(value: any): boolean {
|
|
493
536
|
return value !== null && value !== undefined;
|
|
494
537
|
}
|
|
538
|
+
|
|
539
|
+
interface MessageFns<T> {
|
|
540
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
541
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
542
|
+
fromJSON(object: any): T;
|
|
543
|
+
toJSON(message: T): unknown;
|
|
544
|
+
create(base?: DeepPartial<T>): T;
|
|
545
|
+
fromPartial(object: DeepPartial<T>): T;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
interface StructWrapperFns {
|
|
549
|
+
wrap(object: { [key: string]: any } | undefined): Struct;
|
|
550
|
+
unwrap(message: Struct): { [key: string]: any };
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
interface AnyValueWrapperFns {
|
|
554
|
+
wrap(value: any): Value;
|
|
555
|
+
unwrap(message: any): string | number | boolean | Object | null | Array<any> | undefined;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
interface ListValueWrapperFns {
|
|
559
|
+
wrap(array: Array<any> | undefined): ListValue;
|
|
560
|
+
unwrap(message: ListValue): Array<any>;
|
|
561
|
+
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.8-patch.2
|
|
4
|
+
// protoc v6.33.5
|
|
5
|
+
// source: google/protobuf/timestamp.proto
|
|
6
|
+
|
|
1
7
|
/* eslint-disable */
|
|
2
|
-
import
|
|
3
|
-
import _m0 from "protobufjs/minimal.js";
|
|
8
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
4
9
|
|
|
5
10
|
export interface Timestamp {
|
|
6
11
|
seconds: bigint;
|
|
@@ -8,16 +13,16 @@ export interface Timestamp {
|
|
|
8
13
|
}
|
|
9
14
|
|
|
10
15
|
function createBaseTimestamp(): Timestamp {
|
|
11
|
-
return { seconds:
|
|
16
|
+
return { seconds: 0n, nanos: 0 };
|
|
12
17
|
}
|
|
13
18
|
|
|
14
|
-
export const Timestamp = {
|
|
15
|
-
encode(message: Timestamp, writer:
|
|
16
|
-
if (message.seconds !==
|
|
19
|
+
export const Timestamp: MessageFns<Timestamp> = {
|
|
20
|
+
encode(message: Timestamp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
21
|
+
if (message.seconds !== 0n) {
|
|
17
22
|
if (BigInt.asIntN(64, message.seconds) !== message.seconds) {
|
|
18
23
|
throw new globalThis.Error("value provided for field message.seconds of type int64 too large");
|
|
19
24
|
}
|
|
20
|
-
writer.uint32(8).int64(message.seconds
|
|
25
|
+
writer.uint32(8).int64(message.seconds);
|
|
21
26
|
}
|
|
22
27
|
if (message.nanos !== 0) {
|
|
23
28
|
writer.uint32(16).int32(message.nanos);
|
|
@@ -25,46 +30,48 @@ export const Timestamp = {
|
|
|
25
30
|
return writer;
|
|
26
31
|
},
|
|
27
32
|
|
|
28
|
-
decode(input:
|
|
29
|
-
const reader = input instanceof
|
|
30
|
-
|
|
33
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Timestamp {
|
|
34
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
35
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
31
36
|
const message = createBaseTimestamp();
|
|
32
37
|
while (reader.pos < end) {
|
|
33
38
|
const tag = reader.uint32();
|
|
34
39
|
switch (tag >>> 3) {
|
|
35
|
-
case 1:
|
|
40
|
+
case 1: {
|
|
36
41
|
if (tag !== 8) {
|
|
37
42
|
break;
|
|
38
43
|
}
|
|
39
44
|
|
|
40
|
-
message.seconds =
|
|
45
|
+
message.seconds = reader.int64() as bigint;
|
|
41
46
|
continue;
|
|
42
|
-
|
|
47
|
+
}
|
|
48
|
+
case 2: {
|
|
43
49
|
if (tag !== 16) {
|
|
44
50
|
break;
|
|
45
51
|
}
|
|
46
52
|
|
|
47
53
|
message.nanos = reader.int32();
|
|
48
54
|
continue;
|
|
55
|
+
}
|
|
49
56
|
}
|
|
50
57
|
if ((tag & 7) === 4 || tag === 0) {
|
|
51
58
|
break;
|
|
52
59
|
}
|
|
53
|
-
reader.
|
|
60
|
+
reader.skip(tag & 7);
|
|
54
61
|
}
|
|
55
62
|
return message;
|
|
56
63
|
},
|
|
57
64
|
|
|
58
65
|
fromJSON(object: any): Timestamp {
|
|
59
66
|
return {
|
|
60
|
-
seconds: isSet(object.seconds) ? BigInt(object.seconds) :
|
|
67
|
+
seconds: isSet(object.seconds) ? BigInt(object.seconds) : 0n,
|
|
61
68
|
nanos: isSet(object.nanos) ? globalThis.Number(object.nanos) : 0,
|
|
62
69
|
};
|
|
63
70
|
},
|
|
64
71
|
|
|
65
72
|
toJSON(message: Timestamp): unknown {
|
|
66
73
|
const obj: any = {};
|
|
67
|
-
if (message.seconds !==
|
|
74
|
+
if (message.seconds !== 0n) {
|
|
68
75
|
obj.seconds = message.seconds.toString();
|
|
69
76
|
}
|
|
70
77
|
if (message.nanos !== 0) {
|
|
@@ -78,7 +85,7 @@ export const Timestamp = {
|
|
|
78
85
|
},
|
|
79
86
|
fromPartial(object: DeepPartial<Timestamp>): Timestamp {
|
|
80
87
|
const message = createBaseTimestamp();
|
|
81
|
-
message.seconds = object.seconds ??
|
|
88
|
+
message.seconds = object.seconds ?? 0n;
|
|
82
89
|
message.nanos = object.nanos ?? 0;
|
|
83
90
|
return message;
|
|
84
91
|
},
|
|
@@ -92,15 +99,15 @@ type DeepPartial<T> = T extends Builtin ? T
|
|
|
92
99
|
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
93
100
|
: Partial<T>;
|
|
94
101
|
|
|
95
|
-
function longToBigint(long: Long) {
|
|
96
|
-
return BigInt(long.toString());
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
if (_m0.util.Long !== Long) {
|
|
100
|
-
_m0.util.Long = Long as any;
|
|
101
|
-
_m0.configure();
|
|
102
|
-
}
|
|
103
|
-
|
|
104
102
|
function isSet(value: any): boolean {
|
|
105
103
|
return value !== null && value !== undefined;
|
|
106
104
|
}
|
|
105
|
+
|
|
106
|
+
interface MessageFns<T> {
|
|
107
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
108
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
109
|
+
fromJSON(object: any): T;
|
|
110
|
+
toJSON(message: T): unknown;
|
|
111
|
+
create(base?: DeepPartial<T>): T;
|
|
112
|
+
fromPartial(object: DeepPartial<T>): T;
|
|
113
|
+
}
|