@automerge/subduction 0.10.2 → 0.11.0

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 (36) hide show
  1. package/dist/cjs/wasm-base64.cjs +1 -1
  2. package/dist/cjs/web-bindings.cjs +296 -132
  3. package/dist/cjs/web.cjs +297 -133
  4. package/dist/esm/wasm-base64.js +1 -1
  5. package/dist/iife/index.js +296 -133
  6. package/dist/index.d.ts +110 -40
  7. package/dist/subduction.wasm +0 -0
  8. package/dist/wasm_bindgen/bundler/subduction_wasm.d.ts +110 -40
  9. package/dist/wasm_bindgen/bundler/subduction_wasm.js +1 -1
  10. package/dist/wasm_bindgen/bundler/subduction_wasm_bg.js +300 -129
  11. package/dist/wasm_bindgen/bundler/subduction_wasm_bg.wasm +0 -0
  12. package/dist/wasm_bindgen/bundler/subduction_wasm_bg.wasm.d.ts +28 -19
  13. package/dist/wasm_bindgen/nodejs/subduction_wasm.cjs +305 -133
  14. package/dist/wasm_bindgen/nodejs/subduction_wasm.d.ts +110 -40
  15. package/dist/wasm_bindgen/nodejs/subduction_wasm_bg.wasm +0 -0
  16. package/dist/wasm_bindgen/nodejs/subduction_wasm_bg.wasm.d.ts +28 -19
  17. package/dist/wasm_bindgen/web/subduction_wasm.d.ts +138 -59
  18. package/dist/wasm_bindgen/web/subduction_wasm.js +304 -133
  19. package/dist/wasm_bindgen/web/subduction_wasm_bg.wasm +0 -0
  20. package/dist/wasm_bindgen/web/subduction_wasm_bg.wasm.d.ts +28 -19
  21. package/package.json +1 -1
  22. /package/dist/wasm_bindgen/bundler/snippets/{sedimentree_wasm-c507f5285f2927a0 → sedimentree_wasm-8e1863d4f7634be2}/inline0.js +0 -0
  23. /package/dist/wasm_bindgen/bundler/snippets/{sedimentree_wasm-c507f5285f2927a0 → sedimentree_wasm-8e1863d4f7634be2}/inline1.js +0 -0
  24. /package/dist/wasm_bindgen/bundler/snippets/{sedimentree_wasm-c507f5285f2927a0 → sedimentree_wasm-8e1863d4f7634be2}/inline2.js +0 -0
  25. /package/dist/wasm_bindgen/bundler/snippets/{subduction_wasm-ec51bcf335db35bd → subduction_wasm-98b1f8c21c19bd5c}/inline0.js +0 -0
  26. /package/dist/wasm_bindgen/bundler/snippets/{subduction_wasm-ec51bcf335db35bd → subduction_wasm-98b1f8c21c19bd5c}/inline1.js +0 -0
  27. /package/dist/wasm_bindgen/nodejs/snippets/{sedimentree_wasm-c507f5285f2927a0 → sedimentree_wasm-8e1863d4f7634be2}/inline0.js +0 -0
  28. /package/dist/wasm_bindgen/nodejs/snippets/{sedimentree_wasm-c507f5285f2927a0 → sedimentree_wasm-8e1863d4f7634be2}/inline1.js +0 -0
  29. /package/dist/wasm_bindgen/nodejs/snippets/{sedimentree_wasm-c507f5285f2927a0 → sedimentree_wasm-8e1863d4f7634be2}/inline2.js +0 -0
  30. /package/dist/wasm_bindgen/nodejs/snippets/{subduction_wasm-ec51bcf335db35bd → subduction_wasm-98b1f8c21c19bd5c}/inline0.js +0 -0
  31. /package/dist/wasm_bindgen/nodejs/snippets/{subduction_wasm-ec51bcf335db35bd → subduction_wasm-98b1f8c21c19bd5c}/inline1.js +0 -0
  32. /package/dist/wasm_bindgen/web/snippets/{sedimentree_wasm-c507f5285f2927a0 → sedimentree_wasm-8e1863d4f7634be2}/inline0.js +0 -0
  33. /package/dist/wasm_bindgen/web/snippets/{sedimentree_wasm-c507f5285f2927a0 → sedimentree_wasm-8e1863d4f7634be2}/inline1.js +0 -0
  34. /package/dist/wasm_bindgen/web/snippets/{sedimentree_wasm-c507f5285f2927a0 → sedimentree_wasm-8e1863d4f7634be2}/inline2.js +0 -0
  35. /package/dist/wasm_bindgen/web/snippets/{subduction_wasm-ec51bcf335db35bd → subduction_wasm-98b1f8c21c19bd5c}/inline0.js +0 -0
  36. /package/dist/wasm_bindgen/web/snippets/{subduction_wasm-ec51bcf335db35bd → subduction_wasm-98b1f8c21c19bd5c}/inline1.js +0 -0
@@ -1,4 +1,4 @@
1
- import { tryIntoJsSedimentreeIdsArray } from './snippets/sedimentree_wasm-c507f5285f2927a0/inline2.js';
1
+ import { tryIntoJsSedimentreeIdsArray } from './snippets/sedimentree_wasm-8e1863d4f7634be2/inline2.js';
2
2
 
