@automerge/subduction 0.10.1 → 0.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/cjs/wasm-base64.cjs +1 -1
  2. package/dist/cjs/web-bindings.cjs +73 -41
  3. package/dist/cjs/web.cjs +74 -42
  4. package/dist/esm/wasm-base64.js +1 -1
  5. package/dist/iife/index.js +74 -42
  6. package/dist/index.d.ts +4 -0
  7. package/dist/subduction.wasm +0 -0
  8. package/dist/wasm_bindgen/bundler/subduction_wasm.d.ts +4 -0
  9. package/dist/wasm_bindgen/bundler/subduction_wasm_bg.js +74 -42
  10. package/dist/wasm_bindgen/bundler/subduction_wasm_bg.wasm +0 -0
  11. package/dist/wasm_bindgen/bundler/subduction_wasm_bg.wasm.d.ts +10 -9
  12. package/dist/wasm_bindgen/nodejs/subduction_wasm.cjs +74 -42
  13. package/dist/wasm_bindgen/nodejs/subduction_wasm.d.ts +4 -0
  14. package/dist/wasm_bindgen/nodejs/subduction_wasm_bg.wasm +0 -0
  15. package/dist/wasm_bindgen/nodejs/subduction_wasm_bg.wasm.d.ts +10 -9
  16. package/dist/wasm_bindgen/web/subduction_wasm.d.ts +14 -9
  17. package/dist/wasm_bindgen/web/subduction_wasm.js +74 -42
  18. package/dist/wasm_bindgen/web/subduction_wasm_bg.wasm +0 -0
  19. package/dist/wasm_bindgen/web/subduction_wasm_bg.wasm.d.ts +10 -9
  20. package/package.json +1 -1
  21. /package/dist/wasm_bindgen/bundler/snippets/{sedimentree_wasm-75027ecce41278de → sedimentree_wasm-c507f5285f2927a0}/inline0.js +0 -0
  22. /package/dist/wasm_bindgen/bundler/snippets/{sedimentree_wasm-75027ecce41278de → sedimentree_wasm-c507f5285f2927a0}/inline1.js +0 -0
  23. /package/dist/wasm_bindgen/bundler/snippets/{sedimentree_wasm-75027ecce41278de → sedimentree_wasm-c507f5285f2927a0}/inline2.js +0 -0
  24. /package/dist/wasm_bindgen/nodejs/snippets/{sedimentree_wasm-75027ecce41278de → sedimentree_wasm-c507f5285f2927a0}/inline0.js +0 -0
  25. /package/dist/wasm_bindgen/nodejs/snippets/{sedimentree_wasm-75027ecce41278de → sedimentree_wasm-c507f5285f2927a0}/inline1.js +0 -0
  26. /package/dist/wasm_bindgen/nodejs/snippets/{sedimentree_wasm-75027ecce41278de → sedimentree_wasm-c507f5285f2927a0}/inline2.js +0 -0
  27. /package/dist/wasm_bindgen/web/snippets/{sedimentree_wasm-75027ecce41278de → sedimentree_wasm-c507f5285f2927a0}/inline0.js +0 -0
  28. /package/dist/wasm_bindgen/web/snippets/{sedimentree_wasm-75027ecce41278de → sedimentree_wasm-c507f5285f2927a0}/inline1.js +0 -0
  29. /package/dist/wasm_bindgen/web/snippets/{sedimentree_wasm-75027ecce41278de → sedimentree_wasm-c507f5285f2927a0}/inline2.js +0 -0
