@miden-sdk/miden-sdk 0.15.0-alpha.6 → 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 +284 -267
  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 +284 -267
  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 CargoOZMlHpic; });
8
+ wasmModule = await Promise.resolve().then(function () { return CargoQHCIdWdN; });
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 = [
@@ -11387,7 +11454,8 @@ class AccountBuilder {
11387
11454
  wasm.__wbg_accountbuilder_free(ptr, 0);
11388
11455
  }
11389
11456
  /**
11390
- * Sets the account type (regular, faucet, etc.).
11457
+ * Sets the account type, which in protocol 0.15 is the account visibility
11458
+ * (public or private). Equivalent to [`Self::storage_mode`].
11391
11459
  * @param {AccountType} account_type
11392
11460
  * @returns {AccountBuilder}
11393
11461
  */
@@ -13267,16 +13335,8 @@ class AssetVault {
13267
13335
  /**
13268
13336
  * Returns the balance for the given fungible faucet, or zero if absent.
13269
13337
  *
13270
- * `get_balance` on the 0.15 surface keys by `AssetVaultKey`, not `AccountId`, and
13271
- * validates the composition. The callback flag is `Disabled` because fungible balance
13272
- * reads don't run asset callbacks. Returns zero on lookup error (`Err` arms here would
13273
- * indicate the key was constructed wrong, which can't happen for fungible keys built
13274
- * this way).
13275
- *
13276
- * NOTE: the `AssetVaultKey` encodes the callback flag, so this reports only the balance
13277
- * of callback-*disabled* fungible assets. Faucets built by this SDK omit transfer policies
13278
- * and therefore mint callback-disabled assets, so this is exact for them; an asset minted
13279
- * elsewhere with callbacks enabled would not be counted here.
13338
+ * Matches by faucet id across the vault's fungible assets, so the balance is
13339
+ * found regardless of the asset's callback flag.
13280
13340
  * @param {AccountId} faucet_id
13281
13341
  * @returns {bigint}
13282
13342
  */
@@ -14867,9 +14927,8 @@ class FungibleAssetDelta {
14867
14927
  /**
14868
14928
  * Returns the delta amount for a given faucet, if present.
14869
14929
  *
14870
- * The vault key here is the one used by the fungible-delta tree, which the upstream
14871
- * surface keys with `AssetCallbackFlag::Disabled` — fungible balance deltas don't run
14872
- * asset callbacks. `new_fungible` on the 0.15 surface is infallible.
14930
+ * Matches by faucet id so the delta is found regardless of the asset's
14931
+ * callback flag.
14873
14932
  * @param {AccountId} faucet_id
14874
14933
  * @returns {bigint | undefined}
14875
14934
  */
@@ -15763,6 +15822,104 @@ class JsAccountUpdate {
15763
15822
  }
15764
15823
  if (Symbol.dispose) JsAccountUpdate.prototype[Symbol.dispose] = JsAccountUpdate.prototype.free;
15765
15824
 
15825
+ /**
15826
+ * JS-facing form of a [`miden_client::store::SettingMutation`], applied as a
15827
+ * single atomic batch by the `applySettingsMutations` function in
15828
+ * `settings.js`.
15829
+ */
15830
+ class JsSettingMutation {
15831
+ static __wrap(ptr) {
15832
+ ptr = ptr >>> 0;
15833
+ const obj = Object.create(JsSettingMutation.prototype);
15834
+ obj.__wbg_ptr = ptr;
15835
+ JsSettingMutationFinalization.register(obj, obj.__wbg_ptr, obj);
15836
+ return obj;
15837
+ }
15838
+ __destroy_into_raw() {
15839
+ const ptr = this.__wbg_ptr;
15840
+ this.__wbg_ptr = 0;
15841
+ JsSettingMutationFinalization.unregister(this);
15842
+ return ptr;
15843
+ }
15844
+ free() {
15845
+ const ptr = this.__destroy_into_raw();
15846
+ wasm.__wbg_jssettingmutation_free(ptr, 0);
15847
+ }
15848
+ /**
15849
+ * The `settings` key the mutation targets.
15850
+ * @returns {string}
15851
+ */
15852
+ get key() {
15853
+ let deferred1_0;
15854
+ let deferred1_1;
15855
+ try {
15856
+ const ret = wasm.__wbg_get_jssettingmutation_key(this.__wbg_ptr);
15857
+ deferred1_0 = ret[0];
15858
+ deferred1_1 = ret[1];
15859
+ return getStringFromWasm0(ret[0], ret[1]);
15860
+ } finally {
15861
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
15862
+ }
15863
+ }
15864
+ /**
15865
+ * Either `"set"` or `"remove"`.
15866
+ * @returns {string}
15867
+ */
15868
+ get kind() {
15869
+ let deferred1_0;
15870
+ let deferred1_1;
15871
+ try {
15872
+ const ret = wasm.__wbg_get_jssettingmutation_kind(this.__wbg_ptr);
15873
+ deferred1_0 = ret[0];
15874
+ deferred1_1 = ret[1];
15875
+ return getStringFromWasm0(ret[0], ret[1]);
15876
+ } finally {
15877
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
15878
+ }
15879
+ }
15880
+ /**
15881
+ * The value to write. `Some` for `"set"`, `None` for `"remove"`.
15882
+ * @returns {Uint8Array | undefined}
15883
+ */
15884
+ get value() {
15885
+ const ret = wasm.__wbg_get_jssettingmutation_value(this.__wbg_ptr);
15886
+ let v1;
15887
+ if (ret[0] !== 0) {
15888
+ v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
15889
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15890
+ }
15891
+ return v1;
15892
+ }
15893
+ /**
15894
+ * The `settings` key the mutation targets.
15895
+ * @param {string} arg0
15896
+ */
15897
+ set key(arg0) {
15898
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
15899
+ const len0 = WASM_VECTOR_LEN;
15900
+ wasm.__wbg_set_jssettingmutation_key(this.__wbg_ptr, ptr0, len0);
15901
+ }
15902
+ /**
15903
+ * Either `"set"` or `"remove"`.
15904
+ * @param {string} arg0
15905
+ */
15906
+ set kind(arg0) {
15907
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
15908
+ const len0 = WASM_VECTOR_LEN;
15909
+ wasm.__wbg_set_jsaccountupdate_storageRoot(this.__wbg_ptr, ptr0, len0);
15910
+ }
15911
+ /**
15912
+ * The value to write. `Some` for `"set"`, `None` for `"remove"`.
15913
+ * @param {Uint8Array | null} [arg0]
15914
+ */
15915
+ set value(arg0) {
15916
+ var ptr0 = isLikeNone(arg0) ? 0 : passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
15917
+ var len0 = WASM_VECTOR_LEN;
15918
+ wasm.__wbg_set_jssettingmutation_value(this.__wbg_ptr, ptr0, len0);
15919
+ }
15920
+ }
15921
+ if (Symbol.dispose) JsSettingMutation.prototype[Symbol.dispose] = JsSettingMutation.prototype.free;
15922
+
15766
15923
  /**
15767
15924
  * An object that contains data for a sync update,
15768
15925
  * which will be received by the applyStateSync JS function.
@@ -16110,7 +16267,7 @@ class JsStorageMapEntry {
16110
16267
  set key(arg0) {
16111
16268
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
16112
16269
  const len0 = WASM_VECTOR_LEN;
16113
- wasm.__wbg_set_jsstoragemapentry_key(this.__wbg_ptr, ptr0, len0);
16270
+ wasm.__wbg_set_jssettingmutation_key(this.__wbg_ptr, ptr0, len0);
16114
16271
  }
16115
16272
  /**
16116
16273
  * The slot name of the map this entry belongs to.
@@ -16226,7 +16383,7 @@ class JsStorageSlot {
16226
16383
  set slotValue(arg0) {
16227
16384
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
16228
16385
  const len0 = WASM_VECTOR_LEN;
16229
- wasm.__wbg_set_jsstoragemapentry_key(this.__wbg_ptr, ptr0, len0);
16386
+ wasm.__wbg_set_jssettingmutation_key(this.__wbg_ptr, ptr0, len0);
16230
16387
  }
16231
16388
  }
16232
16389
  if (Symbol.dispose) JsStorageSlot.prototype[Symbol.dispose] = JsStorageSlot.prototype.free;
@@ -16300,7 +16457,7 @@ class JsVaultAsset {
16300
16457
  set asset(arg0) {
16301
16458
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
16302
16459
  const len0 = WASM_VECTOR_LEN;
16303
- wasm.__wbg_set_jsstoragemapentry_key(this.__wbg_ptr, ptr0, len0);
16460
+ wasm.__wbg_set_jssettingmutation_key(this.__wbg_ptr, ptr0, len0);
16304
16461
  }
16305
16462
  /**
16306
16463
  * The vault key associated with the asset.
@@ -18708,13 +18865,13 @@ if (Symbol.dispose) NoteTag.prototype[Symbol.dispose] = NoteTag.prototype.free;
18708
18865
 
18709
18866
  /**
18710
18867
  * Visibility level for note contents when published to the network.
18711
- * @enum {2 | 1}
18868
+ * @enum {0 | 1}
18712
18869
  */
18713
18870
  const NoteType = Object.freeze({
18714
18871
  /**
18715
18872
  * Notes with this type have only their hash published to the network.
18716
18873
  */
18717
- Private: 2, "2": "Private",
18874
+ Private: 0, "0": "Private",
18718
18875
  /**
18719
18876
  * Notes with this type are fully shared with the network.
18720
18877
  */
@@ -19663,7 +19820,9 @@ class RpcClient {
19663
19820
  * the full storage map data with pagination support.
19664
19821
  *
19665
19822
  * @param `block_from` - The starting block number.
19666
- * @param `block_to` - Optional ending block number. When `undefined`, syncs to chain tip.
19823
+ * @param `block_to` - Optional ending block number. When `undefined`, the current chain tip
19824
+ * is fetched with an extra RPC call and used as the bound (the node rejects values greater
19825
+ * than the tip).
19667
19826
  * @param `account_id` - The account to sync storage maps for.
19668
19827
  * @param {number} block_from
19669
19828
  * @param {number | null | undefined} block_to
@@ -19850,19 +20009,16 @@ class SerializedInputNoteData {
19850
20009
  return v1;
19851
20010
  }
19852
20011
  /**
19853
- * @returns {string}
20012
+ * @returns {string | undefined}
19854
20013
  */
19855
20014
  get nullifier() {
19856
- let deferred1_0;
19857
- let deferred1_1;
19858
- try {
19859
- const ret = wasm.__wbg_get_serializedinputnotedata_nullifier(this.__wbg_ptr);
19860
- deferred1_0 = ret[0];
19861
- deferred1_1 = ret[1];
19862
- return getStringFromWasm0(ret[0], ret[1]);
19863
- } finally {
19864
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
20015
+ const ret = wasm.__wbg_get_serializedinputnotedata_nullifier(this.__wbg_ptr);
20016
+ let v1;
20017
+ if (ret[0] !== 0) {
20018
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
20019
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
19865
20020
  }
20021
+ return v1;
19866
20022
  }
19867
20023
  /**
19868
20024
  * @returns {Uint8Array}
@@ -19974,11 +20130,11 @@ class SerializedInputNoteData {
19974
20130
  wasm.__wbg_set_serializedinputnotedata_noteScript(this.__wbg_ptr, ptr0, len0);
19975
20131
  }
19976
20132
  /**
19977
- * @param {string} arg0
20133
+ * @param {string | null} [arg0]
19978
20134
  */
19979
20135
  set nullifier(arg0) {
19980
- const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
19981
- const len0 = WASM_VECTOR_LEN;
20136
+ var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
20137
+ var len0 = WASM_VECTOR_LEN;
19982
20138
  wasm.__wbg_set_serializedinputnotedata_nullifier(this.__wbg_ptr, ptr0, len0);
19983
20139
  }
19984
20140
  /**
@@ -20039,6 +20195,21 @@ class SerializedOutputNoteData {
20039
20195
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
20040
20196
  return v1;
20041
20197
  }
20198
+ /**
20199
+ * @returns {string}
20200
+ */
20201
+ get detailsCommitment() {
20202
+ let deferred1_0;
20203
+ let deferred1_1;
20204
+ try {
20205
+ const ret = wasm.__wbg_get_serializedoutputnotedata_detailsCommitment(this.__wbg_ptr);
20206
+ deferred1_0 = ret[0];
20207
+ deferred1_1 = ret[1];
20208
+ return getStringFromWasm0(ret[0], ret[1]);
20209
+ } finally {
20210
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
20211
+ }
20212
+ }
20042
20213
  /**
20043
20214
  * @returns {number}
20044
20215
  */
@@ -20128,7 +20299,15 @@ class SerializedOutputNoteData {
20128
20299
  set attachments(arg0) {
20129
20300
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
20130
20301
  const len0 = WASM_VECTOR_LEN;
20131
- wasm.__wbg_set_serializedoutputnotedata_attachments(this.__wbg_ptr, ptr0, len0);
20302
+ wasm.__wbg_set_jsstatesyncupdate_partialBlockchainPeaks(this.__wbg_ptr, ptr0, len0);
20303
+ }
20304
+ /**
20305
+ * @param {string} arg0
20306
+ */
20307
+ set detailsCommitment(arg0) {
20308
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
20309
+ const len0 = WASM_VECTOR_LEN;
20310
+ wasm.__wbg_set_jsaccountupdate_storageRoot(this.__wbg_ptr, ptr0, len0);
20132
20311
  }
20133
20312
  /**
20134
20313
  * @param {number} arg0
@@ -20142,7 +20321,7 @@ class SerializedOutputNoteData {
20142
20321
  set metadata(arg0) {
20143
20322
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
20144
20323
  const len0 = WASM_VECTOR_LEN;
20145
- wasm.__wbg_set_jsstatesyncupdate_blockHasRelevantNotes(this.__wbg_ptr, ptr0, len0);
20324
+ wasm.__wbg_set_serializedoutputnotedata_metadata(this.__wbg_ptr, ptr0, len0);
20146
20325
  }
20147
20326
  /**
20148
20327
  * @param {Uint8Array} arg0
@@ -20158,7 +20337,7 @@ class SerializedOutputNoteData {
20158
20337
  set noteId(arg0) {
20159
20338
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
20160
20339
  const len0 = WASM_VECTOR_LEN;
20161
- wasm.__wbg_set_jsaccountupdate_storageRoot(this.__wbg_ptr, ptr0, len0);
20340
+ wasm.__wbg_set_jssettingmutation_key(this.__wbg_ptr, ptr0, len0);
20162
20341
  }
20163
20342
  /**
20164
20343
  * @param {string | null} [arg0]
@@ -20174,7 +20353,7 @@ class SerializedOutputNoteData {
20174
20353
  set recipientDigest(arg0) {
20175
20354
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
20176
20355
  const len0 = WASM_VECTOR_LEN;
20177
- wasm.__wbg_set_jsaccountupdate_vaultRoot(this.__wbg_ptr, ptr0, len0);
20356
+ wasm.__wbg_set_serializedoutputnotedata_recipientDigest(this.__wbg_ptr, ptr0, len0);
20178
20357
  }
20179
20358
  /**
20180
20359
  * @param {number} arg0
@@ -20300,7 +20479,7 @@ class SerializedTransactionData {
20300
20479
  set details(arg0) {
20301
20480
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
20302
20481
  const len0 = WASM_VECTOR_LEN;
20303
- wasm.__wbg_set_serializedoutputnotedata_noteAssets(this.__wbg_ptr, ptr0, len0);
20482
+ wasm.__wbg_set_serializedtransactiondata_details(this.__wbg_ptr, ptr0, len0);
20304
20483
  }
20305
20484
  /**
20306
20485
  * @param {string} arg0
@@ -20330,7 +20509,7 @@ class SerializedTransactionData {
20330
20509
  set status(arg0) {
20331
20510
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
20332
20511
  const len0 = WASM_VECTOR_LEN;
20333
- wasm.__wbg_set_serializedoutputnotedata_attachments(this.__wbg_ptr, ptr0, len0);
20512
+ wasm.__wbg_set_serializedoutputnotedata_noteAssets(this.__wbg_ptr, ptr0, len0);
20334
20513
  }
20335
20514
  /**
20336
20515
  * @param {Uint8Array | null} [arg0]
@@ -20800,7 +20979,7 @@ class StorageMapEntry {
20800
20979
  set key(arg0) {
20801
20980
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
20802
20981
  const len0 = WASM_VECTOR_LEN;
20803
- wasm.__wbg_set_jsstoragemapentry_key(this.__wbg_ptr, ptr0, len0);
20982
+ wasm.__wbg_set_jssettingmutation_key(this.__wbg_ptr, ptr0, len0);
20804
20983
  }
20805
20984
  /**
20806
20985
  * @param {string} arg0
@@ -23037,14 +23216,13 @@ class WebClient {
23037
23216
  }
23038
23217
  /**
23039
23218
  * @param {Uint8Array} init_seed
23040
- * @param {boolean} mutable
23041
23219
  * @param {AuthScheme} auth_scheme
23042
23220
  * @returns {Promise<Account>}
23043
23221
  */
23044
- importPublicAccountFromSeed(init_seed, mutable, auth_scheme) {
23222
+ importPublicAccountFromSeed(init_seed, auth_scheme) {
23045
23223
  const ptr0 = passArray8ToWasm0(init_seed, wasm.__wbindgen_malloc);
23046
23224
  const len0 = WASM_VECTOR_LEN;
23047
- const ret = wasm.webclient_importPublicAccountFromSeed(this.__wbg_ptr, ptr0, len0, mutable, auth_scheme);
23225
+ const ret = wasm.webclient_importPublicAccountFromSeed(this.__wbg_ptr, ptr0, len0, auth_scheme);
23048
23226
  return ret;
23049
23227
  }
23050
23228
  /**
@@ -23279,16 +23457,15 @@ class WebClient {
23279
23457
  }
23280
23458
  /**
23281
23459
  * @param {AccountStorageMode} storage_mode
23282
- * @param {boolean} mutable
23283
23460
  * @param {AuthScheme} auth_scheme
23284
23461
  * @param {Uint8Array | null} [init_seed]
23285
23462
  * @returns {Promise<Account>}
23286
23463
  */
23287
- newWallet(storage_mode, mutable, auth_scheme, init_seed) {
23464
+ newWallet(storage_mode, auth_scheme, init_seed) {
23288
23465
  _assertClass(storage_mode, AccountStorageMode);
23289
23466
  var ptr0 = isLikeNone(init_seed) ? 0 : passArray8ToWasm0(init_seed, wasm.__wbindgen_malloc);
23290
23467
  var len0 = WASM_VECTOR_LEN;
23291
- const ret = wasm.webclient_newWallet(this.__wbg_ptr, storage_mode.__wbg_ptr, mutable, auth_scheme, ptr0, len0);
23468
+ const ret = wasm.webclient_newWallet(this.__wbg_ptr, storage_mode.__wbg_ptr, auth_scheme, ptr0, len0);
23292
23469
  return ret;
23293
23470
  }
23294
23471
  /**
@@ -23937,7 +24114,7 @@ function __wbg_get_imports() {
23937
24114
  const ret = AccountStorage.__wrap(arg0);
23938
24115
  return ret;
23939
24116
  },
23940
- __wbg_addNoteTag_40dad1e41d8a6415: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
24117
+ __wbg_addNoteTag_f0737cd654a0af83: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
23941
24118
  var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
23942
24119
  wasm.__wbindgen_free(arg2, arg3 * 1, 1);
23943
24120
  let v1;
@@ -23950,7 +24127,12 @@ function __wbg_get_imports() {
23950
24127
  v2 = getStringFromWasm0(arg6, arg7).slice();
23951
24128
  wasm.__wbindgen_free(arg6, arg7 * 1, 1);
23952
24129
  }
23953
- const ret = addNoteTag(getStringFromWasm0(arg0, arg1), v0, v1, v2);
24130
+ let v3;
24131
+ if (arg8 !== 0) {
24132
+ v3 = getStringFromWasm0(arg8, arg9).slice();
24133
+ wasm.__wbindgen_free(arg8, arg9 * 1, 1);
24134
+ }
24135
+ const ret = addNoteTag(getStringFromWasm0(arg0, arg1), v0, v1, v2, v3);
23954
24136
  return ret;
23955
24137
  },
23956
24138
  __wbg_address_new: function(arg0) {
@@ -23964,6 +24146,12 @@ function __wbg_get_imports() {
23964
24146
  const ret = applyFullAccountState(getStringFromWasm0(arg0, arg1), JsAccountUpdate.__wrap(arg2));
23965
24147
  return ret;
23966
24148
  },
24149
+ __wbg_applySettingsMutations_633bdfc5efcbeab4: function(arg0, arg1, arg2, arg3) {
24150
+ var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
24151
+ wasm.__wbindgen_free(arg2, arg3 * 4, 4);
24152
+ const ret = applySettingsMutations(getStringFromWasm0(arg0, arg1), v0);
24153
+ return ret;
24154
+ },
23967
24155
  __wbg_applyStateSync_4577b4125b70be6e: function(arg0, arg1, arg2) {
23968
24156
  const ret = applyStateSync(getStringFromWasm0(arg0, arg1), JsStateSyncUpdate.__wrap(arg2));
23969
24157
  return ret;
@@ -24309,6 +24497,12 @@ function __wbg_get_imports() {
24309
24497
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
24310
24498
  }
24311
24499
  },
24500
+ __wbg_getInputNotesFromDetailsCommitments_c7c58c64df846c95: function(arg0, arg1, arg2, arg3) {
24501
+ var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
24502
+ wasm.__wbindgen_free(arg2, arg3 * 4, 4);
24503
+ const ret = getInputNotesFromDetailsCommitments(getStringFromWasm0(arg0, arg1), v0);
24504
+ return ret;
24505
+ },
24312
24506
  __wbg_getInputNotesFromIds_c19092f0da179fdf: function(arg0, arg1, arg2, arg3) {
24313
24507
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
24314
24508
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
@@ -24355,6 +24549,12 @@ function __wbg_get_imports() {
24355
24549
  const ret = getNoteTags(getStringFromWasm0(arg0, arg1));
24356
24550
  return ret;
24357
24551
  },
24552
+ __wbg_getOutputNotesFromDetailsCommitments_2b6cb89aa5ad7bd7: function(arg0, arg1, arg2, arg3) {
24553
+ var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
24554
+ wasm.__wbindgen_free(arg2, arg3 * 4, 4);
24555
+ const ret = getOutputNotesFromDetailsCommitments(getStringFromWasm0(arg0, arg1), v0);
24556
+ return ret;
24557
+ },
24358
24558
  __wbg_getOutputNotesFromIds_1cfcb787c56927d6: function(arg0, arg1, arg2, arg3) {
24359
24559
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
24360
24560
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
@@ -24623,6 +24823,10 @@ function __wbg_get_imports() {
24623
24823
  const ret = JsAccountUpdate.__unwrap(arg0);
24624
24824
  return ret;
24625
24825
  },
24826
+ __wbg_jssettingmutation_new: function(arg0) {
24827
+ const ret = JsSettingMutation.__wrap(arg0);
24828
+ return ret;
24829
+ },
24626
24830
  __wbg_jsstoragemapentry_new: function(arg0) {
24627
24831
  const ret = JsStorageMapEntry.__wrap(arg0);
24628
24832
  return ret;
@@ -24958,7 +25162,7 @@ function __wbg_get_imports() {
24958
25162
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24959
25163
  }
24960
25164
  },
24961
- __wbg_removeNoteTag_77e6e3497d921600: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
25165
+ __wbg_removeNoteTag_d9a0f5ba38c25246: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
24962
25166
  var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
24963
25167
  wasm.__wbindgen_free(arg2, arg3 * 1, 1);
24964
25168
  let v1;
@@ -24971,7 +25175,12 @@ function __wbg_get_imports() {
24971
25175
  v2 = getStringFromWasm0(arg6, arg7).slice();
24972
25176
  wasm.__wbindgen_free(arg6, arg7 * 1, 1);
24973
25177
  }
24974
- const ret = removeNoteTag(getStringFromWasm0(arg0, arg1), v0, v1, v2);
25178
+ let v3;
25179
+ if (arg8 !== 0) {
25180
+ v3 = getStringFromWasm0(arg8, arg9).slice();
25181
+ wasm.__wbindgen_free(arg8, arg9 * 1, 1);
25182
+ }
25183
+ const ret = removeNoteTag(getStringFromWasm0(arg0, arg1), v0, v1, v2, v3);
24975
25184
  return ret;
24976
25185
  },
24977
25186
  __wbg_removeSetting_39da4a2d256af0e2: function(arg0, arg1, arg2, arg3) {
@@ -25194,7 +25403,7 @@ function __wbg_get_imports() {
25194
25403
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25195
25404
  }
25196
25405
  },
25197
- __wbg_upsertAccountRecord_3fb1a14436632f21: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16) {
25406
+ __wbg_upsertAccountRecord_96a74a90d1ab5ddf: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17) {
25198
25407
  let deferred0_0;
25199
25408
  let deferred0_1;
25200
25409
  let deferred1_0;
@@ -25225,7 +25434,7 @@ function __wbg_get_imports() {
25225
25434
  v6 = getArrayU8FromWasm0(arg15, arg16).slice();
25226
25435
  wasm.__wbindgen_free(arg15, arg16 * 1, 1);
25227
25436
  }
25228
- 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);
25437
+ 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);
25229
25438
  return ret;
25230
25439
  } finally {
25231
25440
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
@@ -25269,13 +25478,11 @@ function __wbg_get_imports() {
25269
25478
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
25270
25479
  }
25271
25480
  },
25272
- __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) {
25481
+ __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) {
25273
25482
  let deferred0_0;
25274
25483
  let deferred0_1;
25275
25484
  let deferred6_0;
25276
25485
  let deferred6_1;
25277
- let deferred8_0;
25278
- let deferred8_1;
25279
25486
  let deferred9_0;
25280
25487
  let deferred9_1;
25281
25488
  try {
@@ -25298,8 +25505,11 @@ function __wbg_get_imports() {
25298
25505
  deferred6_1 = arg15;
25299
25506
  var v7 = getArrayU8FromWasm0(arg16, arg17).slice();
25300
25507
  wasm.__wbindgen_free(arg16, arg17 * 1, 1);
25301
- deferred8_0 = arg18;
25302
- deferred8_1 = arg19;
25508
+ let v8;
25509
+ if (arg18 !== 0) {
25510
+ v8 = getStringFromWasm0(arg18, arg19).slice();
25511
+ wasm.__wbindgen_free(arg18, arg19 * 1, 1);
25512
+ }
25303
25513
  deferred9_0 = arg20;
25304
25514
  deferred9_1 = arg21;
25305
25515
  var v10 = getArrayU8FromWasm0(arg23, arg24).slice();
@@ -25309,12 +25519,11 @@ function __wbg_get_imports() {
25309
25519
  v11 = getStringFromWasm0(arg27, arg28).slice();
25310
25520
  wasm.__wbindgen_free(arg27, arg28 * 1, 1);
25311
25521
  }
25312
- 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);
25522
+ 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);
25313
25523
  return ret;
25314
25524
  } finally {
25315
25525
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25316
25526
  wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
25317
- wasm.__wbindgen_free(deferred8_0, deferred8_1, 1);
25318
25527
  wasm.__wbindgen_free(deferred9_0, deferred9_1, 1);
25319
25528
  }
25320
25529
  },
@@ -25332,34 +25541,39 @@ function __wbg_get_imports() {
25332
25541
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25333
25542
  }
25334
25543
  },
25335
- __wbg_upsertOutputNote_086a8c1c81f11d3c: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17) {
25544
+ __wbg_upsertOutputNote_4d029c88a0e7d960: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19) {
25336
25545
  let deferred0_0;
25337
25546
  let deferred0_1;
25338
- let deferred3_0;
25339
- let deferred3_1;
25547
+ let deferred1_0;
25548
+ let deferred1_1;
25549
+ let deferred4_0;
25550
+ let deferred4_1;
25340
25551
  try {
25341
25552
  deferred0_0 = arg2;
25342
25553
  deferred0_1 = arg3;
25343
- var v1 = getArrayU8FromWasm0(arg4, arg5).slice();
25344
- wasm.__wbindgen_free(arg4, arg5 * 1, 1);
25554
+ deferred1_0 = arg4;
25555
+ deferred1_1 = arg5;
25345
25556
  var v2 = getArrayU8FromWasm0(arg6, arg7).slice();
25346
25557
  wasm.__wbindgen_free(arg6, arg7 * 1, 1);
25347
- deferred3_0 = arg8;
25348
- deferred3_1 = arg9;
25349
- var v4 = getArrayU8FromWasm0(arg10, arg11).slice();
25350
- wasm.__wbindgen_free(arg10, arg11 * 1, 1);
25351
- let v5;
25352
- if (arg12 !== 0) {
25353
- v5 = getStringFromWasm0(arg12, arg13).slice();
25354
- wasm.__wbindgen_free(arg12, arg13 * 1, 1);
25558
+ var v3 = getArrayU8FromWasm0(arg8, arg9).slice();
25559
+ wasm.__wbindgen_free(arg8, arg9 * 1, 1);
25560
+ deferred4_0 = arg10;
25561
+ deferred4_1 = arg11;
25562
+ var v5 = getArrayU8FromWasm0(arg12, arg13).slice();
25563
+ wasm.__wbindgen_free(arg12, arg13 * 1, 1);
25564
+ let v6;
25565
+ if (arg14 !== 0) {
25566
+ v6 = getStringFromWasm0(arg14, arg15).slice();
25567
+ wasm.__wbindgen_free(arg14, arg15 * 1, 1);
25355
25568
  }
25356
- var v6 = getArrayU8FromWasm0(arg16, arg17).slice();
25357
- wasm.__wbindgen_free(arg16, arg17 * 1, 1);
25358
- const ret = upsertOutputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), v1, v2, getStringFromWasm0(arg8, arg9), v4, v5, arg14 >>> 0, arg15, v6);
25569
+ var v7 = getArrayU8FromWasm0(arg18, arg19).slice();
25570
+ wasm.__wbindgen_free(arg18, arg19 * 1, 1);
25571
+ const ret = upsertOutputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), v2, v3, getStringFromWasm0(arg10, arg11), v5, v6, arg16 >>> 0, arg17, v7);
25359
25572
  return ret;
25360
25573
  } finally {
25361
25574
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25362
- wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
25575
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
25576
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
25363
25577
  }
25364
25578
  },
25365
25579
  __wbg_upsertStorageMapEntries_068d8303824fff58: function(arg0, arg1, arg2, arg3, arg4, arg5) {
@@ -25428,12 +25642,12 @@ function __wbg_get_imports() {
25428
25642
  return ret;
25429
25643
  },
25430
25644
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
25431
- // Cast intrinsic for `Closure(Closure { dtor_idx: 441, function: Function { arguments: [Externref], shim_idx: 793, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
25645
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 427, function: Function { arguments: [Externref], shim_idx: 793, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
25432
25646
  const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3f095fc116138c37, wasm_bindgen__convert__closures_____invoke__h5b85ca27a15b53fc);
25433
25647
  return ret;
25434
25648
  },
25435
25649
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
25436
- // Cast intrinsic for `Closure(Closure { dtor_idx: 441, function: Function { arguments: [], shim_idx: 442, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
25650
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 427, function: Function { arguments: [], shim_idx: 428, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
25437
25651
  const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3f095fc116138c37, wasm_bindgen__convert__closures_____invoke__h8c482c344300c6d3);
25438
25652
  return ret;
25439
25653
  },
@@ -25723,6 +25937,9 @@ const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undef
25723
25937
  const JsAccountUpdateFinalization = (typeof FinalizationRegistry === 'undefined')
25724
25938
  ? { register: () => {}, unregister: () => {} }
25725
25939
  : new FinalizationRegistry(ptr => wasm.__wbg_jsaccountupdate_free(ptr >>> 0, 1));
25940
+ const JsSettingMutationFinalization = (typeof FinalizationRegistry === 'undefined')
25941
+ ? { register: () => {}, unregister: () => {} }
25942
+ : new FinalizationRegistry(ptr => wasm.__wbg_jssettingmutation_free(ptr >>> 0, 1));
25726
25943
  const JsStateSyncUpdateFinalization = (typeof FinalizationRegistry === 'undefined')
25727
25944
  ? { register: () => {}, unregister: () => {} }
25728
25945
  : new FinalizationRegistry(ptr => wasm.__wbg_jsstatesyncupdate_free(ptr >>> 0, 1));
@@ -26356,7 +26573,7 @@ async function __wbg_init(module_or_path) {
26356
26573
 
26357
26574
  const module$1 = new URL("assets/miden_client_web.wasm", self.location.href);
26358
26575
 
26359
- var CargoOZMlHpic = /*#__PURE__*/Object.freeze({
26576
+ var CargoQHCIdWdN = /*#__PURE__*/Object.freeze({
26360
26577
  __proto__: null,
26361
26578
  Account: Account,
26362
26579
  AccountArray: AccountArray,
@@ -26413,6 +26630,7 @@ var CargoOZMlHpic = /*#__PURE__*/Object.freeze({
26413
26630
  IntoUnderlyingSink: IntoUnderlyingSink,
26414
26631
  IntoUnderlyingSource: IntoUnderlyingSource,
26415
26632
  JsAccountUpdate: JsAccountUpdate,
26633
+ JsSettingMutation: JsSettingMutation,
26416
26634
  JsStateSyncUpdate: JsStateSyncUpdate,
26417
26635
  JsStorageMapEntry: JsStorageMapEntry,
26418
26636
  JsStorageSlot: JsStorageSlot,