@automerge/sedimentree 0.8.3 → 0.9.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 (30) hide show
  1. package/dist/cjs/wasm-base64.cjs +1 -1
  2. package/dist/cjs/web-bindings.cjs +219 -67
  3. package/dist/cjs/web.cjs +220 -68
  4. package/dist/esm/wasm-base64.js +1 -1
  5. package/dist/iife/index.js +219 -68
  6. package/dist/index.d.ts +103 -33
  7. package/dist/sedimentree.wasm +0 -0
  8. package/dist/wasm_bindgen/bundler/sedimentree_wasm.d.ts +103 -33
  9. package/dist/wasm_bindgen/bundler/sedimentree_wasm.js +1 -1
  10. package/dist/wasm_bindgen/bundler/sedimentree_wasm_bg.js +227 -68
  11. package/dist/wasm_bindgen/bundler/sedimentree_wasm_bg.wasm +0 -0
  12. package/dist/wasm_bindgen/bundler/sedimentree_wasm_bg.wasm.d.ts +21 -12
  13. package/dist/wasm_bindgen/nodejs/sedimentree_wasm.cjs +228 -68
  14. package/dist/wasm_bindgen/nodejs/sedimentree_wasm.d.ts +103 -33
  15. package/dist/wasm_bindgen/nodejs/sedimentree_wasm_bg.wasm +0 -0
  16. package/dist/wasm_bindgen/nodejs/sedimentree_wasm_bg.wasm.d.ts +21 -12
  17. package/dist/wasm_bindgen/web/sedimentree_wasm.d.ts +124 -45
  18. package/dist/wasm_bindgen/web/sedimentree_wasm.js +227 -68
  19. package/dist/wasm_bindgen/web/sedimentree_wasm_bg.wasm +0 -0
  20. package/dist/wasm_bindgen/web/sedimentree_wasm_bg.wasm.d.ts +21 -12
  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/nodejs/snippets/{sedimentree_wasm-c507f5285f2927a0 → sedimentree_wasm-8e1863d4f7634be2}/inline0.js +0 -0
  26. /package/dist/wasm_bindgen/nodejs/snippets/{sedimentree_wasm-c507f5285f2927a0 → sedimentree_wasm-8e1863d4f7634be2}/inline1.js +0 -0
  27. /package/dist/wasm_bindgen/nodejs/snippets/{sedimentree_wasm-c507f5285f2927a0 → sedimentree_wasm-8e1863d4f7634be2}/inline2.js +0 -0
  28. /package/dist/wasm_bindgen/web/snippets/{sedimentree_wasm-c507f5285f2927a0 → sedimentree_wasm-8e1863d4f7634be2}/inline0.js +0 -0
  29. /package/dist/wasm_bindgen/web/snippets/{sedimentree_wasm-c507f5285f2927a0 → sedimentree_wasm-8e1863d4f7634be2}/inline1.js +0 -0
  30. /package/dist/wasm_bindgen/web/snippets/{sedimentree_wasm-c507f5285f2927a0 → sedimentree_wasm-8e1863d4f7634be2}/inline2.js +0 -0
