@automerge/subduction 0.10.1 → 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 +328 -132
  3. package/dist/cjs/web.cjs +329 -133
  4. package/dist/esm/wasm-base64.js +1 -1
  5. package/dist/iife/index.js +328 -133
  6. package/dist/index.d.ts +114 -40
  7. package/dist/subduction.wasm +0 -0
  8. package/dist/wasm_bindgen/bundler/subduction_wasm.d.ts +114 -40
  9. package/dist/wasm_bindgen/bundler/subduction_wasm.js +1 -1
  10. package/dist/wasm_bindgen/bundler/subduction_wasm_bg.js +332 -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 +29 -19
  13. package/dist/wasm_bindgen/nodejs/subduction_wasm.cjs +337 -133
  14. package/dist/wasm_bindgen/nodejs/subduction_wasm.d.ts +114 -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 +29 -19
  17. package/dist/wasm_bindgen/web/subduction_wasm.d.ts +143 -59
  18. package/dist/wasm_bindgen/web/subduction_wasm.js +336 -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 +29 -19
  21. package/package.json +1 -1
  22. /package/dist/wasm_bindgen/bundler/snippets/{sedimentree_wasm-75027ecce41278de → sedimentree_wasm-8e1863d4f7634be2}/inline0.js +0 -0
  23. /package/dist/wasm_bindgen/bundler/snippets/{sedimentree_wasm-75027ecce41278de → sedimentree_wasm-8e1863d4f7634be2}/inline1.js +0 -0
  24. /package/dist/wasm_bindgen/bundler/snippets/{sedimentree_wasm-75027ecce41278de → 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-75027ecce41278de → sedimentree_wasm-8e1863d4f7634be2}/inline0.js +0 -0
  28. /package/dist/wasm_bindgen/nodejs/snippets/{sedimentree_wasm-75027ecce41278de → sedimentree_wasm-8e1863d4f7634be2}/inline1.js +0 -0
  29. /package/dist/wasm_bindgen/nodejs/snippets/{sedimentree_wasm-75027ecce41278de → 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-75027ecce41278de → sedimentree_wasm-8e1863d4f7634be2}/inline0.js +0 -0
  33. /package/dist/wasm_bindgen/web/snippets/{sedimentree_wasm-75027ecce41278de → sedimentree_wasm-8e1863d4f7634be2}/inline1.js +0 -0
  34. /package/dist/wasm_bindgen/web/snippets/{sedimentree_wasm-75027ecce41278de → 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-75027ecce41278de/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
  /**
@@ -1299,34 +1446,55 @@ export class MemoryStorage {
1299
1446
  MemoryStorageFinalization.register(this, this.__wbg_ptr, this);
1300
1447
  return this;
1301
1448
  }
1449
+ /**
1450
+ * Save commits and fragments in a single batch.
1451
+ * @param {SedimentreeId} sedimentree_id
1452
+ * @param {Array<any>} commits
1453
+ * @param {Array<any>} fragments
1454
+ * @returns {Promise<any>}
1455
+ */
1456
+ saveBatchAll(sedimentree_id, commits, fragments) {
1457
+ _assertClass(sedimentree_id, SedimentreeId);
1458
+ const ret = wasm.memorystorage_saveBatchAll(this.__wbg_ptr, sedimentree_id.__wbg_ptr, commits, fragments);
1459
+ return ret;
1460
+ }
1302
1461
  /**
1303
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()`
1304
1472
  * @param {SedimentreeId} sedimentree_id
1305
- * @param {Digest} _digest
1473
+ * @param {CommitId} commit_id
1306
1474
  * @param {SignedLooseCommit} signed_commit
1307
1475
  * @param {Uint8Array} blob
1308
1476
  * @returns {Promise<any>}
1309
1477
  */
1310
- saveCommit(sedimentree_id, _digest, signed_commit, blob) {
1478
+ saveCommit(sedimentree_id, commit_id, signed_commit, blob) {
1311
1479
  _assertClass(sedimentree_id, SedimentreeId);
1312
- _assertClass(_digest, Digest);
1480
+ _assertClass(commit_id, CommitId);
1313
1481
  _assertClass(signed_commit, SignedLooseCommit);
1314
- 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);
1315
1483
  return ret;
1316
1484
  }
1317
1485
  /**
1318
1486
  * Save a fragment with its blob.
1319
1487
  * @param {SedimentreeId} sedimentree_id
1320
- * @param {Digest} _digest
1488
+ * @param {CommitId} _fragment_head
1321
1489
  * @param {SignedFragment} signed_fragment
1322
1490
  * @param {Uint8Array} blob
1323
1491
  * @returns {Promise<any>}
1324
1492
  */
1325
- saveFragment(sedimentree_id, _digest, signed_fragment, blob) {
1493
+ saveFragment(sedimentree_id, _fragment_head, signed_fragment, blob) {
1326
1494
  _assertClass(sedimentree_id, SedimentreeId);
1327
- _assertClass(_digest, Digest);
1495
+ _assertClass(_fragment_head, CommitId);
1328
1496
  _assertClass(signed_fragment, SignedFragment);
1329
- 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);
1330
1498
  return ret;
1331
1499
  }
1332
1500
  /**
@@ -1876,6 +2044,12 @@ export class SignedFragment {
1876
2044
  SignedFragmentFinalization.register(obj, obj.__wbg_ptr, obj);
1877
2045
  return obj;
1878
2046
  }
2047
+ static __unwrap(jsValue) {
2048
+ if (!(jsValue instanceof SignedFragment)) {
2049
+ return 0;
2050
+ }
2051
+ return jsValue.__destroy_into_raw();
2052
+ }
1879
2053
  __destroy_into_raw() {
1880
2054
  const ptr = this.__wbg_ptr;
1881
2055
  this.__wbg_ptr = 0;
@@ -1947,6 +2121,12 @@ export class SignedLooseCommit {
1947
2121
  SignedLooseCommitFinalization.register(obj, obj.__wbg_ptr, obj);
1948
2122
  return obj;
1949
2123
  }
2124
+ static __unwrap(jsValue) {
2125
+ if (!(jsValue instanceof SignedLooseCommit)) {
2126
+ return 0;
2127
+ }
2128
+ return jsValue.__destroy_into_raw();
2129
+ }
1950
2130
  __destroy_into_raw() {
1951
2131
  const ptr = this.__wbg_ptr;
1952
2132
  this.__wbg_ptr = 0;
@@ -2062,15 +2242,17 @@ export class Subduction {
2062
2242
  *
2063
2243
  * Returns a [`WasmWriteError`] if storage, networking, or policy fail.
2064
2244
  * @param {SedimentreeId} id
2065
- * @param {Digest[]} parents
2245
+ * @param {CommitId} head
2246
+ * @param {CommitId[]} parents
2066
2247
  * @param {Uint8Array} blob
2067
2248
  * @returns {Promise<FragmentRequested | undefined>}
2068
2249
  */
2069
- addCommit(id, parents, blob) {
2250
+ addCommit(id, head, parents, blob) {
2070
2251
  _assertClass(id, SedimentreeId);
2252
+ _assertClass(head, CommitId);
2071
2253
  const ptr0 = passArrayJsValueToWasm0(parents, wasm.__wbindgen_export);
2072
2254
  const len0 = WASM_VECTOR_LEN;
2073
- 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);
2074
2256
  return ret;
2075
2257
  }
2076
2258
  /**
@@ -2110,15 +2292,15 @@ export class Subduction {
2110
2292
  *
2111
2293
  * Returns a [`WasmWriteError`] if storage, networking, or policy fail.
2112
2294
  * @param {SedimentreeId} id
2113
- * @param {Digest} head
2114
- * @param {Digest[]} boundary
2115
- * @param {Digest[]} checkpoints
2295
+ * @param {CommitId} head
2296
+ * @param {CommitId[]} boundary
2297
+ * @param {CommitId[]} checkpoints
2116
2298
  * @param {Uint8Array} blob
2117
2299
  * @returns {Promise<void>}
2118
2300
  */
2119
2301
  addFragment(id, head, boundary, checkpoints, blob) {
2120
2302
  _assertClass(id, SedimentreeId);
2121
- _assertClass(head, Digest);
2303
+ _assertClass(head, CommitId);
2122
2304
  const ptr0 = passArrayJsValueToWasm0(boundary, wasm.__wbindgen_export);
2123
2305
  const len0 = WASM_VECTOR_LEN;
2124
2306
  const ptr1 = passArrayJsValueToWasm0(checkpoints, wasm.__wbindgen_export);
@@ -3215,7 +3397,7 @@ export class SyncStats {
3215
3397
  }
3216
3398
  /**
3217
3399
  * The remote peer's heads for this sedimentree.
3218
- * @returns {Digest[]}
3400
+ * @returns {CommitId[]}
3219
3401
  */
3220
3402
  get remoteHeads() {
3221
3403
  const ret = wasm.syncstats_remoteHeads(this.__wbg_ptr);
@@ -3427,37 +3609,43 @@ export function makeMessagePortTransport(port) {
3427
3609
  export function start() {
3428
3610
  wasm.start();
3429
3611
  }
3430
- export function __wbg___wasm_refgen_toWasmCommitWithBlob_fcbd230cf952f128(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) {
3431
3619
  const ret = arg0.__wasm_refgen_toWasmCommitWithBlob();
3432
3620
  _assertClass(ret, CommitWithBlob);
3433
3621
  var ptr1 = ret.__destroy_into_raw();
3434
3622
  return ptr1;
3435
3623
  }
3436
- export function __wbg___wasm_refgen_toWasmDepth_4f8de5b877457c3d(arg0) {
3624
+ export function __wbg___wasm_refgen_toWasmDepth_c561b40f337714d7(arg0) {
3437
3625
  const ret = arg0.__wasm_refgen_toWasmDepth();
3438
3626
  _assertClass(ret, Depth);
3439
3627
  var ptr1 = ret.__destroy_into_raw();
3440
3628
  return ptr1;
3441
3629
  }
3442
- export function __wbg___wasm_refgen_toWasmDigest_d0fbca90d003e5b2(arg0) {
3630
+ export function __wbg___wasm_refgen_toWasmDigest_19e9d6dad971a705(arg0) {
3443
3631
  const ret = arg0.__wasm_refgen_toWasmDigest();
3444
3632
  _assertClass(ret, Digest);
3445
3633
  var ptr1 = ret.__destroy_into_raw();
3446
3634
  return ptr1;
3447
3635
  }
3448
- export function __wbg___wasm_refgen_toWasmFragmentWithBlob_814bb2b3d862ac90(arg0) {
3636
+ export function __wbg___wasm_refgen_toWasmFragmentWithBlob_e8ef521f2984e238(arg0) {
3449
3637
  const ret = arg0.__wasm_refgen_toWasmFragmentWithBlob();
3450
3638
  _assertClass(ret, FragmentWithBlob);
3451
3639
  var ptr1 = ret.__destroy_into_raw();
3452
3640
  return ptr1;
3453
3641
  }
3454
- export function __wbg___wasm_refgen_toWasmFragment_32ab33a0a1cf967b(arg0) {
3642
+ export function __wbg___wasm_refgen_toWasmFragment_38ddb9958dbdc455(arg0) {
3455
3643
  const ret = arg0.__wasm_refgen_toWasmFragment();
3456
3644
  _assertClass(ret, Fragment);
3457
3645
  var ptr1 = ret.__destroy_into_raw();
3458
3646
  return ptr1;
3459
3647
  }
3460
- export function __wbg___wasm_refgen_toWasmLooseCommit_6deda612421ca7e6(arg0) {
3648
+ export function __wbg___wasm_refgen_toWasmLooseCommit_876edb05490f6350(arg0) {
3461
3649
  const ret = arg0.__wasm_refgen_toWasmLooseCommit();
3462
3650
  _assertClass(ret, LooseCommit);
3463
3651
  var ptr1 = ret.__destroy_into_raw();
@@ -3531,23 +3719,23 @@ export function __wbg_authenticatedwebsocket_new(arg0) {
3531
3719
  const ret = AuthenticatedWebSocket.__wrap(arg0);
3532
3720
  return ret;
3533
3721
  }
3534
- export function __wbg_authorizeConnect_8e2609308bbbbcfd() { return handleError(function (arg0, arg1) {
3722
+ export function __wbg_authorizeConnect_21fe4159e45997db() { return handleError(function (arg0, arg1) {
3535
3723
  const ret = arg0.authorizeConnect(PeerId.__wrap(arg1));
3536
3724
  return ret;
3537
3725
  }, arguments); }
3538
- export function __wbg_authorizeFetch_b7bcc4e437112c73() { return handleError(function (arg0, arg1, arg2) {
3726
+ export function __wbg_authorizeFetch_03f9af424032be8f() { return handleError(function (arg0, arg1, arg2) {
3539
3727
  const ret = arg0.authorizeFetch(PeerId.__wrap(arg1), SedimentreeId.__wrap(arg2));
3540
3728
  return ret;
3541
3729
  }, arguments); }
3542
- export function __wbg_authorizePublish_7e546fc3d8103532() { return handleError(function (arg0, arg1, arg2) {
3730
+ export function __wbg_authorizePublish_25c669bb7ef08215() { return handleError(function (arg0, arg1, arg2) {
3543
3731
  const ret = arg0.authorizePublish(PeerId.__wrap(arg1), Topic.__wrap(arg2));
3544
3732
  return ret;
3545
3733
  }, arguments); }
3546
- 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) {
3547
3735
  const ret = arg0.authorizePut(PeerId.__wrap(arg1), PeerId.__wrap(arg2), SedimentreeId.__wrap(arg3));
3548
3736
  return ret;
3549
3737
  }, arguments); }
3550
- export function __wbg_authorizeSubscribe_34f5ba6f23bab853() { return handleError(function (arg0, arg1, arg2) {
3738
+ export function __wbg_authorizeSubscribe_b0a4693c31b61926() { return handleError(function (arg0, arg1, arg2) {
3551
3739
  const ret = arg0.authorizeSubscribe(PeerId.__wrap(arg1), Topic.__wrap(arg2));
3552
3740
  return ret;
3553
3741
  }, arguments); }
@@ -3567,14 +3755,18 @@ export function __wbg_call_f858478a02f9600f() { return handleError(function (arg
3567
3755
  const ret = arg0.call(arg1, arg2, arg3, arg4);
3568
3756
  return ret;
3569
3757
  }, arguments); }
3758
+ export function __wbg_close_23a850186a1bff7e(arg0) {
3759
+ arg0.close();
3760
+ }
3570
3761
  export function __wbg_close_af26905c832a88cb() { return handleError(function (arg0) {
3571
3762
  arg0.close();
3572
3763
  }, arguments); }
3573
3764
  export function __wbg_close_cbf870bdad0aad99(arg0) {
3574
3765
  arg0.close();
3575
3766
  }
3576
- export function __wbg_close_f85b3643ad9ed8d4(arg0) {
3577
- arg0.close();
3767
+ export function __wbg_commitid_new(arg0) {
3768
+ const ret = CommitId.__wrap(arg0);
3769
+ return ret;
3578
3770
  }
3579
3771
  export function __wbg_commitwithblob_new(arg0) {
3580
3772
  const ret = CommitWithBlob.__wrap(arg0);
@@ -3596,11 +3788,11 @@ export function __wbg_data_a3d9ff9cdd801002(arg0) {
3596
3788
  const ret = arg0.data;
3597
3789
  return ret;
3598
3790
  }
3599
- export function __wbg_deleteAllCommits_87e95e34aba169ea(arg0, arg1) {
3791
+ export function __wbg_deleteAllCommits_010500ef54b293ad(arg0, arg1) {
3600
3792
  const ret = arg0.deleteAllCommits(arg1);
3601
3793
  return ret;
3602
3794
  }
3603
- export function __wbg_deleteAllFragments_b5a40f8b94689ee5(arg0, arg1) {
3795
+ export function __wbg_deleteAllFragments_ab9739674b79c634(arg0, arg1) {
3604
3796
  const ret = arg0.deleteAllFragments(arg1);
3605
3797
  return ret;
3606
3798
  }
@@ -3612,7 +3804,7 @@ export function __wbg_digest_unwrap(arg0) {
3612
3804
  const ret = Digest.__unwrap(arg0);
3613
3805
  return ret;
3614
3806
  }
3615
- export function __wbg_disconnect_91312bb506e834b1(arg0) {
3807
+ export function __wbg_disconnect_9e7aaa7f19eca5a1(arg0) {
3616
3808
  const ret = arg0.disconnect();
3617
3809
  return ret;
3618
3810
  }
@@ -3639,13 +3831,13 @@ export function __wbg_fetch_f8a611684c3b5fe5(arg0, arg1) {
3639
3831
  const ret = arg0.fetch(arg1);
3640
3832
  return ret;
3641
3833
  }
3642
- 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) {
3643
3835
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
3644
3836
  wasm.__wbindgen_export5(arg2, arg3 * 4, 4);
3645
3837
  const ret = arg0.filterAuthorizedFetch(PeerId.__wrap(arg1), v0);
3646
3838
  return ret;
3647
3839
  }, arguments); }
3648
- 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) {
3649
3841
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
3650
3842
  wasm.__wbindgen_export5(arg2, arg3 * 4, 4);
3651
3843
  const ret = arg0.filterAuthorizedSubscribers(Topic.__wrap(arg1), v0);
@@ -3839,15 +4031,15 @@ export function __wbg_length_ea16607d7b61445b(arg0) {
3839
4031
  const ret = arg0.length;
3840
4032
  return ret;
3841
4033
  }
3842
- export function __wbg_loadAllCommits_1b040f2bd61f63de(arg0, arg1) {
4034
+ export function __wbg_loadAllCommits_66f201365cd0de6b(arg0, arg1) {
3843
4035
  const ret = arg0.loadAllCommits(arg1);
3844
4036
  return ret;
3845
4037
  }
3846
- export function __wbg_loadAllFragments_cf081afbfee53965(arg0, arg1) {
4038
+ export function __wbg_loadAllFragments_e9d859acefaaecfb(arg0, arg1) {
3847
4039
  const ret = arg0.loadAllFragments(arg1);
3848
4040
  return ret;
3849
4041
  }
3850
- export function __wbg_loadAllSedimentreeIds_a9046bfade082517(arg0) {
4042
+ export function __wbg_loadAllSedimentreeIds_940b75def2a4f752(arg0) {
3851
4043
  const ret = arg0.loadAllSedimentreeIds();
3852
4044
  return ret;
3853
4045
  }
@@ -3890,7 +4082,7 @@ export function __wbg_new_d098e265629cd10f(arg0, arg1) {
3890
4082
  const a = state0.a;
3891
4083
  state0.a = 0;
3892
4084
  try {
3893
- return __wasm_bindgen_func_elem_1651_194(a, state0.b, arg0, arg1);
4085
+ return __wasm_bindgen_func_elem_1666_203(a, state0.b, arg0, arg1);
3894
4086
  } finally {
3895
4087
  state0.a = a;
3896
4088
  }
@@ -3924,7 +4116,7 @@ export function __wbg_new_typed_aaaeaf29cf802876(arg0, arg1) {
3924
4116
  const a = state0.a;
3925
4117
  state0.a = 0;
3926
4118
  try {
3927
- return __wasm_bindgen_func_elem_1651_195(a, state0.b, arg0, arg1);
4119
+ return __wasm_bindgen_func_elem_1666_204(a, state0.b, arg0, arg1);
3928
4120
  } finally {
3929
4121
  state0.a = a;
3930
4122
  }
@@ -3975,7 +4167,7 @@ export function __wbg_of_d6376e3774c51f89(arg0, arg1) {
3975
4167
  const ret = Array.of(arg0, arg1);
3976
4168
  return ret;
3977
4169
  }
3978
- export function __wbg_onDisconnect_a24437def131c941(arg0, arg1) {
4170
+ export function __wbg_onDisconnect_9a45cfe08cc17d33(arg0, arg1) {
3979
4171
  arg0.onDisconnect(arg1);
3980
4172
  }
3981
4173
  export function __wbg_open_e7a9d3d6344572f6() { return handleError(function (arg0, arg1, arg2, arg3) {
@@ -4002,7 +4194,7 @@ export function __wbg_port2_947a51b8ba00adc9(arg0) {
4002
4194
  const ret = arg0.port2;
4003
4195
  return ret;
4004
4196
  }
4005
- export function __wbg_postMessage_fb1c205fdbbf796d(arg0, arg1) {
4197
+ export function __wbg_postMessage_a6e9396a4a5452a0(arg0, arg1) {
4006
4198
  arg0.postMessage(arg1);
4007
4199
  }
4008
4200
  export function __wbg_process_44c7a14e11e9f69e(arg0) {
@@ -4034,7 +4226,7 @@ export function __wbg_readyState_1f1e7f1bdf9f4d42(arg0) {
4034
4226
  const ret = arg0.readyState;
4035
4227
  return ret;
4036
4228
  }
4037
- export function __wbg_recvBytes_e13f381294da16db(arg0) {
4229
+ export function __wbg_recvBytes_4eb8483c95417eaa(arg0) {
4038
4230
  const ret = arg0.recvBytes();
4039
4231
  return ret;
4040
4232
  }
@@ -4050,19 +4242,19 @@ export function __wbg_result_c5baa2d3d690a01a() { return handleError(function (a
4050
4242
  const ret = arg0.result;
4051
4243
  return ret;
4052
4244
  }, arguments); }
4053
- export function __wbg_saveBatchAll_b9359532f5a65936(arg0, arg1, arg2, arg3) {
4245
+ export function __wbg_saveBatchAll_c5596fcba8bd2a15(arg0, arg1, arg2, arg3) {
4054
4246
  const ret = arg0.saveBatchAll(arg1, arg2, arg3);
4055
4247
  return ret;
4056
4248
  }
4057
- export function __wbg_saveCommit_f6c4180a159edfdf(arg0, arg1, arg2, arg3, arg4) {
4249
+ export function __wbg_saveCommit_acfb018dfd6c3f76(arg0, arg1, arg2, arg3, arg4) {
4058
4250
  const ret = arg0.saveCommit(arg1, arg2, arg3, arg4);
4059
4251
  return ret;
4060
4252
  }
4061
- export function __wbg_saveFragment_49505af74bd5abe3(arg0, arg1, arg2, arg3, arg4) {
4253
+ export function __wbg_saveFragment_af45ae70254a194a(arg0, arg1, arg2, arg3, arg4) {
4062
4254
  const ret = arg0.saveFragment(arg1, arg2, arg3, arg4);
4063
4255
  return ret;
4064
4256
  }
4065
- export function __wbg_saveSedimentreeId_7b6b4310628fe78c(arg0, arg1) {
4257
+ export function __wbg_saveSedimentreeId_78191f33b235abff(arg0, arg1) {
4066
4258
  const ret = arg0.saveSedimentreeId(arg1);
4067
4259
  return ret;
4068
4260
  }
@@ -4074,14 +4266,14 @@ export function __wbg_sedimentreeid_unwrap(arg0) {
4074
4266
  const ret = SedimentreeId.__unwrap(arg0);
4075
4267
  return ret;
4076
4268
  }
4077
- export function __wbg_sendBytes_9a00cdaf7c891eff(arg0, arg1) {
4269
+ export function __wbg_sendBytes_9eb20f735c0b8c5d(arg0, arg1) {
4078
4270
  const ret = arg0.sendBytes(arg1);
4079
4271
  return ret;
4080
4272
  }
4081
4273
  export function __wbg_send_d31a693c975dea74() { return handleError(function (arg0, arg1, arg2) {
4082
4274
  arg0.send(getArrayU8FromWasm0(arg1, arg2));
4083
4275
  }, arguments); }
4084
- export function __wbg_setTimeout_43db2c2050a4d3d2(arg0, arg1) {
4276
+ export function __wbg_setTimeout_37e1d1c4bd350e8e(arg0, arg1) {
4085
4277
  const ret = setTimeout(arg0, arg1);
4086
4278
  return ret;
4087
4279
  }
@@ -4122,10 +4314,10 @@ export function __wbg_set_onerror_8a268cb237177bba(arg0, arg1) {
4122
4314
  export function __wbg_set_onerror_901ca711f94a5bbb(arg0, arg1) {
4123
4315
  arg0.onerror = arg1;
4124
4316
  }
4125
- export function __wbg_set_onmessage_284248c97c42cb93(arg0, arg1) {
4317
+ export function __wbg_set_onmessage_6f80ab771bf151aa(arg0, arg1) {
4126
4318
  arg0.onmessage = arg1;
4127
4319
  }
4128
- export function __wbg_set_onmessage_6f80ab771bf151aa(arg0, arg1) {
4320
+ export function __wbg_set_onmessage_a5e9c6dfb75369b5(arg0, arg1) {
4129
4321
  arg0.onmessage = arg1;
4130
4322
  }
4131
4323
  export function __wbg_set_onopen_34e3e24cf9337ddd(arg0, arg1) {
@@ -4141,7 +4333,7 @@ export function __wbg_sign_a34d057afd14c54d() { return handleError(function (arg
4141
4333
  const ret = arg0.sign(arg1, arg2, getArrayU8FromWasm0(arg3, arg4));
4142
4334
  return ret;
4143
4335
  }, arguments); }
4144
- export function __wbg_sign_e6fa76bd4ef9c75a(arg0, arg1) {
4336
+ export function __wbg_sign_c34ae159953b0497(arg0, arg1) {
4145
4337
  const ret = arg0.sign(arg1);
4146
4338
  return ret;
4147
4339
  }
@@ -4149,10 +4341,18 @@ export function __wbg_signedfragment_new(arg0) {
4149
4341
  const ret = SignedFragment.__wrap(arg0);
4150
4342
  return ret;
4151
4343
  }
4344
+ export function __wbg_signedfragment_unwrap(arg0) {
4345
+ const ret = SignedFragment.__unwrap(arg0);
4346
+ return ret;
4347
+ }
4152
4348
  export function __wbg_signedloosecommit_new(arg0) {
4153
4349
  const ret = SignedLooseCommit.__wrap(arg0);
4154
4350
  return ret;
4155
4351
  }
4352
+ export function __wbg_signedloosecommit_unwrap(arg0) {
4353
+ const ret = SignedLooseCommit.__unwrap(arg0);
4354
+ return ret;
4355
+ }
4156
4356
  export function __wbg_stack_3b0d974bbf31e44f(arg0, arg1) {
4157
4357
  const ret = arg1.stack;
4158
4358
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -4231,14 +4431,14 @@ export function __wbg_transaction_2237af0233efbdf3() { return handleError(functi
4231
4431
  const ret = arg0.transaction(getStringFromWasm0(arg1, arg2));
4232
4432
  return ret;
4233
4433
  }, arguments); }
4234
- export function __wbg_tryIntoJsSedimentreeIdsArray_6803cc05ac20ff4f() { return handleError(function (arg0, arg1) {
4434
+ export function __wbg_tryIntoJsSedimentreeIdsArray_e5ce060b44a1b912() { return handleError(function (arg0, arg1) {
4235
4435
  const ret = tryIntoJsSedimentreeIdsArray(arg1);
4236
4436
  const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_export);
4237
4437
  const len1 = WASM_VECTOR_LEN;
4238
4438
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
4239
4439
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
4240
4440
  }, arguments); }
4241
- export function __wbg_verifyingKey_28c38fc6525caed5(arg0) {
4441
+ export function __wbg_verifyingKey_cff7231a6c8624d7(arg0) {
4242
4442
  const ret = arg0.verifyingKey();
4243
4443
  return ret;
4244
4444
  }
@@ -4252,32 +4452,32 @@ export function __wbg_webcryptosigner_new(arg0) {
4252
4452
  }
4253
4453
  export function __wbindgen_cast_0000000000000001(arg0, arg1) {
4254
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`.
4255
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_285, __wasm_bindgen_func_elem_638);
4455
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_291, __wasm_bindgen_func_elem_658);
4256
4456
  return ret;
4257
4457
  }
4258
4458
  export function __wbindgen_cast_0000000000000002(arg0, arg1) {
4259
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`.
4260
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_285, __wasm_bindgen_func_elem_638_1);
4460
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_291, __wasm_bindgen_func_elem_658_1);
4261
4461
  return ret;
4262
4462
  }
4263
4463
  export function __wbindgen_cast_0000000000000003(arg0, arg1) {
4264
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`.
4265
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_285, __wasm_bindgen_func_elem_638_2);
4465
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_291, __wasm_bindgen_func_elem_658_2);
4266
4466
  return ret;
4267
4467
  }
4268
4468
  export function __wbindgen_cast_0000000000000004(arg0, arg1) {
4269
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`.
4270
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_285, __wasm_bindgen_func_elem_638_3);
4470
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_291, __wasm_bindgen_func_elem_658_3);
4271
4471
  return ret;
4272
4472
  }
4273
4473
  export function __wbindgen_cast_0000000000000005(arg0, arg1) {
4274
4474
  // Cast intrinsic for `Closure(Closure { dtor_idx: 11, function: Function { arguments: [], shim_idx: 13, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
4275
- const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_285, __wasm_bindgen_func_elem_637);
4475
+ const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_291, __wasm_bindgen_func_elem_657);
4276
4476
  return ret;
4277
4477
  }
4278
4478
  export function __wbindgen_cast_0000000000000006(arg0, arg1) {
4279
- // Cast intrinsic for `Closure(Closure { dtor_idx: 672, function: Function { arguments: [Externref], shim_idx: 756, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
4280
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_285, __wasm_bindgen_func_elem_1651);
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);
4281
4481
  return ret;
4282
4482
  }
4283
4483
  export function __wbindgen_cast_0000000000000007(arg0) {
@@ -4339,39 +4539,39 @@ export function __wbindgen_init_externref_table() {
4339
4539
  table.set(offset + 2, true);
4340
4540
  table.set(offset + 3, false);
4341
4541
  }
4342
- function __wasm_bindgen_func_elem_637(arg0, arg1) {
4343
- wasm.__wasm_bindgen_func_elem_637(arg0, arg1);
4542
+ function __wasm_bindgen_func_elem_657(arg0, arg1) {
4543
+ wasm.__wasm_bindgen_func_elem_657(arg0, arg1);
4344
4544
  }
4345
4545
 
4346
- function __wasm_bindgen_func_elem_638(arg0, arg1, arg2) {
4347
- wasm.__wasm_bindgen_func_elem_638(arg0, arg1, arg2);
4546
+ function __wasm_bindgen_func_elem_658(arg0, arg1, arg2) {
4547
+ wasm.__wasm_bindgen_func_elem_658(arg0, arg1, arg2);
4348
4548
  }
4349
4549
 
4350
- function __wasm_bindgen_func_elem_638_1(arg0, arg1, arg2) {
4351
- wasm.__wasm_bindgen_func_elem_638_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);
4352
4552
  }
4353
4553
 
4354
- function __wasm_bindgen_func_elem_638_2(arg0, arg1, arg2) {
4355
- wasm.__wasm_bindgen_func_elem_638_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);
4356
4556
  }
4357
4557
 
4358
- function __wasm_bindgen_func_elem_638_3(arg0, arg1, arg2) {
4359
- wasm.__wasm_bindgen_func_elem_638_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);
4360
4560
  }
4361
4561
 
4362
- function __wasm_bindgen_func_elem_1651(arg0, arg1, arg2) {
4363
- const ret = wasm.__wasm_bindgen_func_elem_1651(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);
4364
4564
  if (ret[1]) {
4365
4565
  throw takeFromExternrefTable0(ret[0]);
4366
4566
  }
4367
4567
  }
4368
4568
 
4369
- function __wasm_bindgen_func_elem_1651_194(arg0, arg1, arg2, arg3) {
4370
- wasm.__wasm_bindgen_func_elem_1651_194(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);
4371
4571
  }
4372
4572
 
4373
- function __wasm_bindgen_func_elem_1651_195(arg0, arg1, arg2, arg3) {
4374
- wasm.__wasm_bindgen_func_elem_1651_195(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);
4375
4575
  }
4376
4576
 
4377
4577
 
@@ -4412,6 +4612,9 @@ const BlobMetaFinalization = (typeof FinalizationRegistry === 'undefined')
4412
4612
  const CallErrorFinalization = (typeof FinalizationRegistry === 'undefined')
4413
4613
  ? { register: () => {}, unregister: () => {} }
4414
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));
4415
4618
  const CommitWithBlobFinalization = (typeof FinalizationRegistry === 'undefined')
4416
4619
  ? { register: () => {}, unregister: () => {} }
4417
4620
  : new FinalizationRegistry(ptr => wasm.__wbg_commitwithblob_free(ptr >>> 0, 1));