@miden-sdk/miden-sdk 0.15.0-alpha.7 → 0.15.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 (43) hide show
  1. package/dist/mt/{Cargo-C9UbiAcT.js → Cargo-1zqmsGGR.js} +314 -96
  2. package/dist/mt/Cargo-1zqmsGGR.js.map +1 -0
  3. package/dist/mt/api-types.d.ts +17 -24
  4. package/dist/mt/assets/miden_client_web.wasm +0 -0
  5. package/dist/mt/crates/miden_client_web.d.ts +42 -19
  6. package/dist/mt/eager.js +1 -1
  7. package/dist/mt/index.js +8 -60
  8. package/dist/mt/index.js.map +1 -1
  9. package/dist/mt/wasm.js +1 -1
  10. package/dist/mt/workerHelpers.js +1 -1
  11. package/dist/mt/workers/{Cargo-C9UbiAcT-Z344cyB1.js → Cargo-1zqmsGGR-COfl7R3D.js} +314 -96
  12. package/dist/mt/workers/Cargo-1zqmsGGR-COfl7R3D.js.map +1 -0
  13. package/dist/mt/workers/assets/miden_client_web.wasm +0 -0
  14. package/dist/mt/workers/web-client-methods-worker.js +315 -96
  15. package/dist/mt/workers/web-client-methods-worker.js.map +1 -1
  16. package/dist/mt/workers/web-client-methods-worker.module.js +1 -1
  17. package/dist/mt/workers/web-client-methods-worker.module.js.map +1 -1
  18. package/dist/mt/workers/workerHelpers.js +1 -1
  19. package/dist/st/{Cargo-OZMlHpic.js → Cargo-qHCIdWdN.js} +315 -98
  20. package/dist/st/Cargo-qHCIdWdN.js.map +1 -0
  21. package/dist/st/api-types.d.ts +17 -24
  22. package/dist/st/assets/miden_client_web.wasm +0 -0
  23. package/dist/st/crates/miden_client_web.d.ts +42 -19
  24. package/dist/st/eager.js +1 -1
  25. package/dist/st/index.js +8 -60
  26. package/dist/st/index.js.map +1 -1
  27. package/dist/st/wasm.js +1 -1
  28. package/dist/st/workers/{Cargo-OZMlHpic-DZjvJlWc.js → Cargo-qHCIdWdN-CZmgHdJc.js} +315 -98
  29. package/dist/st/workers/Cargo-qHCIdWdN-CZmgHdJc.js.map +1 -0
  30. package/dist/st/workers/assets/miden_client_web.wasm +0 -0
  31. package/dist/st/workers/web-client-methods-worker.js +316 -98
  32. package/dist/st/workers/web-client-methods-worker.js.map +1 -1
  33. package/dist/st/workers/web-client-methods-worker.module.js +1 -1
  34. package/dist/st/workers/web-client-methods-worker.module.js.map +1 -1
  35. package/js/node/napi-compat.js +2 -2
  36. package/js/node-index.js +1 -4
  37. package/js/resources/accounts.js +2 -14
  38. package/js/utils.js +2 -31
  39. package/package.json +4 -4
  40. package/dist/mt/Cargo-C9UbiAcT.js.map +0 -1
  41. package/dist/mt/workers/Cargo-C9UbiAcT-Z344cyB1.js.map +0 -1
  42. package/dist/st/Cargo-OZMlHpic.js.map +0 -1
  43. package/dist/st/workers/Cargo-OZMlHpic-DZjvJlWc.js.map +0 -1
@@ -5,7 +5,7 @@
5
5
  async function loadWasm() {
6
6
  let wasmModule;
7
7
  if (!undefined || (undefined && !undefined.SSR)) {
8
- wasmModule = await Promise.resolve().then(function () { return CargoC9UbiAcT; });
8
+ wasmModule = await Promise.resolve().then(function () { return Cargo1zqmsGGR; });
9
9
  // The Cargo glue's __wbg_init TLA is stripped by the rollup build to
10
10
  // prevent blocking WKWebView module evaluation. Call it explicitly here
11
11
  // with the WASM URL that the Cargo glue pre-resolves (relative to its
@@ -8910,7 +8910,7 @@ const V1_STORES = {
8910
8910
  [Table.Transactions]: indexes("id", "statusVariant"),
8911
8911
  [Table.TransactionScripts]: indexes("scriptRoot"),
8912
8912
  [Table.InputNotes]: indexes("detailsCommitment", "noteId", "nullifier", "stateDiscriminant", "[consumedBlockHeight+consumedTxOrder+noteId]"),
8913
- [Table.OutputNotes]: indexes("noteId", "recipientDigest", "stateDiscriminant", "nullifier"),
8913
+ [Table.OutputNotes]: indexes("detailsCommitment", "noteId", "recipientDigest", "stateDiscriminant", "nullifier"),
8914
8914
  [Table.NotesScripts]: indexes("scriptRoot"),
8915
8915
  [Table.StateSync]: indexes("id"),
8916
8916
  [Table.BlockHeaders]: indexes("blockNum", "hasClientNotes"),
@@ -9112,6 +9112,7 @@ async function getAllAccountHeaders(dbId) {
9112
9112
  locked: record.locked,
9113
9113
  committed: record.committed,
9114
9114
  accountCommitment: record.accountCommitment || "",
9115
+ watched: record.watched ?? false,
9115
9116
  }));
9116
9117
  return resultObject;
9117
9118
  }
@@ -9138,6 +9139,7 @@ async function getAccountHeader(dbId, accountId) {
9138
9139
  codeRoot: record.codeRoot,
9139
9140
  accountSeed: seedToBase64(record.accountSeed),
9140
9141
  locked: record.locked,
9142
+ watched: record.watched ?? false,
9141
9143
  };
9142
9144
  }
9143
9145
  catch (error) {
@@ -9162,6 +9164,7 @@ async function getAccountHeaderByCommitment(dbId, accountCommitment) {
9162
9164
  codeRoot: record.codeRoot,
9163
9165
  accountSeed: seedToBase64(record.accountSeed),
9164
9166
  locked: record.locked,
9167
+ watched: record.watched ?? false,
9165
9168
  };
9166
9169
  }
9167
9170
  catch (error) {
@@ -9445,6 +9448,7 @@ async function applyTransactionDelta(dbId, accountId, nonce, updatedSlots, chang
9445
9448
  accountSeed: oldHeader.accountSeed,
9446
9449
  accountCommitment: oldHeader.accountCommitment,
9447
9450
  locked: oldHeader.locked,
9451
+ watched: oldHeader.watched ?? false,
9448
9452
  });
9449
9453
  }
9450
9454
  await db.latestAccountHeaders.put({
@@ -9457,6 +9461,7 @@ async function applyTransactionDelta(dbId, accountId, nonce, updatedSlots, chang
9457
9461
  accountSeed: undefined,
9458
9462
  accountCommitment: commitment,
9459
9463
  locked: false,
9464
+ watched: oldHeader?.watched ?? false,
9460
9465
  });
9461
9466
  });
9462
9467
  }