@@ -67,6 +67,143 @@ class BlobMeta {
67
67
  if (Symbol.dispose) BlobMeta.prototype[Symbol.dispose] = BlobMeta.prototype.free;
68
68
  exports.BlobMeta = BlobMeta;
69
69
 
70
+ /**
71
+ * A user-supplied opaque identifier for a loose commit.
72
+ *
73
+ * Unlike [`Digest`](crate::digest::WasmDigest), which is a content hash
74
+ * computed by the system, `CommitId` is provided by the caller at construction
75
+ * time. This is the identity used for DAG traversal, fragment boundaries,
76
+ * and sync.
77
+ */
78
+ class CommitId {
79
+ static __wrap(ptr) {
80
+ ptr = ptr >>> 0;
81
+ const obj = Object.create(CommitId.prototype);
82
+ obj.__wbg_ptr = ptr;
83
+ CommitIdFinalization.register(obj, obj.__wbg_ptr, obj);
84
+ return obj;
85
+ }
86
+ __destroy_into_raw() {
87
+ const ptr = this.__wbg_ptr;
88
+ this.__wbg_ptr = 0;
89
+ CommitIdFinalization.unregister(this);
90
+ return ptr;
91
+ }
92
+ free() {
93
+ const ptr = this.__destroy_into_raw();
94
+ wasm.__wbg_commitid_free(ptr, 0);
95
+ }
96
+ /**
97
+ * Upcasts; to the JS-import type for [`WasmCommitId`].
98
+ * @returns {CommitId}
99
+ */
100
+ __wasm_refgen_toWasmCommitId() {
101
+ const ret = wasm.commitid___wasm_refgen_toWasmCommitId(this.__wbg_ptr);
102
+ return CommitId.__wrap(ret);
103
+ }
104
+ /**
105
+ * Creates a new commit identifier from its Base58 string representation.
106
+ *
107
+ * # Errors
108
+ *
109
+ * Returns an error if the string cannot be decoded or is not 32 bytes.
110
+ * @param {string} s
111
+ * @returns {CommitId}
112
+ */
113
+ static fromBase58(s) {
114
+ const ptr0 = passStringToWasm0(s, wasm.__wbindgen_export, wasm.__wbindgen_export2);
115
+ const len0 = WASM_VECTOR_LEN;
116
+ const ret = wasm.commitid_fromBase58(ptr0, len0);
117
+ if (ret[2]) {
118
+ throw takeFromExternrefTable0(ret[1]);
119
+ }
120
+ return CommitId.__wrap(ret[0]);
121
+ }
122
+ /**
123
+ * Creates a new commit identifier from its byte representation.
124
+ *
125
+ * # Errors
126
+ *
127
+ * Returns an error if the byte slice is not exactly 32 bytes.
128
+ * @param {Uint8Array} bytes
129
+ * @returns {CommitId}
130
+ */
131
+ static fromBytes(bytes) {
132
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
133
+ const len0 = WASM_VECTOR_LEN;
134
+ const ret = wasm.commitid_fromBytes(ptr0, len0);
135
+ if (ret[2]) {
136
+ throw takeFromExternrefTable0(ret[1]);
137
+ }
138
+ return CommitId.__wrap(ret[0]);
139
+ }
140
+ /**
141
+ * Creates a new commit identifier from its hexadecimal string representation.
142
+ *
143
+ * # Errors
144
+ *
145
+ * Returns an error if the string is not valid hex or not 32 bytes.
146
+ * @param {string} s
147
+ * @returns {CommitId}
148
+ */
149
+ static fromHexString(s) {
150
+ const ptr0 = passStringToWasm0(s, wasm.__wbindgen_export, wasm.__wbindgen_export2);
151
+ const len0 = WASM_VECTOR_LEN;
152
+ const ret = wasm.commitid_fromHexString(ptr0, len0);
153
+ if (ret[2]) {
154
+ throw takeFromExternrefTable0(ret[1]);
155
+ }
156
+ return CommitId.__wrap(ret[0]);
157
+ }
158
+ /**
159
+ * Creates a new commit identifier from its byte representation.
160
+ *
161
+ * # Errors
162
+ *
163
+ * Returns an error if the byte slice is not exactly 32 bytes.
164
+ * @param {Uint8Array} bytes
165
+ */
166
+ constructor(bytes) {
167
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
168
+ const len0 = WASM_VECTOR_LEN;
169
+ const ret = wasm.commitid_new(ptr0, len0);
170
+ if (ret[2]) {
171
+ throw takeFromExternrefTable0(ret[1]);
172
+ }
173
+ this.__wbg_ptr = ret[0] >>> 0;
174
+ CommitIdFinalization.register(this, this.__wbg_ptr, this);
175
+ return this;
176
+ }
177
+ /**
178
+ * Returns the byte representation of the commit identifier.
179
+ * @returns {Uint8Array}
180
+ */
181
+ toBytes() {
182
+ const ret = wasm.commitid_toBytes(this.__wbg_ptr);
183
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
184
+ wasm.__wbindgen_export6(ret[0], ret[1] * 1, 1);
185
+ return v1;
186
+ }
187
+ /**
188
+ * Returns the hexadecimal string representation.
189
+ * @returns {string}
190
+ */
191
+ toHexString() {
192
+ let deferred1_0;
193
+ let deferred1_1;
194
+ try {
195
+ const ret = wasm.commitid_toHexString(this.__wbg_ptr);
196
+ deferred1_0 = ret[0];
197
+ deferred1_1 = ret[1];
198
+ return getStringFromWasm0(ret[0], ret[1]);
199
+ } finally {
200
+ wasm.__wbindgen_export6(deferred1_0, deferred1_1, 1);
201
+ }
202
+ }
203
+ }
204
+ if (Symbol.dispose) CommitId.prototype[Symbol.dispose] = CommitId.prototype.free;
205
+ exports.CommitId = CommitId;
206
+
70
207
  /**
71
208
  * A commit stored with its associated blob.
72
209
  */
@@ -368,8 +505,8 @@ class Fragment {
368
505
  return BlobMeta.__wrap(ret);
369
506
  }
370
507
  /**
371
- * Get the boundary digests of the fragment.
372
- * @returns {Digest[]}
508
+ * Get the boundary commit identifiers of the fragment.
509
+ * @returns {CommitId[]}
373
510
  */
374
511
  get boundary() {
375
512
  const ret = wasm.fragment_boundary(this.__wbg_ptr);
@@ -378,25 +515,25 @@ class Fragment {
378
515
  return v1;
379
516
  }
380
517
  /**
381
- * Get the head digest of the fragment.
382
- * @returns {Digest}
518
+ * Get the head commit identifier of the fragment.
519
+ * @returns {CommitId}
383
520
  */
384
521
  get head() {
385
522
  const ret = wasm.fragment_head(this.__wbg_ptr);
386
- return Digest.__wrap(ret);
523
+ return CommitId.__wrap(ret);
387
524
  }
388
525
  /**
389
526
  * Create a new fragment from the given sedimentree ID, head, boundary, checkpoints, and blob metadata.
390
527
  * @param {SedimentreeId} sedimentree_id
391
- * @param {Digest} head
392
- * @param {Digest[]} boundary
393
- * @param {Digest[]} checkpoints
528
+ * @param {CommitId} head
529
+ * @param {CommitId[]} boundary
530
+ * @param {CommitId[]} checkpoints
394
531
  * @param {BlobMeta} blob_meta
395
532
  */
396
533
  constructor(sedimentree_id, head, boundary, checkpoints, blob_meta) {
397
534
  _assertClass(sedimentree_id, SedimentreeId);
398
535
  var ptr0 = sedimentree_id.__destroy_into_raw();
399
- _assertClass(head, Digest);
536
+ _assertClass(head, CommitId);
400
537
  var ptr1 = head.__destroy_into_raw();
401
538
  const ptr2 = passArrayJsValueToWasm0(boundary, wasm.__wbindgen_export);
402
539
  const len2 = WASM_VECTOR_LEN;
@@ -543,7 +680,15 @@ class LooseCommit {
543
680
  return BlobMeta.__wrap(ret);
544
681
  }
545
682
  /**
546
- * Get the digest of the commit.
683
+ * Get the commit's head identifier.
684
+ * @returns {CommitId}
685
+ */
686
+ get commitId() {
687
+ const ret = wasm.loosecommit_commitId(this.__wbg_ptr);
688
+ return CommitId.__wrap(ret);
689
+ }
690
+ /**
691
+ * Get the digest of the commit (content hash).
547
692
  * @returns {Digest}
548
693
  */
549
694
  get digest() {
@@ -551,25 +696,28 @@ class LooseCommit {
551
696
  return Digest.__wrap(ret);
552
697
  }
553
698
  /**
554
- * Create a new `LooseCommit` from the given sedimentree ID, parents, and blob metadata.
699
+ * Create a new `LooseCommit` from the given sedimentree ID, head, parents, and blob metadata.
555
700
  * @param {SedimentreeId} sedimentree_id
556
- * @param {Digest[]} parents
701
+ * @param {CommitId} head
702
+ * @param {CommitId[]} parents
557
703
  * @param {BlobMeta} blob_meta
558
704
  */
559
- constructor(sedimentree_id, parents, blob_meta) {
705
+ constructor(sedimentree_id, head, parents, blob_meta) {
560
706
  _assertClass(sedimentree_id, SedimentreeId);
561
707
  var ptr0 = sedimentree_id.__destroy_into_raw();
562
- const ptr1 = passArrayJsValueToWasm0(parents, wasm.__wbindgen_export);
563
- const len1 = WASM_VECTOR_LEN;
708
+ _assertClass(head, CommitId);
709
+ var ptr1 = head.__destroy_into_raw();
710
+ const ptr2 = passArrayJsValueToWasm0(parents, wasm.__wbindgen_export);
711
+ const len2 = WASM_VECTOR_LEN;
564
712
  _assertClass(blob_meta, BlobMeta);
565
- const ret = wasm.loosecommit_new(ptr0, ptr1, len1, blob_meta.__wbg_ptr);
713
+ const ret = wasm.loosecommit_new(ptr0, ptr1, ptr2, len2, blob_meta.__wbg_ptr);
566
714
  this.__wbg_ptr = ret >>> 0;
567
715
  LooseCommitFinalization.register(this, this.__wbg_ptr, this);
568
716
  return this;
569
717
  }
570
718
  /**
571
- * Get the parent digests of the commit.
572
- * @returns {Digest[]}
719
+ * Get the parent commit identifiers.
720
+ * @returns {CommitId[]}
573
721
  */
574
722
  get parents() {
575
723
  const ret = wasm.loosecommit_parents(this.__wbg_ptr);
@@ -618,27 +766,27 @@ class MemoryStorage {
618
766
  return ret;
619
767
  }
620
768
  /**
621
- * Delete a commit by digest.
769
+ * Delete a single commit by its ID.
622
770
  * @param {SedimentreeId} sedimentree_id
623
- * @param {Digest} digest
771
+ * @param {CommitId} commit_id
624
772
  * @returns {Promise<any>}
625
773
  */
626
- deleteCommit(sedimentree_id, digest) {
774
+ deleteCommit(sedimentree_id, commit_id) {
627
775
  _assertClass(sedimentree_id, SedimentreeId);
628
- _assertClass(digest, Digest);
629
- const ret = wasm.memorystorage_deleteCommit(this.__wbg_ptr, sedimentree_id.__wbg_ptr, digest.__wbg_ptr);
776
+ _assertClass(commit_id, CommitId);
777
+ const ret = wasm.memorystorage_deleteCommit(this.__wbg_ptr, sedimentree_id.__wbg_ptr, commit_id.__wbg_ptr);
630
778
  return ret;
631
779
  }
632
780
  /**
633
- * Delete a fragment by digest.
781
+ * Delete a fragment by its identifier.
634
782
  * @param {SedimentreeId} sedimentree_id
635
- * @param {Digest} digest
783
+ * @param {CommitId} fragment_head
636
784
  * @returns {Promise<any>}
637
785
  */
638
- deleteFragment(sedimentree_id, digest) {
786
+ deleteFragment(sedimentree_id, fragment_head) {
639
787
  _assertClass(sedimentree_id, SedimentreeId);
640
- _assertClass(digest, Digest);
641
- const ret = wasm.memorystorage_deleteFragment(this.__wbg_ptr, sedimentree_id.__wbg_ptr, digest.__wbg_ptr);
788
+ _assertClass(fragment_head, CommitId);
789
+ const ret = wasm.memorystorage_deleteFragment(this.__wbg_ptr, sedimentree_id.__wbg_ptr, fragment_head.__wbg_ptr);
642
790
  return ret;
643
791
  }
644
792
  /**
@@ -652,23 +800,23 @@ class MemoryStorage {
652
800
  return ret;
653
801
  }
654
802
  /**
655
- * List all commit digests for a sedimentree.
803
+ * List all commit IDs for a sedimentree.
656
804
  * @param {SedimentreeId} sedimentree_id
657
805
  * @returns {Promise<any>}
658
806
  */
659
- listCommitDigests(sedimentree_id) {
807
+ listCommitIds(sedimentree_id) {
660
808
  _assertClass(sedimentree_id, SedimentreeId);
661
- const ret = wasm.memorystorage_listCommitDigests(this.__wbg_ptr, sedimentree_id.__wbg_ptr);
809
+ const ret = wasm.memorystorage_listCommitIds(this.__wbg_ptr, sedimentree_id.__wbg_ptr);
662
810
  return ret;
663
811
  }
664
812
  /**
665
- * List all fragment digests for a sedimentree.
813
+ * List all fragment IDs for a sedimentree.
666
814
  * @param {SedimentreeId} sedimentree_id
667
815
  * @returns {Promise<any>}
668
816
  */
669
- listFragmentDigests(sedimentree_id) {
817
+ listFragmentIds(sedimentree_id) {
670
818
  _assertClass(sedimentree_id, SedimentreeId);
671
- const ret = wasm.memorystorage_listFragmentDigests(this.__wbg_ptr, sedimentree_id.__wbg_ptr);
819
+ const ret = wasm.memorystorage_listFragmentIds(this.__wbg_ptr, sedimentree_id.__wbg_ptr);
672
820
  return ret;
673
821
  }
674
822
  /**
@@ -700,27 +848,27 @@ class MemoryStorage {
700
848
  return ret;
701
849
  }
702
850
  /**
703
- * Load a commit by digest, returning `CommitWithBlob` or null.
851
+ * Load a single commit by its ID, returning `CommitWithBlob` or null.
704
852
  * @param {SedimentreeId} sedimentree_id
705
- * @param {Digest} digest
853
+ * @param {CommitId} commit_id
706
854
  * @returns {Promise<any>}
707
855
  */
708
- loadCommit(sedimentree_id, digest) {
856
+ loadCommit(sedimentree_id, commit_id) {
709
857
  _assertClass(sedimentree_id, SedimentreeId);
710
- _assertClass(digest, Digest);
711
- const ret = wasm.memorystorage_loadCommit(this.__wbg_ptr, sedimentree_id.__wbg_ptr, digest.__wbg_ptr);
858
+ _assertClass(commit_id, CommitId);
859
+ const ret = wasm.memorystorage_loadCommit(this.__wbg_ptr, sedimentree_id.__wbg_ptr, commit_id.__wbg_ptr);
712
860
  return ret;
713
861
  }
714
862
  /**
715
- * Load a fragment by digest, returning `FragmentWithBlob` or null.
863
+ * Load a fragment by its identifier, returning `FragmentWithBlob` or null.
716
864
  * @param {SedimentreeId} sedimentree_id
717
- * @param {Digest} digest
865
+ * @param {CommitId} fragment_head
718
866
  * @returns {Promise<any>}
719
867
  */
720
- loadFragment(sedimentree_id, digest) {
868
+ loadFragment(sedimentree_id, fragment_head) {
721
869
  _assertClass(sedimentree_id, SedimentreeId);
722
- _assertClass(digest, Digest);
723
- const ret = wasm.memorystorage_loadFragment(this.__wbg_ptr, sedimentree_id.__wbg_ptr, digest.__wbg_ptr);
870
+ _assertClass(fragment_head, CommitId);
871
+ const ret = wasm.memorystorage_loadFragment(this.__wbg_ptr, sedimentree_id.__wbg_ptr, fragment_head.__wbg_ptr);
724
872
  return ret;
725
873
  }
726
874
  /**
@@ -746,32 +894,41 @@ class MemoryStorage {
746
894
  }
747
895
  /**
748
896
  * Save a commit with its blob.
897
+ *
898
+ * The `commit_id` parameter must match the `head()` embedded in
899
+ * the signed commit payload. Returns an error if they differ.
900
+ *
901
+ * # Errors
902
+ *
903
+ * Returns a JS error if:
904
+ * - The signed payload cannot be decoded
905
+ * - The `commit_id` does not match the embedded `head()`
749
906
  * @param {SedimentreeId} sedimentree_id
750
- * @param {Digest} _digest
907
+ * @param {CommitId} commit_id
751
908
  * @param {SignedLooseCommit} signed_commit
752
909
  * @param {Uint8Array} blob
753
910
  * @returns {Promise<any>}
754
911
  */
755
- saveCommit(sedimentree_id, _digest, signed_commit, blob) {
912
+ saveCommit(sedimentree_id, commit_id, signed_commit, blob) {
756
913
  _assertClass(sedimentree_id, SedimentreeId);
757
- _assertClass(_digest, Digest);
914
+ _assertClass(commit_id, CommitId);
758
915
  _assertClass(signed_commit, SignedLooseCommit);
759
- const ret = wasm.memorystorage_saveCommit(this.__wbg_ptr, sedimentree_id.__wbg_ptr, _digest.__wbg_ptr, signed_commit.__wbg_ptr, blob);
916
+ const ret = wasm.memorystorage_saveCommit(this.__wbg_ptr, sedimentree_id.__wbg_ptr, commit_id.__wbg_ptr, signed_commit.__wbg_ptr, blob);
760
917
  return ret;
761
918
  }
762
919
  /**
763
920
  * Save a fragment with its blob.
764
921
  * @param {SedimentreeId} sedimentree_id
765
- * @param {Digest} _digest
922
+ * @param {CommitId} _fragment_head
766
923
  * @param {SignedFragment} signed_fragment
767
924
  * @param {Uint8Array} blob
768
925
  * @returns {Promise<any>}
769
926
  */
770
- saveFragment(sedimentree_id, _digest, signed_fragment, blob) {
927
+ saveFragment(sedimentree_id, _fragment_head, signed_fragment, blob) {
771
928
  _assertClass(sedimentree_id, SedimentreeId);
772
- _assertClass(_digest, Digest);
929
+ _assertClass(_fragment_head, CommitId);
773
930
  _assertClass(signed_fragment, SignedFragment);
774
- const ret = wasm.memorystorage_saveFragment(this.__wbg_ptr, sedimentree_id.__wbg_ptr, _digest.__wbg_ptr, signed_fragment.__wbg_ptr, blob);
931
+ const ret = wasm.memorystorage_saveFragment(this.__wbg_ptr, sedimentree_id.__wbg_ptr, _fragment_head.__wbg_ptr, signed_fragment.__wbg_ptr, blob);
775
932
  return ret;
776
933
  }
777
934
  /**
@@ -1102,19 +1259,19 @@ exports.SignedLooseCommit = SignedLooseCommit;
1102
1259
  function __wbg_get_imports() {
1103
1260
  const import0 = {
1104
1261
  __proto__: null,
1105
- __wbg___wasm_refgen_toWasmDigest_476b24805f220005: function(arg0) {
1106
- const ret = arg0.__wasm_refgen_toWasmDigest();
1107
- _assertClass(ret, Digest);
1262
+ __wbg___wasm_refgen_toWasmCommitId_65b818e358f27de6: function(arg0) {
1263
+ const ret = arg0.__wasm_refgen_toWasmCommitId();
1264
+ _assertClass(ret, CommitId);
1108
1265
  var ptr1 = ret.__destroy_into_raw();
1109
1266
  return ptr1;
1110
1267
  },
1111
- __wbg___wasm_refgen_toWasmFragment_10dd1ff9b3934840: function(arg0) {
1268
+ __wbg___wasm_refgen_toWasmFragment_38ddb9958dbdc455: function(arg0) {
1112
1269
  const ret = arg0.__wasm_refgen_toWasmFragment();
1113
1270
  _assertClass(ret, Fragment);
1114
1271
  var ptr1 = ret.__destroy_into_raw();
1115
1272
  return ptr1;
1116
1273
  },
1117
- __wbg___wasm_refgen_toWasmLooseCommit_f36ad6a9389cee03: function(arg0) {
1274
+ __wbg___wasm_refgen_toWasmLooseCommit_876edb05490f6350: function(arg0) {
1118
1275
  const ret = arg0.__wasm_refgen_toWasmLooseCommit();
1119
1276
  _assertClass(ret, LooseCommit);
1120
1277
  var ptr1 = ret.__destroy_into_raw();
@@ -1151,12 +1308,12 @@ function __wbg_get_imports() {
1151
1308
  const ret = arg0.call(arg1, arg2);
1152
1309
  return ret;
1153
1310
  }, arguments); },
1154
- __wbg_commitwithblob_new: function(arg0) {
1155
- const ret = CommitWithBlob.__wrap(arg0);
1311
+ __wbg_commitid_new: function(arg0) {
1312
+ const ret = CommitId.__wrap(arg0);
1156
1313
  return ret;
1157
1314
  },
1158
- __wbg_digest_new: function(arg0) {
1159
- const ret = Digest.__wrap(arg0);
1315
+ __wbg_commitwithblob_new: function(arg0) {
1316
+ const ret = CommitWithBlob.__wrap(arg0);
1160
1317
  return ret;
1161
1318
  },
1162
1319
  __wbg_fragmentwithblob_new: function(arg0) {
@@ -1206,7 +1363,7 @@ function __wbg_get_imports() {
1206
1363
  const a = state0.a;
1207
1364
  state0.a = 0;
1208
1365
  try {
1209
- return __wasm_bindgen_func_elem_552_67(a, state0.b, arg0, arg1);
1366
+ return __wasm_bindgen_func_elem_563_75(a, state0.b, arg0, arg1);
1210
1367
  } finally {
1211
1368
  state0.a = a;
1212
1369
  }
@@ -1271,8 +1428,8 @@ function __wbg_get_imports() {
1271
1428
  return ret;
1272
1429
  },
1273
1430
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1274
- // Cast intrinsic for `Closure(Closure { dtor_idx: 70, function: Function { arguments: [Externref], shim_idx: 132, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1275
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_385, __wasm_bindgen_func_elem_552);
1431
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 73, function: Function { arguments: [Externref], shim_idx: 136, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1432
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_400, __wasm_bindgen_func_elem_563);
1276
1433
  return ret;
1277
1434
  },
1278
1435
  __wbindgen_cast_0000000000000002: function(arg0) {
@@ -1301,15 +1458,15 @@ function __wbg_get_imports() {
1301
1458
  };
1302
1459
  }
1303
1460
 
1304
- function __wasm_bindgen_func_elem_552(arg0, arg1, arg2) {
1305
- const ret = wasm.__wasm_bindgen_func_elem_552(arg0, arg1, arg2);
1461
+ function __wasm_bindgen_func_elem_563(arg0, arg1, arg2) {
1462
+ const ret = wasm.__wasm_bindgen_func_elem_563(arg0, arg1, arg2);
1306
1463
  if (ret[1]) {
1307
1464
  throw takeFromExternrefTable0(ret[0]);
1308
1465
  }
1309
1466
  }
1310
1467
 
1311
- function __wasm_bindgen_func_elem_552_67(arg0, arg1, arg2, arg3) {
1312
- wasm.__wasm_bindgen_func_elem_552_67(arg0, arg1, arg2, arg3);
1468
+ function __wasm_bindgen_func_elem_563_75(arg0, arg1, arg2, arg3) {
1469
+ wasm.__wasm_bindgen_func_elem_563_75(arg0, arg1, arg2, arg3);
1313
1470
  }
1314
1471
 
1315
1472
  const MemoryStorageFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -1318,6 +1475,9 @@ const MemoryStorageFinalization = (typeof FinalizationRegistry === 'undefined')
1318
1475
  const BlobMetaFinalization = (typeof FinalizationRegistry === 'undefined')
1319
1476
  ? { register: () => {}, unregister: () => {} }
1320
1477
  : new FinalizationRegistry(ptr => wasm.__wbg_blobmeta_free(ptr >>> 0, 1));
1478
+ const CommitIdFinalization = (typeof FinalizationRegistry === 'undefined')
1479
+ ? { register: () => {}, unregister: () => {} }
1480
+ : new FinalizationRegistry(ptr => wasm.__wbg_commitid_free(ptr >>> 0, 1));
1321
1481
  const CommitWithBlobFinalization = (typeof FinalizationRegistry === 'undefined')
1322
1482
  ? { register: () => {}, unregister: () => {} }
1323
1483
  : new FinalizationRegistry(ptr => wasm.__wbg_commitwithblob_free(ptr >>> 0, 1));