@ottochain/sdk 1.4.1 → 1.4.2
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/esm/apps/contracts/index.js +10 -28
- package/dist/esm/apps/corporate/index.js +24 -79
- package/dist/esm/apps/governance/index.js +36 -85
- package/dist/esm/apps/identity/constants.js +22 -27
- package/dist/esm/apps/identity/index.js +7 -35
- package/dist/esm/apps/index.js +6 -32
- package/dist/esm/apps/markets/index.js +6 -27
- package/dist/esm/apps/oracles/index.js +7 -27
- package/dist/esm/errors.js +9 -19
- package/dist/esm/generated/google/protobuf/struct.js +33 -39
- package/dist/esm/generated/google/protobuf/timestamp.js +6 -9
- package/dist/esm/generated/index.js +10 -134
- package/dist/esm/generated/ottochain/apps/contracts/v1/contract.js +48 -54
- package/dist/esm/generated/ottochain/apps/corporate/v1/corporate.js +335 -357
- package/dist/esm/generated/ottochain/apps/governance/v1/governance.js +284 -299
- package/dist/esm/generated/ottochain/apps/identity/v1/agent.js +38 -47
- package/dist/esm/generated/ottochain/apps/identity/v1/attestation.js +44 -50
- package/dist/esm/generated/ottochain/apps/markets/v1/market.js +77 -86
- package/dist/esm/generated/ottochain/apps/oracles/v1/oracle.js +66 -72
- package/dist/esm/generated/ottochain/v1/common.js +1 -4
- package/dist/esm/generated/ottochain/v1/fiber.js +90 -96
- package/dist/esm/generated/ottochain/v1/messages.js +79 -82
- package/dist/esm/generated/ottochain/v1/records.js +137 -140
- package/dist/esm/index.js +13 -70
- package/dist/esm/ottochain/drop-nulls.js +1 -5
- package/dist/esm/ottochain/index.js +6 -54
- package/dist/esm/ottochain/metagraph-client.js +12 -16
- package/dist/esm/ottochain/normalize.js +4 -11
- package/dist/esm/ottochain/snapshot.js +10 -20
- package/dist/esm/ottochain/transaction.js +13 -25
- package/dist/esm/ottochain/types.js +1 -2
- package/dist/esm/types.js +2 -7
- package/dist/esm/validation.js +65 -76
- package/dist/esm/verify.js +3 -7
- package/package.json +1 -1
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
2
|
// versions:
|
|
4
3
|
// protoc-gen-ts_proto v2.11.2
|
|
5
4
|
// protoc unknown
|
|
6
5
|
// source: ottochain/v1/records.proto
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.CalculatedState_ScriptsEntry = exports.CalculatedState_StateMachinesEntry = exports.CalculatedState = exports.FiberLogEntryList = exports.OnChainState_LatestLogsEntry = exports.OnChainState_FiberCommitsEntry = exports.OnChainState = exports.FiberCommit = exports.ScriptFiberRecord = exports.StateMachineFiberRecord = exports.protobufPackage = void 0;
|
|
9
6
|
/* eslint-disable */
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
8
|
+
import { Value } from "../../google/protobuf/struct.js";
|
|
9
|
+
import { AccessControlPolicy, EventReceipt, FiberLogEntry, FiberStatus, fiberStatusFromJSON, fiberStatusToJSON, fiberStatusToNumber, ScriptInvocation, StateMachineDefinition, } from "./fiber.js";
|
|
10
|
+
export const protobufPackage = "ottochain.v1";
|
|
14
11
|
function createBaseStateMachineFiberRecord() {
|
|
15
12
|
return {
|
|
16
13
|
fiberId: "",
|
|
@@ -23,14 +20,14 @@ function createBaseStateMachineFiberRecord() {
|
|
|
23
20
|
stateDataHash: "",
|
|
24
21
|
sequenceNumber: 0,
|
|
25
22
|
owners: [],
|
|
26
|
-
status:
|
|
23
|
+
status: FiberStatus.FIBER_STATUS_UNSPECIFIED,
|
|
27
24
|
lastReceipt: undefined,
|
|
28
25
|
parentFiberId: undefined,
|
|
29
26
|
childFiberIds: [],
|
|
30
27
|
};
|
|
31
28
|
}
|
|
32
|
-
|
|
33
|
-
encode(message, writer = new
|
|
29
|
+
export const StateMachineFiberRecord = {
|
|
30
|
+
encode(message, writer = new BinaryWriter()) {
|
|
34
31
|
if (message.fiberId !== "") {
|
|
35
32
|
writer.uint32(10).string(message.fiberId);
|
|
36
33
|
}
|
|
@@ -44,13 +41,13 @@ exports.StateMachineFiberRecord = {
|
|
|
44
41
|
writer.uint32(32).int64(message.latestUpdateOrdinal);
|
|
45
42
|
}
|
|
46
43
|
if (message.definition !== undefined) {
|
|
47
|
-
|
|
44
|
+
StateMachineDefinition.encode(message.definition, writer.uint32(42).fork()).join();
|
|
48
45
|
}
|
|
49
46
|
if (message.currentState !== "") {
|
|
50
47
|
writer.uint32(50).string(message.currentState);
|
|
51
48
|
}
|
|
52
49
|
if (message.stateData !== undefined) {
|
|
53
|
-
|
|
50
|
+
Value.encode(Value.wrap(message.stateData), writer.uint32(58).fork()).join();
|
|
54
51
|
}
|
|
55
52
|
if (message.stateDataHash !== "") {
|
|
56
53
|
writer.uint32(66).string(message.stateDataHash);
|
|
@@ -61,11 +58,11 @@ exports.StateMachineFiberRecord = {
|
|
|
61
58
|
for (const v of message.owners) {
|
|
62
59
|
writer.uint32(82).string(v);
|
|
63
60
|
}
|
|
64
|
-
if (message.status !==
|
|
65
|
-
writer.uint32(88).int32(
|
|
61
|
+
if (message.status !== FiberStatus.FIBER_STATUS_UNSPECIFIED) {
|
|
62
|
+
writer.uint32(88).int32(fiberStatusToNumber(message.status));
|
|
66
63
|
}
|
|
67
64
|
if (message.lastReceipt !== undefined) {
|
|
68
|
-
|
|
65
|
+
EventReceipt.encode(message.lastReceipt, writer.uint32(98).fork()).join();
|
|
69
66
|
}
|
|
70
67
|
if (message.parentFiberId !== undefined) {
|
|
71
68
|
writer.uint32(106).string(message.parentFiberId);
|
|
@@ -76,7 +73,7 @@ exports.StateMachineFiberRecord = {
|
|
|
76
73
|
return writer;
|
|
77
74
|
},
|
|
78
75
|
decode(input, length) {
|
|
79
|
-
const reader = input instanceof
|
|
76
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
80
77
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
81
78
|
const message = createBaseStateMachineFiberRecord();
|
|
82
79
|
while (reader.pos < end) {
|
|
@@ -114,7 +111,7 @@ exports.StateMachineFiberRecord = {
|
|
|
114
111
|
if (tag !== 42) {
|
|
115
112
|
break;
|
|
116
113
|
}
|
|
117
|
-
message.definition =
|
|
114
|
+
message.definition = StateMachineDefinition.decode(reader, reader.uint32());
|
|
118
115
|
continue;
|
|
119
116
|
}
|
|
120
117
|
case 6: {
|
|
@@ -128,7 +125,7 @@ exports.StateMachineFiberRecord = {
|
|
|
128
125
|
if (tag !== 58) {
|
|
129
126
|
break;
|
|
130
127
|
}
|
|
131
|
-
message.stateData =
|
|
128
|
+
message.stateData = Value.unwrap(Value.decode(reader, reader.uint32()));
|
|
132
129
|
continue;
|
|
133
130
|
}
|
|
134
131
|
case 8: {
|
|
@@ -156,14 +153,14 @@ exports.StateMachineFiberRecord = {
|
|
|
156
153
|
if (tag !== 88) {
|
|
157
154
|
break;
|
|
158
155
|
}
|
|
159
|
-
message.status =
|
|
156
|
+
message.status = fiberStatusFromJSON(reader.int32());
|
|
160
157
|
continue;
|
|
161
158
|
}
|
|
162
159
|
case 12: {
|
|
163
160
|
if (tag !== 98) {
|
|
164
161
|
break;
|
|
165
162
|
}
|
|
166
|
-
message.lastReceipt =
|
|
163
|
+
message.lastReceipt = EventReceipt.decode(reader, reader.uint32());
|
|
167
164
|
continue;
|
|
168
165
|
}
|
|
169
166
|
case 13: {
|
|
@@ -210,7 +207,7 @@ exports.StateMachineFiberRecord = {
|
|
|
210
207
|
: isSet(object.latest_update_ordinal)
|
|
211
208
|
? globalThis.Number(object.latest_update_ordinal)
|
|
212
209
|
: 0,
|
|
213
|
-
definition: isSet(object.definition) ?
|
|
210
|
+
definition: isSet(object.definition) ? StateMachineDefinition.fromJSON(object.definition) : undefined,
|
|
214
211
|
currentState: isSet(object.currentState)
|
|
215
212
|
? globalThis.String(object.currentState)
|
|
216
213
|
: isSet(object.current_state)
|
|
@@ -232,11 +229,11 @@ exports.StateMachineFiberRecord = {
|
|
|
232
229
|
? globalThis.Number(object.sequence_number)
|
|
233
230
|
: 0,
|
|
234
231
|
owners: globalThis.Array.isArray(object?.owners) ? object.owners.map((e) => globalThis.String(e)) : [],
|
|
235
|
-
status: isSet(object.status) ?
|
|
232
|
+
status: isSet(object.status) ? fiberStatusFromJSON(object.status) : FiberStatus.FIBER_STATUS_UNSPECIFIED,
|
|
236
233
|
lastReceipt: isSet(object.lastReceipt)
|
|
237
|
-
?
|
|
234
|
+
? EventReceipt.fromJSON(object.lastReceipt)
|
|
238
235
|
: isSet(object.last_receipt)
|
|
239
|
-
?
|
|
236
|
+
? EventReceipt.fromJSON(object.last_receipt)
|
|
240
237
|
: undefined,
|
|
241
238
|
parentFiberId: isSet(object.parentFiberId)
|
|
242
239
|
? globalThis.String(object.parentFiberId)
|
|
@@ -265,7 +262,7 @@ exports.StateMachineFiberRecord = {
|
|
|
265
262
|
obj.latestUpdateOrdinal = Math.round(message.latestUpdateOrdinal);
|
|
266
263
|
}
|
|
267
264
|
if (message.definition !== undefined) {
|
|
268
|
-
obj.definition =
|
|
265
|
+
obj.definition = StateMachineDefinition.toJSON(message.definition);
|
|
269
266
|
}
|
|
270
267
|
if (message.currentState !== "") {
|
|
271
268
|
obj.currentState = message.currentState;
|
|
@@ -282,11 +279,11 @@ exports.StateMachineFiberRecord = {
|
|
|
282
279
|
if (message.owners?.length) {
|
|
283
280
|
obj.owners = message.owners;
|
|
284
281
|
}
|
|
285
|
-
if (message.status !==
|
|
286
|
-
obj.status =
|
|
282
|
+
if (message.status !== FiberStatus.FIBER_STATUS_UNSPECIFIED) {
|
|
283
|
+
obj.status = fiberStatusToJSON(message.status);
|
|
287
284
|
}
|
|
288
285
|
if (message.lastReceipt !== undefined) {
|
|
289
|
-
obj.lastReceipt =
|
|
286
|
+
obj.lastReceipt = EventReceipt.toJSON(message.lastReceipt);
|
|
290
287
|
}
|
|
291
288
|
if (message.parentFiberId !== undefined) {
|
|
292
289
|
obj.parentFiberId = message.parentFiberId;
|
|
@@ -297,7 +294,7 @@ exports.StateMachineFiberRecord = {
|
|
|
297
294
|
return obj;
|
|
298
295
|
},
|
|
299
296
|
create(base) {
|
|
300
|
-
return
|
|
297
|
+
return StateMachineFiberRecord.fromPartial(base ?? {});
|
|
301
298
|
},
|
|
302
299
|
fromPartial(object) {
|
|
303
300
|
const message = createBaseStateMachineFiberRecord();
|
|
@@ -306,16 +303,16 @@ exports.StateMachineFiberRecord = {
|
|
|
306
303
|
message.previousUpdateOrdinal = object.previousUpdateOrdinal ?? 0;
|
|
307
304
|
message.latestUpdateOrdinal = object.latestUpdateOrdinal ?? 0;
|
|
308
305
|
message.definition = (object.definition !== undefined && object.definition !== null)
|
|
309
|
-
?
|
|
306
|
+
? StateMachineDefinition.fromPartial(object.definition)
|
|
310
307
|
: undefined;
|
|
311
308
|
message.currentState = object.currentState ?? "";
|
|
312
309
|
message.stateData = object.stateData ?? undefined;
|
|
313
310
|
message.stateDataHash = object.stateDataHash ?? "";
|
|
314
311
|
message.sequenceNumber = object.sequenceNumber ?? 0;
|
|
315
312
|
message.owners = object.owners?.map((e) => e) || [];
|
|
316
|
-
message.status = object.status ??
|
|
313
|
+
message.status = object.status ?? FiberStatus.FIBER_STATUS_UNSPECIFIED;
|
|
317
314
|
message.lastReceipt = (object.lastReceipt !== undefined && object.lastReceipt !== null)
|
|
318
|
-
?
|
|
315
|
+
? EventReceipt.fromPartial(object.lastReceipt)
|
|
319
316
|
: undefined;
|
|
320
317
|
message.parentFiberId = object.parentFiberId ?? undefined;
|
|
321
318
|
message.childFiberIds = object.childFiberIds?.map((e) => e) || [];
|
|
@@ -333,12 +330,12 @@ function createBaseScriptFiberRecord() {
|
|
|
333
330
|
accessControl: undefined,
|
|
334
331
|
sequenceNumber: 0,
|
|
335
332
|
owners: [],
|
|
336
|
-
status:
|
|
333
|
+
status: FiberStatus.FIBER_STATUS_UNSPECIFIED,
|
|
337
334
|
lastInvocation: undefined,
|
|
338
335
|
};
|
|
339
336
|
}
|
|
340
|
-
|
|
341
|
-
encode(message, writer = new
|
|
337
|
+
export const ScriptFiberRecord = {
|
|
338
|
+
encode(message, writer = new BinaryWriter()) {
|
|
342
339
|
if (message.fiberId !== "") {
|
|
343
340
|
writer.uint32(10).string(message.fiberId);
|
|
344
341
|
}
|
|
@@ -349,16 +346,16 @@ exports.ScriptFiberRecord = {
|
|
|
349
346
|
writer.uint32(24).int64(message.latestUpdateOrdinal);
|
|
350
347
|
}
|
|
351
348
|
if (message.scriptProgram !== undefined) {
|
|
352
|
-
|
|
349
|
+
Value.encode(Value.wrap(message.scriptProgram), writer.uint32(34).fork()).join();
|
|
353
350
|
}
|
|
354
351
|
if (message.stateData !== undefined) {
|
|
355
|
-
|
|
352
|
+
Value.encode(Value.wrap(message.stateData), writer.uint32(42).fork()).join();
|
|
356
353
|
}
|
|
357
354
|
if (message.stateDataHash !== undefined) {
|
|
358
355
|
writer.uint32(50).string(message.stateDataHash);
|
|
359
356
|
}
|
|
360
357
|
if (message.accessControl !== undefined) {
|
|
361
|
-
|
|
358
|
+
AccessControlPolicy.encode(message.accessControl, writer.uint32(58).fork()).join();
|
|
362
359
|
}
|
|
363
360
|
if (message.sequenceNumber !== 0) {
|
|
364
361
|
writer.uint32(64).int64(message.sequenceNumber);
|
|
@@ -366,16 +363,16 @@ exports.ScriptFiberRecord = {
|
|
|
366
363
|
for (const v of message.owners) {
|
|
367
364
|
writer.uint32(74).string(v);
|
|
368
365
|
}
|
|
369
|
-
if (message.status !==
|
|
370
|
-
writer.uint32(80).int32(
|
|
366
|
+
if (message.status !== FiberStatus.FIBER_STATUS_UNSPECIFIED) {
|
|
367
|
+
writer.uint32(80).int32(fiberStatusToNumber(message.status));
|
|
371
368
|
}
|
|
372
369
|
if (message.lastInvocation !== undefined) {
|
|
373
|
-
|
|
370
|
+
ScriptInvocation.encode(message.lastInvocation, writer.uint32(90).fork()).join();
|
|
374
371
|
}
|
|
375
372
|
return writer;
|
|
376
373
|
},
|
|
377
374
|
decode(input, length) {
|
|
378
|
-
const reader = input instanceof
|
|
375
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
379
376
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
380
377
|
const message = createBaseScriptFiberRecord();
|
|
381
378
|
while (reader.pos < end) {
|
|
@@ -406,14 +403,14 @@ exports.ScriptFiberRecord = {
|
|
|
406
403
|
if (tag !== 34) {
|
|
407
404
|
break;
|
|
408
405
|
}
|
|
409
|
-
message.scriptProgram =
|
|
406
|
+
message.scriptProgram = Value.unwrap(Value.decode(reader, reader.uint32()));
|
|
410
407
|
continue;
|
|
411
408
|
}
|
|
412
409
|
case 5: {
|
|
413
410
|
if (tag !== 42) {
|
|
414
411
|
break;
|
|
415
412
|
}
|
|
416
|
-
message.stateData =
|
|
413
|
+
message.stateData = Value.unwrap(Value.decode(reader, reader.uint32()));
|
|
417
414
|
continue;
|
|
418
415
|
}
|
|
419
416
|
case 6: {
|
|
@@ -427,7 +424,7 @@ exports.ScriptFiberRecord = {
|
|
|
427
424
|
if (tag !== 58) {
|
|
428
425
|
break;
|
|
429
426
|
}
|
|
430
|
-
message.accessControl =
|
|
427
|
+
message.accessControl = AccessControlPolicy.decode(reader, reader.uint32());
|
|
431
428
|
continue;
|
|
432
429
|
}
|
|
433
430
|
case 8: {
|
|
@@ -448,14 +445,14 @@ exports.ScriptFiberRecord = {
|
|
|
448
445
|
if (tag !== 80) {
|
|
449
446
|
break;
|
|
450
447
|
}
|
|
451
|
-
message.status =
|
|
448
|
+
message.status = fiberStatusFromJSON(reader.int32());
|
|
452
449
|
continue;
|
|
453
450
|
}
|
|
454
451
|
case 11: {
|
|
455
452
|
if (tag !== 90) {
|
|
456
453
|
break;
|
|
457
454
|
}
|
|
458
|
-
message.lastInvocation =
|
|
455
|
+
message.lastInvocation = ScriptInvocation.decode(reader, reader.uint32());
|
|
459
456
|
continue;
|
|
460
457
|
}
|
|
461
458
|
}
|
|
@@ -499,9 +496,9 @@ exports.ScriptFiberRecord = {
|
|
|
499
496
|
? globalThis.String(object.state_data_hash)
|
|
500
497
|
: undefined,
|
|
501
498
|
accessControl: isSet(object.accessControl)
|
|
502
|
-
?
|
|
499
|
+
? AccessControlPolicy.fromJSON(object.accessControl)
|
|
503
500
|
: isSet(object.access_control)
|
|
504
|
-
?
|
|
501
|
+
? AccessControlPolicy.fromJSON(object.access_control)
|
|
505
502
|
: undefined,
|
|
506
503
|
sequenceNumber: isSet(object.sequenceNumber)
|
|
507
504
|
? globalThis.Number(object.sequenceNumber)
|
|
@@ -509,11 +506,11 @@ exports.ScriptFiberRecord = {
|
|
|
509
506
|
? globalThis.Number(object.sequence_number)
|
|
510
507
|
: 0,
|
|
511
508
|
owners: globalThis.Array.isArray(object?.owners) ? object.owners.map((e) => globalThis.String(e)) : [],
|
|
512
|
-
status: isSet(object.status) ?
|
|
509
|
+
status: isSet(object.status) ? fiberStatusFromJSON(object.status) : FiberStatus.FIBER_STATUS_UNSPECIFIED,
|
|
513
510
|
lastInvocation: isSet(object.lastInvocation)
|
|
514
|
-
?
|
|
511
|
+
? ScriptInvocation.fromJSON(object.lastInvocation)
|
|
515
512
|
: isSet(object.last_invocation)
|
|
516
|
-
?
|
|
513
|
+
? ScriptInvocation.fromJSON(object.last_invocation)
|
|
517
514
|
: undefined,
|
|
518
515
|
};
|
|
519
516
|
},
|
|
@@ -538,7 +535,7 @@ exports.ScriptFiberRecord = {
|
|
|
538
535
|
obj.stateDataHash = message.stateDataHash;
|
|
539
536
|
}
|
|
540
537
|
if (message.accessControl !== undefined) {
|
|
541
|
-
obj.accessControl =
|
|
538
|
+
obj.accessControl = AccessControlPolicy.toJSON(message.accessControl);
|
|
542
539
|
}
|
|
543
540
|
if (message.sequenceNumber !== 0) {
|
|
544
541
|
obj.sequenceNumber = Math.round(message.sequenceNumber);
|
|
@@ -546,16 +543,16 @@ exports.ScriptFiberRecord = {
|
|
|
546
543
|
if (message.owners?.length) {
|
|
547
544
|
obj.owners = message.owners;
|
|
548
545
|
}
|
|
549
|
-
if (message.status !==
|
|
550
|
-
obj.status =
|
|
546
|
+
if (message.status !== FiberStatus.FIBER_STATUS_UNSPECIFIED) {
|
|
547
|
+
obj.status = fiberStatusToJSON(message.status);
|
|
551
548
|
}
|
|
552
549
|
if (message.lastInvocation !== undefined) {
|
|
553
|
-
obj.lastInvocation =
|
|
550
|
+
obj.lastInvocation = ScriptInvocation.toJSON(message.lastInvocation);
|
|
554
551
|
}
|
|
555
552
|
return obj;
|
|
556
553
|
},
|
|
557
554
|
create(base) {
|
|
558
|
-
return
|
|
555
|
+
return ScriptFiberRecord.fromPartial(base ?? {});
|
|
559
556
|
},
|
|
560
557
|
fromPartial(object) {
|
|
561
558
|
const message = createBaseScriptFiberRecord();
|
|
@@ -566,13 +563,13 @@ exports.ScriptFiberRecord = {
|
|
|
566
563
|
message.stateData = object.stateData ?? undefined;
|
|
567
564
|
message.stateDataHash = object.stateDataHash ?? undefined;
|
|
568
565
|
message.accessControl = (object.accessControl !== undefined && object.accessControl !== null)
|
|
569
|
-
?
|
|
566
|
+
? AccessControlPolicy.fromPartial(object.accessControl)
|
|
570
567
|
: undefined;
|
|
571
568
|
message.sequenceNumber = object.sequenceNumber ?? 0;
|
|
572
569
|
message.owners = object.owners?.map((e) => e) || [];
|
|
573
|
-
message.status = object.status ??
|
|
570
|
+
message.status = object.status ?? FiberStatus.FIBER_STATUS_UNSPECIFIED;
|
|
574
571
|
message.lastInvocation = (object.lastInvocation !== undefined && object.lastInvocation !== null)
|
|
575
|
-
?
|
|
572
|
+
? ScriptInvocation.fromPartial(object.lastInvocation)
|
|
576
573
|
: undefined;
|
|
577
574
|
return message;
|
|
578
575
|
},
|
|
@@ -580,8 +577,8 @@ exports.ScriptFiberRecord = {
|
|
|
580
577
|
function createBaseFiberCommit() {
|
|
581
578
|
return { recordHash: "", stateDataHash: undefined, sequenceNumber: 0 };
|
|
582
579
|
}
|
|
583
|
-
|
|
584
|
-
encode(message, writer = new
|
|
580
|
+
export const FiberCommit = {
|
|
581
|
+
encode(message, writer = new BinaryWriter()) {
|
|
585
582
|
if (message.recordHash !== "") {
|
|
586
583
|
writer.uint32(10).string(message.recordHash);
|
|
587
584
|
}
|
|
@@ -594,7 +591,7 @@ exports.FiberCommit = {
|
|
|
594
591
|
return writer;
|
|
595
592
|
},
|
|
596
593
|
decode(input, length) {
|
|
597
|
-
const reader = input instanceof
|
|
594
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
598
595
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
599
596
|
const message = createBaseFiberCommit();
|
|
600
597
|
while (reader.pos < end) {
|
|
@@ -662,7 +659,7 @@ exports.FiberCommit = {
|
|
|
662
659
|
return obj;
|
|
663
660
|
},
|
|
664
661
|
create(base) {
|
|
665
|
-
return
|
|
662
|
+
return FiberCommit.fromPartial(base ?? {});
|
|
666
663
|
},
|
|
667
664
|
fromPartial(object) {
|
|
668
665
|
const message = createBaseFiberCommit();
|
|
@@ -675,18 +672,18 @@ exports.FiberCommit = {
|
|
|
675
672
|
function createBaseOnChainState() {
|
|
676
673
|
return { fiberCommits: {}, latestLogs: {} };
|
|
677
674
|
}
|
|
678
|
-
|
|
679
|
-
encode(message, writer = new
|
|
675
|
+
export const OnChainState = {
|
|
676
|
+
encode(message, writer = new BinaryWriter()) {
|
|
680
677
|
globalThis.Object.entries(message.fiberCommits).forEach(([key, value]) => {
|
|
681
|
-
|
|
678
|
+
OnChainState_FiberCommitsEntry.encode({ key: key, value }, writer.uint32(10).fork()).join();
|
|
682
679
|
});
|
|
683
680
|
globalThis.Object.entries(message.latestLogs).forEach(([key, value]) => {
|
|
684
|
-
|
|
681
|
+
OnChainState_LatestLogsEntry.encode({ key: key, value }, writer.uint32(18).fork()).join();
|
|
685
682
|
});
|
|
686
683
|
return writer;
|
|
687
684
|
},
|
|
688
685
|
decode(input, length) {
|
|
689
|
-
const reader = input instanceof
|
|
686
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
690
687
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
691
688
|
const message = createBaseOnChainState();
|
|
692
689
|
while (reader.pos < end) {
|
|
@@ -696,7 +693,7 @@ exports.OnChainState = {
|
|
|
696
693
|
if (tag !== 10) {
|
|
697
694
|
break;
|
|
698
695
|
}
|
|
699
|
-
const entry1 =
|
|
696
|
+
const entry1 = OnChainState_FiberCommitsEntry.decode(reader, reader.uint32());
|
|
700
697
|
if (entry1.value !== undefined) {
|
|
701
698
|
message.fiberCommits[entry1.key] = entry1.value;
|
|
702
699
|
}
|
|
@@ -706,7 +703,7 @@ exports.OnChainState = {
|
|
|
706
703
|
if (tag !== 18) {
|
|
707
704
|
break;
|
|
708
705
|
}
|
|
709
|
-
const entry2 =
|
|
706
|
+
const entry2 = OnChainState_LatestLogsEntry.decode(reader, reader.uint32());
|
|
710
707
|
if (entry2.value !== undefined) {
|
|
711
708
|
message.latestLogs[entry2.key] = entry2.value;
|
|
712
709
|
}
|
|
@@ -724,23 +721,23 @@ exports.OnChainState = {
|
|
|
724
721
|
return {
|
|
725
722
|
fiberCommits: isObject(object.fiberCommits)
|
|
726
723
|
? globalThis.Object.entries(object.fiberCommits).reduce((acc, [key, value]) => {
|
|
727
|
-
acc[key] =
|
|
724
|
+
acc[key] = FiberCommit.fromJSON(value);
|
|
728
725
|
return acc;
|
|
729
726
|
}, {})
|
|
730
727
|
: isObject(object.fiber_commits)
|
|
731
728
|
? globalThis.Object.entries(object.fiber_commits).reduce((acc, [key, value]) => {
|
|
732
|
-
acc[key] =
|
|
729
|
+
acc[key] = FiberCommit.fromJSON(value);
|
|
733
730
|
return acc;
|
|
734
731
|
}, {})
|
|
735
732
|
: {},
|
|
736
733
|
latestLogs: isObject(object.latestLogs)
|
|
737
734
|
? globalThis.Object.entries(object.latestLogs).reduce((acc, [key, value]) => {
|
|
738
|
-
acc[key] =
|
|
735
|
+
acc[key] = FiberLogEntryList.fromJSON(value);
|
|
739
736
|
return acc;
|
|
740
737
|
}, {})
|
|
741
738
|
: isObject(object.latest_logs)
|
|
742
739
|
? globalThis.Object.entries(object.latest_logs).reduce((acc, [key, value]) => {
|
|
743
|
-
acc[key] =
|
|
740
|
+
acc[key] = FiberLogEntryList.fromJSON(value);
|
|
744
741
|
return acc;
|
|
745
742
|
}, {})
|
|
746
743
|
: {},
|
|
@@ -753,7 +750,7 @@ exports.OnChainState = {
|
|
|
753
750
|
if (entries.length > 0) {
|
|
754
751
|
obj.fiberCommits = {};
|
|
755
752
|
entries.forEach(([k, v]) => {
|
|
756
|
-
obj.fiberCommits[k] =
|
|
753
|
+
obj.fiberCommits[k] = FiberCommit.toJSON(v);
|
|
757
754
|
});
|
|
758
755
|
}
|
|
759
756
|
}
|
|
@@ -762,26 +759,26 @@ exports.OnChainState = {
|
|
|
762
759
|
if (entries.length > 0) {
|
|
763
760
|
obj.latestLogs = {};
|
|
764
761
|
entries.forEach(([k, v]) => {
|
|
765
|
-
obj.latestLogs[k] =
|
|
762
|
+
obj.latestLogs[k] = FiberLogEntryList.toJSON(v);
|
|
766
763
|
});
|
|
767
764
|
}
|
|
768
765
|
}
|
|
769
766
|
return obj;
|
|
770
767
|
},
|
|
771
768
|
create(base) {
|
|
772
|
-
return
|
|
769
|
+
return OnChainState.fromPartial(base ?? {});
|
|
773
770
|
},
|
|
774
771
|
fromPartial(object) {
|
|
775
772
|
const message = createBaseOnChainState();
|
|
776
773
|
message.fiberCommits = globalThis.Object.entries(object.fiberCommits ?? {}).reduce((acc, [key, value]) => {
|
|
777
774
|
if (value !== undefined) {
|
|
778
|
-
acc[key] =
|
|
775
|
+
acc[key] = FiberCommit.fromPartial(value);
|
|
779
776
|
}
|
|
780
777
|
return acc;
|
|
781
778
|
}, {});
|
|
782
779
|
message.latestLogs = globalThis.Object.entries(object.latestLogs ?? {}).reduce((acc, [key, value]) => {
|
|
783
780
|
if (value !== undefined) {
|
|
784
|
-
acc[key] =
|
|
781
|
+
acc[key] = FiberLogEntryList.fromPartial(value);
|
|
785
782
|
}
|
|
786
783
|
return acc;
|
|
787
784
|
}, {});
|
|
@@ -791,18 +788,18 @@ exports.OnChainState = {
|
|
|
791
788
|
function createBaseOnChainState_FiberCommitsEntry() {
|
|
792
789
|
return { key: "", value: undefined };
|
|
793
790
|
}
|
|
794
|
-
|
|
795
|
-
encode(message, writer = new
|
|
791
|
+
export const OnChainState_FiberCommitsEntry = {
|
|
792
|
+
encode(message, writer = new BinaryWriter()) {
|
|
796
793
|
if (message.key !== "") {
|
|
797
794
|
writer.uint32(10).string(message.key);
|
|
798
795
|
}
|
|
799
796
|
if (message.value !== undefined) {
|
|
800
|
-
|
|
797
|
+
FiberCommit.encode(message.value, writer.uint32(18).fork()).join();
|
|
801
798
|
}
|
|
802
799
|
return writer;
|
|
803
800
|
},
|
|
804
801
|
decode(input, length) {
|
|
805
|
-
const reader = input instanceof
|
|
802
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
806
803
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
807
804
|
const message = createBaseOnChainState_FiberCommitsEntry();
|
|
808
805
|
while (reader.pos < end) {
|
|
@@ -819,7 +816,7 @@ exports.OnChainState_FiberCommitsEntry = {
|
|
|
819
816
|
if (tag !== 18) {
|
|
820
817
|
break;
|
|
821
818
|
}
|
|
822
|
-
message.value =
|
|
819
|
+
message.value = FiberCommit.decode(reader, reader.uint32());
|
|
823
820
|
continue;
|
|
824
821
|
}
|
|
825
822
|
}
|
|
@@ -833,7 +830,7 @@ exports.OnChainState_FiberCommitsEntry = {
|
|
|
833
830
|
fromJSON(object) {
|
|
834
831
|
return {
|
|
835
832
|
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
836
|
-
value: isSet(object.value) ?
|
|
833
|
+
value: isSet(object.value) ? FiberCommit.fromJSON(object.value) : undefined,
|
|
837
834
|
};
|
|
838
835
|
},
|
|
839
836
|
toJSON(message) {
|
|
@@ -842,18 +839,18 @@ exports.OnChainState_FiberCommitsEntry = {
|
|
|
842
839
|
obj.key = message.key;
|
|
843
840
|
}
|
|
844
841
|
if (message.value !== undefined) {
|
|
845
|
-
obj.value =
|
|
842
|
+
obj.value = FiberCommit.toJSON(message.value);
|
|
846
843
|
}
|
|
847
844
|
return obj;
|
|
848
845
|
},
|
|
849
846
|
create(base) {
|
|
850
|
-
return
|
|
847
|
+
return OnChainState_FiberCommitsEntry.fromPartial(base ?? {});
|
|
851
848
|
},
|
|
852
849
|
fromPartial(object) {
|
|
853
850
|
const message = createBaseOnChainState_FiberCommitsEntry();
|
|
854
851
|
message.key = object.key ?? "";
|
|
855
852
|
message.value = (object.value !== undefined && object.value !== null)
|
|
856
|
-
?
|
|
853
|
+
? FiberCommit.fromPartial(object.value)
|
|
857
854
|
: undefined;
|
|
858
855
|
return message;
|
|
859
856
|
},
|
|
@@ -861,18 +858,18 @@ exports.OnChainState_FiberCommitsEntry = {
|
|
|
861
858
|
function createBaseOnChainState_LatestLogsEntry() {
|
|
862
859
|
return { key: "", value: undefined };
|
|
863
860
|
}
|
|
864
|
-
|
|
865
|
-
encode(message, writer = new
|
|
861
|
+
export const OnChainState_LatestLogsEntry = {
|
|
862
|
+
encode(message, writer = new BinaryWriter()) {
|
|
866
863
|
if (message.key !== "") {
|
|
867
864
|
writer.uint32(10).string(message.key);
|
|
868
865
|
}
|
|
869
866
|
if (message.value !== undefined) {
|
|
870
|
-
|
|
867
|
+
FiberLogEntryList.encode(message.value, writer.uint32(18).fork()).join();
|
|
871
868
|
}
|
|
872
869
|
return writer;
|
|
873
870
|
},
|
|
874
871
|
decode(input, length) {
|
|
875
|
-
const reader = input instanceof
|
|
872
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
876
873
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
877
874
|
const message = createBaseOnChainState_LatestLogsEntry();
|
|
878
875
|
while (reader.pos < end) {
|
|
@@ -889,7 +886,7 @@ exports.OnChainState_LatestLogsEntry = {
|
|
|
889
886
|
if (tag !== 18) {
|
|
890
887
|
break;
|
|
891
888
|
}
|
|
892
|
-
message.value =
|
|
889
|
+
message.value = FiberLogEntryList.decode(reader, reader.uint32());
|
|
893
890
|
continue;
|
|
894
891
|
}
|
|
895
892
|
}
|
|
@@ -903,7 +900,7 @@ exports.OnChainState_LatestLogsEntry = {
|
|
|
903
900
|
fromJSON(object) {
|
|
904
901
|
return {
|
|
905
902
|
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
906
|
-
value: isSet(object.value) ?
|
|
903
|
+
value: isSet(object.value) ? FiberLogEntryList.fromJSON(object.value) : undefined,
|
|
907
904
|
};
|
|
908
905
|
},
|
|
909
906
|
toJSON(message) {
|
|
@@ -912,18 +909,18 @@ exports.OnChainState_LatestLogsEntry = {
|
|
|
912
909
|
obj.key = message.key;
|
|
913
910
|
}
|
|
914
911
|
if (message.value !== undefined) {
|
|
915
|
-
obj.value =
|
|
912
|
+
obj.value = FiberLogEntryList.toJSON(message.value);
|
|
916
913
|
}
|
|
917
914
|
return obj;
|
|
918
915
|
},
|
|
919
916
|
create(base) {
|
|
920
|
-
return
|
|
917
|
+
return OnChainState_LatestLogsEntry.fromPartial(base ?? {});
|
|
921
918
|
},
|
|
922
919
|
fromPartial(object) {
|
|
923
920
|
const message = createBaseOnChainState_LatestLogsEntry();
|
|
924
921
|
message.key = object.key ?? "";
|
|
925
922
|
message.value = (object.value !== undefined && object.value !== null)
|
|
926
|
-
?
|
|
923
|
+
? FiberLogEntryList.fromPartial(object.value)
|
|
927
924
|
: undefined;
|
|
928
925
|
return message;
|
|
929
926
|
},
|
|
@@ -931,15 +928,15 @@ exports.OnChainState_LatestLogsEntry = {
|
|
|
931
928
|
function createBaseFiberLogEntryList() {
|
|
932
929
|
return { entries: [] };
|
|
933
930
|
}
|
|
934
|
-
|
|
935
|
-
encode(message, writer = new
|
|
931
|
+
export const FiberLogEntryList = {
|
|
932
|
+
encode(message, writer = new BinaryWriter()) {
|
|
936
933
|
for (const v of message.entries) {
|
|
937
|
-
|
|
934
|
+
FiberLogEntry.encode(v, writer.uint32(10).fork()).join();
|
|
938
935
|
}
|
|
939
936
|
return writer;
|
|
940
937
|
},
|
|
941
938
|
decode(input, length) {
|
|
942
|
-
const reader = input instanceof
|
|
939
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
943
940
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
944
941
|
const message = createBaseFiberLogEntryList();
|
|
945
942
|
while (reader.pos < end) {
|
|
@@ -949,7 +946,7 @@ exports.FiberLogEntryList = {
|
|
|
949
946
|
if (tag !== 10) {
|
|
950
947
|
break;
|
|
951
948
|
}
|
|
952
|
-
message.entries.push(
|
|
949
|
+
message.entries.push(FiberLogEntry.decode(reader, reader.uint32()));
|
|
953
950
|
continue;
|
|
954
951
|
}
|
|
955
952
|
}
|
|
@@ -963,41 +960,41 @@ exports.FiberLogEntryList = {
|
|
|
963
960
|
fromJSON(object) {
|
|
964
961
|
return {
|
|
965
962
|
entries: globalThis.Array.isArray(object?.entries)
|
|
966
|
-
? object.entries.map((e) =>
|
|
963
|
+
? object.entries.map((e) => FiberLogEntry.fromJSON(e))
|
|
967
964
|
: [],
|
|
968
965
|
};
|
|
969
966
|
},
|
|
970
967
|
toJSON(message) {
|
|
971
968
|
const obj = {};
|
|
972
969
|
if (message.entries?.length) {
|
|
973
|
-
obj.entries = message.entries.map((e) =>
|
|
970
|
+
obj.entries = message.entries.map((e) => FiberLogEntry.toJSON(e));
|
|
974
971
|
}
|
|
975
972
|
return obj;
|
|
976
973
|
},
|
|
977
974
|
create(base) {
|
|
978
|
-
return
|
|
975
|
+
return FiberLogEntryList.fromPartial(base ?? {});
|
|
979
976
|
},
|
|
980
977
|
fromPartial(object) {
|
|
981
978
|
const message = createBaseFiberLogEntryList();
|
|
982
|
-
message.entries = object.entries?.map((e) =>
|
|
979
|
+
message.entries = object.entries?.map((e) => FiberLogEntry.fromPartial(e)) || [];
|
|
983
980
|
return message;
|
|
984
981
|
},
|
|
985
982
|
};
|
|
986
983
|
function createBaseCalculatedState() {
|
|
987
984
|
return { stateMachines: {}, scripts: {} };
|
|
988
985
|
}
|
|
989
|
-
|
|
990
|
-
encode(message, writer = new
|
|
986
|
+
export const CalculatedState = {
|
|
987
|
+
encode(message, writer = new BinaryWriter()) {
|
|
991
988
|
globalThis.Object.entries(message.stateMachines).forEach(([key, value]) => {
|
|
992
|
-
|
|
989
|
+
CalculatedState_StateMachinesEntry.encode({ key: key, value }, writer.uint32(10).fork()).join();
|
|
993
990
|
});
|
|
994
991
|
globalThis.Object.entries(message.scripts).forEach(([key, value]) => {
|
|
995
|
-
|
|
992
|
+
CalculatedState_ScriptsEntry.encode({ key: key, value }, writer.uint32(18).fork()).join();
|
|
996
993
|
});
|
|
997
994
|
return writer;
|
|
998
995
|
},
|
|
999
996
|
decode(input, length) {
|
|
1000
|
-
const reader = input instanceof
|
|
997
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1001
998
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1002
999
|
const message = createBaseCalculatedState();
|
|
1003
1000
|
while (reader.pos < end) {
|
|
@@ -1007,7 +1004,7 @@ exports.CalculatedState = {
|
|
|
1007
1004
|
if (tag !== 10) {
|
|
1008
1005
|
break;
|
|
1009
1006
|
}
|
|
1010
|
-
const entry1 =
|
|
1007
|
+
const entry1 = CalculatedState_StateMachinesEntry.decode(reader, reader.uint32());
|
|
1011
1008
|
if (entry1.value !== undefined) {
|
|
1012
1009
|
message.stateMachines[entry1.key] = entry1.value;
|
|
1013
1010
|
}
|
|
@@ -1017,7 +1014,7 @@ exports.CalculatedState = {
|
|
|
1017
1014
|
if (tag !== 18) {
|
|
1018
1015
|
break;
|
|
1019
1016
|
}
|
|
1020
|
-
const entry2 =
|
|
1017
|
+
const entry2 = CalculatedState_ScriptsEntry.decode(reader, reader.uint32());
|
|
1021
1018
|
if (entry2.value !== undefined) {
|
|
1022
1019
|
message.scripts[entry2.key] = entry2.value;
|
|
1023
1020
|
}
|
|
@@ -1035,18 +1032,18 @@ exports.CalculatedState = {
|
|
|
1035
1032
|
return {
|
|
1036
1033
|
stateMachines: isObject(object.stateMachines)
|
|
1037
1034
|
? globalThis.Object.entries(object.stateMachines).reduce((acc, [key, value]) => {
|
|
1038
|
-
acc[key] =
|
|
1035
|
+
acc[key] = StateMachineFiberRecord.fromJSON(value);
|
|
1039
1036
|
return acc;
|
|
1040
1037
|
}, {})
|
|
1041
1038
|
: isObject(object.state_machines)
|
|
1042
1039
|
? globalThis.Object.entries(object.state_machines).reduce((acc, [key, value]) => {
|
|
1043
|
-
acc[key] =
|
|
1040
|
+
acc[key] = StateMachineFiberRecord.fromJSON(value);
|
|
1044
1041
|
return acc;
|
|
1045
1042
|
}, {})
|
|
1046
1043
|
: {},
|
|
1047
1044
|
scripts: isObject(object.scripts)
|
|
1048
1045
|
? globalThis.Object.entries(object.scripts).reduce((acc, [key, value]) => {
|
|
1049
|
-
acc[key] =
|
|
1046
|
+
acc[key] = ScriptFiberRecord.fromJSON(value);
|
|
1050
1047
|
return acc;
|
|
1051
1048
|
}, {})
|
|
1052
1049
|
: {},
|
|
@@ -1059,7 +1056,7 @@ exports.CalculatedState = {
|
|
|
1059
1056
|
if (entries.length > 0) {
|
|
1060
1057
|
obj.stateMachines = {};
|
|
1061
1058
|
entries.forEach(([k, v]) => {
|
|
1062
|
-
obj.stateMachines[k] =
|
|
1059
|
+
obj.stateMachines[k] = StateMachineFiberRecord.toJSON(v);
|
|
1063
1060
|
});
|
|
1064
1061
|
}
|
|
1065
1062
|
}
|
|
@@ -1068,27 +1065,27 @@ exports.CalculatedState = {
|
|
|
1068
1065
|
if (entries.length > 0) {
|
|
1069
1066
|
obj.scripts = {};
|
|
1070
1067
|
entries.forEach(([k, v]) => {
|
|
1071
|
-
obj.scripts[k] =
|
|
1068
|
+
obj.scripts[k] = ScriptFiberRecord.toJSON(v);
|
|
1072
1069
|
});
|
|
1073
1070
|
}
|
|
1074
1071
|
}
|
|
1075
1072
|
return obj;
|
|
1076
1073
|
},
|
|
1077
1074
|
create(base) {
|
|
1078
|
-
return
|
|
1075
|
+
return CalculatedState.fromPartial(base ?? {});
|
|
1079
1076
|
},
|
|
1080
1077
|
fromPartial(object) {
|
|
1081
1078
|
const message = createBaseCalculatedState();
|
|
1082
1079
|
message.stateMachines =
|
|
1083
1080
|
globalThis.Object.entries(object.stateMachines ?? {}).reduce((acc, [key, value]) => {
|
|
1084
1081
|
if (value !== undefined) {
|
|
1085
|
-
acc[key] =
|
|
1082
|
+
acc[key] = StateMachineFiberRecord.fromPartial(value);
|
|
1086
1083
|
}
|
|
1087
1084
|
return acc;
|
|
1088
1085
|
}, {});
|
|
1089
1086
|
message.scripts = globalThis.Object.entries(object.scripts ?? {}).reduce((acc, [key, value]) => {
|
|
1090
1087
|
if (value !== undefined) {
|
|
1091
|
-
acc[key] =
|
|
1088
|
+
acc[key] = ScriptFiberRecord.fromPartial(value);
|
|
1092
1089
|
}
|
|
1093
1090
|
return acc;
|
|
1094
1091
|
}, {});
|
|
@@ -1098,18 +1095,18 @@ exports.CalculatedState = {
|
|
|
1098
1095
|
function createBaseCalculatedState_StateMachinesEntry() {
|
|
1099
1096
|
return { key: "", value: undefined };
|
|
1100
1097
|
}
|
|
1101
|
-
|
|
1102
|
-
encode(message, writer = new
|
|
1098
|
+
export const CalculatedState_StateMachinesEntry = {
|
|
1099
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1103
1100
|
if (message.key !== "") {
|
|
1104
1101
|
writer.uint32(10).string(message.key);
|
|
1105
1102
|
}
|
|
1106
1103
|
if (message.value !== undefined) {
|
|
1107
|
-
|
|
1104
|
+
StateMachineFiberRecord.encode(message.value, writer.uint32(18).fork()).join();
|
|
1108
1105
|
}
|
|
1109
1106
|
return writer;
|
|
1110
1107
|
},
|
|
1111
1108
|
decode(input, length) {
|
|
1112
|
-
const reader = input instanceof
|
|
1109
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1113
1110
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1114
1111
|
const message = createBaseCalculatedState_StateMachinesEntry();
|
|
1115
1112
|
while (reader.pos < end) {
|
|
@@ -1126,7 +1123,7 @@ exports.CalculatedState_StateMachinesEntry = {
|
|
|
1126
1123
|
if (tag !== 18) {
|
|
1127
1124
|
break;
|
|
1128
1125
|
}
|
|
1129
|
-
message.value =
|
|
1126
|
+
message.value = StateMachineFiberRecord.decode(reader, reader.uint32());
|
|
1130
1127
|
continue;
|
|
1131
1128
|
}
|
|
1132
1129
|
}
|
|
@@ -1140,7 +1137,7 @@ exports.CalculatedState_StateMachinesEntry = {
|
|
|
1140
1137
|
fromJSON(object) {
|
|
1141
1138
|
return {
|
|
1142
1139
|
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
1143
|
-
value: isSet(object.value) ?
|
|
1140
|
+
value: isSet(object.value) ? StateMachineFiberRecord.fromJSON(object.value) : undefined,
|
|
1144
1141
|
};
|
|
1145
1142
|
},
|
|
1146
1143
|
toJSON(message) {
|
|
@@ -1149,18 +1146,18 @@ exports.CalculatedState_StateMachinesEntry = {
|
|
|
1149
1146
|
obj.key = message.key;
|
|
1150
1147
|
}
|
|
1151
1148
|
if (message.value !== undefined) {
|
|
1152
|
-
obj.value =
|
|
1149
|
+
obj.value = StateMachineFiberRecord.toJSON(message.value);
|
|
1153
1150
|
}
|
|
1154
1151
|
return obj;
|
|
1155
1152
|
},
|
|
1156
1153
|
create(base) {
|
|
1157
|
-
return
|
|
1154
|
+
return CalculatedState_StateMachinesEntry.fromPartial(base ?? {});
|
|
1158
1155
|
},
|
|
1159
1156
|
fromPartial(object) {
|
|
1160
1157
|
const message = createBaseCalculatedState_StateMachinesEntry();
|
|
1161
1158
|
message.key = object.key ?? "";
|
|
1162
1159
|
message.value = (object.value !== undefined && object.value !== null)
|
|
1163
|
-
?
|
|
1160
|
+
? StateMachineFiberRecord.fromPartial(object.value)
|
|
1164
1161
|
: undefined;
|
|
1165
1162
|
return message;
|
|
1166
1163
|
},
|
|
@@ -1168,18 +1165,18 @@ exports.CalculatedState_StateMachinesEntry = {
|
|
|
1168
1165
|
function createBaseCalculatedState_ScriptsEntry() {
|
|
1169
1166
|
return { key: "", value: undefined };
|
|
1170
1167
|
}
|
|
1171
|
-
|
|
1172
|
-
encode(message, writer = new
|
|
1168
|
+
export const CalculatedState_ScriptsEntry = {
|
|
1169
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1173
1170
|
if (message.key !== "") {
|
|
1174
1171
|
writer.uint32(10).string(message.key);
|
|
1175
1172
|
}
|
|
1176
1173
|
if (message.value !== undefined) {
|
|
1177
|
-
|
|
1174
|
+
ScriptFiberRecord.encode(message.value, writer.uint32(18).fork()).join();
|
|
1178
1175
|
}
|
|
1179
1176
|
return writer;
|
|
1180
1177
|
},
|
|
1181
1178
|
decode(input, length) {
|
|
1182
|
-
const reader = input instanceof
|
|
1179
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1183
1180
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1184
1181
|
const message = createBaseCalculatedState_ScriptsEntry();
|
|
1185
1182
|
while (reader.pos < end) {
|
|
@@ -1196,7 +1193,7 @@ exports.CalculatedState_ScriptsEntry = {
|
|
|
1196
1193
|
if (tag !== 18) {
|
|
1197
1194
|
break;
|
|
1198
1195
|
}
|
|
1199
|
-
message.value =
|
|
1196
|
+
message.value = ScriptFiberRecord.decode(reader, reader.uint32());
|
|
1200
1197
|
continue;
|
|
1201
1198
|
}
|
|
1202
1199
|
}
|
|
@@ -1210,7 +1207,7 @@ exports.CalculatedState_ScriptsEntry = {
|
|
|
1210
1207
|
fromJSON(object) {
|
|
1211
1208
|
return {
|
|
1212
1209
|
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
1213
|
-
value: isSet(object.value) ?
|
|
1210
|
+
value: isSet(object.value) ? ScriptFiberRecord.fromJSON(object.value) : undefined,
|
|
1214
1211
|
};
|
|
1215
1212
|
},
|
|
1216
1213
|
toJSON(message) {
|
|
@@ -1219,18 +1216,18 @@ exports.CalculatedState_ScriptsEntry = {
|
|
|
1219
1216
|
obj.key = message.key;
|
|
1220
1217
|
}
|
|
1221
1218
|
if (message.value !== undefined) {
|
|
1222
|
-
obj.value =
|
|
1219
|
+
obj.value = ScriptFiberRecord.toJSON(message.value);
|
|
1223
1220
|
}
|
|
1224
1221
|
return obj;
|
|
1225
1222
|
},
|
|
1226
1223
|
create(base) {
|
|
1227
|
-
return
|
|
1224
|
+
return CalculatedState_ScriptsEntry.fromPartial(base ?? {});
|
|
1228
1225
|
},
|
|
1229
1226
|
fromPartial(object) {
|
|
1230
1227
|
const message = createBaseCalculatedState_ScriptsEntry();
|
|
1231
1228
|
message.key = object.key ?? "";
|
|
1232
1229
|
message.value = (object.value !== undefined && object.value !== null)
|
|
1233
|
-
?
|
|
1230
|
+
? ScriptFiberRecord.fromPartial(object.value)
|
|
1234
1231
|
: undefined;
|
|
1235
1232
|
return message;
|
|
1236
1233
|
},
|