3
3
  /**
4
4
  * An authenticated HTTP long-poll transport.
@@ -439,6 +439,142 @@ export class CallError {
439
439
  }
440
440
  if (Symbol.dispose) CallError.prototype[Symbol.dispose] = CallError.prototype.free;
441
441
 
442
+ /**
443
+ * A user-supplied opaque identifier for a loose commit.
444
+ *
445
+ * Unlike [`Digest`](crate::digest::WasmDigest), which is a content hash
446
+ * computed by the system, `CommitId` is provided by the caller at construction
447
+ * time. This is the identity used for DAG traversal, fragment boundaries,
448
+ * and sync.
449
+ */
450
+ export class CommitId {
451
+ static __wrap(ptr) {
452
+ ptr = ptr >>> 0;
453
+ const obj = Object.create(CommitId.prototype);
454
+ obj.__wbg_ptr = ptr;
455
+ CommitIdFinalization.register(obj, obj.__wbg_ptr, obj);
456
+ return obj;
457
+ }
458
+ __destroy_into_raw() {
459
+ const ptr = this.__wbg_ptr;
460
+ this.__wbg_ptr = 0;
461
+ CommitIdFinalization.unregister(this);
462
+ return ptr;
463
+ }
464
+ free() {
465
+ const ptr = this.__destroy_into_raw();
466
+ wasm.__wbg_commitid_free(ptr, 0);
467
+ }
468
+ /**
469
+ * Upcasts; to the JS-import type for [`WasmCommitId`].
470
+ * @returns {CommitId}
471
+ */
472
+ __wasm_refgen_toWasmCommitId() {
473
+ const ret = wasm.commitid___wasm_refgen_toWasmCommitId(this.__wbg_ptr);
474
+ return CommitId.__wrap(ret);
475
+ }
476
+ /**
477
+ * Creates a new commit identifier from its Base58 string representation.
478
+ *
479
+ * # Errors
480
+ *
481
+ * Returns an error if the string cannot be decoded or is not 32 bytes.
482
+ * @param {string} s
483
+ * @returns {CommitId}
484
+ */
485
+ static fromBase58(s) {
486
+ const ptr0 = passStringToWasm0(s, wasm.__wbindgen_export, wasm.__wbindgen_export2);
487
+ const len0 = WASM_VECTOR_LEN;
488
+ const ret = wasm.commitid_fromBase58(ptr0, len0);
489
+ if (ret[2]) {
490
+ throw takeFromExternrefTable0(ret[1]);
491
+ }
492
+ return CommitId.__wrap(ret[0]);
493
+ }
494
+ /**
495
+ * Creates a new commit identifier from its byte representation.
496
+ *
497
+ * # Errors
498
+ *
499
+ * Returns an error if the byte slice is not exactly 32 bytes.
500
+ * @param {Uint8Array} bytes
501
+ * @returns {CommitId}
502
+ */
503
+ static fromBytes(bytes) {
504
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
505
+ const len0 = WASM_VECTOR_LEN;
506
+ const ret = wasm.commitid_fromBytes(ptr0, len0);
507
+ if (ret[2]) {
508
+ throw takeFromExternrefTable0(ret[1]);
509
+ }
510
+ return CommitId.__wrap(ret[0]);
511
+ }
512
+ /**
513
+ * Creates a new commit identifier from its hexadecimal string representation.
514
+ *
515
+ * # Errors
516
+ *
517
+ * Returns an error if the string is not valid hex or not 32 bytes.
518
+ * @param {string} s
519
+ * @returns {CommitId}
520
+ */
521
+ static fromHexString(s) {
522
+ const ptr0 = passStringToWasm0(s, wasm.__wbindgen_export, wasm.__wbindgen_export2);
523
+ const len0 = WASM_VECTOR_LEN;
524
+ const ret = wasm.commitid_fromHexString(ptr0, len0);
525
+ if (ret[2]) {
526
+ throw takeFromExternrefTable0(ret[1]);
527
+ }
528
+ return CommitId.__wrap(ret[0]);
529
+ }
530
+ /**
531
+ * Creates a new commit identifier from its byte representation.
532
+ *
533
+ * # Errors
534
+ *
535
+ * Returns an error if the byte slice is not exactly 32 bytes.
536
+ * @param {Uint8Array} bytes
537
+ */
538
+ constructor(bytes) {
539
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
540
+ const len0 = WASM_VECTOR_LEN;
541
+ const ret = wasm.commitid_new(ptr0, len0);
542
+ if (ret[2]) {
543
+ throw takeFromExternrefTable0(ret[1]);
544
+ }
545
+ this.__wbg_ptr = ret[0] >>> 0;
546
+ CommitIdFinalization.register(this, this.__wbg_ptr, this);
547
+ return this;
548
+ }
549
+ /**
550
+ * Returns the byte representation of the commit identifier.
551
+ * @returns {Uint8Array}
552
+ */
553
+ toBytes() {
554
+ const ret = wasm.commitid_toBytes(this.__wbg_ptr);
555
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
556
+ wasm.__wbindgen_export5(ret[0], ret[1] * 1, 1);
557
+ return v1;
558
+ }
559
+ /**
560
+ * Returns the hexadecimal string representation.
561
+ * @returns {string}
562
+ */
563
+ toHexString() {
564
+ let deferred1_0;
565
+ let deferred1_1;
566
+ try {
567
+ const ret = wasm.commitid_toHexString(this.__wbg_ptr);
568
+ deferred1_0 = ret[0];
569
+ deferred1_1 = ret[1];
570
+ return getStringFromWasm0(ret[0], ret[1]);
571
+ } finally {
572
+ wasm.__wbindgen_export5(deferred1_0, deferred1_1, 1);
573
+ }
574
+ }
575
+ }
576
+ if (Symbol.dispose) CommitId.prototype[Symbol.dispose] = CommitId.prototype.free;
577
+
442
578
  /**
443
579
  * A commit stored with its associated blob.
444
580
  */
@@ -743,8 +879,8 @@ export class Fragment {
743
879
  return BlobMeta.__wrap(ret);
744
880
  }
745
881
  /**
746
- * Get the boundary digests of the fragment.
747
- * @returns {Digest[]}
882
+ * Get the boundary commit identifiers of the fragment.
883
+ * @returns {CommitId[]}
748
884
  */
