@agoric/client-utils 0.1.1-dev-a29afed.0.a29afed → 0.1.1-dev-cb1866d.0.cb1866d

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.
Files changed (34) hide show
  1. package/dist/bundle-utils.d.ts +95 -0
  2. package/dist/bundle-utils.d.ts.map +1 -0
  3. package/dist/bundle-utils.js +219 -0
  4. package/dist/bundle-utils.js.map +1 -0
  5. package/dist/codegen/agoric/bundle.d.ts +94 -11
  6. package/dist/codegen/agoric/bundle.d.ts.map +1 -1
  7. package/dist/codegen/agoric/rpc.query.d.ts +1 -0
  8. package/dist/codegen/agoric/rpc.query.d.ts.map +1 -1
  9. package/dist/codegen/agoric/swingset/msgs.d.ts +138 -33
  10. package/dist/codegen/agoric/swingset/msgs.d.ts.map +1 -1
  11. package/dist/codegen/agoric/swingset/msgs.js +270 -46
  12. package/dist/codegen/agoric/swingset/msgs.js.map +1 -1
  13. package/dist/codegen/agoric/swingset/msgs.rpc.msg.d.ts +4 -1
  14. package/dist/codegen/agoric/swingset/msgs.rpc.msg.d.ts.map +1 -1
  15. package/dist/codegen/agoric/swingset/msgs.rpc.msg.js +7 -1
  16. package/dist/codegen/agoric/swingset/msgs.rpc.msg.js.map +1 -1
  17. package/dist/codegen/agoric/swingset/query.d.ts +54 -1
  18. package/dist/codegen/agoric/swingset/query.d.ts.map +1 -1
  19. package/dist/codegen/agoric/swingset/query.js +181 -1
  20. package/dist/codegen/agoric/swingset/query.js.map +1 -1
  21. package/dist/codegen/agoric/swingset/query.rpc.Query.d.ts +5 -1
  22. package/dist/codegen/agoric/swingset/query.rpc.Query.d.ts.map +1 -1
  23. package/dist/codegen/agoric/swingset/query.rpc.Query.js +10 -1
  24. package/dist/codegen/agoric/swingset/query.rpc.Query.js.map +1 -1
  25. package/dist/codegen/agoric/swingset/swingset.d.ts +170 -0
  26. package/dist/codegen/agoric/swingset/swingset.d.ts.map +1 -1
  27. package/dist/codegen/agoric/swingset/swingset.js +473 -0
  28. package/dist/codegen/agoric/swingset/swingset.js.map +1 -1
  29. package/dist/codegen/varint.d.ts +1 -1
  30. package/dist/main.d.ts +1 -0
  31. package/dist/main.d.ts.map +1 -1
  32. package/dist/main.js +1 -0
  33. package/dist/main.js.map +1 -1
  34. package/package.json +9 -9
@@ -5,6 +5,55 @@ import { isSet } from '../../helpers.js';
5
5
  import {} from '../../json-safe.js';
6
6
  import { decodeBase64 as bytesFromBase64 } from '@endo/base64';
7
7
  import { encodeBase64 as base64FromBytes } from '@endo/base64';