package/dist/index.d.ts CHANGED
@@ -653,6 +653,10 @@ export class MemoryStorage {
653
653
  * Create a new in-memory storage instance.
654
654
  */
655
655
  constructor();
656
+ /**
657
+ * Save commits and fragments in a single batch.
658
+ */
659
+ saveBatchAll(sedimentree_id: SedimentreeId, commits: Array<any>, fragments: Array<any>): Promise<any>;
656
660
  /**
657
661
  * Save a commit with its blob.
658
662
  */
Binary file
@@ -653,6 +653,10 @@ export class MemoryStorage {
653
653
  * Create a new in-memory storage instance.
654
654
  */
655
655
  constructor();
656
+ /**
657
+ * Save commits and fragments in a single batch.
658
+ */
659
+ saveBatchAll(sedimentree_id: SedimentreeId, commits: Array<any>, fragments: Array<any>): Promise<any>;
656
660
  /**
657
661
  * Save a commit with its blob.
658
662
  */
@@ -1,4 +1,4 @@
1
- import { tryIntoJsSedimentreeIdsArray } from './snippets/sedimentree_wasm-75027ecce41278de/inline2.js';
1
+ import { tryIntoJsSedimentreeIdsArray } from './snippets/sedimentree_wasm-c507f5285f2927a0/inline2.js';
2
2
 
3
3
  /**
4
4
  * An authenticated HTTP long-poll transport.
@@ -1299,6 +1299,18 @@ export class MemoryStorage {
1299
1299
  MemoryStorageFinalization.register(this, this.__wbg_ptr, this);
1300
1300
  return this;
1301
1301
  }
1302
+ /**
1303
+ * Save commits and fragments in a single batch.
1304
+ * @param {SedimentreeId} sedimentree_id
1305
+ * @param {Array<any>} commits
1306
+ * @param {Array<any>} fragments
1307
+ * @returns {Promise<any>}
1308
+ */
1309
+ saveBatchAll(sedimentree_id, commits, fragments) {
1310
+ _assertClass(sedimentree_id, SedimentreeId);
1311
+ const ret = wasm.memorystorage_saveBatchAll(this.__wbg_ptr, sedimentree_id.__wbg_ptr, commits, fragments);
1312
+ return ret;
1313
+ }
1302
1314
  /**
1303
1315
  * Save a commit with its blob.
1304
1316
  * @param {SedimentreeId} sedimentree_id
@@ -1876,6 +1888,12 @@ export class SignedFragment {
1876
1888
  SignedFragmentFinalization.register(obj, obj.__wbg_ptr, obj);
1877
1889
  return obj;
1878
1890
  }
1891
+ static __unwrap(jsValue) {
1892
+ if (!(jsValue instanceof SignedFragment)) {
1893
+ return 0;
1894
+ }
1895
+ return jsValue.__destroy_into_raw();
1896
+ }
1879
1897
  __destroy_into_raw() {
1880
1898
  const ptr = this.__wbg_ptr;
1881
1899
  this.__wbg_ptr = 0;
@@ -1947,6 +1965,12 @@ export class SignedLooseCommit {
1947
1965
  SignedLooseCommitFinalization.register(obj, obj.__wbg_ptr, obj);
1948
1966
  return obj;
1949
1967
  }
1968
+ static __unwrap(jsValue) {
1969
+ if (!(jsValue instanceof SignedLooseCommit)) {
1970
+ return 0;
1971
+ }
1972
+ return jsValue.__destroy_into_raw();
1973
+ }
1950
1974
  __destroy_into_raw() {
1951
1975
  const ptr = this.__wbg_ptr;
1952
1976
  this.__wbg_ptr = 0;
@@ -3427,37 +3451,37 @@ export function makeMessagePortTransport(port) {
3427
3451
  export function start() {
3428
3452
  wasm.start();
3429
3453
  }
3430
- export function __wbg___wasm_refgen_toWasmCommitWithBlob_fcbd230cf952f128(arg0) {
3454
+ export function __wbg___wasm_refgen_toWasmCommitWithBlob_bcab5aaed3558280(arg0) {
3431
3455
  const ret = arg0.__wasm_refgen_toWasmCommitWithBlob();
3432
3456
  _assertClass(ret, CommitWithBlob);
3433
3457
  var ptr1 = ret.__destroy_into_raw();
3434
3458
  return ptr1;
3435
3459
  }
3436
- export function __wbg___wasm_refgen_toWasmDepth_4f8de5b877457c3d(arg0) {
3460
+ export function __wbg___wasm_refgen_toWasmDepth_5124f666e343ff0c(arg0) {
3437
3461
  const ret = arg0.__wasm_refgen_toWasmDepth();
3438
3462
  _assertClass(ret, Depth);
3439
3463
  var ptr1 = ret.__destroy_into_raw();
3440
3464
  return ptr1;
3441
3465
  }
3442
- export function __wbg___wasm_refgen_toWasmDigest_d0fbca90d003e5b2(arg0) {
3466
+ export function __wbg___wasm_refgen_toWasmDigest_476b24805f220005(arg0) {
3443
3467
  const ret = arg0.__wasm_refgen_toWasmDigest();
3444
3468
  _assertClass(ret, Digest);
3445
3469
  var ptr1 = ret.__destroy_into_raw();
3446
3470
  return ptr1;
3447
3471
  }
3448
- export function __wbg___wasm_refgen_toWasmFragmentWithBlob_814bb2b3d862ac90(arg0) {
3472
+ export function __wbg___wasm_refgen_toWasmFragmentWithBlob_ed713e5c5f4cc52e(arg0) {
3449
3473
  const ret = arg0.__wasm_refgen_toWasmFragmentWithBlob();
3450
3474
  _assertClass(ret, FragmentWithBlob);
3451
3475
  var ptr1 = ret.__destroy_into_raw();
3452
3476
  return ptr1;
3453
3477
  }
3454
- export function __wbg___wasm_refgen_toWasmFragment_32ab33a0a1cf967b(arg0) {
3478
+ export function __wbg___wasm_refgen_toWasmFragment_10dd1ff9b3934840(arg0) {
3455
3479
  const ret = arg0.__wasm_refgen_toWasmFragment();
3456
3480
  _assertClass(ret, Fragment);
3457
3481
  var ptr1 = ret.__destroy_into_raw();
3458
3482
  return ptr1;
3459
3483
  }
3460
- export function __wbg___wasm_refgen_toWasmLooseCommit_6deda612421ca7e6(arg0) {
3484
+ export function __wbg___wasm_refgen_toWasmLooseCommit_f36ad6a9389cee03(arg0) {
3461
3485
  const ret = arg0.__wasm_refgen_toWasmLooseCommit();
3462
3486
  _assertClass(ret, LooseCommit);
3463
3487
  var ptr1 = ret.__destroy_into_raw();
@@ -3596,11 +3620,11 @@ export function __wbg_data_a3d9ff9cdd801002(arg0) {
3596
3620
  const ret = arg0.data;
3597
3621
  return ret;
3598
3622
  }
3599
- export function __wbg_deleteAllCommits_87e95e34aba169ea(arg0, arg1) {
3623
+ export function __wbg_deleteAllCommits_026a63e00bba2a2c(arg0, arg1) {
3600
3624
  const ret = arg0.deleteAllCommits(arg1);
3601
3625
  return ret;
3602
3626
  }
3603
- export function __wbg_deleteAllFragments_b5a40f8b94689ee5(arg0, arg1) {
3627
+ export function __wbg_deleteAllFragments_857ddb74b3342f83(arg0, arg1) {
3604
3628
  const ret = arg0.deleteAllFragments(arg1);
3605
3629
  return ret;
3606
3630
  }
@@ -3839,15 +3863,15 @@ export function __wbg_length_ea16607d7b61445b(arg0) {
3839
3863
  const ret = arg0.length;
3840
3864
  return ret;
3841
3865
  }
3842
- export function __wbg_loadAllCommits_1b040f2bd61f63de(arg0, arg1) {
3866
+ export function __wbg_loadAllCommits_c18e977eb552890c(arg0, arg1) {
3843
3867
  const ret = arg0.loadAllCommits(arg1);
3844
3868
  return ret;
3845
3869
  }
3846
- export function __wbg_loadAllFragments_cf081afbfee53965(arg0, arg1) {
3870
+ export function __wbg_loadAllFragments_499f304a483c7f7f(arg0, arg1) {
3847
3871
  const ret = arg0.loadAllFragments(arg1);
3848
3872
  return ret;
3849
3873
  }
3850
- export function __wbg_loadAllSedimentreeIds_a9046bfade082517(arg0) {
3874
+ export function __wbg_loadAllSedimentreeIds_da48711155f73930(arg0) {
3851
3875
  const ret = arg0.loadAllSedimentreeIds();
3852
3876
  return ret;
3853
3877
  }
@@ -3890,7 +3914,7 @@ export function __wbg_new_d098e265629cd10f(arg0, arg1) {
3890
3914
  const a = state0.a;
3891
3915
  state0.a = 0;
3892
3916
  try {
3893
- return __wasm_bindgen_func_elem_1651_194(a, state0.b, arg0, arg1);
3917
+ return __wasm_bindgen_func_elem_1652_195(a, state0.b, arg0, arg1);
3894
3918
  } finally {
3895
3919
  state0.a = a;
3896
3920
  }
@@ -3924,7 +3948,7 @@ export function __wbg_new_typed_aaaeaf29cf802876(arg0, arg1) {
3924
3948
  const a = state0.a;
3925
3949
  state0.a = 0;
3926
3950
  try {
3927
- return __wasm_bindgen_func_elem_1651_195(a, state0.b, arg0, arg1);
3951
+ return __wasm_bindgen_func_elem_1652_196(a, state0.b, arg0, arg1);
3928
3952
  } finally {
3929
3953
  state0.a = a;
3930
3954
  }
@@ -4050,19 +4074,19 @@ export function __wbg_result_c5baa2d3d690a01a() { return handleError(function (a
4050
4074
  const ret = arg0.result;
4051
4075
  return ret;
4052
4076
  }, arguments); }
4053
- export function __wbg_saveBatchAll_b9359532f5a65936(arg0, arg1, arg2, arg3) {
4077
+ export function __wbg_saveBatchAll_7c5c5f486aefa571(arg0, arg1, arg2, arg3) {
4054
4078
  const ret = arg0.saveBatchAll(arg1, arg2, arg3);
4055
4079
  return ret;
4056
4080
  }
4057
- export function __wbg_saveCommit_f6c4180a159edfdf(arg0, arg1, arg2, arg3, arg4) {
4081
+ export function __wbg_saveCommit_fb38edd913837eb2(arg0, arg1, arg2, arg3, arg4) {
4058
4082
  const ret = arg0.saveCommit(arg1, arg2, arg3, arg4);
4059
4083
  return ret;
4060
4084
  }
4061
- export function __wbg_saveFragment_49505af74bd5abe3(arg0, arg1, arg2, arg3, arg4) {
4085
+ export function __wbg_saveFragment_8682cc697a38dbad(arg0, arg1, arg2, arg3, arg4) {
4062
4086
  const ret = arg0.saveFragment(arg1, arg2, arg3, arg4);
4063
4087
  return ret;
4064
4088
  }
4065
- export function __wbg_saveSedimentreeId_7b6b4310628fe78c(arg0, arg1) {
4089
+ export function __wbg_saveSedimentreeId_ec8145842e87e53b(arg0, arg1) {
4066
4090
  const ret = arg0.saveSedimentreeId(arg1);
4067
4091
  return ret;
4068
4092
  }
@@ -4149,10 +4173,18 @@ export function __wbg_signedfragment_new(arg0) {
4149
4173
  const ret = SignedFragment.__wrap(arg0);
4150
4174
  return ret;
4151
4175
  }
4176
+ export function __wbg_signedfragment_unwrap(arg0) {
4177
+ const ret = SignedFragment.__unwrap(arg0);
4178
+ return ret;
4179
+ }
4152
4180
  export function __wbg_signedloosecommit_new(arg0) {
4153
4181
  const ret = SignedLooseCommit.__wrap(arg0);
4154
4182
  return ret;
4155
4183
  }
4184
+ export function __wbg_signedloosecommit_unwrap(arg0) {
4185
+ const ret = SignedLooseCommit.__unwrap(arg0);
4186
+ return ret;
4187
+ }
4156
4188
  export function __wbg_stack_3b0d974bbf31e44f(arg0, arg1) {
4157
4189
  const ret = arg1.stack;
4158
4190
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -4231,7 +4263,7 @@ export function __wbg_transaction_2237af0233efbdf3() { return handleError(functi
4231
4263
  const ret = arg0.transaction(getStringFromWasm0(arg1, arg2));
4232
4264
  return ret;
4233
4265
  }, arguments); }
4234
- export function __wbg_tryIntoJsSedimentreeIdsArray_6803cc05ac20ff4f() { return handleError(function (arg0, arg1) {
4266
+ export function __wbg_tryIntoJsSedimentreeIdsArray_b07d2438a6f2a3b9() { return handleError(function (arg0, arg1) {
4235
4267
  const ret = tryIntoJsSedimentreeIdsArray(arg1);
4236
4268
  const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_export);
4237
4269
  const len1 = WASM_VECTOR_LEN;
@@ -4252,32 +4284,32 @@ export function __wbg_webcryptosigner_new(arg0) {
4252
4284
  }
4253
4285
  export function __wbindgen_cast_0000000000000001(arg0, arg1) {
4254
4286
  // 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);
4287
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_287, __wasm_bindgen_func_elem_639);
4256
4288
  return ret;
4257
4289
  }
4258
4290
  export function __wbindgen_cast_0000000000000002(arg0, arg1) {
4259
4291
  // 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);
4292
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_287, __wasm_bindgen_func_elem_639_1);
4261
4293
  return ret;
4262
4294
  }
4263
4295
  export function __wbindgen_cast_0000000000000003(arg0, arg1) {
4264
4296
  // 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);
4297
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_287, __wasm_bindgen_func_elem_639_2);
4266
4298
  return ret;
4267
4299
  }
4268
4300
  export function __wbindgen_cast_0000000000000004(arg0, arg1) {
4269
4301
  // 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);
4302
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_287, __wasm_bindgen_func_elem_639_3);
4271
4303
  return ret;
4272
4304
  }
4273
4305
  export function __wbindgen_cast_0000000000000005(arg0, arg1) {
4274
4306
  // 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);
4307
+ const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_287, __wasm_bindgen_func_elem_638);
4276
4308
  return ret;
4277
4309
  }
4278
4310
  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);
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);
4281
4313
  return ret;
4282
4314
  }
4283
4315
  export function __wbindgen_cast_0000000000000007(arg0) {
@@ -4339,39 +4371,39 @@ export function __wbindgen_init_externref_table() {
4339
4371
  table.set(offset + 2, true);
4340
4372
  table.set(offset + 3, false);
4341
4373
  }
4342
- function __wasm_bindgen_func_elem_637(arg0, arg1) {
4343
- wasm.__wasm_bindgen_func_elem_637(arg0, arg1);
4374
+ function __wasm_bindgen_func_elem_638(arg0, arg1) {
4375
+ wasm.__wasm_bindgen_func_elem_638(arg0, arg1);
4344
4376
  }
4345
4377
 
4346
- function __wasm_bindgen_func_elem_638(arg0, arg1, arg2) {
4347
- wasm.__wasm_bindgen_func_elem_638(arg0, arg1, arg2);
4378
+ function __wasm_bindgen_func_elem_639(arg0, arg1, arg2) {
4379
+ wasm.__wasm_bindgen_func_elem_639(arg0, arg1, arg2);
4348
4380
  }
4349
4381
 
4350
- function __wasm_bindgen_func_elem_638_1(arg0, arg1, arg2) {
4351
- wasm.__wasm_bindgen_func_elem_638_1(arg0, arg1, arg2);
4382
+ function __wasm_bindgen_func_elem_639_1(arg0, arg1, arg2) {
4383
+ wasm.__wasm_bindgen_func_elem_639_1(arg0, arg1, arg2);
4352
4384
  }
4353
4385
 
4354
- function __wasm_bindgen_func_elem_638_2(arg0, arg1, arg2) {
4355
- wasm.__wasm_bindgen_func_elem_638_2(arg0, arg1, arg2);
4386
+ function __wasm_bindgen_func_elem_639_2(arg0, arg1, arg2) {
4387
+ wasm.__wasm_bindgen_func_elem_639_2(arg0, arg1, arg2);
4356
4388
  }
4357
4389
 
4358
- function __wasm_bindgen_func_elem_638_3(arg0, arg1, arg2) {
4359
- wasm.__wasm_bindgen_func_elem_638_3(arg0, arg1, arg2);
4390
+ function __wasm_bindgen_func_elem_639_3(arg0, arg1, arg2) {
4391
+ wasm.__wasm_bindgen_func_elem_639_3(arg0, arg1, arg2);
4360
4392
  }
4361
4393
 
4362
- function __wasm_bindgen_func_elem_1651(arg0, arg1, arg2) {
4363
- const ret = wasm.__wasm_bindgen_func_elem_1651(arg0, arg1, arg2);
4394
+ function __wasm_bindgen_func_elem_1652(arg0, arg1, arg2) {
4395
+ const ret = wasm.__wasm_bindgen_func_elem_1652(arg0, arg1, arg2);
4364
4396
  if (ret[1]) {
4365
4397
  throw takeFromExternrefTable0(ret[0]);
4366
4398
  }
4367
4399
  }
4368
4400
 
4369
- function __wasm_bindgen_func_elem_1651_194(arg0, arg1, arg2, arg3) {
4370
- wasm.__wasm_bindgen_func_elem_1651_194(arg0, arg1, arg2, arg3);
4401
+ function __wasm_bindgen_func_elem_1652_195(arg0, arg1, arg2, arg3) {
4402
+ wasm.__wasm_bindgen_func_elem_1652_195(arg0, arg1, arg2, arg3);
4371
4403
  }
4372
4404
 
4373
- function __wasm_bindgen_func_elem_1651_195(arg0, arg1, arg2, arg3) {
4374
- wasm.__wasm_bindgen_func_elem_1651_195(arg0, arg1, arg2, arg3);
4405
+ function __wasm_bindgen_func_elem_1652_196(arg0, arg1, arg2, arg3) {
4406
+ wasm.__wasm_bindgen_func_elem_1652_196(arg0, arg1, arg2, arg3);
4375
4407
  }
4376
4408
 
4377
4409
 
@@ -218,6 +218,7 @@ export const memorystorage_listFragmentDigests: (a: number, b: number) => any;
218
218
  export const memorystorage_loadAllFragments: (a: number, b: number) => any;
219
219
  export const memorystorage_deleteFragment: (a: number, b: number, c: number) => any;
220
220
  export const memorystorage_deleteAllFragments: (a: number, b: number) => any;
221
+ export const memorystorage_saveBatchAll: (a: number, b: number, c: any, d: any) => any;
221
222
  export const depth___wasm_refgen_toWasmDepth: (a: number) => number;
222
223
  export const fragmentwithblob_new: (a: number, b: any) => number;
223
224
  export const __wbg_sedimentreeid_free: (a: number, b: number) => void;
@@ -226,15 +227,15 @@ export const __wbg_fragmentwithblob_free: (a: number, b: number) => void;
226
227
  export const sedimentreeid_toBytes: (a: number) => [number, number];
227
228
  export const sedimentreeid___wasm_refgen_toWasmSedimentreeId: (a: number) => number;
228
229
  export const fragmentwithblob_blob: (a: number) => any;
229
- export const __wasm_bindgen_func_elem_285: (a: number, b: number) => void;
230
- export const __wasm_bindgen_func_elem_1651: (a: number, b: number, c: any) => [number, number];
231
- export const __wasm_bindgen_func_elem_1651_194: (a: number, b: number, c: any, d: any) => void;
232
- export const __wasm_bindgen_func_elem_1651_195: (a: number, b: number, c: any, d: any) => void;
233
- export const __wasm_bindgen_func_elem_638: (a: number, b: number, c: any) => void;
234
- export const __wasm_bindgen_func_elem_638_1: (a: number, b: number, c: any) => void;
235
- export const __wasm_bindgen_func_elem_638_2: (a: number, b: number, c: any) => void;
236
- export const __wasm_bindgen_func_elem_638_3: (a: number, b: number, c: any) => void;
237
- export const __wasm_bindgen_func_elem_637: (a: number, b: number) => void;
230
+ export const __wasm_bindgen_func_elem_287: (a: number, b: number) => void;
231
+ export const __wasm_bindgen_func_elem_1652: (a: number, b: number, c: any) => [number, number];
232
+ export const __wasm_bindgen_func_elem_1652_195: (a: number, b: number, c: any, d: any) => void;
233
+ export const __wasm_bindgen_func_elem_1652_196: (a: number, b: number, c: any, d: any) => void;
234
+ export const __wasm_bindgen_func_elem_639: (a: number, b: number, c: any) => void;
235
+ export const __wasm_bindgen_func_elem_639_1: (a: number, b: number, c: any) => void;
236
+ export const __wasm_bindgen_func_elem_639_2: (a: number, b: number, c: any) => void;
237
+ export const __wasm_bindgen_func_elem_639_3: (a: number, b: number, c: any) => void;
238
+ export const __wasm_bindgen_func_elem_638: (a: number, b: number) => void;
238
239
  export const __wbindgen_export: (a: number, b: number) => number;
239
240
  export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
240
241
  export const __wbindgen_export3: (a: number) => void;
@@ -1,5 +1,5 @@
1
1
  /* @ts-self-types="./subduction_wasm.d.ts" */
2
- const { tryIntoJsSedimentreeIdsArray } = require(String.raw`./snippets/sedimentree_wasm-75027ecce41278de/inline2.js`);
2
+ const { tryIntoJsSedimentreeIdsArray } = require(String.raw`./snippets/sedimentree_wasm-c507f5285f2927a0/inline2.js`);
3
3
 
4
4
  /**
5
5
  * An authenticated HTTP long-poll transport.
@@ -1317,6 +1317,18 @@ class MemoryStorage {
1317
1317
  MemoryStorageFinalization.register(this, this.__wbg_ptr, this);
1318
1318
  return this;
1319
1319
  }
1320
+ /**
1321
+ * Save commits and fragments in a single batch.
1322
+ * @param {SedimentreeId} sedimentree_id
1323
+ * @param {Array<any>} commits
1324
+ * @param {Array<any>} fragments
1325
+ * @returns {Promise<any>}
1326
+ */
1327
+ saveBatchAll(sedimentree_id, commits, fragments) {
1328
+ _assertClass(sedimentree_id, SedimentreeId);
1329
+ const ret = wasm.memorystorage_saveBatchAll(this.__wbg_ptr, sedimentree_id.__wbg_ptr, commits, fragments);
1330
+ return ret;
1331
+ }
1320
1332
  /**
1321
1333
  * Save a commit with its blob.
1322
1334
  * @param {SedimentreeId} sedimentree_id
@@ -1904,6 +1916,12 @@ class SignedFragment {
1904
1916
  SignedFragmentFinalization.register(obj, obj.__wbg_ptr, obj);
1905
1917
  return obj;
1906
1918
  }
1919
+ static __unwrap(jsValue) {
1920
+ if (!(jsValue instanceof SignedFragment)) {
1921
+ return 0;
1922
+ }
1923
+ return jsValue.__destroy_into_raw();
1924
+ }
1907
1925
  __destroy_into_raw() {
1908
1926
  const ptr = this.__wbg_ptr;
1909
1927
  this.__wbg_ptr = 0;
@@ -1976,6 +1994,12 @@ class SignedLooseCommit {
1976
1994
  SignedLooseCommitFinalization.register(obj, obj.__wbg_ptr, obj);
1977
1995
  return obj;
1978
1996
  }
1997
+ static __unwrap(jsValue) {
1998
+ if (!(jsValue instanceof SignedLooseCommit)) {
1999
+ return 0;
2000
+ }
2001
+ return jsValue.__destroy_into_raw();
2002
+ }
1979
2003
  __destroy_into_raw() {
1980
2004
  const ptr = this.__wbg_ptr;
1981
2005
  this.__wbg_ptr = 0;
@@ -3473,37 +3497,37 @@ const import2 = require("./snippets/subduction_wasm-ec51bcf335db35bd/inline1.js"
3473
3497
  function __wbg_get_imports() {
3474
3498
  const import0 = {
3475
3499
  __proto__: null,
3476
- __wbg___wasm_refgen_toWasmCommitWithBlob_fcbd230cf952f128: function(arg0) {
3500
+ __wbg___wasm_refgen_toWasmCommitWithBlob_bcab5aaed3558280: function(arg0) {
3477
3501
  const ret = arg0.__wasm_refgen_toWasmCommitWithBlob();
3478
3502
  _assertClass(ret, CommitWithBlob);
3479
3503
  var ptr1 = ret.__destroy_into_raw();
3480
3504
  return ptr1;
3481
3505
  },
3482
- __wbg___wasm_refgen_toWasmDepth_4f8de5b877457c3d: function(arg0) {
3506
+ __wbg___wasm_refgen_toWasmDepth_5124f666e343ff0c: function(arg0) {
3483
3507
  const ret = arg0.__wasm_refgen_toWasmDepth();
3484
3508
  _assertClass(ret, Depth);
3485
3509
  var ptr1 = ret.__destroy_into_raw();
3486
3510
  return ptr1;
3487
3511
  },
3488
- __wbg___wasm_refgen_toWasmDigest_d0fbca90d003e5b2: function(arg0) {
3512
+ __wbg___wasm_refgen_toWasmDigest_476b24805f220005: function(arg0) {
3489
3513
  const ret = arg0.__wasm_refgen_toWasmDigest();
3490
3514
  _assertClass(ret, Digest);
3491
3515
  var ptr1 = ret.__destroy_into_raw();
3492
3516
  return ptr1;
3493
3517
  },
3494
- __wbg___wasm_refgen_toWasmFragmentWithBlob_814bb2b3d862ac90: function(arg0) {
3518
+ __wbg___wasm_refgen_toWasmFragmentWithBlob_ed713e5c5f4cc52e: function(arg0) {
3495
3519
  const ret = arg0.__wasm_refgen_toWasmFragmentWithBlob();
3496
3520
  _assertClass(ret, FragmentWithBlob);
3497
3521
  var ptr1 = ret.__destroy_into_raw();
3498
3522
  return ptr1;
3499
3523
  },
3500
- __wbg___wasm_refgen_toWasmFragment_32ab33a0a1cf967b: function(arg0) {
3524
+ __wbg___wasm_refgen_toWasmFragment_10dd1ff9b3934840: function(arg0) {
3501
3525
  const ret = arg0.__wasm_refgen_toWasmFragment();
3502
3526
  _assertClass(ret, Fragment);
3503
3527
  var ptr1 = ret.__destroy_into_raw();
3504
3528
  return ptr1;
3505
3529
  },
3506
- __wbg___wasm_refgen_toWasmLooseCommit_6deda612421ca7e6: function(arg0) {
3530
+ __wbg___wasm_refgen_toWasmLooseCommit_f36ad6a9389cee03: function(arg0) {
3507
3531
  const ret = arg0.__wasm_refgen_toWasmLooseCommit();
3508
3532
  _assertClass(ret, LooseCommit);
3509
3533
  var ptr1 = ret.__destroy_into_raw();
@@ -3642,11 +3666,11 @@ function __wbg_get_imports() {
3642
3666
  const ret = arg0.data;
3643
3667
  return ret;
3644
3668
  },
3645
- __wbg_deleteAllCommits_87e95e34aba169ea: function(arg0, arg1) {
3669
+ __wbg_deleteAllCommits_026a63e00bba2a2c: function(arg0, arg1) {
3646
3670
  const ret = arg0.deleteAllCommits(arg1);
3647
3671
  return ret;
3648
3672
  },
3649
- __wbg_deleteAllFragments_b5a40f8b94689ee5: function(arg0, arg1) {
3673
+ __wbg_deleteAllFragments_857ddb74b3342f83: function(arg0, arg1) {
3650
3674
  const ret = arg0.deleteAllFragments(arg1);
3651
3675
  return ret;
3652
3676
  },
@@ -3885,15 +3909,15 @@ function __wbg_get_imports() {
3885
3909
  const ret = arg0.length;
3886
3910
  return ret;
3887
3911
  },
3888
- __wbg_loadAllCommits_1b040f2bd61f63de: function(arg0, arg1) {
3912
+ __wbg_loadAllCommits_c18e977eb552890c: function(arg0, arg1) {
3889
3913
  const ret = arg0.loadAllCommits(arg1);
3890
3914
  return ret;
3891
3915
  },
3892
- __wbg_loadAllFragments_cf081afbfee53965: function(arg0, arg1) {
3916
+ __wbg_loadAllFragments_499f304a483c7f7f: function(arg0, arg1) {
3893
3917
  const ret = arg0.loadAllFragments(arg1);
3894
3918
  return ret;
3895
3919
  },
3896
- __wbg_loadAllSedimentreeIds_a9046bfade082517: function(arg0) {
3920
+ __wbg_loadAllSedimentreeIds_da48711155f73930: function(arg0) {
3897
3921
  const ret = arg0.loadAllSedimentreeIds();
3898
3922
  return ret;
3899
3923
  },
@@ -3936,7 +3960,7 @@ function __wbg_get_imports() {
3936
3960
  const a = state0.a;
3937
3961
  state0.a = 0;
3938
3962
  try {
3939
- return __wasm_bindgen_func_elem_1651_194(a, state0.b, arg0, arg1);
3963
+ return __wasm_bindgen_func_elem_1652_195(a, state0.b, arg0, arg1);
3940
3964
  } finally {
3941
3965
  state0.a = a;
3942
3966
  }
@@ -3970,7 +3994,7 @@ function __wbg_get_imports() {
3970
3994
  const a = state0.a;
3971
3995
  state0.a = 0;
3972
3996
  try {
3973
- return __wasm_bindgen_func_elem_1651_195(a, state0.b, arg0, arg1);
3997
+ return __wasm_bindgen_func_elem_1652_196(a, state0.b, arg0, arg1);
3974
3998
  } finally {
3975
3999
  state0.a = a;
3976
4000
  }
@@ -4096,19 +4120,19 @@ function __wbg_get_imports() {
4096
4120
  const ret = arg0.result;
4097
4121
  return ret;
4098
4122
  }, arguments); },
4099
- __wbg_saveBatchAll_b9359532f5a65936: function(arg0, arg1, arg2, arg3) {
4123
+ __wbg_saveBatchAll_7c5c5f486aefa571: function(arg0, arg1, arg2, arg3) {
4100
4124
  const ret = arg0.saveBatchAll(arg1, arg2, arg3);
4101
4125
  return ret;
4102
4126
  },
4103
- __wbg_saveCommit_f6c4180a159edfdf: function(arg0, arg1, arg2, arg3, arg4) {
4127
+ __wbg_saveCommit_fb38edd913837eb2: function(arg0, arg1, arg2, arg3, arg4) {
4104
4128
  const ret = arg0.saveCommit(arg1, arg2, arg3, arg4);
4105
4129
  return ret;
4106
4130
  },
4107
- __wbg_saveFragment_49505af74bd5abe3: function(arg0, arg1, arg2, arg3, arg4) {
4131
+ __wbg_saveFragment_8682cc697a38dbad: function(arg0, arg1, arg2, arg3, arg4) {
4108
4132
  const ret = arg0.saveFragment(arg1, arg2, arg3, arg4);
4109
4133
  return ret;
4110
4134
  },
4111
- __wbg_saveSedimentreeId_7b6b4310628fe78c: function(arg0, arg1) {
4135
+ __wbg_saveSedimentreeId_ec8145842e87e53b: function(arg0, arg1) {
4112
4136
  const ret = arg0.saveSedimentreeId(arg1);
4113
4137
  return ret;
4114
4138
  },
@@ -4195,10 +4219,18 @@ function __wbg_get_imports() {
4195
4219
  const ret = SignedFragment.__wrap(arg0);
4196
4220
  return ret;
4197
4221
  },
4222
+ __wbg_signedfragment_unwrap: function(arg0) {
4223
+ const ret = SignedFragment.__unwrap(arg0);
4224
+ return ret;
4225
+ },
4198
4226
  __wbg_signedloosecommit_new: function(arg0) {
4199
4227
  const ret = SignedLooseCommit.__wrap(arg0);
4200
4228
  return ret;
4201
4229
  },
4230
+ __wbg_signedloosecommit_unwrap: function(arg0) {
4231
+ const ret = SignedLooseCommit.__unwrap(arg0);
4232
+ return ret;
4233
+ },
4202
4234
  __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
4203
4235
  const ret = arg1.stack;
4204
4236
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -4277,7 +4309,7 @@ function __wbg_get_imports() {
4277
4309
  const ret = arg0.transaction(getStringFromWasm0(arg1, arg2));
4278
4310
  return ret;
4279
4311
  }, arguments); },
4280
- __wbg_tryIntoJsSedimentreeIdsArray_6803cc05ac20ff4f: function() { return handleError(function (arg0, arg1) {
4312
+ __wbg_tryIntoJsSedimentreeIdsArray_b07d2438a6f2a3b9: function() { return handleError(function (arg0, arg1) {
4281
4313
  const ret = tryIntoJsSedimentreeIdsArray(arg1);
4282
4314
  const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_export);
4283
4315
  const len1 = WASM_VECTOR_LEN;
@@ -4298,32 +4330,32 @@ function __wbg_get_imports() {
4298
4330
  },
4299
4331
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
4300
4332
  // Cast intrinsic for `Closure(Closure { dtor_idx: 11, function: Function { arguments: [Externref], shim_idx: 12, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
4301
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_285, __wasm_bindgen_func_elem_638);
4333
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_287, __wasm_bindgen_func_elem_639);
4302
4334
  return ret;
4303
4335
  },
4304
4336
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
4305
4337
  // 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`.
4306
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_285, __wasm_bindgen_func_elem_638_1);
4338
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_287, __wasm_bindgen_func_elem_639_1);
4307
4339
  return ret;
4308
4340
  },
4309
4341
  __wbindgen_cast_0000000000000003: function(arg0, arg1) {
4310
4342
  // 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`.
4311
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_285, __wasm_bindgen_func_elem_638_2);
4343
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_287, __wasm_bindgen_func_elem_639_2);
4312
4344
  return ret;
4313
4345
  },
4314
4346
  __wbindgen_cast_0000000000000004: function(arg0, arg1) {
4315
4347
  // 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`.
4316
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_285, __wasm_bindgen_func_elem_638_3);
4348
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_287, __wasm_bindgen_func_elem_639_3);
4317
4349
  return ret;
4318
4350
  },
4319
4351
  __wbindgen_cast_0000000000000005: function(arg0, arg1) {
4320
4352
  // Cast intrinsic for `Closure(Closure { dtor_idx: 11, function: Function { arguments: [], shim_idx: 13, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
4321
- const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_285, __wasm_bindgen_func_elem_637);
4353
+ const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_287, __wasm_bindgen_func_elem_638);
4322
4354
  return ret;
4323
4355
  },
4324
4356
  __wbindgen_cast_0000000000000006: function(arg0, arg1) {
4325
- // 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`.
4326
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_285, __wasm_bindgen_func_elem_1651);
4357
+ // 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`.
4358
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_287, __wasm_bindgen_func_elem_1652);
4327
4359
  return ret;
4328
4360
  },
4329
4361
  __wbindgen_cast_0000000000000007: function(arg0) {
@@ -4394,39 +4426,39 @@ function __wbg_get_imports() {
4394
4426
  };
4395
4427
  }
4396
4428
 
4397
- function __wasm_bindgen_func_elem_637(arg0, arg1) {
4398
- wasm.__wasm_bindgen_func_elem_637(arg0, arg1);
4429
+ function __wasm_bindgen_func_elem_638(arg0, arg1) {
4430
+ wasm.__wasm_bindgen_func_elem_638(arg0, arg1);
4399
4431
  }
4400
4432
 
4401
- function __wasm_bindgen_func_elem_638(arg0, arg1, arg2) {
4402
- wasm.__wasm_bindgen_func_elem_638(arg0, arg1, arg2);
4433
+ function __wasm_bindgen_func_elem_639(arg0, arg1, arg2) {
4434
+ wasm.__wasm_bindgen_func_elem_639(arg0, arg1, arg2);
4403
4435
  }
4404
4436
 
4405
- function __wasm_bindgen_func_elem_638_1(arg0, arg1, arg2) {
4406
- wasm.__wasm_bindgen_func_elem_638_1(arg0, arg1, arg2);
4437
+ function __wasm_bindgen_func_elem_639_1(arg0, arg1, arg2) {
4438
+ wasm.__wasm_bindgen_func_elem_639_1(arg0, arg1, arg2);
4407
4439
  }
4408
4440
 
4409
- function __wasm_bindgen_func_elem_638_2(arg0, arg1, arg2) {
4410
- wasm.__wasm_bindgen_func_elem_638_2(arg0, arg1, arg2);
4441
+ function __wasm_bindgen_func_elem_639_2(arg0, arg1, arg2) {
4442
+ wasm.__wasm_bindgen_func_elem_639_2(arg0, arg1, arg2);
4411
4443
  }
4412
4444
 
4413
- function __wasm_bindgen_func_elem_638_3(arg0, arg1, arg2) {
4414
- wasm.__wasm_bindgen_func_elem_638_3(arg0, arg1, arg2);
4445
+ function __wasm_bindgen_func_elem_639_3(arg0, arg1, arg2) {
4446
+ wasm.__wasm_bindgen_func_elem_639_3(arg0, arg1, arg2);
4415
4447
  }
4416
4448
 
4417
- function __wasm_bindgen_func_elem_1651(arg0, arg1, arg2) {
4418
- const ret = wasm.__wasm_bindgen_func_elem_1651(arg0, arg1, arg2);
4449
+ function __wasm_bindgen_func_elem_1652(arg0, arg1, arg2) {
4450
+ const ret = wasm.__wasm_bindgen_func_elem_1652(arg0, arg1, arg2);
4419
4451
  if (ret[1]) {
4420
4452
  throw takeFromExternrefTable0(ret[0]);
4421
4453
  }
4422
4454
  }
4423
4455
 
4424
- function __wasm_bindgen_func_elem_1651_194(arg0, arg1, arg2, arg3) {
4425
- wasm.__wasm_bindgen_func_elem_1651_194(arg0, arg1, arg2, arg3);
4456
+ function __wasm_bindgen_func_elem_1652_195(arg0, arg1, arg2, arg3) {
4457
+ wasm.__wasm_bindgen_func_elem_1652_195(arg0, arg1, arg2, arg3);
4426
4458
  }
4427
4459
 
4428
- function __wasm_bindgen_func_elem_1651_195(arg0, arg1, arg2, arg3) {
4429
- wasm.__wasm_bindgen_func_elem_1651_195(arg0, arg1, arg2, arg3);
4460
+ function __wasm_bindgen_func_elem_1652_196(arg0, arg1, arg2, arg3) {
4461
+ wasm.__wasm_bindgen_func_elem_1652_196(arg0, arg1, arg2, arg3);
4430
4462
  }
4431
4463
 
4432
4464
 
@@ -653,6 +653,10 @@ export class MemoryStorage {
653
653
  * Create a new in-memory storage instance.
654
654
  */
655
655
  constructor();
656
+ /**
657
+ * Save commits and fragments in a single batch.
658
+ */
659
+ saveBatchAll(sedimentree_id: SedimentreeId, commits: Array<any>, fragments: Array<any>): Promise<any>;
656
660
  /**
657
661
  * Save a commit with its blob.
658
662
  */