749
885
  get boundary() {
750
886
  const ret = wasm.fragment_boundary(this.__wbg_ptr);
@@ -753,25 +889,25 @@ export class Fragment {
753
889
  return v1;
754
890
  }
755
891
  /**
756
- * Get the head digest of the fragment.
757
- * @returns {Digest}
892
+ * Get the head commit identifier of the fragment.
893
+ * @returns {CommitId}
758
894
  */
759
895
  get head() {
760
896
  const ret = wasm.fragment_head(this.__wbg_ptr);
761
- return Digest.__wrap(ret);
897
+ return CommitId.__wrap(ret);
762
898
  }
763
899
  /**
764
900
  * Create a new fragment from the given sedimentree ID, head, boundary, checkpoints, and blob metadata.
765
901
  * @param {SedimentreeId} sedimentree_id
766
- * @param {Digest} head
767
- * @param {Digest[]} boundary
768
- * @param {Digest[]} checkpoints
902
+ * @param {CommitId} head
903
+ * @param {CommitId[]} boundary
904
+ * @param {CommitId[]} checkpoints
769
905
  * @param {BlobMeta} blob_meta
770
906
  */
771
907
  constructor(sedimentree_id, head, boundary, checkpoints, blob_meta) {
772
908
  _assertClass(sedimentree_id, SedimentreeId);
773
909
  var ptr0 = sedimentree_id.__destroy_into_raw();
774
- _assertClass(head, Digest);
910
+ _assertClass(head, CommitId);
775
911
  var ptr1 = head.__destroy_into_raw();
776
912
  const ptr2 = passArrayJsValueToWasm0(boundary, wasm.__wbindgen_export);
777
913
  const len2 = WASM_VECTOR_LEN;
@@ -817,22 +953,22 @@ export class FragmentRequested {
817
953
  return Depth.__wrap(ret);
818
954
  }
819
955
  /**
820
- * Get the digest of the requested fragment.
821
- * @returns {Digest}
956
+ * Get the head commit identifier of the requested fragment.
957
+ * @returns {CommitId}
822
958
  */
823
959
  get head() {
824
960
  const ret = wasm.fragmentrequested_head(this.__wbg_ptr);
825
- return Digest.__wrap(ret);
961
+ return CommitId.__wrap(ret);
826
962
  }
827
963
  /**
828
- * Create a new fragment request from the given digest.
829
- * @param {Digest} digest
964
+ * Create a new fragment request from the given commit ID.
965
+ * @param {CommitId} commit_id
830
966
  * @param {Depth} depth
831
967
  */
832
- constructor(digest, depth) {
833
- _assertClass(digest, Digest);
968
+ constructor(commit_id, depth) {
969
+ _assertClass(commit_id, CommitId);
834
970
  _assertClass(depth, Depth);
835
- const ret = wasm.fragmentrequested_new(digest.__wbg_ptr, depth.__wbg_ptr);
971
+ const ret = wasm.fragmentrequested_new(commit_id.__wbg_ptr, depth.__wbg_ptr);
836
972
  this.__wbg_ptr = ret >>> 0;
837
973
  FragmentRequestedFinalization.register(this, this.__wbg_ptr, this);
838
974
  return this;
@@ -997,7 +1133,15 @@ export class LooseCommit {
997
1133
  return BlobMeta.__wrap(ret);
998
1134
  }
999
1135
  /**
1000
- * Get the digest of the commit.
1136
+ * Get the commit's head identifier.
1137
+ * @returns {CommitId}
1138
+ */
1139
+ get commitId() {
1140
+ const ret = wasm.loosecommit_commitId(this.__wbg_ptr);
1141
+ return CommitId.__wrap(ret);
1142
+ }
1143
+ /**
1144
+ * Get the digest of the commit (content hash).
1001
1145
  * @returns {Digest}
1002
1146
  */
1003
1147
  get digest() {
@@ -1005,25 +1149,28 @@ export class LooseCommit {
1005
1149
  return Digest.__wrap(ret);
1006
1150
  }
1007
1151
  /**
1008
- * Create a new `LooseCommit` from the given sedimentree ID, parents, and blob metadata.
1152
+ * Create a new `LooseCommit` from the given sedimentree ID, head, parents, and blob metadata.
1009
1153
  * @param {SedimentreeId} sedimentree_id
1010
- * @param {Digest[]} parents
1154
+ * @param {CommitId} head
1155
+ * @param {CommitId[]} parents
1011
1156
  * @param {BlobMeta} blob_meta
1012
1157
  */
1013
- constructor(sedimentree_id, parents, blob_meta) {
1158
+ constructor(sedimentree_id, head, parents, blob_meta) {
1014
1159
  _assertClass(sedimentree_id, SedimentreeId);
1015
1160
  var ptr0 = sedimentree_id.__destroy_into_raw();
1016
- const ptr1 = passArrayJsValueToWasm0(parents, wasm.__wbindgen_export);
1017
- const len1 = WASM_VECTOR_LEN;
1161
+ _assertClass(head, CommitId);
1162
+ var ptr1 = head.__destroy_into_raw();
1163
+ const ptr2 = passArrayJsValueToWasm0(parents, wasm.__wbindgen_export);
1164
+ const len2 = WASM_VECTOR_LEN;
1018
1165
  _assertClass(blob_meta, BlobMeta);
1019
- const ret = wasm.loosecommit_new(ptr0, ptr1, len1, blob_meta.__wbg_ptr);
1166
+ const ret = wasm.loosecommit_new(ptr0, ptr1, ptr2, len2, blob_meta.__wbg_ptr);
1020
1167
  this.__wbg_ptr = ret >>> 0;
1021
1168
  LooseCommitFinalization.register(this, this.__wbg_ptr, this);
1022
1169
  return this;
1023
1170
  }
1024
1171
  /**
1025
- * Get the parent digests of the commit.
1026
- * @returns {Digest[]}
1172
+ * Get the parent commit identifiers.
1173
+ * @returns {CommitId[]}
1027
1174
  */
1028
1175
  get parents() {
1029
1176
  const ret = wasm.loosecommit_parents(this.__wbg_ptr);
@@ -1185,27 +1332,27 @@ export class MemoryStorage {
1185
1332
  return ret;
1186
1333
  }
1187
1334
  /**
1188
- * Delete a commit by digest.
1335
+ * Delete a single commit by its ID.
1189
1336
  * @param {SedimentreeId} sedimentree_id
1190
- * @param {Digest} digest
1337
+ * @param {CommitId} commit_id
1191
1338
  * @returns {Promise<any>}
1192
1339
  */
1193
- deleteCommit(sedimentree_id, digest) {
1340
+ deleteCommit(sedimentree_id, commit_id) {
1194
1341
  _assertClass(sedimentree_id, SedimentreeId);
1195
- _assertClass(digest, Digest);
1196
- const ret = wasm.memorystorage_deleteCommit(this.__wbg_ptr, sedimentree_id.__wbg_ptr, digest.__wbg_ptr);
1342
+ _assertClass(commit_id, CommitId);
1343
+ const ret = wasm.memorystorage_deleteCommit(this.__wbg_ptr, sedimentree_id.__wbg_ptr, commit_id.__wbg_ptr);
1197
1344
  return ret;
1198
1345
  }
1199
1346
  /**
1200
- * Delete a fragment by digest.
1347
+ * Delete a fragment by its identifier.
1201
1348
  * @param {SedimentreeId} sedimentree_id
1202
- * @param {Digest} digest
1349
+ * @param {CommitId} fragment_head
1203
1350
  * @returns {Promise<any>}
1204
1351
  */
1205
- deleteFragment(sedimentree_id, digest) {
1352
+ deleteFragment(sedimentree_id, fragment_head) {
1206
1353
  _assertClass(sedimentree_id, SedimentreeId);
1207
- _assertClass(digest, Digest);
1208
- const ret = wasm.memorystorage_deleteFragment(this.__wbg_ptr, sedimentree_id.__wbg_ptr, digest.__wbg_ptr);
1354
+ _assertClass(fragment_head, CommitId);
1355
+ const ret = wasm.memorystorage_deleteFragment(this.__wbg_ptr, sedimentree_id.__wbg_ptr, fragment_head.__wbg_ptr);
1209
1356
  return ret;
1210
1357
  }
1211
1358
  /**
@@ -1219,23 +1366,23 @@ export class MemoryStorage {
1219
1366
  return ret;
1220
1367
  }
1221
1368
  /**
1222
- * List all commit digests for a sedimentree.
1369
+ * List all commit IDs for a sedimentree.
1223
1370
  * @param {SedimentreeId} sedimentree_id
1224
1371
  * @returns {Promise<any>}
1225
1372
  */
1226
- listCommitDigests(sedimentree_id) {
1373
+ listCommitIds(sedimentree_id) {
1227
1374
  _assertClass(sedimentree_id, SedimentreeId);
1228
- const ret = wasm.memorystorage_listCommitDigests(this.__wbg_ptr, sedimentree_id.__wbg_ptr);
1375
+ const ret = wasm.memorystorage_listCommitIds(this.__wbg_ptr, sedimentree_id.__wbg_ptr);
1229
1376
  return ret;
1230
1377
  }
1231
1378
  /**
1232
- * List all fragment digests for a sedimentree.
1379
+ * List all fragment IDs for a sedimentree.
1233
1380
  * @param {SedimentreeId} sedimentree_id
1234
1381
  * @returns {Promise<any>}
1235
1382
  */
1236
- listFragmentDigests(sedimentree_id) {
1383
+ listFragmentIds(sedimentree_id) {
1237
1384
  _assertClass(sedimentree_id, SedimentreeId);
1238
- const ret = wasm.memorystorage_listFragmentDigests(this.__wbg_ptr, sedimentree_id.__wbg_ptr);
1385
+ const ret = wasm.memorystorage_listFragmentIds(this.__wbg_ptr, sedimentree_id.__wbg_ptr);
1239
1386
  return ret;
1240
1387
  }
1241
1388
  /**
@@ -1267,27 +1414,27 @@ export class MemoryStorage {
1267
1414
  return ret;
1268
1415
  }
1269
1416
  /**
1270
- * Load a commit by digest, returning `CommitWithBlob` or null.
1417
+ * Load a single commit by its ID, returning `CommitWithBlob` or null.
1271
1418
  * @param {SedimentreeId} sedimentree_id
1272
- * @param {Digest} digest
1419
+ * @param {CommitId} commit_id
1273
1420
  * @returns {Promise<any>}
1274
1421
  */
1275
- loadCommit(sedimentree_id, digest) {
1422
+ loadCommit(sedimentree_id, commit_id) {
1276
1423
  _assertClass(sedimentree_id, SedimentreeId);
1277
- _assertClass(digest, Digest);
1278
- const ret = wasm.memorystorage_loadCommit(this.__wbg_ptr, sedimentree_id.__wbg_ptr, digest.__wbg_ptr);
1424
+ _assertClass(commit_id, CommitId);
1425
+ const ret = wasm.memorystorage_loadCommit(this.__wbg_ptr, sedimentree_id.__wbg_ptr, commit_id.__wbg_ptr);
1279
1426
  return ret;
1280
1427
  }
1281
1428
  /**
1282
- * Load a fragment by digest, returning `FragmentWithBlob` or null.
1429
+ * Load a fragment by its identifier, returning `FragmentWithBlob` or null.
1283
1430
  * @param {SedimentreeId} sedimentree_id
1284
- * @param {Digest} digest
1431
+ * @param {CommitId} fragment_head
1285
1432
  * @returns {Promise<any>}
1286
1433
  */
1287
- loadFragment(sedimentree_id, digest) {
1434
+ loadFragment(sedimentree_id, fragment_head) {
1288
1435
  _assertClass(sedimentree_id, SedimentreeId);
1289
- _assertClass(digest, Digest);
1290
- const ret = wasm.memorystorage_loadFragment(this.__wbg_ptr, sedimentree_id.__wbg_ptr, digest.__wbg_ptr);
1436
+ _assertClass(fragment_head, CommitId);
1437
+ const ret = wasm.memorystorage_loadFragment(this.__wbg_ptr, sedimentree_id.__wbg_ptr, fragment_head.__wbg_ptr);
1291
1438
  return ret;
1292
1439
  }
1293
1440
  /**
@@ -1313,32 +1460,41 @@ export class MemoryStorage {
1313
1460
  }
1314
1461
  /**
1315
1462
  * Save a commit with its blob.
1463
+ *
1464
+ * The `commit_id` parameter must match the `head()` embedded in
1465
+ * the signed commit payload. Returns an error if they differ.
1466
+ *
1467
+ * # Errors
1468
+ *
1469
+ * Returns a JS error if:
1470
+ * - The signed payload cannot be decoded
1471
+ * - The `commit_id` does not match the embedded `head()`
1316
1472
  * @param {SedimentreeId} sedimentree_id
1317
- * @param {Digest} _digest
1473
+ * @param {CommitId} commit_id
1318
1474
  * @param {SignedLooseCommit} signed_commit
1319
1475
  * @param {Uint8Array} blob
1320
1476
  * @returns {Promise<any>}
1321
1477
  */
1322
- saveCommit(sedimentree_id, _digest, signed_commit, blob) {
1478
+ saveCommit(sedimentree_id, commit_id, signed_commit, blob) {
1323
1479
  _assertClass(sedimentree_id, SedimentreeId);
1324
- _assertClass(_digest, Digest);
1480
+ _assertClass(commit_id, CommitId);
1325
1481
  _assertClass(signed_commit, SignedLooseCommit);
1326
- const ret = wasm.memorystorage_saveCommit(this.__wbg_ptr, sedimentree_id.__wbg_ptr, _digest.__wbg_ptr, signed_commit.__wbg_ptr, blob);
1482
+ const ret = wasm.memorystorage_saveCommit(this.__wbg_ptr, sedimentree_id.__wbg_ptr, commit_id.__wbg_ptr, signed_commit.__wbg_ptr, blob);
1327
1483
  return ret;
1328
1484
  }
1329
1485
  /**
1330
1486
  * Save a fragment with its blob.
1331
1487
  * @param {SedimentreeId} sedimentree_id
1332
- * @param {Digest} _digest
1488
+ * @param {CommitId} _fragment_head
1333
1489
  * @param {SignedFragment} signed_fragment
1334
1490
  * @param {Uint8Array} blob
1335
1491
  * @returns {Promise<any>}
1336
1492
  */
1337
- saveFragment(sedimentree_id, _digest, signed_fragment, blob) {
1493
+ saveFragment(sedimentree_id, _fragment_head, signed_fragment, blob) {
1338
1494
  _assertClass(sedimentree_id, SedimentreeId);
1339
- _assertClass(_digest, Digest);
1495
+ _assertClass(_fragment_head, CommitId);
1340
1496
  _assertClass(signed_fragment, SignedFragment);
1341
- const ret = wasm.memorystorage_saveFragment(this.__wbg_ptr, sedimentree_id.__wbg_ptr, _digest.__wbg_ptr, signed_fragment.__wbg_ptr, blob);
1497
+ const ret = wasm.memorystorage_saveFragment(this.__wbg_ptr, sedimentree_id.__wbg_ptr, _fragment_head.__wbg_ptr, signed_fragment.__wbg_ptr, blob);
1342
1498
  return ret;
1343
1499
  }
1344
1500
  /**
@@ -2086,15 +2242,17 @@ export class Subduction {
2086
2242
  *
2087
2243
  * Returns a [`WasmWriteError`] if storage, networking, or policy fail.
2088
2244
  * @param {SedimentreeId} id
2089
- * @param {Digest[]} parents
2245
+ * @param {CommitId} head
2246
+ * @param {CommitId[]} parents
2090
2247
  * @param {Uint8Array} blob
2091
2248
  * @returns {Promise<FragmentRequested | undefined>}
2092
2249
  */
2093
- addCommit(id, parents, blob) {
2250
+ addCommit(id, head, parents, blob) {
2094
2251
  _assertClass(id, SedimentreeId);
2252
+ _assertClass(head, CommitId);
2095
2253
  const ptr0 = passArrayJsValueToWasm0(parents, wasm.__wbindgen_export);
2096
2254
  const len0 = WASM_VECTOR_LEN;
2097
- const ret = wasm.subduction_addCommit(this.__wbg_ptr, id.__wbg_ptr, ptr0, len0, blob);
2255
+ const ret = wasm.subduction_addCommit(this.__wbg_ptr, id.__wbg_ptr, head.__wbg_ptr, ptr0, len0, blob);
2098
2256
  return ret;
2099
2257
  }
2100
2258
  /**
@@ -2134,15 +2292,15 @@ export class Subduction {
2134
2292
  *
2135
2293
  * Returns a [`WasmWriteError`] if storage, networking, or policy fail.
2136
2294
  * @param {SedimentreeId} id
2137
- * @param {Digest} head
2138
- * @param {Digest[]} boundary
2139
- * @param {Digest[]} checkpoints
2295
+ * @param {CommitId} head
2296
+ * @param {CommitId[]} boundary
2297
+ * @param {CommitId[]} checkpoints
2140
2298
  * @param {Uint8Array} blob
2141
2299
  * @returns {Promise<void>}
2142
2300
  */
2143
2301
  addFragment(id, head, boundary, checkpoints, blob) {
2144
2302
  _assertClass(id, SedimentreeId);
2145
- _assertClass(head, Digest);
2303
+ _assertClass(head, CommitId);
2146
2304
  const ptr0 = passArrayJsValueToWasm0(boundary, wasm.__wbindgen_export);
2147
2305
  const len0 = WASM_VECTOR_LEN;
2148
2306
  const ptr1 = passArrayJsValueToWasm0(checkpoints, wasm.__wbindgen_export);
@@ -3239,7 +3397,7 @@ export class SyncStats {
3239
3397
  }
3240
3398
  /**
3241
3399
  * The remote peer's heads for this sedimentree.
3242
- * @returns {Digest[]}
3400
+ * @returns {CommitId[]}
3243
3401
  */
3244
3402
  get remoteHeads() {
3245
3403
  const ret = wasm.syncstats_remoteHeads(this.__wbg_ptr);
@@ -3451,37 +3609,43 @@ export function makeMessagePortTransport(port) {
3451
3609
  export function start() {
3452
3610
  wasm.start();
3453
3611
  }
3454
- export function __wbg___wasm_refgen_toWasmCommitWithBlob_bcab5aaed3558280(arg0) {
3612
+ export function __wbg___wasm_refgen_toWasmCommitId_65b818e358f27de6(arg0) {
3613
+ const ret = arg0.__wasm_refgen_toWasmCommitId();
3614
+ _assertClass(ret, CommitId);
3615
+ var ptr1 = ret.__destroy_into_raw();
3616
+ return ptr1;
3617
+ }
3618
+ export function __wbg___wasm_refgen_toWasmCommitWithBlob_4ee001b6d734dc9e(arg0) {
3455
3619
  const ret = arg0.__wasm_refgen_toWasmCommitWithBlob();
3456
3620
  _assertClass(ret, CommitWithBlob);
3457
3621
  var ptr1 = ret.__destroy_into_raw();
3458
3622
  return ptr1;
3459
3623
  }
3460
- export function __wbg___wasm_refgen_toWasmDepth_5124f666e343ff0c(arg0) {
3624
+ export function __wbg___wasm_refgen_toWasmDepth_c561b40f337714d7(arg0) {
3461
3625
  const ret = arg0.__wasm_refgen_toWasmDepth();
3462
3626
  _assertClass(ret, Depth);
3463
3627
  var ptr1 = ret.__destroy_into_raw();
3464
3628
  return ptr1;
3465
3629
  }
3466
- export function __wbg___wasm_refgen_toWasmDigest_476b24805f220005(arg0) {
3630
+ export function __wbg___wasm_refgen_toWasmDigest_19e9d6dad971a705(arg0) {
3467
3631
  const ret = arg0.__wasm_refgen_toWasmDigest();
3468
3632
  _assertClass(ret, Digest);
3469
3633
  var ptr1 = ret.__destroy_into_raw();
3470
3634
  return ptr1;
3471
3635
  }
3472
- export function __wbg___wasm_refgen_toWasmFragmentWithBlob_ed713e5c5f4cc52e(arg0) {
3636
+ export function __wbg___wasm_refgen_toWasmFragmentWithBlob_e8ef521f2984e238(arg0) {
3473
3637
  const ret = arg0.__wasm_refgen_toWasmFragmentWithBlob();
3474
3638
  _assertClass(ret, FragmentWithBlob);
3475
3639
  var ptr1 = ret.__destroy_into_raw();
3476
3640
  return ptr1;
3477
3641
  }
3478
- export function __wbg___wasm_refgen_toWasmFragment_10dd1ff9b3934840(arg0) {
3642
+ export function __wbg___wasm_refgen_toWasmFragment_38ddb9958dbdc455(arg0) {
3479
3643
  const ret = arg0.__wasm_refgen_toWasmFragment();
3480
3644
  _assertClass(ret, Fragment);
3481
3645
  var ptr1 = ret.__destroy_into_raw();
3482
3646
  return ptr1;
3483
3647
  }
3484
- export function __wbg___wasm_refgen_toWasmLooseCommit_f36ad6a9389cee03(arg0) {
3648
+ export function __wbg___wasm_refgen_toWasmLooseCommit_876edb05490f6350(arg0) {
3485
3649
  const ret = arg0.__wasm_refgen_toWasmLooseCommit();
3486
3650
  _assertClass(ret, LooseCommit);
3487
3651
  var ptr1 = ret.__destroy_into_raw();
@@ -3555,23 +3719,23 @@ export function __wbg_authenticatedwebsocket_new(arg0) {
3555
3719
  const ret = AuthenticatedWebSocket.__wrap(arg0);
3556
3720
  return ret;
3557
3721
  }
3558
- export function __wbg_authorizeConnect_8e2609308bbbbcfd() { return handleError(function (arg0, arg1) {
3722
+ export function __wbg_authorizeConnect_21fe4159e45997db() { return handleError(function (arg0, arg1) {
3559
3723
  const ret = arg0.authorizeConnect(PeerId.__wrap(arg1));
3560
3724
  return ret;
3561
3725
  }, arguments); }
3562
- export function __wbg_authorizeFetch_b7bcc4e437112c73() { return handleError(function (arg0, arg1, arg2) {
3726
+ export function __wbg_authorizeFetch_03f9af424032be8f() { return handleError(function (arg0, arg1, arg2) {
3563
3727
  const ret = arg0.authorizeFetch(PeerId.__wrap(arg1), SedimentreeId.__wrap(arg2));
3564
3728
  return ret;
3565
3729
  }, arguments); }
3566
- export function __wbg_authorizePublish_7e546fc3d8103532() { return handleError(function (arg0, arg1, arg2) {
3730
+ export function __wbg_authorizePublish_25c669bb7ef08215() { return handleError(function (arg0, arg1, arg2) {
3567
3731
  const ret = arg0.authorizePublish(PeerId.__wrap(arg1), Topic.__wrap(arg2));
3568
3732
  return ret;
3569
3733
  }, arguments); }
3570
- export function __wbg_authorizePut_ba5a5e36c9e9bbfa() { return handleError(function (arg0, arg1, arg2, arg3) {
3734
+ export function __wbg_authorizePut_a25e6f1145209b09() { return handleError(function (arg0, arg1, arg2, arg3) {
3571
3735
  const ret = arg0.authorizePut(PeerId.__wrap(arg1), PeerId.__wrap(arg2), SedimentreeId.__wrap(arg3));
3572
3736
  return ret;
3573
3737
  }, arguments); }
3574
- export function __wbg_authorizeSubscribe_34f5ba6f23bab853() { return handleError(function (arg0, arg1, arg2) {
3738
+ export function __wbg_authorizeSubscribe_b0a4693c31b61926() { return handleError(function (arg0, arg1, arg2) {
3575
3739
  const ret = arg0.authorizeSubscribe(PeerId.__wrap(arg1), Topic.__wrap(arg2));
3576
3740
  return ret;
3577
3741
  }, arguments); }
@@ -3591,14 +3755,18 @@ export function __wbg_call_f858478a02f9600f() { return handleError(function (arg
3591
3755
  const ret = arg0.call(arg1, arg2, arg3, arg4);
3592
3756
  return ret;
3593
3757
  }, arguments); }
3758
+ export function __wbg_close_23a850186a1bff7e(arg0) {
3759
+ arg0.close();
3760
+ }
3594
3761
  export function __wbg_close_af26905c832a88cb() { return handleError(function (arg0) {
3595
3762
  arg0.close();
3596
3763
  }, arguments); }
3597
3764
  export function __wbg_close_cbf870bdad0aad99(arg0) {
3598
3765
  arg0.close();
3599
3766
  }
3600
- export function __wbg_close_f85b3643ad9ed8d4(arg0) {
3601
- arg0.close();
3767
+ export function __wbg_commitid_new(arg0) {
3768
+ const ret = CommitId.__wrap(arg0);
3769
+ return ret;
3602
3770
  }
3603
3771
  export function __wbg_commitwithblob_new(arg0) {
3604
3772
  const ret = CommitWithBlob.__wrap(arg0);
@@ -3620,11 +3788,11 @@ export function __wbg_data_a3d9ff9cdd801002(arg0) {
3620
3788
  const ret = arg0.data;
3621
3789
  return ret;
3622
3790
  }
3623
- export function __wbg_deleteAllCommits_026a63e00bba2a2c(arg0, arg1) {
3791
+ export function __wbg_deleteAllCommits_010500ef54b293ad(arg0, arg1) {
3624
3792
  const ret = arg0.deleteAllCommits(arg1);
3625
3793
  return ret;
3626
3794
  }
3627
- export function __wbg_deleteAllFragments_857ddb74b3342f83(arg0, arg1) {
3795
+ export function __wbg_deleteAllFragments_ab9739674b79c634(arg0, arg1) {
3628
3796
  const ret = arg0.deleteAllFragments(arg1);
3629
3797
  return ret;
3630
3798
  }
@@ -3636,7 +3804,7 @@ export function __wbg_digest_unwrap(arg0) {
3636
3804
  const ret = Digest.__unwrap(arg0);
3637
3805
  return ret;
3638
3806
  }
3639
- export function __wbg_disconnect_91312bb506e834b1(arg0) {
3807
+ export function __wbg_disconnect_9e7aaa7f19eca5a1(arg0) {
3640
3808
  const ret = arg0.disconnect();
3641
3809
  return ret;
3642
3810
  }
@@ -3663,13 +3831,13 @@ export function __wbg_fetch_f8a611684c3b5fe5(arg0, arg1) {
3663
3831
  const ret = arg0.fetch(arg1);
3664
3832
  return ret;
3665
3833
  }
3666
- export function __wbg_filterAuthorizedFetch_a647f13dc33948f1() { return handleError(function (arg0, arg1, arg2, arg3) {
3834
+ export function __wbg_filterAuthorizedFetch_6200c76db1af659a() { return handleError(function (arg0, arg1, arg2, arg3) {
3667
3835
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
3668
3836
  wasm.__wbindgen_export5(arg2, arg3 * 4, 4);
3669
3837
  const ret = arg0.filterAuthorizedFetch(PeerId.__wrap(arg1), v0);
3670
3838
  return ret;
3671
3839
  }, arguments); }
3672
- export function __wbg_filterAuthorizedSubscribers_34bdeaaac0eb31a5() { return handleError(function (arg0, arg1, arg2, arg3) {
3840
+ export function __wbg_filterAuthorizedSubscribers_68da0bf57e85166c() { return handleError(function (arg0, arg1, arg2, arg3) {
3673
3841
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
3674
3842
  wasm.__wbindgen_export5(arg2, arg3 * 4, 4);
3675
3843
  const ret = arg0.filterAuthorizedSubscribers(Topic.__wrap(arg1), v0);
@@ -3863,15 +4031,15 @@ export function __wbg_length_ea16607d7b61445b(arg0) {
3863
4031
  const ret = arg0.length;
3864
4032
  return ret;
3865
4033
  }
3866
- export function __wbg_loadAllCommits_c18e977eb552890c(arg0, arg1) {
4034
+ export function __wbg_loadAllCommits_66f201365cd0de6b(arg0, arg1) {
3867
4035
  const ret = arg0.loadAllCommits(arg1);
3868
4036
  return ret;
3869
4037
  }
3870
- export function __wbg_loadAllFragments_499f304a483c7f7f(arg0, arg1) {
4038
+ export function __wbg_loadAllFragments_e9d859acefaaecfb(arg0, arg1) {
3871
4039
  const ret = arg0.loadAllFragments(arg1);
3872
4040
  return ret;
3873
4041
  }
3874
- export function __wbg_loadAllSedimentreeIds_da48711155f73930(arg0) {
4042
+ export function __wbg_loadAllSedimentreeIds_940b75def2a4f752(arg0) {
3875
4043
  const ret = arg0.loadAllSedimentreeIds();
3876
4044
  return ret;
3877
4045
  }
@@ -3914,7 +4082,7 @@ export function __wbg_new_d098e265629cd10f(arg0, arg1) {
3914
4082
  const a = state0.a;
3915
4083
  state0.a = 0;
3916
4084
  try {
3917
- return __wasm_bindgen_func_elem_1652_195(a, state0.b, arg0, arg1);
4085
+ return __wasm_bindgen_func_elem_1666_203(a, state0.b, arg0, arg1);
3918
4086
  } finally {
3919
4087
  state0.a = a;
3920
4088
  }
@@ -3948,7 +4116,7 @@ export function __wbg_new_typed_aaaeaf29cf802876(arg0, arg1) {
3948
4116
  const a = state0.a;
3949
4117
  state0.a = 0;
3950
4118
  try {
3951
- return __wasm_bindgen_func_elem_1652_196(a, state0.b, arg0, arg1);
4119
+ return __wasm_bindgen_func_elem_1666_204(a, state0.b, arg0, arg1);
3952
4120
  } finally {
3953
4121
  state0.a = a;
3954
4122
  }
@@ -3999,7 +4167,7 @@ export function __wbg_of_d6376e3774c51f89(arg0, arg1) {
3999
4167
  const ret = Array.of(arg0, arg1);
4000
4168
  return ret;
4001
4169
  }
4002
- export function __wbg_onDisconnect_a24437def131c941(arg0, arg1) {
4170
+ export function __wbg_onDisconnect_9a45cfe08cc17d33(arg0, arg1) {
4003
4171
  arg0.onDisconnect(arg1);
4004
4172
  }
4005
4173
  export function __wbg_open_e7a9d3d6344572f6() { return handleError(function (arg0, arg1, arg2, arg3) {
@@ -4026,7 +4194,7 @@ export function __wbg_port2_947a51b8ba00adc9(arg0) {
4026
4194
  const ret = arg0.port2;
4027
4195
  return ret;
4028
4196
  }
4029
- export function __wbg_postMessage_fb1c205fdbbf796d(arg0, arg1) {
4197
+ export function __wbg_postMessage_a6e9396a4a5452a0(arg0, arg1) {
4030
4198
  arg0.postMessage(arg1);
4031
4199
  }
4032
4200
  export function __wbg_process_44c7a14e11e9f69e(arg0) {
@@ -4058,7 +4226,7 @@ export function __wbg_readyState_1f1e7f1bdf9f4d42(arg0) {
4058
4226
  const ret = arg0.readyState;
4059
4227
  return ret;
4060
4228
  }
4061
- export function __wbg_recvBytes_e13f381294da16db(arg0) {
4229
+ export function __wbg_recvBytes_4eb8483c95417eaa(arg0) {
4062
4230
  const ret = arg0.recvBytes();
4063
4231
  return ret;
4064
4232
  }
@@ -4074,19 +4242,19 @@ export function __wbg_result_c5baa2d3d690a01a() { return handleError(function (a
4074
4242
  const ret = arg0.result;
4075
4243
  return ret;
4076
4244
  }, arguments); }
4077
- export function __wbg_saveBatchAll_7c5c5f486aefa571(arg0, arg1, arg2, arg3) {
4245
+ export function __wbg_saveBatchAll_c5596fcba8bd2a15(arg0, arg1, arg2, arg3) {
4078
4246
  const ret = arg0.saveBatchAll(arg1, arg2, arg3);
4079
4247
  return ret;
4080
4248
  }
4081
- export function __wbg_saveCommit_fb38edd913837eb2(arg0, arg1, arg2, arg3, arg4) {
4249
+ export function __wbg_saveCommit_acfb018dfd6c3f76(arg0, arg1, arg2, arg3, arg4) {
4082
4250
  const ret = arg0.saveCommit(arg1, arg2, arg3, arg4);
4083
4251
  return ret;
4084
4252
  }
4085
- export function __wbg_saveFragment_8682cc697a38dbad(arg0, arg1, arg2, arg3, arg4) {
4253
+ export function __wbg_saveFragment_af45ae70254a194a(arg0, arg1, arg2, arg3, arg4) {
4086
4254
  const ret = arg0.saveFragment(arg1, arg2, arg3, arg4);
4087
4255
  return ret;
4088
4256
  }
4089
- export function __wbg_saveSedimentreeId_ec8145842e87e53b(arg0, arg1) {
4257
+ export function __wbg_saveSedimentreeId_78191f33b235abff(arg0, arg1) {
4090
4258
  const ret = arg0.saveSedimentreeId(arg1);
4091
4259
  return ret;
4092
4260
  }
@@ -4098,14 +4266,14 @@ export function __wbg_sedimentreeid_unwrap(arg0) {
4098
4266
  const ret = SedimentreeId.__unwrap(arg0);
4099
4267
  return ret;
4100
4268
  }
4101
- export function __wbg_sendBytes_9a00cdaf7c891eff(arg0, arg1) {
4269
+ export function __wbg_sendBytes_9eb20f735c0b8c5d(arg0, arg1) {
4102
4270
  const ret = arg0.sendBytes(arg1);
4103
4271
  return ret;
4104
4272
  }
4105
4273
  export function __wbg_send_d31a693c975dea74() { return handleError(function (arg0, arg1, arg2) {
4106
4274
  arg0.send(getArrayU8FromWasm0(arg1, arg2));
4107
4275
  }, arguments); }
4108
- export function __wbg_setTimeout_43db2c2050a4d3d2(arg0, arg1) {
4276
+ export function __wbg_setTimeout_37e1d1c4bd350e8e(arg0, arg1) {
4109
4277
  const ret = setTimeout(arg0, arg1);
4110
4278
  return ret;
4111
4279
  }
@@ -4146,10 +4314,10 @@ export function __wbg_set_onerror_8a268cb237177bba(arg0, arg1) {
4146
4314
  export function __wbg_set_onerror_901ca711f94a5bbb(arg0, arg1) {
4147
4315
  arg0.onerror = arg1;
4148
4316
  }
4149
- export function __wbg_set_onmessage_284248c97c42cb93(arg0, arg1) {
4317
+ export function __wbg_set_onmessage_6f80ab771bf151aa(arg0, arg1) {
4150
4318
  arg0.onmessage = arg1;
4151
4319
  }
4152
- export function __wbg_set_onmessage_6f80ab771bf151aa(arg0, arg1) {
4320
+ export function __wbg_set_onmessage_a5e9c6dfb75369b5(arg0, arg1) {
4153
4321
  arg0.onmessage = arg1;
4154
4322
  }
4155
4323
  export function __wbg_set_onopen_34e3e24cf9337ddd(arg0, arg1) {
@@ -4165,7 +4333,7 @@ export function __wbg_sign_a34d057afd14c54d() { return handleError(function (arg
4165
4333
  const ret = arg0.sign(arg1, arg2, getArrayU8FromWasm0(arg3, arg4));
4166
4334
  return ret;
4167
4335
  }, arguments); }
4168
- export function __wbg_sign_e6fa76bd4ef9c75a(arg0, arg1) {
4336
+ export function __wbg_sign_c34ae159953b0497(arg0, arg1) {
4169
4337
  const ret = arg0.sign(arg1);
4170
4338
  return ret;
4171
4339
  }
@@ -4263,14 +4431,14 @@ export function __wbg_transaction_2237af0233efbdf3() { return handleError(functi
4263
4431
  const ret = arg0.transaction(getStringFromWasm0(arg1, arg2));
4264
4432
  return ret;
4265
4433
  }, arguments); }
4266
- export function __wbg_tryIntoJsSedimentreeIdsArray_b07d2438a6f2a3b9() { return handleError(function (arg0, arg1) {
4434
+ export function __wbg_tryIntoJsSedimentreeIdsArray_e5ce060b44a1b912() { return handleError(function (arg0, arg1) {
4267
4435
  const ret = tryIntoJsSedimentreeIdsArray(arg1);
4268
4436
  const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_export);
4269
4437
  const len1 = WASM_VECTOR_LEN;
4270
4438
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
4271
4439
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
4272
4440
  }, arguments); }
4273
- export function __wbg_verifyingKey_28c38fc6525caed5(arg0) {
4441
+ export function __wbg_verifyingKey_cff7231a6c8624d7(arg0) {
4274
4442
  const ret = arg0.verifyingKey();
4275
4443
  return ret;
4276
4444
  }
@@ -4284,32 +4452,32 @@ export function __wbg_webcryptosigner_new(arg0) {
4284
4452
  }
4285
4453
  export function __wbindgen_cast_0000000000000001(arg0, arg1) {
4286
4454
  // Cast intrinsic for `Closure(Closure { dtor_idx: 11, function: Function { arguments: [Externref], shim_idx: 12, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
4287
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_287, __wasm_bindgen_func_elem_639);
4455
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_291, __wasm_bindgen_func_elem_658);
4288
4456
  return ret;
4289
4457
  }
4290
4458
  export function __wbindgen_cast_0000000000000002(arg0, arg1) {
4291
4459
  // Cast intrinsic for `Closure(Closure { dtor_idx: 11, function: Function { arguments: [NamedExternref("Event")], shim_idx: 12, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
4292
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_287, __wasm_bindgen_func_elem_639_1);
4460
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_291, __wasm_bindgen_func_elem_658_1);
4293
4461
  return ret;
4294
4462
  }
4295
4463
  export function __wbindgen_cast_0000000000000003(arg0, arg1) {
4296
4464
  // Cast intrinsic for `Closure(Closure { dtor_idx: 11, function: Function { arguments: [NamedExternref("IDBVersionChangeEvent")], shim_idx: 12, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
4297
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_287, __wasm_bindgen_func_elem_639_2);
4465
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_291, __wasm_bindgen_func_elem_658_2);
4298
4466
  return ret;
4299
4467
  }
4300
4468
  export function __wbindgen_cast_0000000000000004(arg0, arg1) {
4301
4469
  // Cast intrinsic for `Closure(Closure { dtor_idx: 11, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 12, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
4302
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_287, __wasm_bindgen_func_elem_639_3);
4470
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_291, __wasm_bindgen_func_elem_658_3);
4303
4471
  return ret;
4304
4472
  }
4305
4473
  export function __wbindgen_cast_0000000000000005(arg0, arg1) {
4306
4474
  // Cast intrinsic for `Closure(Closure { dtor_idx: 11, function: Function { arguments: [], shim_idx: 13, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
4307
- const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_287, __wasm_bindgen_func_elem_638);
4475
+ const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_291, __wasm_bindgen_func_elem_657);
4308
4476
  return ret;
4309
4477
  }
4310
4478
  export function __wbindgen_cast_0000000000000006(arg0, arg1) {
4311
- // Cast intrinsic for `Closure(Closure { dtor_idx: 677, function: Function { arguments: [Externref], shim_idx: 761, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
4312
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_287, __wasm_bindgen_func_elem_1652);
4479
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 686, function: Function { arguments: [Externref], shim_idx: 772, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
4480
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_291, __wasm_bindgen_func_elem_1666);
4313
4481
  return ret;
4314
4482
  }
4315
4483
  export function __wbindgen_cast_0000000000000007(arg0) {
@@ -4371,39 +4539,39 @@ export function __wbindgen_init_externref_table() {
4371
4539
  table.set(offset + 2, true);
4372
4540
  table.set(offset + 3, false);
4373
4541
  }
4374
- function __wasm_bindgen_func_elem_638(arg0, arg1) {
4375
- wasm.__wasm_bindgen_func_elem_638(arg0, arg1);
4542
+ function __wasm_bindgen_func_elem_657(arg0, arg1) {
4543
+ wasm.__wasm_bindgen_func_elem_657(arg0, arg1);
4376
4544
  }
4377
4545
 
4378
- function __wasm_bindgen_func_elem_639(arg0, arg1, arg2) {
4379
- wasm.__wasm_bindgen_func_elem_639(arg0, arg1, arg2);
4546
+ function __wasm_bindgen_func_elem_658(arg0, arg1, arg2) {
4547
+ wasm.__wasm_bindgen_func_elem_658(arg0, arg1, arg2);
4380
4548
  }
4381
4549
 
4382
- function __wasm_bindgen_func_elem_639_1(arg0, arg1, arg2) {
4383
- wasm.__wasm_bindgen_func_elem_639_1(arg0, arg1, arg2);
4550
+ function __wasm_bindgen_func_elem_658_1(arg0, arg1, arg2) {
4551
+ wasm.__wasm_bindgen_func_elem_658_1(arg0, arg1, arg2);
4384
4552
  }
4385
4553
 
4386
- function __wasm_bindgen_func_elem_639_2(arg0, arg1, arg2) {
4387
- wasm.__wasm_bindgen_func_elem_639_2(arg0, arg1, arg2);
4554
+ function __wasm_bindgen_func_elem_658_2(arg0, arg1, arg2) {
4555
+ wasm.__wasm_bindgen_func_elem_658_2(arg0, arg1, arg2);
4388
4556
  }
4389
4557
 
4390
- function __wasm_bindgen_func_elem_639_3(arg0, arg1, arg2) {
4391
- wasm.__wasm_bindgen_func_elem_639_3(arg0, arg1, arg2);
4558
+ function __wasm_bindgen_func_elem_658_3(arg0, arg1, arg2) {
4559
+ wasm.__wasm_bindgen_func_elem_658_3(arg0, arg1, arg2);
4392
4560
  }
4393
4561
 
4394
- function __wasm_bindgen_func_elem_1652(arg0, arg1, arg2) {
4395
- const ret = wasm.__wasm_bindgen_func_elem_1652(arg0, arg1, arg2);
4562
+ function __wasm_bindgen_func_elem_1666(arg0, arg1, arg2) {
4563
+ const ret = wasm.__wasm_bindgen_func_elem_1666(arg0, arg1, arg2);
4396
4564
  if (ret[1]) {
4397
4565
  throw takeFromExternrefTable0(ret[0]);
4398
4566
  }
4399
4567
  }
4400
4568
 
4401
- function __wasm_bindgen_func_elem_1652_195(arg0, arg1, arg2, arg3) {
4402
- wasm.__wasm_bindgen_func_elem_1652_195(arg0, arg1, arg2, arg3);
4569
+ function __wasm_bindgen_func_elem_1666_203(arg0, arg1, arg2, arg3) {
4570
+ wasm.__wasm_bindgen_func_elem_1666_203(arg0, arg1, arg2, arg3);
4403
4571
  }
4404
4572
 
4405
- function __wasm_bindgen_func_elem_1652_196(arg0, arg1, arg2, arg3) {
4406
- wasm.__wasm_bindgen_func_elem_1652_196(arg0, arg1, arg2, arg3);
4573
+ function __wasm_bindgen_func_elem_1666_204(arg0, arg1, arg2, arg3) {
4574
+ wasm.__wasm_bindgen_func_elem_1666_204(arg0, arg1, arg2, arg3);
4407
4575
  }
4408
4576
 
4409
4577
 
@@ -4444,6 +4612,9 @@ const BlobMetaFinalization = (typeof FinalizationRegistry === 'undefined')
4444
4612
  const CallErrorFinalization = (typeof FinalizationRegistry === 'undefined')
4445
4613
  ? { register: () => {}, unregister: () => {} }
4446
4614
  : new FinalizationRegistry(ptr => wasm.__wbg_callerror_free(ptr >>> 0, 1));
4615
+ const CommitIdFinalization = (typeof FinalizationRegistry === 'undefined')
4616
+ ? { register: () => {}, unregister: () => {} }
4617
+ : new FinalizationRegistry(ptr => wasm.__wbg_commitid_free(ptr >>> 0, 1));
4447
4618
  const CommitWithBlobFinalization = (typeof FinalizationRegistry === 'undefined')
4448
4619
  ? { register: () => {}, unregister: () => {} }
4449
4620
  : new FinalizationRegistry(ptr => wasm.__wbg_commitwithblob_free(ptr >>> 0, 1));