@@ -9681,6 +9686,7 @@ async function applyFullAccountState(dbId, accountState) {
9681
9686
  accountSeed: oldHeader.accountSeed,
9682
9687
  accountCommitment: oldHeader.accountCommitment,
9683
9688
  locked: oldHeader.locked,
9689
+ watched: oldHeader.watched ?? false,
9684
9690
  });
9685
9691
  }
9686
9692
  await db.latestAccountHeaders.put({
@@ -9693,6 +9699,7 @@ async function applyFullAccountState(dbId, accountState) {
9693
9699
  accountSeed,
9694
9700
  accountCommitment,
9695
9701
  locked: false,
9702
+ watched: oldHeader?.watched ?? false,
9696
9703
  });
9697
9704
  });
9698
9705
  }
@@ -9700,7 +9707,7 @@ async function applyFullAccountState(dbId, accountState) {
9700
9707
  logWebStoreError(error, `Error applying full account state`);
9701
9708
  }
9702
9709
  }
9703
- async function upsertAccountRecord(dbId, accountId, codeRoot, storageRoot, vaultRoot, nonce, committed, commitment, accountSeed) {
9710
+ async function upsertAccountRecord(dbId, accountId, codeRoot, storageRoot, vaultRoot, nonce, committed, commitment, accountSeed, watched) {
9704
9711
  try {
9705
9712
  const db = getDatabase(dbId);
9706
9713
  const data = {
@@ -9713,6 +9720,7 @@ async function upsertAccountRecord(dbId, accountId, codeRoot, storageRoot, vault
9713
9720
  accountSeed,
9714
9721
  accountCommitment: commitment,
9715
9722
  locked: false,
9723
+ watched,
9716
9724
  };
9717
9725
  await db.latestAccountHeaders.put(data);
9718
9726
  }
@@ -10521,6 +10529,32 @@ async function getOutputNotesFromNullifiers(dbId, nullifiers) {
10521
10529
  logWebStoreError(err, "Failed to get output notes from nullifiers");
10522
10530
  }
10523
10531
  }
10532
+ async function getInputNotesFromDetailsCommitments(dbId, detailsCommitments) {
10533
+ try {
10534
+ const db = getDatabase(dbId);
10535
+ let notes = await db.inputNotes
10536
+ .where("detailsCommitment")
10537
+ .anyOf(detailsCommitments)
10538
+ .toArray();
10539
+ return await processInputNotes(dbId, notes);
10540
+ }
10541
+ catch (err) {
10542
+ logWebStoreError(err, "Failed to get input notes from details commitments");
10543
+ }
10544
+ }
10545
+ async function getOutputNotesFromDetailsCommitments(dbId, detailsCommitments) {
10546
+ try {
10547
+ const db = getDatabase(dbId);
10548
+ let notes = await db.outputNotes
10549
+ .where("detailsCommitment")
10550
+ .anyOf(detailsCommitments)
10551
+ .toArray();
10552
+ return await processOutputNotes(notes);
10553
+ }
10554
+ catch (err) {
10555
+ logWebStoreError(err, "Failed to get output notes from details commitments");
10556
+ }
10557
+ }
10524
10558
  async function getOutputNotesFromIds(dbId, noteIds) {
10525
10559
  try {
10526
10560
  const db = getDatabase(dbId);
@@ -10538,7 +10572,9 @@ async function getUnspentInputNoteNullifiers(dbId) {
10538
10572
  .where("stateDiscriminant")
10539
10573
  .anyOf([2, 4, 5])
10540
10574
  .toArray();
10541
- return notes.map((note) => note.nullifier);
10575
+ return notes
10576
+ .map((note) => note.nullifier)
10577
+ .filter((nullifier) => nullifier != null);
10542
10578
  }
10543
10579
  catch (err) {
10544
10580
  logWebStoreError(err, "Failed to get unspent input note nullifiers");
@@ -10562,19 +10598,15 @@ async function upsertInputNote(dbId, detailsCommitment, noteId, assets, attachme
10562
10598
  const doWork = async (t) => {
10563
10599
  try {
10564
10600
  const data = {
10565
- // The details commitment is the primary key. It is always present, even
10566
- // for partial notes lacking a noteId, so a partial note that later gains
10567
- // its noteId updates the same row instead of inserting a duplicate.
10568
10601
  detailsCommitment,
10569
- // Convert null -> undefined so Dexie omits the noteId secondary index
10570
- // for partial notes that don't have one yet.
10602
+ // noteId/nullifier are only known once the note's metadata is available.
10571
10603
  noteId: noteId ?? undefined,
10572
10604
  assets,
10573
10605
  attachments,
10574
10606
  serialNumber,
10575
10607
  inputs,
10576
10608
  scriptRoot,
10577
- nullifier,
10609
+ nullifier: nullifier ?? undefined,
10578
10610
  state,
10579
10611
  stateDiscriminant,
10580
10612
  serializedCreatedAt,
@@ -10656,11 +10688,12 @@ async function getInputNoteByOffset(dbId, states, consumerAccountId, blockStart,
10656
10688
  logWebStoreError(err, "Failed to get input note by offset");
10657
10689
  }
10658
10690
  }
10659
- async function upsertOutputNote(dbId, noteId, assets, attachments, recipientDigest, metadata, nullifier, expectedHeight, stateDiscriminant, state, tx) {
10691
+ async function upsertOutputNote(dbId, detailsCommitment, noteId, assets, attachments, recipientDigest, metadata, nullifier, expectedHeight, stateDiscriminant, state, tx) {
10660
10692
  const db = getDatabase(dbId);
10661
10693
  const doWork = async (t) => {
10662
10694
  try {
10663
10695
  const data = {
10696
+ detailsCommitment,
10664
10697
  noteId,
10665
10698
  assets,
10666
10699
  attachments,
@@ -10675,7 +10708,7 @@ async function upsertOutputNote(dbId, noteId, assets, attachments, recipientDige
10675
10708
  /* v8 ignore next 3 — requires a mid-transaction Dexie write failure, not modelable with fake-indexeddb */
10676
10709
  }
10677
10710
  catch (error) {
10678
- logWebStoreError(error, `Error inserting note: ${noteId}`);
10711
+ logWebStoreError(error, `Error inserting note: ${detailsCommitment}`);
10679
10712
  }
10680
10713
  };
10681
10714
  return db.dexie.transaction("rw", db.outputNotes, db.notesScripts, doWork);
@@ -10684,7 +10717,6 @@ async function processInputNotes(dbId, notes) {
10684
10717
  const db = getDatabase(dbId);
10685
10718
  return await Promise.all(notes.map(async (note) => {
10686
10719
  const assetsBase64 = uint8ArrayToBase64(note.assets);
10687
- const attachmentsBase64 = uint8ArrayToBase64(note.attachments);
10688
10720
  const serialNumberBase64 = uint8ArrayToBase64(note.serialNumber);
10689
10721
  const inputsBase64 = uint8ArrayToBase64(note.inputs);
10690
10722
  let serializedNoteScriptBase64 = undefined;
@@ -10695,30 +10727,31 @@ async function processInputNotes(dbId, notes) {
10695
10727
  }
10696
10728
  }
10697
10729
  const stateBase64 = uint8ArrayToBase64(note.state);
10730
+ const attachmentsBase64 = uint8ArrayToBase64(note.attachments);
10698
10731
  return {
10699
10732
  assets: assetsBase64,
10700
- attachments: attachmentsBase64,
10701
10733
  serialNumber: serialNumberBase64,
10702
10734
  inputs: inputsBase64,
10703
10735
  createdAt: note.serializedCreatedAt,
10704
10736
  serializedNoteScript: serializedNoteScriptBase64,
10705
10737
  state: stateBase64,
10738
+ attachments: attachmentsBase64,
10706
10739
  };
10707
10740
  }));
10708
10741
  }
10709
10742
  async function processOutputNotes(notes) {
10710
10743
  return await Promise.all(notes.map((note) => {
10711
10744
  const assetsBase64 = uint8ArrayToBase64(note.assets);
10712
- const attachmentsBase64 = uint8ArrayToBase64(note.attachments);
10713
10745
  const metadataBase64 = uint8ArrayToBase64(note.metadata);
10714
10746
  const stateBase64 = uint8ArrayToBase64(note.state);
10747
+ const attachmentsBase64 = uint8ArrayToBase64(note.attachments);
10715
10748
  return {
10716
10749
  assets: assetsBase64,
10717
- attachments: attachmentsBase64,
10718
10750
  recipientDigest: note.recipientDigest,
10719
10751
  metadata: metadataBase64,
10720
10752
  expectedHeight: note.expectedHeight,
10721
10753
  state: stateBase64,
10754
+ attachments: attachmentsBase64,
10722
10755
  };
10723
10756
  }));
10724
10757
  }
@@ -10796,6 +10829,30 @@ async function listSettingKeys(dbId) {
10796
10829
  logWebStoreError(error, `Error listing setting keys`);
10797
10830
  }
10798
10831
  }
10832
+ async function applySettingsMutations(dbId, mutations) {
10833
+ try {
10834
+ const db = getDatabase(dbId);
10835
+ await db.dexie.transaction("rw", db.settings, async () => {
10836
+ for (const mutation of mutations) {
10837
+ if (mutation.kind === "set") {
10838
+ if (mutation.value === undefined) {
10839
+ throw new Error(`Setting mutation "set" for key ${mutation.key} is missing a value`);
10840
+ }
10841
+ await db.settings.put({ key: mutation.key, value: mutation.value });
10842
+ }
10843
+ else if (mutation.kind === "remove") {
10844
+ await db.settings.where("key").equals(mutation.key).delete();
10845
+ }
10846
+ else {
10847
+ throw new Error(`Unknown setting mutation kind: ${mutation.kind}`);
10848
+ }
10849
+ }
10850
+ });
10851
+ }
10852
+ catch (error) {
10853
+ logWebStoreError(error, "Error applying settings mutations");
10854
+ }
10855
+ }
10799
10856
 
10800
10857
  const IDS_FILTER_PREFIX = "Ids:";
10801
10858
  const EXPIRED_BEFORE_FILTER_PREFIX = "ExpiredPending:";
@@ -10923,6 +10980,10 @@ async function getNoteTags(dbId) {
10923
10980
  record.sourceNoteId == "" ? undefined : record.sourceNoteId;
10924
10981
  record.sourceAccountId =
10925
10982
  record.sourceAccountId == "" ? undefined : record.sourceAccountId;
10983
+ record.sourceSubscriptionKey =
10984
+ record.sourceSubscriptionKey == ""
10985
+ ? undefined
10986
+ : record.sourceSubscriptionKey;
10926
10987
  return record;
10927
10988
  });
10928
10989
  return processedRecords;
@@ -10949,7 +11010,7 @@ async function getSyncHeight(dbId) {
10949
11010
  logWebStoreError(error, "Error fetching sync height");
10950
11011
  }
10951
11012
  }
10952
- async function addNoteTag(dbId, tag, sourceNoteId, sourceAccountId) {
11013
+ async function addNoteTag(dbId, tag, sourceNoteId, sourceAccountId, sourceSubscriptionKey) {
10953
11014
  try {
10954
11015
  const db = getDatabase(dbId);
10955
11016
  let tagArray = new Uint8Array(tag);
@@ -10958,23 +11019,29 @@ async function addNoteTag(dbId, tag, sourceNoteId, sourceAccountId) {
10958
11019
  tag: tagBase64,
10959
11020
  sourceNoteId: sourceNoteId ? sourceNoteId : "",
10960
11021
  sourceAccountId: sourceAccountId ? sourceAccountId : "",
11022
+ sourceSubscriptionKey: sourceSubscriptionKey ? sourceSubscriptionKey : "",
10961
11023
  });
10962
11024
  }
10963
11025
  catch (error) {
10964
11026
  logWebStoreError(error, "Failed to add note tag");
10965
11027
  }
10966
11028
  }
10967
- async function removeNoteTag(dbId, tag, sourceNoteId, sourceAccountId) {
11029
+ async function removeNoteTag(dbId, tag, sourceNoteId, sourceAccountId, sourceSubscriptionKey) {
10968
11030
  try {
10969
11031
  const db = getDatabase(dbId);
10970
11032
  let tagArray = new Uint8Array(tag);
10971
11033
  let tagBase64 = uint8ArrayToBase64(tagArray);
11034
+ const subscriptionKey = sourceSubscriptionKey ? sourceSubscriptionKey : "";
10972
11035
  return await db.tags
10973
11036
  .where({
10974
11037
  tag: tagBase64,
10975
11038
  sourceNoteId: sourceNoteId ? sourceNoteId : "",
10976
11039
  sourceAccountId: sourceAccountId ? sourceAccountId : "",
10977
11040
  })
11041
+ // Filtered in JS rather than via the `where` clause: rows written
11042
+ // before the column existed lack the property entirely, and a
11043
+ // `where` equality on `""` would never match them.
11044
+ .and((record) => (record.sourceSubscriptionKey ?? "") == subscriptionKey)
10978
11045
  .delete();
10979
11046
  }
10980
11047
  catch (error) {
@@ -11010,7 +11077,7 @@ async function applyStateSync(dbId, stateUpdate) {
11010
11077
  return upsertInputNote(dbId, note.detailsCommitment, note.noteId, note.noteAssets, note.attachments, note.serialNumber, note.inputs, note.noteScriptRoot, note.noteScript, note.nullifier, note.createdAt, note.stateDiscriminant, note.state, note.consumedBlockHeight, note.consumedTxOrder, note.consumerAccountId);
11011
11078
  })),
11012
11079
  Promise.all(serializedOutputNotes.map((note) => {
11013
- return upsertOutputNote(dbId, note.noteId, note.noteAssets, note.attachments, note.recipientDigest, note.metadata, note.nullifier, note.expectedHeight, note.stateDiscriminant, note.state);
11080
+ return upsertOutputNote(dbId, note.detailsCommitment, note.noteId, note.noteAssets, note.attachments, note.recipientDigest, note.metadata, note.nullifier, note.expectedHeight, note.stateDiscriminant, note.state);
11014
11081
  })),
11015
11082
  Promise.all(transactionUpdates.map((transactionRecord) => {
11016
11083
  let promises = [
@@ -11486,7 +11553,8 @@ class AccountBuilder {
11486
11553
  wasm.__wbg_accountbuilder_free(ptr, 0);
11487
11554
  }
11488
11555
  /**
11489
- * Sets the account type (regular, faucet, etc.).
11556
+ * Sets the account type, which in protocol 0.15 is the account visibility
11557
+ * (public or private). Equivalent to [`Self::storage_mode`].
11490
11558
  * @param {AccountType} account_type
11491
11559
  * @returns {AccountBuilder}
11492
11560
  */
@@ -13366,16 +13434,8 @@ class AssetVault {
13366
13434
  /**
13367
13435
  * Returns the balance for the given fungible faucet, or zero if absent.
13368
13436
  *
13369
- * `get_balance` on the 0.15 surface keys by `AssetVaultKey`, not `AccountId`, and
13370
- * validates the composition. The callback flag is `Disabled` because fungible balance
13371
- * reads don't run asset callbacks. Returns zero on lookup error (`Err` arms here would
13372
- * indicate the key was constructed wrong, which can't happen for fungible keys built
13373
- * this way).
13374
- *
13375
- * NOTE: the `AssetVaultKey` encodes the callback flag, so this reports only the balance
13376
- * of callback-*disabled* fungible assets. Faucets built by this SDK omit transfer policies
13377
- * and therefore mint callback-disabled assets, so this is exact for them; an asset minted
13378
- * elsewhere with callbacks enabled would not be counted here.
13437
+ * Matches by faucet id across the vault's fungible assets, so the balance is
13438
+ * found regardless of the asset's callback flag.
13379
13439
  * @param {AccountId} faucet_id
13380
13440
  * @returns {bigint}
13381
13441
  */
@@ -14966,9 +15026,8 @@ class FungibleAssetDelta {
14966
15026
  /**
14967
15027
  * Returns the delta amount for a given faucet, if present.
14968
15028
  *
14969
- * The vault key here is the one used by the fungible-delta tree, which the upstream
14970
- * surface keys with `AssetCallbackFlag::Disabled` — fungible balance deltas don't run
14971
- * asset callbacks. `new_fungible` on the 0.15 surface is infallible.
15029
+ * Matches by faucet id so the delta is found regardless of the asset's
15030
+ * callback flag.
14972
15031
  * @param {AccountId} faucet_id
14973
15032
  * @returns {bigint | undefined}
14974
15033
  */
@@ -15862,6 +15921,104 @@ class JsAccountUpdate {
15862
15921
  }
15863
15922
  if (Symbol.dispose) JsAccountUpdate.prototype[Symbol.dispose] = JsAccountUpdate.prototype.free;
15864
15923
 
15924
+ /**
15925
+ * JS-facing form of a [`miden_client::store::SettingMutation`], applied as a
15926
+ * single atomic batch by the `applySettingsMutations` function in
15927
+ * `settings.js`.
15928
+ */
15929
+ class JsSettingMutation {
15930
+ static __wrap(ptr) {
15931
+ ptr = ptr >>> 0;
15932
+ const obj = Object.create(JsSettingMutation.prototype);
15933
+ obj.__wbg_ptr = ptr;
15934
+ JsSettingMutationFinalization.register(obj, obj.__wbg_ptr, obj);
15935
+ return obj;
15936
+ }
15937
+ __destroy_into_raw() {
15938
+ const ptr = this.__wbg_ptr;
15939
+ this.__wbg_ptr = 0;
15940
+ JsSettingMutationFinalization.unregister(this);
15941
+ return ptr;
15942
+ }
15943
+ free() {
15944
+ const ptr = this.__destroy_into_raw();
15945
+ wasm.__wbg_jssettingmutation_free(ptr, 0);
15946
+ }
15947
+ /**
15948
+ * The `settings` key the mutation targets.
15949
+ * @returns {string}
15950
+ */
15951
+ get key() {
15952
+ let deferred1_0;
15953
+ let deferred1_1;
15954
+ try {
15955
+ const ret = wasm.__wbg_get_jssettingmutation_key(this.__wbg_ptr);
15956
+ deferred1_0 = ret[0];
15957
+ deferred1_1 = ret[1];
15958
+ return getStringFromWasm0(ret[0], ret[1]);
15959
+ } finally {
15960
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
15961
+ }
15962
+ }
15963
+ /**
15964
+ * Either `"set"` or `"remove"`.
15965
+ * @returns {string}
15966
+ */
15967
+ get kind() {
15968
+ let deferred1_0;
15969
+ let deferred1_1;
15970
+ try {
15971
+ const ret = wasm.__wbg_get_jssettingmutation_kind(this.__wbg_ptr);
15972
+ deferred1_0 = ret[0];
15973
+ deferred1_1 = ret[1];
15974
+ return getStringFromWasm0(ret[0], ret[1]);
15975
+ } finally {
15976
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
15977
+ }
15978
+ }
15979
+ /**
15980
+ * The value to write. `Some` for `"set"`, `None` for `"remove"`.
15981
+ * @returns {Uint8Array | undefined}
15982
+ */
15983
+ get value() {
15984
+ const ret = wasm.__wbg_get_jssettingmutation_value(this.__wbg_ptr);
15985
+ let v1;
15986
+ if (ret[0] !== 0) {
15987
+ v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
15988
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15989
+ }
15990
+ return v1;
15991
+ }
15992
+ /**
15993
+ * The `settings` key the mutation targets.
15994
+ * @param {string} arg0
15995
+ */
15996
+ set key(arg0) {
15997
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
15998
+ const len0 = WASM_VECTOR_LEN;
15999
+ wasm.__wbg_set_jssettingmutation_key(this.__wbg_ptr, ptr0, len0);
16000
+ }
16001
+ /**
16002
+ * Either `"set"` or `"remove"`.
16003
+ * @param {string} arg0
16004
+ */
16005
+ set kind(arg0) {
16006
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
16007
+ const len0 = WASM_VECTOR_LEN;
16008
+ wasm.__wbg_set_jsaccountupdate_storageRoot(this.__wbg_ptr, ptr0, len0);
16009
+ }
16010
+ /**
16011
+ * The value to write. `Some` for `"set"`, `None` for `"remove"`.
16012
+ * @param {Uint8Array | null} [arg0]
16013
+ */
16014
+ set value(arg0) {
16015
+ var ptr0 = isLikeNone(arg0) ? 0 : passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
16016
+ var len0 = WASM_VECTOR_LEN;
16017
+ wasm.__wbg_set_jssettingmutation_value(this.__wbg_ptr, ptr0, len0);
16018
+ }
16019
+ }
16020
+ if (Symbol.dispose) JsSettingMutation.prototype[Symbol.dispose] = JsSettingMutation.prototype.free;
16021
+
15865
16022
  /**
15866
16023
  * An object that contains data for a sync update,
15867
16024
  * which will be received by the applyStateSync JS function.
@@ -16209,7 +16366,7 @@ class JsStorageMapEntry {
16209
16366
  set key(arg0) {
16210
16367
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
16211
16368
  const len0 = WASM_VECTOR_LEN;
16212
- wasm.__wbg_set_jsstoragemapentry_key(this.__wbg_ptr, ptr0, len0);
16369
+ wasm.__wbg_set_jssettingmutation_key(this.__wbg_ptr, ptr0, len0);
16213
16370
  }
16214
16371
  /**
16215
16372
  * The slot name of the map this entry belongs to.
@@ -16325,7 +16482,7 @@ class JsStorageSlot {
16325
16482
  set slotValue(arg0) {
16326
16483
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
16327
16484
  const len0 = WASM_VECTOR_LEN;
16328
- wasm.__wbg_set_jsstoragemapentry_key(this.__wbg_ptr, ptr0, len0);
16485
+ wasm.__wbg_set_jssettingmutation_key(this.__wbg_ptr, ptr0, len0);
16329
16486
  }
16330
16487
  }
16331
16488
  if (Symbol.dispose) JsStorageSlot.prototype[Symbol.dispose] = JsStorageSlot.prototype.free;
@@ -16399,7 +16556,7 @@ class JsVaultAsset {
16399
16556
  set asset(arg0) {
16400
16557
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
16401
16558
  const len0 = WASM_VECTOR_LEN;
16402
- wasm.__wbg_set_jsstoragemapentry_key(this.__wbg_ptr, ptr0, len0);
16559
+ wasm.__wbg_set_jssettingmutation_key(this.__wbg_ptr, ptr0, len0);
16403
16560
  }
16404
16561
  /**
16405
16562
  * The vault key associated with the asset.
@@ -18807,13 +18964,13 @@ if (Symbol.dispose) NoteTag.prototype[Symbol.dispose] = NoteTag.prototype.free;
18807
18964
 
18808
18965
  /**
18809
18966
  * Visibility level for note contents when published to the network.
18810
- * @enum {2 | 1}
18967
+ * @enum {0 | 1}
18811
18968
  */
18812
18969
  const NoteType = Object.freeze({
18813
18970
  /**
18814
18971
  * Notes with this type have only their hash published to the network.
18815
18972
  */
18816
- Private: 2, "2": "Private",
18973
+ Private: 0, "0": "Private",
18817
18974
  /**
18818
18975
  * Notes with this type are fully shared with the network.
18819
18976
  */
@@ -19762,7 +19919,9 @@ class RpcClient {
19762
19919
  * the full storage map data with pagination support.
19763
19920
  *
19764
19921
  * @param `block_from` - The starting block number.
19765
- * @param `block_to` - Optional ending block number. When `undefined`, syncs to chain tip.
19922
+ * @param `block_to` - Optional ending block number. When `undefined`, the current chain tip
19923
+ * is fetched with an extra RPC call and used as the bound (the node rejects values greater
19924
+ * than the tip).
19766
19925
  * @param `account_id` - The account to sync storage maps for.
19767
19926
  * @param {number} block_from
19768
19927
  * @param {number | null | undefined} block_to
@@ -19949,19 +20108,16 @@ class SerializedInputNoteData {
19949
20108
  return v1;
19950
20109
  }
19951
20110
  /**
19952
- * @returns {string}
20111
+ * @returns {string | undefined}
19953
20112
  */
19954
20113
  get nullifier() {
19955
- let deferred1_0;
19956
- let deferred1_1;
19957
- try {
19958
- const ret = wasm.__wbg_get_serializedinputnotedata_nullifier(this.__wbg_ptr);
19959
- deferred1_0 = ret[0];
19960
- deferred1_1 = ret[1];
19961
- return getStringFromWasm0(ret[0], ret[1]);
19962
- } finally {
19963
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
20114
+ const ret = wasm.__wbg_get_serializedinputnotedata_nullifier(this.__wbg_ptr);
20115
+ let v1;
20116
+ if (ret[0] !== 0) {
20117
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
20118
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
19964
20119
  }
20120
+ return v1;
19965
20121
  }
19966
20122
  /**
19967
20123
  * @returns {Uint8Array}
@@ -20073,11 +20229,11 @@ class SerializedInputNoteData {
20073
20229
  wasm.__wbg_set_serializedinputnotedata_noteScript(this.__wbg_ptr, ptr0, len0);
20074
20230
  }
20075
20231
  /**
20076
- * @param {string} arg0
20232
+ * @param {string | null} [arg0]
20077
20233
  */
20078
20234
  set nullifier(arg0) {
20079
- const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
20080
- const len0 = WASM_VECTOR_LEN;
20235
+ var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
20236
+ var len0 = WASM_VECTOR_LEN;
20081
20237
  wasm.__wbg_set_serializedinputnotedata_nullifier(this.__wbg_ptr, ptr0, len0);
20082
20238
  }
20083
20239
  /**
@@ -20138,6 +20294,21 @@ class SerializedOutputNoteData {
20138
20294
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
20139
20295
  return v1;
20140
20296
  }
20297
+ /**
20298
+ * @returns {string}
20299
+ */
20300
+ get detailsCommitment() {
20301
+ let deferred1_0;
20302
+ let deferred1_1;
20303
+ try {
20304
+ const ret = wasm.__wbg_get_serializedoutputnotedata_detailsCommitment(this.__wbg_ptr);
20305
+ deferred1_0 = ret[0];
20306
+ deferred1_1 = ret[1];
20307
+ return getStringFromWasm0(ret[0], ret[1]);
20308
+ } finally {
20309
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
20310
+ }
20311
+ }
20141
20312
  /**
20142
20313
  * @returns {number}
20143
20314
  */
@@ -20227,7 +20398,15 @@ class SerializedOutputNoteData {
20227
20398
  set attachments(arg0) {
20228
20399
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
20229
20400
  const len0 = WASM_VECTOR_LEN;
20230
- wasm.__wbg_set_serializedoutputnotedata_attachments(this.__wbg_ptr, ptr0, len0);
20401
+ wasm.__wbg_set_jsstatesyncupdate_partialBlockchainPeaks(this.__wbg_ptr, ptr0, len0);
20402
+ }
20403
+ /**
20404
+ * @param {string} arg0
20405
+ */
20406
+ set detailsCommitment(arg0) {
20407
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
20408
+ const len0 = WASM_VECTOR_LEN;
20409
+ wasm.__wbg_set_jsaccountupdate_storageRoot(this.__wbg_ptr, ptr0, len0);
20231
20410
  }
20232
20411
  /**
20233
20412
  * @param {number} arg0
@@ -20241,7 +20420,7 @@ class SerializedOutputNoteData {
20241
20420
  set metadata(arg0) {
20242
20421
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
20243
20422
  const len0 = WASM_VECTOR_LEN;
20244
- wasm.__wbg_set_jsstatesyncupdate_blockHasRelevantNotes(this.__wbg_ptr, ptr0, len0);
20423
+ wasm.__wbg_set_serializedoutputnotedata_metadata(this.__wbg_ptr, ptr0, len0);
20245
20424
  }
20246
20425
  /**
20247
20426
  * @param {Uint8Array} arg0
@@ -20257,7 +20436,7 @@ class SerializedOutputNoteData {
20257
20436
  set noteId(arg0) {
20258
20437
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
20259
20438
  const len0 = WASM_VECTOR_LEN;
20260
- wasm.__wbg_set_jsaccountupdate_storageRoot(this.__wbg_ptr, ptr0, len0);
20439
+ wasm.__wbg_set_jssettingmutation_key(this.__wbg_ptr, ptr0, len0);
20261
20440
  }
20262
20441
  /**
20263
20442
  * @param {string | null} [arg0]
@@ -20273,7 +20452,7 @@ class SerializedOutputNoteData {
20273
20452
  set recipientDigest(arg0) {
20274
20453
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
20275
20454
  const len0 = WASM_VECTOR_LEN;
20276
- wasm.__wbg_set_jsaccountupdate_vaultRoot(this.__wbg_ptr, ptr0, len0);
20455
+ wasm.__wbg_set_serializedoutputnotedata_recipientDigest(this.__wbg_ptr, ptr0, len0);
20277
20456
  }
20278
20457
  /**
20279
20458
  * @param {number} arg0
@@ -20399,7 +20578,7 @@ class SerializedTransactionData {
20399
20578
  set details(arg0) {
20400
20579
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
20401
20580
  const len0 = WASM_VECTOR_LEN;
20402
- wasm.__wbg_set_serializedoutputnotedata_noteAssets(this.__wbg_ptr, ptr0, len0);
20581
+ wasm.__wbg_set_serializedtransactiondata_details(this.__wbg_ptr, ptr0, len0);
20403
20582
  }
20404
20583
  /**
20405
20584
  * @param {string} arg0
@@ -20429,7 +20608,7 @@ class SerializedTransactionData {
20429
20608
  set status(arg0) {
20430
20609
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
20431
20610
  const len0 = WASM_VECTOR_LEN;
20432
- wasm.__wbg_set_serializedoutputnotedata_attachments(this.__wbg_ptr, ptr0, len0);
20611
+ wasm.__wbg_set_serializedoutputnotedata_noteAssets(this.__wbg_ptr, ptr0, len0);
20433
20612
  }
20434
20613
  /**
20435
20614
  * @param {Uint8Array | null} [arg0]
@@ -20899,7 +21078,7 @@ class StorageMapEntry {
20899
21078
  set key(arg0) {
20900
21079
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
20901
21080
  const len0 = WASM_VECTOR_LEN;
20902
- wasm.__wbg_set_jsstoragemapentry_key(this.__wbg_ptr, ptr0, len0);
21081
+ wasm.__wbg_set_jssettingmutation_key(this.__wbg_ptr, ptr0, len0);
20903
21082
  }
20904
21083
  /**
20905
21084
  * @param {string} arg0
@@ -23136,14 +23315,13 @@ class WebClient {
23136
23315
  }
23137
23316
  /**
23138
23317
  * @param {Uint8Array} init_seed
23139
- * @param {boolean} mutable
23140
23318
  * @param {AuthScheme} auth_scheme
23141
23319
  * @returns {Promise<Account>}
23142
23320
  */
23143
- importPublicAccountFromSeed(init_seed, mutable, auth_scheme) {
23321
+ importPublicAccountFromSeed(init_seed, auth_scheme) {
23144
23322
  const ptr0 = passArray8ToWasm0(init_seed, wasm.__wbindgen_malloc);
23145
23323
  const len0 = WASM_VECTOR_LEN;
23146
- const ret = wasm.webclient_importPublicAccountFromSeed(this.__wbg_ptr, ptr0, len0, mutable, auth_scheme);
23324
+ const ret = wasm.webclient_importPublicAccountFromSeed(this.__wbg_ptr, ptr0, len0, auth_scheme);
23147
23325
  return ret;
23148
23326
  }
23149
23327
  /**
@@ -23378,16 +23556,15 @@ class WebClient {
23378
23556
  }
23379
23557
  /**
23380
23558
  * @param {AccountStorageMode} storage_mode
23381
- * @param {boolean} mutable
23382
23559
  * @param {AuthScheme} auth_scheme
23383
23560
  * @param {Uint8Array | null} [init_seed]
23384
23561
  * @returns {Promise<Account>}
23385
23562
  */
23386
- newWallet(storage_mode, mutable, auth_scheme, init_seed) {
23563
+ newWallet(storage_mode, auth_scheme, init_seed) {
23387
23564
  _assertClass(storage_mode, AccountStorageMode);
23388
23565
  var ptr0 = isLikeNone(init_seed) ? 0 : passArray8ToWasm0(init_seed, wasm.__wbindgen_malloc);
23389
23566
  var len0 = WASM_VECTOR_LEN;
23390
- const ret = wasm.webclient_newWallet(this.__wbg_ptr, storage_mode.__wbg_ptr, mutable, auth_scheme, ptr0, len0);
23567
+ const ret = wasm.webclient_newWallet(this.__wbg_ptr, storage_mode.__wbg_ptr, auth_scheme, ptr0, len0);
23391
23568
  return ret;
23392
23569
  }
23393
23570
  /**
@@ -24158,7 +24335,7 @@ function __wbg_get_imports(memory) {
24158
24335
  const ret = AccountStorage.__wrap(arg0);
24159
24336
  return ret;
24160
24337
  },
24161
- __wbg_addNoteTag_40dad1e41d8a6415: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
24338
+ __wbg_addNoteTag_f0737cd654a0af83: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
24162
24339
  var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
24163
24340
  wasm.__wbindgen_free(arg2, arg3 * 1, 1);
24164
24341
  let v1;
@@ -24171,7 +24348,12 @@ function __wbg_get_imports(memory) {
24171
24348
  v2 = getStringFromWasm0(arg6, arg7).slice();
24172
24349
  wasm.__wbindgen_free(arg6, arg7 * 1, 1);
24173
24350
  }
24174
- const ret = addNoteTag(getStringFromWasm0(arg0, arg1), v0, v1, v2);
24351
+ let v3;
24352
+ if (arg8 !== 0) {
24353
+ v3 = getStringFromWasm0(arg8, arg9).slice();
24354
+ wasm.__wbindgen_free(arg8, arg9 * 1, 1);
24355
+ }
24356
+ const ret = addNoteTag(getStringFromWasm0(arg0, arg1), v0, v1, v2, v3);
24175
24357
  return ret;
24176
24358
  },
24177
24359
  __wbg_address_new: function(arg0) {
@@ -24185,6 +24367,12 @@ function __wbg_get_imports(memory) {
24185
24367
  const ret = applyFullAccountState(getStringFromWasm0(arg0, arg1), JsAccountUpdate.__wrap(arg2));
24186
24368
  return ret;
24187
24369
  },
24370
+ __wbg_applySettingsMutations_633bdfc5efcbeab4: function(arg0, arg1, arg2, arg3) {
24371
+ var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
24372
+ wasm.__wbindgen_free(arg2, arg3 * 4, 4);
24373
+ const ret = applySettingsMutations(getStringFromWasm0(arg0, arg1), v0);
24374
+ return ret;
24375
+ },
24188
24376
  __wbg_applyStateSync_4577b4125b70be6e: function(arg0, arg1, arg2) {
24189
24377
  const ret = applyStateSync(getStringFromWasm0(arg0, arg1), JsStateSyncUpdate.__wrap(arg2));
24190
24378
  return ret;
@@ -24542,6 +24730,12 @@ function __wbg_get_imports(memory) {
24542
24730
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
24543
24731
  }
24544
24732
  },
24733
+ __wbg_getInputNotesFromDetailsCommitments_c7c58c64df846c95: function(arg0, arg1, arg2, arg3) {
24734
+ var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
24735
+ wasm.__wbindgen_free(arg2, arg3 * 4, 4);
24736
+ const ret = getInputNotesFromDetailsCommitments(getStringFromWasm0(arg0, arg1), v0);
24737
+ return ret;
24738
+ },
24545
24739
  __wbg_getInputNotesFromIds_c19092f0da179fdf: function(arg0, arg1, arg2, arg3) {
24546
24740
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
24547
24741
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
@@ -24588,6 +24782,12 @@ function __wbg_get_imports(memory) {
24588
24782
  const ret = getNoteTags(getStringFromWasm0(arg0, arg1));
24589
24783
  return ret;
24590
24784
  },
24785
+ __wbg_getOutputNotesFromDetailsCommitments_2b6cb89aa5ad7bd7: function(arg0, arg1, arg2, arg3) {
24786
+ var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
24787
+ wasm.__wbindgen_free(arg2, arg3 * 4, 4);
24788
+ const ret = getOutputNotesFromDetailsCommitments(getStringFromWasm0(arg0, arg1), v0);
24789
+ return ret;
24790
+ },
24591
24791
  __wbg_getOutputNotesFromIds_1cfcb787c56927d6: function(arg0, arg1, arg2, arg3) {
24592
24792
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
24593
24793
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
@@ -24866,6 +25066,10 @@ function __wbg_get_imports(memory) {
24866
25066
  const ret = JsAccountUpdate.__unwrap(arg0);
24867
25067
  return ret;
24868
25068
  },
25069
+ __wbg_jssettingmutation_new: function(arg0) {
25070
+ const ret = JsSettingMutation.__wrap(arg0);
25071
+ return ret;
25072
+ },
24869
25073
  __wbg_jsstoragemapentry_new: function(arg0) {
24870
25074
  const ret = JsStorageMapEntry.__wrap(arg0);
24871
25075
  return ret;
@@ -25220,7 +25424,7 @@ function __wbg_get_imports(memory) {
25220
25424
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25221
25425
  }
25222
25426
  },
25223
- __wbg_removeNoteTag_77e6e3497d921600: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
25427
+ __wbg_removeNoteTag_d9a0f5ba38c25246: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
25224
25428
  var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
25225
25429
  wasm.__wbindgen_free(arg2, arg3 * 1, 1);
25226
25430
  let v1;
@@ -25233,7 +25437,12 @@ function __wbg_get_imports(memory) {
25233
25437
  v2 = getStringFromWasm0(arg6, arg7).slice();
25234
25438
  wasm.__wbindgen_free(arg6, arg7 * 1, 1);
25235
25439
  }
25236
- const ret = removeNoteTag(getStringFromWasm0(arg0, arg1), v0, v1, v2);
25440
+ let v3;
25441
+ if (arg8 !== 0) {
25442
+ v3 = getStringFromWasm0(arg8, arg9).slice();
25443
+ wasm.__wbindgen_free(arg8, arg9 * 1, 1);
25444
+ }
25445
+ const ret = removeNoteTag(getStringFromWasm0(arg0, arg1), v0, v1, v2, v3);
25237
25446
  return ret;
25238
25447
  },
25239
25448
  __wbg_removeSetting_39da4a2d256af0e2: function(arg0, arg1, arg2, arg3) {
@@ -25463,7 +25672,7 @@ function __wbg_get_imports(memory) {
25463
25672
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25464
25673
  }
25465
25674
  },
25466
- __wbg_upsertAccountRecord_3fb1a14436632f21: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16) {
25675
+ __wbg_upsertAccountRecord_96a74a90d1ab5ddf: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17) {
25467
25676
  let deferred0_0;
25468
25677
  let deferred0_1;
25469
25678
  let deferred1_0;
@@ -25494,7 +25703,7 @@ function __wbg_get_imports(memory) {
25494
25703
  v6 = getArrayU8FromWasm0(arg15, arg16).slice();
25495
25704
  wasm.__wbindgen_free(arg15, arg16 * 1, 1);
25496
25705
  }
25497
- const ret = upsertAccountRecord(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), getStringFromWasm0(arg6, arg7), getStringFromWasm0(arg8, arg9), getStringFromWasm0(arg10, arg11), arg12 !== 0, getStringFromWasm0(arg13, arg14), v6);
25706
+ const ret = upsertAccountRecord(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), getStringFromWasm0(arg6, arg7), getStringFromWasm0(arg8, arg9), getStringFromWasm0(arg10, arg11), arg12 !== 0, getStringFromWasm0(arg13, arg14), v6, arg17 !== 0);
25498
25707
  return ret;
25499
25708
  } finally {
25500
25709
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
@@ -25538,13 +25747,11 @@ function __wbg_get_imports(memory) {
25538
25747
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
25539
25748
  }
25540
25749
  },
25541
- __wbg_upsertInputNote_54c9d28ec61fd731: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22, arg23, arg24, arg25, arg26, arg27, arg28) {
25750
+ __wbg_upsertInputNote_41d8246e4ca8cd5d: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22, arg23, arg24, arg25, arg26, arg27, arg28) {
25542
25751
  let deferred0_0;
25543
25752
  let deferred0_1;
25544
25753
  let deferred6_0;
25545
25754
  let deferred6_1;
25546
- let deferred8_0;
25547
- let deferred8_1;
25548
25755
  let deferred9_0;
25549
25756
  let deferred9_1;
25550
25757
  try {
@@ -25567,8 +25774,11 @@ function __wbg_get_imports(memory) {
25567
25774
  deferred6_1 = arg15;
25568
25775
  var v7 = getArrayU8FromWasm0(arg16, arg17).slice();
25569
25776
  wasm.__wbindgen_free(arg16, arg17 * 1, 1);
25570
- deferred8_0 = arg18;
25571
- deferred8_1 = arg19;
25777
+ let v8;
25778
+ if (arg18 !== 0) {
25779
+ v8 = getStringFromWasm0(arg18, arg19).slice();
25780
+ wasm.__wbindgen_free(arg18, arg19 * 1, 1);
25781
+ }
25572
25782
  deferred9_0 = arg20;
25573
25783
  deferred9_1 = arg21;
25574
25784
  var v10 = getArrayU8FromWasm0(arg23, arg24).slice();
@@ -25578,12 +25788,11 @@ function __wbg_get_imports(memory) {
25578
25788
  v11 = getStringFromWasm0(arg27, arg28).slice();
25579
25789
  wasm.__wbindgen_free(arg27, arg28 * 1, 1);
25580
25790
  }
25581
- const ret = upsertInputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), v1, v2, v3, v4, v5, getStringFromWasm0(arg14, arg15), v7, getStringFromWasm0(arg18, arg19), getStringFromWasm0(arg20, arg21), arg22, v10, arg25 === 0x100000001 ? undefined : arg25, arg26 === 0x100000001 ? undefined : arg26, v11);
25791
+ const ret = upsertInputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), v1, v2, v3, v4, v5, getStringFromWasm0(arg14, arg15), v7, v8, getStringFromWasm0(arg20, arg21), arg22, v10, arg25 === 0x100000001 ? undefined : arg25, arg26 === 0x100000001 ? undefined : arg26, v11);
25582
25792
  return ret;
25583
25793
  } finally {
25584
25794
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25585
25795
  wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
25586
- wasm.__wbindgen_free(deferred8_0, deferred8_1, 1);
25587
25796
  wasm.__wbindgen_free(deferred9_0, deferred9_1, 1);
25588
25797
  }
25589
25798
  },
@@ -25601,34 +25810,39 @@ function __wbg_get_imports(memory) {
25601
25810
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25602
25811
  }
25603
25812
  },
25604
- __wbg_upsertOutputNote_086a8c1c81f11d3c: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17) {
25813
+ __wbg_upsertOutputNote_4d029c88a0e7d960: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19) {
25605
25814
  let deferred0_0;
25606
25815
  let deferred0_1;
25607
- let deferred3_0;
25608
- let deferred3_1;
25816
+ let deferred1_0;
25817
+ let deferred1_1;
25818
+ let deferred4_0;
25819
+ let deferred4_1;
25609
25820
  try {
25610
25821
  deferred0_0 = arg2;
25611
25822
  deferred0_1 = arg3;
25612
- var v1 = getArrayU8FromWasm0(arg4, arg5).slice();
25613
- wasm.__wbindgen_free(arg4, arg5 * 1, 1);
25823
+ deferred1_0 = arg4;
25824
+ deferred1_1 = arg5;
25614
25825
  var v2 = getArrayU8FromWasm0(arg6, arg7).slice();
25615
25826
  wasm.__wbindgen_free(arg6, arg7 * 1, 1);
25616
- deferred3_0 = arg8;
25617
- deferred3_1 = arg9;
25618
- var v4 = getArrayU8FromWasm0(arg10, arg11).slice();
25619
- wasm.__wbindgen_free(arg10, arg11 * 1, 1);
25620
- let v5;
25621
- if (arg12 !== 0) {
25622
- v5 = getStringFromWasm0(arg12, arg13).slice();
25623
- wasm.__wbindgen_free(arg12, arg13 * 1, 1);
25827
+ var v3 = getArrayU8FromWasm0(arg8, arg9).slice();
25828
+ wasm.__wbindgen_free(arg8, arg9 * 1, 1);
25829
+ deferred4_0 = arg10;
25830
+ deferred4_1 = arg11;
25831
+ var v5 = getArrayU8FromWasm0(arg12, arg13).slice();
25832
+ wasm.__wbindgen_free(arg12, arg13 * 1, 1);
25833
+ let v6;
25834
+ if (arg14 !== 0) {
25835
+ v6 = getStringFromWasm0(arg14, arg15).slice();
25836
+ wasm.__wbindgen_free(arg14, arg15 * 1, 1);
25624
25837
  }
25625
- var v6 = getArrayU8FromWasm0(arg16, arg17).slice();
25626
- wasm.__wbindgen_free(arg16, arg17 * 1, 1);
25627
- const ret = upsertOutputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), v1, v2, getStringFromWasm0(arg8, arg9), v4, v5, arg14 >>> 0, arg15, v6);
25838
+ var v7 = getArrayU8FromWasm0(arg18, arg19).slice();
25839
+ wasm.__wbindgen_free(arg18, arg19 * 1, 1);
25840
+ const ret = upsertOutputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), v2, v3, getStringFromWasm0(arg10, arg11), v5, v6, arg16 >>> 0, arg17, v7);
25628
25841
  return ret;
25629
25842
  } finally {
25630
25843
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25631
- wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
25844
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
25845
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
25632
25846
  }
25633
25847
  },
25634
25848
  __wbg_upsertStorageMapEntries_068d8303824fff58: function(arg0, arg1, arg2, arg3, arg4, arg5) {
@@ -26024,6 +26238,9 @@ const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undef
26024
26238
  const JsAccountUpdateFinalization = (typeof FinalizationRegistry === 'undefined')
26025
26239
  ? { register: () => {}, unregister: () => {} }
26026
26240
  : new FinalizationRegistry(ptr => wasm.__wbg_jsaccountupdate_free(ptr >>> 0, 1));
26241
+ const JsSettingMutationFinalization = (typeof FinalizationRegistry === 'undefined')
26242
+ ? { register: () => {}, unregister: () => {} }
26243
+ : new FinalizationRegistry(ptr => wasm.__wbg_jssettingmutation_free(ptr >>> 0, 1));
26027
26244
  const JsStateSyncUpdateFinalization = (typeof FinalizationRegistry === 'undefined')
26028
26245
  ? { register: () => {}, unregister: () => {} }
26029
26246
  : new FinalizationRegistry(ptr => wasm.__wbg_jsstatesyncupdate_free(ptr >>> 0, 1));
@@ -26720,6 +26937,7 @@ var index = /*#__PURE__*/Object.freeze({
26720
26937
  IntoUnderlyingSink: IntoUnderlyingSink,
26721
26938
  IntoUnderlyingSource: IntoUnderlyingSource,
26722
26939
  JsAccountUpdate: JsAccountUpdate,
26940
+ JsSettingMutation: JsSettingMutation,
26723
26941
  JsStateSyncUpdate: JsStateSyncUpdate,
26724
26942
  JsStorageMapEntry: JsStorageMapEntry,
26725
26943
  JsStorageSlot: JsStorageSlot,
@@ -26828,7 +27046,7 @@ var index = /*#__PURE__*/Object.freeze({
26828
27046
 
26829
27047
  const module$1 = new URL("assets/miden_client_web.wasm", self.location.href);
26830
27048
 
26831
- var CargoC9UbiAcT = /*#__PURE__*/Object.freeze({
27049
+ var Cargo1zqmsGGR = /*#__PURE__*/Object.freeze({
26832
27050
  __proto__: null,
26833
27051
  Account: Account,
26834
27052
  AccountArray: AccountArray,
@@ -26885,6 +27103,7 @@ var CargoC9UbiAcT = /*#__PURE__*/Object.freeze({
26885
27103
  IntoUnderlyingSink: IntoUnderlyingSink,
26886
27104
  IntoUnderlyingSource: IntoUnderlyingSource,
26887
27105
  JsAccountUpdate: JsAccountUpdate,
27106
+ JsSettingMutation: JsSettingMutation,
26888
27107
  JsStateSyncUpdate: JsStateSyncUpdate,
26889
27108
  JsStorageMapEntry: JsStorageMapEntry,
26890
27109
  JsStorageSlot: JsStorageSlot,