8
+ /** Current state of this chunk. */
9
+ export var ChunkState;
10
+ (function (ChunkState) {
11
+ /** CHUNK_STATE_UNSPECIFIED - Unknown state. */
12
+ ChunkState[ChunkState["CHUNK_STATE_UNSPECIFIED"] = 0] = "CHUNK_STATE_UNSPECIFIED";
13
+ /** CHUNK_STATE_IN_FLIGHT - The chunk is still in-flight. */
14
+ ChunkState[ChunkState["CHUNK_STATE_IN_FLIGHT"] = 1] = "CHUNK_STATE_IN_FLIGHT";
15
+ /** CHUNK_STATE_RECEIVED - The chunk has been received. */
16
+ ChunkState[ChunkState["CHUNK_STATE_RECEIVED"] = 2] = "CHUNK_STATE_RECEIVED";
17
+ /** CHUNK_STATE_PROCESSED - The chunk has been processed. */
18
+ ChunkState[ChunkState["CHUNK_STATE_PROCESSED"] = 3] = "CHUNK_STATE_PROCESSED";
19
+ ChunkState[ChunkState["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
20
+ })(ChunkState || (ChunkState = {}));
21
+ export const ChunkStateSDKType = ChunkState;
22
+ export function chunkStateFromJSON(object) {
23
+ switch (object) {
24
+ case 0:
25
+ case 'CHUNK_STATE_UNSPECIFIED':
26
+ return ChunkState.CHUNK_STATE_UNSPECIFIED;
27
+ case 1:
28
+ case 'CHUNK_STATE_IN_FLIGHT':
29
+ return ChunkState.CHUNK_STATE_IN_FLIGHT;
30
+ case 2:
31
+ case 'CHUNK_STATE_RECEIVED':
32
+ return ChunkState.CHUNK_STATE_RECEIVED;
33
+ case 3:
34
+ case 'CHUNK_STATE_PROCESSED':
35
+ return ChunkState.CHUNK_STATE_PROCESSED;
36
+ case -1:
37
+ case 'UNRECOGNIZED':
38
+ default:
39
+ return ChunkState.UNRECOGNIZED;
40
+ }
41
+ }
42
+ export function chunkStateToJSON(object) {
43
+ switch (object) {
44
+ case ChunkState.CHUNK_STATE_UNSPECIFIED:
45
+ return 'CHUNK_STATE_UNSPECIFIED';
46
+ case ChunkState.CHUNK_STATE_IN_FLIGHT:
47
+ return 'CHUNK_STATE_IN_FLIGHT';
48
+ case ChunkState.CHUNK_STATE_RECEIVED:
49
+ return 'CHUNK_STATE_RECEIVED';
50
+ case ChunkState.CHUNK_STATE_PROCESSED:
51
+ return 'CHUNK_STATE_PROCESSED';
52
+ case ChunkState.UNRECOGNIZED:
53
+ default:
54
+ return 'UNRECOGNIZED';
55
+ }
56
+ }
8
57
  function createBaseCoreEvalProposal() {
9
58
  return {
10
59
  title: '',
@@ -168,6 +217,10 @@ function createBaseParams() {
168
217
  powerFlagFees: [],
169
218
  queueMax: [],
170
219
  vatCleanupBudget: [],
220
+ installationDeadlineBlocks: BigInt(0),
221
+ installationDeadlineSeconds: BigInt(0),
222
+ bundleUncompressedSizeLimitBytes: BigInt(0),
223
+ chunkSizeLimitBytes: BigInt(0),
171
224
  };
172
225
  }
173
226
  export const Params = {
@@ -191,6 +244,18 @@ export const Params = {
191
244
  for (const v of message.vatCleanupBudget) {
192
245
  UintMapEntry.encode(v, writer.uint32(50).fork()).ldelim();
193
246
  }
247
+ if (message.installationDeadlineBlocks !== BigInt(0)) {
248
+ writer.uint32(56).int64(message.installationDeadlineBlocks);
249
+ }
250
+ if (message.installationDeadlineSeconds !== BigInt(0)) {
251
+ writer.uint32(64).int64(message.installationDeadlineSeconds);
252
+ }
253
+ if (message.bundleUncompressedSizeLimitBytes !== BigInt(0)) {
254
+ writer.uint32(72).int64(message.bundleUncompressedSizeLimitBytes);
255
+ }
256
+ if (message.chunkSizeLimitBytes !== BigInt(0)) {
257
+ writer.uint32(80).int64(message.chunkSizeLimitBytes);
258
+ }
194
259
  return writer;
195
260
  },
196
261
  decode(input, length) {
@@ -218,6 +283,18 @@ export const Params = {
218
283
  case 6:
219
284
  message.vatCleanupBudget.push(UintMapEntry.decode(reader, reader.uint32()));
220
285
  break;
286
+ case 7:
287
+ message.installationDeadlineBlocks = reader.int64();
288
+ break;
289
+ case 8:
290
+ message.installationDeadlineSeconds = reader.int64();
291
+ break;
292
+ case 9:
293
+ message.bundleUncompressedSizeLimitBytes = reader.int64();
294
+ break;
295
+ case 10:
296
+ message.chunkSizeLimitBytes = reader.int64();
297
+ break;
221
298
  default:
222
299
  reader.skipType(tag & 7);
223
300
  break;
@@ -245,6 +322,18 @@ export const Params = {
245
322
  vatCleanupBudget: Array.isArray(object?.vatCleanupBudget)
246
323
  ? object.vatCleanupBudget.map((e) => UintMapEntry.fromJSON(e))
247
324
  : [],
325
+ installationDeadlineBlocks: isSet(object.installationDeadlineBlocks)
326
+ ? BigInt(object.installationDeadlineBlocks.toString())
327
+ : BigInt(0),
328
+ installationDeadlineSeconds: isSet(object.installationDeadlineSeconds)
329
+ ? BigInt(object.installationDeadlineSeconds.toString())
330
+ : BigInt(0),
331
+ bundleUncompressedSizeLimitBytes: isSet(object.bundleUncompressedSizeLimitBytes)
332
+ ? BigInt(object.bundleUncompressedSizeLimitBytes.toString())
333
+ : BigInt(0),
334
+ chunkSizeLimitBytes: isSet(object.chunkSizeLimitBytes)
335
+ ? BigInt(object.chunkSizeLimitBytes.toString())
336
+ : BigInt(0),
248
337
  };
249
338
  },
250
339
  toJSON(message) {
@@ -281,6 +370,14 @@ export const Params = {
281
370
  else {
282
371
  obj.vatCleanupBudget = [];
283
372
  }
373
+ message.installationDeadlineBlocks !== undefined &&
374
+ (obj.installationDeadlineBlocks = (message.installationDeadlineBlocks || BigInt(0)).toString());
375
+ message.installationDeadlineSeconds !== undefined &&
376
+ (obj.installationDeadlineSeconds = (message.installationDeadlineSeconds || BigInt(0)).toString());
377
+ message.bundleUncompressedSizeLimitBytes !== undefined &&
378
+ (obj.bundleUncompressedSizeLimitBytes = (message.bundleUncompressedSizeLimitBytes || BigInt(0)).toString());
379
+ message.chunkSizeLimitBytes !== undefined &&
380
+ (obj.chunkSizeLimitBytes = (message.chunkSizeLimitBytes || BigInt(0)).toString());
284
381
  return obj;
285
382
  },
286
383
  fromPartial(object) {
@@ -296,6 +393,26 @@ export const Params = {
296
393
  object.queueMax?.map(e => QueueSize.fromPartial(e)) || [];
297
394
  message.vatCleanupBudget =
298
395
  object.vatCleanupBudget?.map(e => UintMapEntry.fromPartial(e)) || [];
396
+ message.installationDeadlineBlocks =
397
+ object.installationDeadlineBlocks !== undefined &&
398
+ object.installationDeadlineBlocks !== null
399
+ ? BigInt(object.installationDeadlineBlocks.toString())
400
+ : BigInt(0);
401
+ message.installationDeadlineSeconds =
402
+ object.installationDeadlineSeconds !== undefined &&
403
+ object.installationDeadlineSeconds !== null
404
+ ? BigInt(object.installationDeadlineSeconds.toString())
405
+ : BigInt(0);
406
+ message.bundleUncompressedSizeLimitBytes =
407
+ object.bundleUncompressedSizeLimitBytes !== undefined &&
408
+ object.bundleUncompressedSizeLimitBytes !== null
409
+ ? BigInt(object.bundleUncompressedSizeLimitBytes.toString())
410
+ : BigInt(0);
411
+ message.chunkSizeLimitBytes =
412
+ object.chunkSizeLimitBytes !== undefined &&
413
+ object.chunkSizeLimitBytes !== null
414
+ ? BigInt(object.chunkSizeLimitBytes.toString())
415
+ : BigInt(0);
299
416
  return message;
300
417
  },
301
418
  fromProtoMsg(message) {
@@ -314,6 +431,9 @@ export const Params = {
314
431
  function createBaseState() {
315
432
  return {
316
433
  queueAllowed: [],
434
+ firstChunkedArtifactId: BigInt(0),
435
+ lastChunkedArtifactId: BigInt(0),
436
+ nextChunkedArtifactId: BigInt(0),
317
437
  };
318
438
  }
319
439
  export const State = {
@@ -322,6 +442,15 @@ export const State = {
322
442
  for (const v of message.queueAllowed) {
323
443
  QueueSize.encode(v, writer.uint32(10).fork()).ldelim();
324
444
  }
445
+ if (message.firstChunkedArtifactId !== BigInt(0)) {
446
+ writer.uint32(16).uint64(message.firstChunkedArtifactId);
447
+ }
448
+ if (message.lastChunkedArtifactId !== BigInt(0)) {
449
+ writer.uint32(24).uint64(message.lastChunkedArtifactId);
450
+ }
451
+ if (message.nextChunkedArtifactId !== BigInt(0)) {
452
+ writer.uint32(32).uint64(message.nextChunkedArtifactId);
453
+ }
325
454
  return writer;
326
455
  },
327
456
  decode(input, length) {
@@ -334,6 +463,15 @@ export const State = {
334
463
  case 1:
335
464
  message.queueAllowed.push(QueueSize.decode(reader, reader.uint32()));
336
465
  break;
466
+ case 2:
467
+ message.firstChunkedArtifactId = reader.uint64();
468
+ break;
469
+ case 3:
470
+ message.lastChunkedArtifactId = reader.uint64();
471
+ break;
472
+ case 4:
473
+ message.nextChunkedArtifactId = reader.uint64();
474
+ break;
337
475
  default:
338
476
  reader.skipType(tag & 7);
339
477
  break;
@@ -346,6 +484,15 @@ export const State = {
346
484
  queueAllowed: Array.isArray(object?.queueAllowed)
347
485
  ? object.queueAllowed.map((e) => QueueSize.fromJSON(e))
348
486
  : [],
487
+ firstChunkedArtifactId: isSet(object.firstChunkedArtifactId)
488
+ ? BigInt(object.firstChunkedArtifactId.toString())
489
+ : BigInt(0),
490
+ lastChunkedArtifactId: isSet(object.lastChunkedArtifactId)
491
+ ? BigInt(object.lastChunkedArtifactId.toString())
492
+ : BigInt(0),
493
+ nextChunkedArtifactId: isSet(object.nextChunkedArtifactId)
494
+ ? BigInt(object.nextChunkedArtifactId.toString())
495
+ : BigInt(0),
349
496
  };
350
497
  },
351
498
  toJSON(message) {
@@ -356,12 +503,33 @@ export const State = {
356
503
  else {
357
504
  obj.queueAllowed = [];
358
505
  }
506
+ message.firstChunkedArtifactId !== undefined &&
507
+ (obj.firstChunkedArtifactId = (message.firstChunkedArtifactId || BigInt(0)).toString());
508
+ message.lastChunkedArtifactId !== undefined &&
509
+ (obj.lastChunkedArtifactId = (message.lastChunkedArtifactId || BigInt(0)).toString());
510
+ message.nextChunkedArtifactId !== undefined &&
511
+ (obj.nextChunkedArtifactId = (message.nextChunkedArtifactId || BigInt(0)).toString());
359
512
  return obj;
360
513
  },
361
514
  fromPartial(object) {
362
515
  const message = createBaseState();
363
516
  message.queueAllowed =
364
517
  object.queueAllowed?.map(e => QueueSize.fromPartial(e)) || [];
518
+ message.firstChunkedArtifactId =
519
+ object.firstChunkedArtifactId !== undefined &&
520
+ object.firstChunkedArtifactId !== null
521
+ ? BigInt(object.firstChunkedArtifactId.toString())
522
+ : BigInt(0);
523
+ message.lastChunkedArtifactId =
524
+ object.lastChunkedArtifactId !== undefined &&
525
+ object.lastChunkedArtifactId !== null
526
+ ? BigInt(object.lastChunkedArtifactId.toString())
527
+ : BigInt(0);
528
+ message.nextChunkedArtifactId =
529
+ object.nextChunkedArtifactId !== undefined &&
530
+ object.nextChunkedArtifactId !== null
531
+ ? BigInt(object.nextChunkedArtifactId.toString())
532
+ : BigInt(0);
365
533
  return message;
366
534
  },
367
535
  fromProtoMsg(message) {
@@ -815,4 +983,309 @@ export const SwingStoreArtifact = {
815
983
  };
816
984
  },
817
985
  };
986
+ function createBaseChunkedArtifact() {
987
+ return {
988
+ sha512: '',
989
+ sizeBytes: BigInt(0),
990
+ chunks: [],
991
+ };
992
+ }
993
+ export const ChunkedArtifact = {
994
+ typeUrl: '/agoric.swingset.ChunkedArtifact',
995
+ encode(message, writer = BinaryWriter.create()) {
996
+ if (message.sha512 !== '') {
997
+ writer.uint32(10).string(message.sha512);
998
+ }
999
+ if (message.sizeBytes !== BigInt(0)) {
1000
+ writer.uint32(16).uint64(message.sizeBytes);
1001
+ }
1002
+ for (const v of message.chunks) {
1003
+ ChunkInfo.encode(v, writer.uint32(26).fork()).ldelim();
1004
+ }
1005
+ return writer;
1006
+ },
1007
+ decode(input, length) {
1008
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1009
+ let end = length === undefined ? reader.len : reader.pos + length;
1010
+ const message = createBaseChunkedArtifact();
1011
+ while (reader.pos < end) {
1012
+ const tag = reader.uint32();
1013
+ switch (tag >>> 3) {
1014
+ case 1:
1015
+ message.sha512 = reader.string();
1016
+ break;
1017
+ case 2:
1018
+ message.sizeBytes = reader.uint64();
1019
+ break;
1020
+ case 3:
1021
+ message.chunks.push(ChunkInfo.decode(reader, reader.uint32()));
1022
+ break;
1023
+ default:
1024
+ reader.skipType(tag & 7);
1025
+ break;
1026
+ }
1027
+ }
1028
+ return message;
1029
+ },
1030
+ fromJSON(object) {
1031
+ return {
1032
+ sha512: isSet(object.sha512) ? String(object.sha512) : '',
1033
+ sizeBytes: isSet(object.sizeBytes)
1034
+ ? BigInt(object.sizeBytes.toString())
1035
+ : BigInt(0),
1036
+ chunks: Array.isArray(object?.chunks)
1037
+ ? object.chunks.map((e) => ChunkInfo.fromJSON(e))
1038
+ : [],
1039
+ };
1040
+ },
1041
+ toJSON(message) {
1042
+ const obj = {};
1043
+ message.sha512 !== undefined && (obj.sha512 = message.sha512);
1044
+ message.sizeBytes !== undefined &&
1045
+ (obj.sizeBytes = (message.sizeBytes || BigInt(0)).toString());
1046
+ if (message.chunks) {
1047
+ obj.chunks = message.chunks.map(e => e ? ChunkInfo.toJSON(e) : undefined);
1048
+ }
1049
+ else {
1050
+ obj.chunks = [];
1051
+ }
1052
+ return obj;
1053
+ },
1054
+ fromPartial(object) {
1055
+ const message = createBaseChunkedArtifact();
1056
+ message.sha512 = object.sha512 ?? '';
1057
+ message.sizeBytes =
1058
+ object.sizeBytes !== undefined && object.sizeBytes !== null
1059
+ ? BigInt(object.sizeBytes.toString())
1060
+ : BigInt(0);
1061
+ message.chunks = object.chunks?.map(e => ChunkInfo.fromPartial(e)) || [];
1062
+ return message;
1063
+ },
1064
+ fromProtoMsg(message) {
1065
+ return ChunkedArtifact.decode(message.value);
1066
+ },
1067
+ toProto(message) {
1068
+ return ChunkedArtifact.encode(message).finish();
1069
+ },
1070
+ toProtoMsg(message) {
1071
+ return {
1072
+ typeUrl: '/agoric.swingset.ChunkedArtifact',
1073
+ value: ChunkedArtifact.encode(message).finish(),
1074
+ };
1075
+ },
1076
+ };
1077
+ function createBaseChunkInfo() {
1078
+ return {
1079
+ sha512: '',
1080
+ sizeBytes: BigInt(0),
1081
+ state: 0,
1082
+ };
1083
+ }
1084
+ export const ChunkInfo = {
1085
+ typeUrl: '/agoric.swingset.ChunkInfo',
1086
+ encode(message, writer = BinaryWriter.create()) {
1087
+ if (message.sha512 !== '') {
1088
+ writer.uint32(10).string(message.sha512);
1089
+ }
1090
+ if (message.sizeBytes !== BigInt(0)) {
1091
+ writer.uint32(16).uint64(message.sizeBytes);
1092
+ }
1093
+ if (message.state !== 0) {
1094
+ writer.uint32(24).int32(message.state);
1095
+ }
1096
+ return writer;
1097
+ },
1098
+ decode(input, length) {
1099
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1100
+ let end = length === undefined ? reader.len : reader.pos + length;
1101
+ const message = createBaseChunkInfo();
1102
+ while (reader.pos < end) {
1103
+ const tag = reader.uint32();
1104
+ switch (tag >>> 3) {
1105
+ case 1:
1106
+ message.sha512 = reader.string();
1107
+ break;
1108
+ case 2:
1109
+ message.sizeBytes = reader.uint64();
1110
+ break;
1111
+ case 3:
1112
+ message.state = reader.int32();
1113
+ break;
1114
+ default:
1115
+ reader.skipType(tag & 7);
1116
+ break;
1117
+ }
1118
+ }
1119
+ return message;
1120
+ },
1121
+ fromJSON(object) {
1122
+ return {
1123
+ sha512: isSet(object.sha512) ? String(object.sha512) : '',
1124
+ sizeBytes: isSet(object.sizeBytes)
1125
+ ? BigInt(object.sizeBytes.toString())
1126
+ : BigInt(0),
1127
+ state: isSet(object.state) ? chunkStateFromJSON(object.state) : -1,
1128
+ };
1129
+ },
1130
+ toJSON(message) {
1131
+ const obj = {};
1132
+ message.sha512 !== undefined && (obj.sha512 = message.sha512);
1133
+ message.sizeBytes !== undefined &&
1134
+ (obj.sizeBytes = (message.sizeBytes || BigInt(0)).toString());
1135
+ message.state !== undefined &&
1136
+ (obj.state = chunkStateToJSON(message.state));
1137
+ return obj;
1138
+ },
1139
+ fromPartial(object) {
1140
+ const message = createBaseChunkInfo();
1141
+ message.sha512 = object.sha512 ?? '';
1142
+ message.sizeBytes =
1143
+ object.sizeBytes !== undefined && object.sizeBytes !== null
1144
+ ? BigInt(object.sizeBytes.toString())
1145
+ : BigInt(0);
1146
+ message.state = object.state ?? 0;
1147
+ return message;
1148
+ },
1149
+ fromProtoMsg(message) {
1150
+ return ChunkInfo.decode(message.value);
1151
+ },
1152
+ toProto(message) {
1153
+ return ChunkInfo.encode(message).finish();
1154
+ },
1155
+ toProtoMsg(message) {
1156
+ return {
1157
+ typeUrl: '/agoric.swingset.ChunkInfo',
1158
+ value: ChunkInfo.encode(message).finish(),
1159
+ };
1160
+ },
1161
+ };
1162
+ function createBaseChunkedArtifactNode() {
1163
+ return {
1164
+ chunkedArtifactId: BigInt(0),
1165
+ nextId: BigInt(0),
1166
+ prevId: BigInt(0),
1167
+ startTimeUnix: BigInt(0),
1168
+ startBlockHeight: BigInt(0),
1169
+ };
1170
+ }
1171
+ export const ChunkedArtifactNode = {
1172
+ typeUrl: '/agoric.swingset.ChunkedArtifactNode',
1173
+ encode(message, writer = BinaryWriter.create()) {
1174
+ if (message.chunkedArtifactId !== BigInt(0)) {
1175
+ writer.uint32(8).uint64(message.chunkedArtifactId);
1176
+ }
1177
+ if (message.nextId !== BigInt(0)) {
1178
+ writer.uint32(16).uint64(message.nextId);
1179
+ }
1180
+ if (message.prevId !== BigInt(0)) {
1181
+ writer.uint32(24).uint64(message.prevId);
1182
+ }
1183
+ if (message.startTimeUnix !== BigInt(0)) {
1184
+ writer.uint32(32).int64(message.startTimeUnix);
1185
+ }
1186
+ if (message.startBlockHeight !== BigInt(0)) {
1187
+ writer.uint32(40).int64(message.startBlockHeight);
1188
+ }
1189
+ return writer;
1190
+ },
1191
+ decode(input, length) {
1192
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1193
+ let end = length === undefined ? reader.len : reader.pos + length;
1194
+ const message = createBaseChunkedArtifactNode();
1195
+ while (reader.pos < end) {
1196
+ const tag = reader.uint32();
1197
+ switch (tag >>> 3) {
1198
+ case 1:
1199
+ message.chunkedArtifactId = reader.uint64();
1200
+ break;
1201
+ case 2:
1202
+ message.nextId = reader.uint64();
1203
+ break;
1204
+ case 3:
1205
+ message.prevId = reader.uint64();
1206
+ break;
1207
+ case 4:
1208
+ message.startTimeUnix = reader.int64();
1209
+ break;
1210
+ case 5:
1211
+ message.startBlockHeight = reader.int64();
1212
+ break;
1213
+ default:
1214
+ reader.skipType(tag & 7);
1215
+ break;
1216
+ }
1217
+ }
1218
+ return message;
1219
+ },
1220
+ fromJSON(object) {
1221
+ return {
1222
+ chunkedArtifactId: isSet(object.chunkedArtifactId)
1223
+ ? BigInt(object.chunkedArtifactId.toString())
1224
+ : BigInt(0),
1225
+ nextId: isSet(object.nextId)
1226
+ ? BigInt(object.nextId.toString())
1227
+ : BigInt(0),
1228
+ prevId: isSet(object.prevId)
1229
+ ? BigInt(object.prevId.toString())
1230
+ : BigInt(0),
1231
+ startTimeUnix: isSet(object.startTimeUnix)
1232
+ ? BigInt(object.startTimeUnix.toString())
1233
+ : BigInt(0),
1234
+ startBlockHeight: isSet(object.startBlockHeight)
1235
+ ? BigInt(object.startBlockHeight.toString())
1236
+ : BigInt(0),
1237
+ };
1238
+ },
1239
+ toJSON(message) {
1240
+ const obj = {};
1241
+ message.chunkedArtifactId !== undefined &&
1242
+ (obj.chunkedArtifactId = (message.chunkedArtifactId || BigInt(0)).toString());
1243
+ message.nextId !== undefined &&
1244
+ (obj.nextId = (message.nextId || BigInt(0)).toString());
1245
+ message.prevId !== undefined &&
1246
+ (obj.prevId = (message.prevId || BigInt(0)).toString());
1247
+ message.startTimeUnix !== undefined &&
1248
+ (obj.startTimeUnix = (message.startTimeUnix || BigInt(0)).toString());
1249
+ message.startBlockHeight !== undefined &&
1250
+ (obj.startBlockHeight = (message.startBlockHeight || BigInt(0)).toString());
1251
+ return obj;
1252
+ },
1253
+ fromPartial(object) {
1254
+ const message = createBaseChunkedArtifactNode();
1255
+ message.chunkedArtifactId =
1256
+ object.chunkedArtifactId !== undefined &&
1257
+ object.chunkedArtifactId !== null
1258
+ ? BigInt(object.chunkedArtifactId.toString())
1259
+ : BigInt(0);
1260
+ message.nextId =
1261
+ object.nextId !== undefined && object.nextId !== null
1262
+ ? BigInt(object.nextId.toString())
1263
+ : BigInt(0);
1264
+ message.prevId =
1265
+ object.prevId !== undefined && object.prevId !== null
1266
+ ? BigInt(object.prevId.toString())
1267
+ : BigInt(0);
1268
+ message.startTimeUnix =
1269
+ object.startTimeUnix !== undefined && object.startTimeUnix !== null
1270
+ ? BigInt(object.startTimeUnix.toString())
1271
+ : BigInt(0);
1272
+ message.startBlockHeight =
1273
+ object.startBlockHeight !== undefined && object.startBlockHeight !== null
1274
+ ? BigInt(object.startBlockHeight.toString())
1275
+ : BigInt(0);
1276
+ return message;
1277
+ },
1278
+ fromProtoMsg(message) {
1279
+ return ChunkedArtifactNode.decode(message.value);
1280
+ },
1281
+ toProto(message) {
1282
+ return ChunkedArtifactNode.encode(message).finish();
1283
+ },
1284
+ toProtoMsg(message) {
1285
+ return {
1286
+ typeUrl: '/agoric.swingset.ChunkedArtifactNode',
1287
+ value: ChunkedArtifactNode.encode(message).finish(),
1288
+ };
1289
+ },
1290
+ };
818
1291
  //# sourceMappingURL=swingset.js.map