@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
@@ -8281,7 +8281,7 @@ const V1_STORES = {
8281
8281
  [Table.Transactions]: indexes("id", "statusVariant"),
8282
8282
  [Table.TransactionScripts]: indexes("scriptRoot"),
8283
8283
  [Table.InputNotes]: indexes("detailsCommitment", "noteId", "nullifier", "stateDiscriminant", "[consumedBlockHeight+consumedTxOrder+noteId]"),
8284
- [Table.OutputNotes]: indexes("noteId", "recipientDigest", "stateDiscriminant", "nullifier"),
8284
+ [Table.OutputNotes]: indexes("detailsCommitment", "noteId", "recipientDigest", "stateDiscriminant", "nullifier"),
8285
8285
  [Table.NotesScripts]: indexes("scriptRoot"),
8286
8286
  [Table.StateSync]: indexes("id"),
8287
8287
  [Table.BlockHeaders]: indexes("blockNum", "hasClientNotes"),
@@ -8483,6 +8483,7 @@ async function getAllAccountHeaders(dbId) {
8483
8483
  locked: record.locked,
8484
8484
  committed: record.committed,
8485
8485
  accountCommitment: record.accountCommitment || "",
8486
+ watched: record.watched ?? false,
8486
8487
  }));
8487
8488
  return resultObject;
8488
8489
  }
@@ -8509,6 +8510,7 @@ async function getAccountHeader(dbId, accountId) {
8509
8510
  codeRoot: record.codeRoot,
8510
8511
  accountSeed: seedToBase64(record.accountSeed),
8511
8512
  locked: record.locked,
8513
+ watched: record.watched ?? false,
8512
8514
  };
8513
8515
  }
8514
8516
  catch (error) {
@@ -8533,6 +8535,7 @@ async function getAccountHeaderByCommitment(dbId, accountCommitment) {
8533
8535
  codeRoot: record.codeRoot,
8534
8536
  accountSeed: seedToBase64(record.accountSeed),
8535
8537
  locked: record.locked,
8538
+ watched: record.watched ?? false,
8536
8539
  };
8537
8540
  }
8538
8541
  catch (error) {
@@ -8816,6 +8819,7 @@ async function applyTransactionDelta(dbId, accountId, nonce, updatedSlots, chang
8816
8819
  accountSeed: oldHeader.accountSeed,
8817
8820
  accountCommitment: oldHeader.accountCommitment,
8818
8821
  locked: oldHeader.locked,
8822
+ watched: oldHeader.watched ?? false,
8819
8823
  });
8820
8824
  }
8821
8825
  await db.latestAccountHeaders.put({
@@ -8828,6 +8832,7 @@ async function applyTransactionDelta(dbId, accountId, nonce, updatedSlots, chang
8828
8832
  accountSeed: undefined,
8829
8833
  accountCommitment: commitment,
8830
8834
  locked: false,
8835
+ watched: oldHeader?.watched ?? false,
8831
8836
  });
8832
8837
  });
8833
8838
  }
@@ -9052,6 +9057,7 @@ async function applyFullAccountState(dbId, accountState) {
9052
9057
  accountSeed: oldHeader.accountSeed,
9053
9058
  accountCommitment: oldHeader.accountCommitment,
9054
9059
  locked: oldHeader.locked,
9060
+ watched: oldHeader.watched ?? false,
9055
9061
  });
9056
9062
  }
9057
9063
  await db.latestAccountHeaders.put({
@@ -9064,6 +9070,7 @@ async function applyFullAccountState(dbId, accountState) {
9064
9070
  accountSeed,
9065
9071
  accountCommitment,
9066
9072
  locked: false,
9073
+ watched: oldHeader?.watched ?? false,
9067
9074
  });
9068
9075
  });
9069
9076
  }
@@ -9071,7 +9078,7 @@ async function applyFullAccountState(dbId, accountState) {
9071
9078
  logWebStoreError(error, `Error applying full account state`);
9072
9079
  }
9073
9080
  }
9074
- async function upsertAccountRecord(dbId, accountId, codeRoot, storageRoot, vaultRoot, nonce, committed, commitment, accountSeed) {
9081
+ async function upsertAccountRecord(dbId, accountId, codeRoot, storageRoot, vaultRoot, nonce, committed, commitment, accountSeed, watched) {
9075
9082
  try {
9076
9083
  const db = getDatabase(dbId);
9077
9084
  const data = {
@@ -9084,6 +9091,7 @@ async function upsertAccountRecord(dbId, accountId, codeRoot, storageRoot, vault
9084
9091
  accountSeed,
9085
9092
  accountCommitment: commitment,
9086
9093
  locked: false,
9094
+ watched,
9087
9095
  };
9088
9096
  await db.latestAccountHeaders.put(data);
9089
9097
  }
@@ -9892,6 +9900,32 @@ async function getOutputNotesFromNullifiers(dbId, nullifiers) {
9892
9900
  logWebStoreError(err, "Failed to get output notes from nullifiers");
9893
9901
  }
9894
9902
  }
9903
+ async function getInputNotesFromDetailsCommitments(dbId, detailsCommitments) {
9904
+ try {
9905
+ const db = getDatabase(dbId);
9906
+ let notes = await db.inputNotes
9907
+ .where("detailsCommitment")
9908
+ .anyOf(detailsCommitments)
9909
+ .toArray();
9910
+ return await processInputNotes(dbId, notes);
9911
+ }
9912
+ catch (err) {
9913
+ logWebStoreError(err, "Failed to get input notes from details commitments");
9914
+ }
9915
+ }
9916
+ async function getOutputNotesFromDetailsCommitments(dbId, detailsCommitments) {
9917
+ try {
9918
+ const db = getDatabase(dbId);
9919
+ let notes = await db.outputNotes
9920
+ .where("detailsCommitment")
9921
+ .anyOf(detailsCommitments)
9922
+ .toArray();
9923
+ return await processOutputNotes(notes);
9924
+ }
9925
+ catch (err) {
9926
+ logWebStoreError(err, "Failed to get output notes from details commitments");
9927
+ }
9928
+ }
9895
9929
  async function getOutputNotesFromIds(dbId, noteIds) {
9896
9930
  try {
9897
9931
  const db = getDatabase(dbId);
@@ -9909,7 +9943,9 @@ async function getUnspentInputNoteNullifiers(dbId) {
9909
9943
  .where("stateDiscriminant")
9910
9944
  .anyOf([2, 4, 5])
9911
9945
  .toArray();
9912
- return notes.map((note) => note.nullifier);
9946
+ return notes
9947
+ .map((note) => note.nullifier)
9948
+ .filter((nullifier) => nullifier != null);
9913
9949
  }
9914
9950
  catch (err) {
9915
9951
  logWebStoreError(err, "Failed to get unspent input note nullifiers");
@@ -9933,19 +9969,15 @@ async function upsertInputNote(dbId, detailsCommitment, noteId, assets, attachme
9933
9969
  const doWork = async (t) => {
9934
9970
  try {
9935
9971
  const data = {
9936
- // The details commitment is the primary key. It is always present, even
9937
- // for partial notes lacking a noteId, so a partial note that later gains
9938
- // its noteId updates the same row instead of inserting a duplicate.
9939
9972
  detailsCommitment,
9940
- // Convert null -> undefined so Dexie omits the noteId secondary index
9941
- // for partial notes that don't have one yet.
9973
+ // noteId/nullifier are only known once the note's metadata is available.
9942
9974
  noteId: noteId ?? undefined,
9943
9975
  assets,
9944
9976
  attachments,
9945
9977
  serialNumber,
9946
9978
  inputs,
9947
9979
  scriptRoot,
9948
- nullifier,
9980
+ nullifier: nullifier ?? undefined,
9949
9981
  state,
9950
9982
  stateDiscriminant,
9951
9983
  serializedCreatedAt,
@@ -10027,11 +10059,12 @@ async function getInputNoteByOffset(dbId, states, consumerAccountId, blockStart,
10027
10059
  logWebStoreError(err, "Failed to get input note by offset");
10028
10060
  }
10029
10061
  }
10030
- async function upsertOutputNote(dbId, noteId, assets, attachments, recipientDigest, metadata, nullifier, expectedHeight, stateDiscriminant, state, tx) {
10062
+ async function upsertOutputNote(dbId, detailsCommitment, noteId, assets, attachments, recipientDigest, metadata, nullifier, expectedHeight, stateDiscriminant, state, tx) {
10031
10063
  const db = getDatabase(dbId);
10032
10064
  const doWork = async (t) => {
10033
10065
  try {
10034
10066
  const data = {
10067
+ detailsCommitment,
10035
10068
  noteId,
10036
10069
  assets,
10037
10070
  attachments,
@@ -10046,7 +10079,7 @@ async function upsertOutputNote(dbId, noteId, assets, attachments, recipientDige
10046
10079
  /* v8 ignore next 3 — requires a mid-transaction Dexie write failure, not modelable with fake-indexeddb */
10047
10080
  }
10048
10081
  catch (error) {
10049
- logWebStoreError(error, `Error inserting note: ${noteId}`);
10082
+ logWebStoreError(error, `Error inserting note: ${detailsCommitment}`);
10050
10083
  }
10051
10084
  };
10052
10085
  return db.dexie.transaction("rw", db.outputNotes, db.notesScripts, doWork);
@@ -10055,7 +10088,6 @@ async function processInputNotes(dbId, notes) {
10055
10088
  const db = getDatabase(dbId);
10056
10089
  return await Promise.all(notes.map(async (note) => {
10057
10090
  const assetsBase64 = uint8ArrayToBase64(note.assets);
10058
- const attachmentsBase64 = uint8ArrayToBase64(note.attachments);
10059
10091
  const serialNumberBase64 = uint8ArrayToBase64(note.serialNumber);
10060
10092
  const inputsBase64 = uint8ArrayToBase64(note.inputs);
10061
10093
  let serializedNoteScriptBase64 = undefined;
@@ -10066,30 +10098,31 @@ async function processInputNotes(dbId, notes) {
10066
10098
  }
10067
10099
  }
10068
10100
  const stateBase64 = uint8ArrayToBase64(note.state);
10101
+ const attachmentsBase64 = uint8ArrayToBase64(note.attachments);
10069
10102
  return {
10070
10103
  assets: assetsBase64,
10071
- attachments: attachmentsBase64,
10072
10104
  serialNumber: serialNumberBase64,
10073
10105
  inputs: inputsBase64,
10074
10106
  createdAt: note.serializedCreatedAt,
10075
10107
  serializedNoteScript: serializedNoteScriptBase64,
10076
10108
  state: stateBase64,
10109
+ attachments: attachmentsBase64,
10077
10110
  };
10078
10111
  }));
10079
10112
  }
10080
10113
  async function processOutputNotes(notes) {
10081
10114
  return await Promise.all(notes.map((note) => {
10082
10115
  const assetsBase64 = uint8ArrayToBase64(note.assets);
10083
- const attachmentsBase64 = uint8ArrayToBase64(note.attachments);
10084
10116
  const metadataBase64 = uint8ArrayToBase64(note.metadata);
10085
10117
  const stateBase64 = uint8ArrayToBase64(note.state);
10118
+ const attachmentsBase64 = uint8ArrayToBase64(note.attachments);
10086
10119
  return {
10087
10120
  assets: assetsBase64,
10088
- attachments: attachmentsBase64,
10089
10121
  recipientDigest: note.recipientDigest,
10090
10122
  metadata: metadataBase64,
10091
10123
  expectedHeight: note.expectedHeight,
10092
10124
  state: stateBase64,
10125
+ attachments: attachmentsBase64,
10093
10126
  };
10094
10127
  }));
10095
10128
  }
@@ -10167,6 +10200,30 @@ async function listSettingKeys(dbId) {
10167
10200
  logWebStoreError(error, `Error listing setting keys`);
10168
10201
  }
10169
10202
  }
10203
+ async function applySettingsMutations(dbId, mutations) {
10204
+ try {
10205
+ const db = getDatabase(dbId);
10206
+ await db.dexie.transaction("rw", db.settings, async () => {
10207
+ for (const mutation of mutations) {
10208
+ if (mutation.kind === "set") {
10209
+ if (mutation.value === undefined) {
10210
+ throw new Error(`Setting mutation "set" for key ${mutation.key} is missing a value`);
10211
+ }
10212
+ await db.settings.put({ key: mutation.key, value: mutation.value });
10213
+ }
10214
+ else if (mutation.kind === "remove") {
10215
+ await db.settings.where("key").equals(mutation.key).delete();
10216
+ }
10217
+ else {
10218
+ throw new Error(`Unknown setting mutation kind: ${mutation.kind}`);
10219
+ }
10220
+ }
10221
+ });
10222
+ }
10223
+ catch (error) {
10224
+ logWebStoreError(error, "Error applying settings mutations");
10225
+ }
10226
+ }
10170
10227
 
10171
10228
  const IDS_FILTER_PREFIX = "Ids:";
10172
10229
  const EXPIRED_BEFORE_FILTER_PREFIX = "ExpiredPending:";
@@ -10294,6 +10351,10 @@ async function getNoteTags(dbId) {
10294
10351
  record.sourceNoteId == "" ? undefined : record.sourceNoteId;
10295
10352
  record.sourceAccountId =
10296
10353
  record.sourceAccountId == "" ? undefined : record.sourceAccountId;
10354
+ record.sourceSubscriptionKey =
10355
+ record.sourceSubscriptionKey == ""
10356
+ ? undefined
10357
+ : record.sourceSubscriptionKey;
10297
10358
  return record;
10298
10359
  });
10299
10360
  return processedRecords;
@@ -10320,7 +10381,7 @@ async function getSyncHeight(dbId) {
10320
10381
  logWebStoreError(error, "Error fetching sync height");
10321
10382
  }
10322
10383
  }
10323
- async function addNoteTag(dbId, tag, sourceNoteId, sourceAccountId) {
10384
+ async function addNoteTag(dbId, tag, sourceNoteId, sourceAccountId, sourceSubscriptionKey) {
10324
10385
  try {
10325
10386
  const db = getDatabase(dbId);
10326
10387
  let tagArray = new Uint8Array(tag);
@@ -10329,23 +10390,29 @@ async function addNoteTag(dbId, tag, sourceNoteId, sourceAccountId) {
10329
10390
  tag: tagBase64,
10330
10391
  sourceNoteId: sourceNoteId ? sourceNoteId : "",
10331
10392
  sourceAccountId: sourceAccountId ? sourceAccountId : "",
10393
+ sourceSubscriptionKey: sourceSubscriptionKey ? sourceSubscriptionKey : "",
10332
10394
  });
10333
10395
  }
10334
10396
  catch (error) {
10335
10397
  logWebStoreError(error, "Failed to add note tag");
10336
10398
  }
10337
10399
  }
10338
- async function removeNoteTag(dbId, tag, sourceNoteId, sourceAccountId) {
10400
+ async function removeNoteTag(dbId, tag, sourceNoteId, sourceAccountId, sourceSubscriptionKey) {
10339
10401
  try {
10340
10402
  const db = getDatabase(dbId);
10341
10403
  let tagArray = new Uint8Array(tag);
10342
10404
  let tagBase64 = uint8ArrayToBase64(tagArray);
10405
+ const subscriptionKey = sourceSubscriptionKey ? sourceSubscriptionKey : "";
10343
10406
  return await db.tags
10344
10407
  .where({
10345
10408
  tag: tagBase64,
10346
10409
  sourceNoteId: sourceNoteId ? sourceNoteId : "",
10347
10410
  sourceAccountId: sourceAccountId ? sourceAccountId : "",
10348
10411
  })
10412
+ // Filtered in JS rather than via the `where` clause: rows written
10413
+ // before the column existed lack the property entirely, and a
10414
+ // `where` equality on `""` would never match them.
10415
+ .and((record) => (record.sourceSubscriptionKey ?? "") == subscriptionKey)
10349
10416
  .delete();
10350
10417
  }
10351
10418
  catch (error) {
@@ -10381,7 +10448,7 @@ async function applyStateSync(dbId, stateUpdate) {
10381
10448
  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);
10382
10449
  })),
10383
10450
  Promise.all(serializedOutputNotes.map((note) => {
10384
- return upsertOutputNote(dbId, note.noteId, note.noteAssets, note.attachments, note.recipientDigest, note.metadata, note.nullifier, note.expectedHeight, note.stateDiscriminant, note.state);
10451
+ return upsertOutputNote(dbId, note.detailsCommitment, note.noteId, note.noteAssets, note.attachments, note.recipientDigest, note.metadata, note.nullifier, note.expectedHeight, note.stateDiscriminant, note.state);
10385
10452
  })),
10386
10453
  Promise.all(transactionUpdates.map((transactionRecord) => {
10387
10454
  let promises = [
@@ -10758,7 +10825,8 @@ class AccountBuilder {
10758
10825
  wasm.__wbg_accountbuilder_free(ptr, 0);
10759
10826
  }
10760
10827
  /**
10761
- * Sets the account type (regular, faucet, etc.).
10828
+ * Sets the account type, which in protocol 0.15 is the account visibility
10829
+ * (public or private). Equivalent to [`Self::storage_mode`].
10762
10830
  * @param {AccountType} account_type
10763
10831
  * @returns {AccountBuilder}
10764
10832
  */
@@ -12638,16 +12706,8 @@ class AssetVault {
12638
12706
  /**
12639
12707
  * Returns the balance for the given fungible faucet, or zero if absent.
12640
12708
  *
12641
- * `get_balance` on the 0.15 surface keys by `AssetVaultKey`, not `AccountId`, and
12642
- * validates the composition. The callback flag is `Disabled` because fungible balance
12643
- * reads don't run asset callbacks. Returns zero on lookup error (`Err` arms here would
12644
- * indicate the key was constructed wrong, which can't happen for fungible keys built
12645
- * this way).
12646
- *
12647
- * NOTE: the `AssetVaultKey` encodes the callback flag, so this reports only the balance
12648
- * of callback-*disabled* fungible assets. Faucets built by this SDK omit transfer policies
12649
- * and therefore mint callback-disabled assets, so this is exact for them; an asset minted
12650
- * elsewhere with callbacks enabled would not be counted here.
12709
+ * Matches by faucet id across the vault's fungible assets, so the balance is
12710
+ * found regardless of the asset's callback flag.
12651
12711
  * @param {AccountId} faucet_id
12652
12712
  * @returns {bigint}
12653
12713
  */
@@ -14238,9 +14298,8 @@ class FungibleAssetDelta {
14238
14298
  /**
14239
14299
  * Returns the delta amount for a given faucet, if present.
14240
14300
  *
14241
- * The vault key here is the one used by the fungible-delta tree, which the upstream
14242
- * surface keys with `AssetCallbackFlag::Disabled` — fungible balance deltas don't run
14243
- * asset callbacks. `new_fungible` on the 0.15 surface is infallible.
14301
+ * Matches by faucet id so the delta is found regardless of the asset's
14302
+ * callback flag.
14244
14303
  * @param {AccountId} faucet_id
14245
14304
  * @returns {bigint | undefined}
14246
14305
  */
@@ -15134,6 +15193,104 @@ class JsAccountUpdate {
15134
15193
  }
15135
15194
  if (Symbol.dispose) JsAccountUpdate.prototype[Symbol.dispose] = JsAccountUpdate.prototype.free;
15136
15195
 
15196
+ /**
15197
+ * JS-facing form of a [`miden_client::store::SettingMutation`], applied as a
15198
+ * single atomic batch by the `applySettingsMutations` function in
15199
+ * `settings.js`.
15200
+ */
15201
+ class JsSettingMutation {
15202
+ static __wrap(ptr) {
15203
+ ptr = ptr >>> 0;
15204
+ const obj = Object.create(JsSettingMutation.prototype);
15205
+ obj.__wbg_ptr = ptr;
15206
+ JsSettingMutationFinalization.register(obj, obj.__wbg_ptr, obj);
15207
+ return obj;
15208
+ }
15209
+ __destroy_into_raw() {
15210
+ const ptr = this.__wbg_ptr;
15211
+ this.__wbg_ptr = 0;
15212
+ JsSettingMutationFinalization.unregister(this);
15213
+ return ptr;
15214
+ }
15215
+ free() {
15216
+ const ptr = this.__destroy_into_raw();
15217
+ wasm.__wbg_jssettingmutation_free(ptr, 0);
15218
+ }
15219
+ /**
15220
+ * The `settings` key the mutation targets.
15221
+ * @returns {string}
15222
+ */
15223
+ get key() {
15224
+ let deferred1_0;
15225
+ let deferred1_1;
15226
+ try {
15227
+ const ret = wasm.__wbg_get_jssettingmutation_key(this.__wbg_ptr);
15228
+ deferred1_0 = ret[0];
15229
+ deferred1_1 = ret[1];
15230
+ return getStringFromWasm0(ret[0], ret[1]);
15231
+ } finally {
15232
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
15233
+ }
15234
+ }
15235
+ /**
15236
+ * Either `"set"` or `"remove"`.
15237
+ * @returns {string}
15238
+ */
15239
+ get kind() {
15240
+ let deferred1_0;
15241
+ let deferred1_1;
15242
+ try {
15243
+ const ret = wasm.__wbg_get_jssettingmutation_kind(this.__wbg_ptr);
15244
+ deferred1_0 = ret[0];
15245
+ deferred1_1 = ret[1];
15246
+ return getStringFromWasm0(ret[0], ret[1]);
15247
+ } finally {
15248
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
15249
+ }
15250
+ }
15251
+ /**
15252
+ * The value to write. `Some` for `"set"`, `None` for `"remove"`.
15253
+ * @returns {Uint8Array | undefined}
15254
+ */
15255
+ get value() {
15256
+ const ret = wasm.__wbg_get_jssettingmutation_value(this.__wbg_ptr);
15257
+ let v1;
15258
+ if (ret[0] !== 0) {
15259
+ v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
15260
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15261
+ }
15262
+ return v1;
15263
+ }
15264
+ /**
15265
+ * The `settings` key the mutation targets.
15266
+ * @param {string} arg0
15267
+ */
15268
+ set key(arg0) {
15269
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
15270
+ const len0 = WASM_VECTOR_LEN;
15271
+ wasm.__wbg_set_jssettingmutation_key(this.__wbg_ptr, ptr0, len0);
15272
+ }
15273
+ /**
15274
+ * Either `"set"` or `"remove"`.
15275
+ * @param {string} arg0
15276
+ */
15277
+ set kind(arg0) {
15278
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
15279
+ const len0 = WASM_VECTOR_LEN;
15280
+ wasm.__wbg_set_jsaccountupdate_storageRoot(this.__wbg_ptr, ptr0, len0);
15281
+ }
15282
+ /**
15283
+ * The value to write. `Some` for `"set"`, `None` for `"remove"`.
15284
+ * @param {Uint8Array | null} [arg0]
15285
+ */
15286
+ set value(arg0) {
15287
+ var ptr0 = isLikeNone(arg0) ? 0 : passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
15288
+ var len0 = WASM_VECTOR_LEN;
15289
+ wasm.__wbg_set_jssettingmutation_value(this.__wbg_ptr, ptr0, len0);
15290
+ }
15291
+ }
15292
+ if (Symbol.dispose) JsSettingMutation.prototype[Symbol.dispose] = JsSettingMutation.prototype.free;
15293
+
15137
15294
  /**
15138
15295
  * An object that contains data for a sync update,
15139
15296
  * which will be received by the applyStateSync JS function.
@@ -15481,7 +15638,7 @@ class JsStorageMapEntry {
15481
15638
  set key(arg0) {
15482
15639
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
15483
15640
  const len0 = WASM_VECTOR_LEN;
15484
- wasm.__wbg_set_jsstoragemapentry_key(this.__wbg_ptr, ptr0, len0);
15641
+ wasm.__wbg_set_jssettingmutation_key(this.__wbg_ptr, ptr0, len0);
15485
15642
  }
15486
15643
  /**
15487
15644
  * The slot name of the map this entry belongs to.
@@ -15597,7 +15754,7 @@ class JsStorageSlot {
15597
15754
  set slotValue(arg0) {
15598
15755
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
15599
15756
  const len0 = WASM_VECTOR_LEN;
15600
- wasm.__wbg_set_jsstoragemapentry_key(this.__wbg_ptr, ptr0, len0);
15757
+ wasm.__wbg_set_jssettingmutation_key(this.__wbg_ptr, ptr0, len0);
15601
15758
  }
15602
15759
  }
15603
15760
  if (Symbol.dispose) JsStorageSlot.prototype[Symbol.dispose] = JsStorageSlot.prototype.free;
@@ -15671,7 +15828,7 @@ class JsVaultAsset {
15671
15828
  set asset(arg0) {
15672
15829
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
15673
15830
  const len0 = WASM_VECTOR_LEN;
15674
- wasm.__wbg_set_jsstoragemapentry_key(this.__wbg_ptr, ptr0, len0);
15831
+ wasm.__wbg_set_jssettingmutation_key(this.__wbg_ptr, ptr0, len0);
15675
15832
  }
15676
15833
  /**
15677
15834
  * The vault key associated with the asset.
@@ -18079,13 +18236,13 @@ if (Symbol.dispose) NoteTag.prototype[Symbol.dispose] = NoteTag.prototype.free;
18079
18236
 
18080
18237
  /**
18081
18238
  * Visibility level for note contents when published to the network.
18082
- * @enum {2 | 1}
18239
+ * @enum {0 | 1}
18083
18240
  */
18084
18241
  const NoteType = Object.freeze({
18085
18242
  /**
18086
18243
  * Notes with this type have only their hash published to the network.
18087
18244
  */
18088
- Private: 2, "2": "Private",
18245
+ Private: 0, "0": "Private",
18089
18246
  /**
18090
18247
  * Notes with this type are fully shared with the network.
18091
18248
  */
@@ -19034,7 +19191,9 @@ class RpcClient {
19034
19191
  * the full storage map data with pagination support.
19035
19192
  *
19036
19193
  * @param `block_from` - The starting block number.
19037
- * @param `block_to` - Optional ending block number. When `undefined`, syncs to chain tip.
19194
+ * @param `block_to` - Optional ending block number. When `undefined`, the current chain tip
19195
+ * is fetched with an extra RPC call and used as the bound (the node rejects values greater
19196
+ * than the tip).
19038
19197
  * @param `account_id` - The account to sync storage maps for.
19039
19198
  * @param {number} block_from
19040
19199
  * @param {number | null | undefined} block_to
@@ -19221,19 +19380,16 @@ class SerializedInputNoteData {
19221
19380
  return v1;
19222
19381
  }
19223
19382
  /**
19224
- * @returns {string}
19383
+ * @returns {string | undefined}
19225
19384
  */
19226
19385
  get nullifier() {
19227
- let deferred1_0;
19228
- let deferred1_1;
19229
- try {
19230
- const ret = wasm.__wbg_get_serializedinputnotedata_nullifier(this.__wbg_ptr);
19231
- deferred1_0 = ret[0];
19232
- deferred1_1 = ret[1];
19233
- return getStringFromWasm0(ret[0], ret[1]);
19234
- } finally {
19235
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
19386
+ const ret = wasm.__wbg_get_serializedinputnotedata_nullifier(this.__wbg_ptr);
19387
+ let v1;
19388
+ if (ret[0] !== 0) {
19389
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
19390
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
19236
19391
  }
19392
+ return v1;
19237
19393
  }
19238
19394
  /**
19239
19395
  * @returns {Uint8Array}
@@ -19345,11 +19501,11 @@ class SerializedInputNoteData {
19345
19501
  wasm.__wbg_set_serializedinputnotedata_noteScript(this.__wbg_ptr, ptr0, len0);
19346
19502
  }
19347
19503
  /**
19348
- * @param {string} arg0
19504
+ * @param {string | null} [arg0]
19349
19505
  */
19350
19506
  set nullifier(arg0) {
19351
- const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
19352
- const len0 = WASM_VECTOR_LEN;
19507
+ var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
19508
+ var len0 = WASM_VECTOR_LEN;
19353
19509
  wasm.__wbg_set_serializedinputnotedata_nullifier(this.__wbg_ptr, ptr0, len0);
19354
19510
  }
19355
19511
  /**
@@ -19410,6 +19566,21 @@ class SerializedOutputNoteData {
19410
19566
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
19411
19567
  return v1;
19412
19568
  }
19569
+ /**
19570
+ * @returns {string}
19571
+ */
19572
+ get detailsCommitment() {
19573
+ let deferred1_0;
19574
+ let deferred1_1;
19575
+ try {
19576
+ const ret = wasm.__wbg_get_serializedoutputnotedata_detailsCommitment(this.__wbg_ptr);
19577
+ deferred1_0 = ret[0];
19578
+ deferred1_1 = ret[1];
19579
+ return getStringFromWasm0(ret[0], ret[1]);
19580
+ } finally {
19581
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
19582
+ }
19583
+ }
19413
19584
  /**
19414
19585
  * @returns {number}
19415
19586
  */
@@ -19499,7 +19670,15 @@ class SerializedOutputNoteData {
19499
19670
  set attachments(arg0) {
19500
19671
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
19501
19672
  const len0 = WASM_VECTOR_LEN;
19502
- wasm.__wbg_set_serializedoutputnotedata_attachments(this.__wbg_ptr, ptr0, len0);
19673
+ wasm.__wbg_set_jsstatesyncupdate_partialBlockchainPeaks(this.__wbg_ptr, ptr0, len0);
19674
+ }
19675
+ /**
19676
+ * @param {string} arg0
19677
+ */
19678
+ set detailsCommitment(arg0) {
19679
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
19680
+ const len0 = WASM_VECTOR_LEN;
19681
+ wasm.__wbg_set_jsaccountupdate_storageRoot(this.__wbg_ptr, ptr0, len0);
19503
19682
  }
19504
19683
  /**
19505
19684
  * @param {number} arg0
@@ -19513,7 +19692,7 @@ class SerializedOutputNoteData {
19513
19692
  set metadata(arg0) {
19514
19693
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
19515
19694
  const len0 = WASM_VECTOR_LEN;
19516
- wasm.__wbg_set_jsstatesyncupdate_blockHasRelevantNotes(this.__wbg_ptr, ptr0, len0);
19695
+ wasm.__wbg_set_serializedoutputnotedata_metadata(this.__wbg_ptr, ptr0, len0);
19517
19696
  }
19518
19697
  /**
19519
19698
  * @param {Uint8Array} arg0
@@ -19529,7 +19708,7 @@ class SerializedOutputNoteData {
19529
19708
  set noteId(arg0) {
19530
19709
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
19531
19710
  const len0 = WASM_VECTOR_LEN;
19532
- wasm.__wbg_set_jsaccountupdate_storageRoot(this.__wbg_ptr, ptr0, len0);
19711
+ wasm.__wbg_set_jssettingmutation_key(this.__wbg_ptr, ptr0, len0);
19533
19712
  }
19534
19713
  /**
19535
19714
  * @param {string | null} [arg0]
@@ -19545,7 +19724,7 @@ class SerializedOutputNoteData {
19545
19724
  set recipientDigest(arg0) {
19546
19725
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
19547
19726
  const len0 = WASM_VECTOR_LEN;
19548
- wasm.__wbg_set_jsaccountupdate_vaultRoot(this.__wbg_ptr, ptr0, len0);
19727
+ wasm.__wbg_set_serializedoutputnotedata_recipientDigest(this.__wbg_ptr, ptr0, len0);
19549
19728
  }
19550
19729
  /**
19551
19730
  * @param {number} arg0
@@ -19671,7 +19850,7 @@ class SerializedTransactionData {
19671
19850
  set details(arg0) {
19672
19851
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
19673
19852
  const len0 = WASM_VECTOR_LEN;
19674
- wasm.__wbg_set_serializedoutputnotedata_noteAssets(this.__wbg_ptr, ptr0, len0);
19853
+ wasm.__wbg_set_serializedtransactiondata_details(this.__wbg_ptr, ptr0, len0);
19675
19854
  }
19676
19855
  /**
19677
19856
  * @param {string} arg0
@@ -19701,7 +19880,7 @@ class SerializedTransactionData {
19701
19880
  set status(arg0) {
19702
19881
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
19703
19882
  const len0 = WASM_VECTOR_LEN;
19704
- wasm.__wbg_set_serializedoutputnotedata_attachments(this.__wbg_ptr, ptr0, len0);
19883
+ wasm.__wbg_set_serializedoutputnotedata_noteAssets(this.__wbg_ptr, ptr0, len0);
19705
19884
  }
19706
19885
  /**
19707
19886
  * @param {Uint8Array | null} [arg0]
@@ -20171,7 +20350,7 @@ class StorageMapEntry {
20171
20350
  set key(arg0) {
20172
20351
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
20173
20352
  const len0 = WASM_VECTOR_LEN;
20174
- wasm.__wbg_set_jsstoragemapentry_key(this.__wbg_ptr, ptr0, len0);
20353
+ wasm.__wbg_set_jssettingmutation_key(this.__wbg_ptr, ptr0, len0);
20175
20354
  }
20176
20355
  /**
20177
20356
  * @param {string} arg0
@@ -22408,14 +22587,13 @@ class WebClient {
22408
22587
  }
22409
22588
  /**
22410
22589
  * @param {Uint8Array} init_seed
22411
- * @param {boolean} mutable
22412
22590
  * @param {AuthScheme} auth_scheme
22413
22591
  * @returns {Promise<Account>}
22414
22592
  */
22415
- importPublicAccountFromSeed(init_seed, mutable, auth_scheme) {
22593
+ importPublicAccountFromSeed(init_seed, auth_scheme) {
22416
22594
  const ptr0 = passArray8ToWasm0(init_seed, wasm.__wbindgen_malloc);
22417
22595
  const len0 = WASM_VECTOR_LEN;
22418
- const ret = wasm.webclient_importPublicAccountFromSeed(this.__wbg_ptr, ptr0, len0, mutable, auth_scheme);
22596
+ const ret = wasm.webclient_importPublicAccountFromSeed(this.__wbg_ptr, ptr0, len0, auth_scheme);
22419
22597
  return ret;
22420
22598
  }
22421
22599
  /**
@@ -22650,16 +22828,15 @@ class WebClient {
22650
22828
  }
22651
22829
  /**
22652
22830
  * @param {AccountStorageMode} storage_mode
22653
- * @param {boolean} mutable
22654
22831
  * @param {AuthScheme} auth_scheme
22655
22832
  * @param {Uint8Array | null} [init_seed]
22656
22833
  * @returns {Promise<Account>}
22657
22834
  */
22658
- newWallet(storage_mode, mutable, auth_scheme, init_seed) {
22835
+ newWallet(storage_mode, auth_scheme, init_seed) {
22659
22836
  _assertClass(storage_mode, AccountStorageMode);
22660
22837
  var ptr0 = isLikeNone(init_seed) ? 0 : passArray8ToWasm0(init_seed, wasm.__wbindgen_malloc);
22661
22838
  var len0 = WASM_VECTOR_LEN;
22662
- const ret = wasm.webclient_newWallet(this.__wbg_ptr, storage_mode.__wbg_ptr, mutable, auth_scheme, ptr0, len0);
22839
+ const ret = wasm.webclient_newWallet(this.__wbg_ptr, storage_mode.__wbg_ptr, auth_scheme, ptr0, len0);
22663
22840
  return ret;
22664
22841
  }
22665
22842
  /**
@@ -23308,7 +23485,7 @@ function __wbg_get_imports() {
23308
23485
  const ret = AccountStorage.__wrap(arg0);
23309
23486
  return ret;
23310
23487
  },
23311
- __wbg_addNoteTag_40dad1e41d8a6415: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
23488
+ __wbg_addNoteTag_f0737cd654a0af83: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
23312
23489
  var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
23313
23490
  wasm.__wbindgen_free(arg2, arg3 * 1, 1);
23314
23491
  let v1;
@@ -23321,7 +23498,12 @@ function __wbg_get_imports() {
23321
23498
  v2 = getStringFromWasm0(arg6, arg7).slice();
23322
23499
  wasm.__wbindgen_free(arg6, arg7 * 1, 1);
23323
23500
  }
23324
- const ret = addNoteTag(getStringFromWasm0(arg0, arg1), v0, v1, v2);
23501
+ let v3;
23502
+ if (arg8 !== 0) {
23503
+ v3 = getStringFromWasm0(arg8, arg9).slice();
23504
+ wasm.__wbindgen_free(arg8, arg9 * 1, 1);
23505
+ }
23506
+ const ret = addNoteTag(getStringFromWasm0(arg0, arg1), v0, v1, v2, v3);
23325
23507
  return ret;
23326
23508
  },
23327
23509
  __wbg_address_new: function(arg0) {
@@ -23335,6 +23517,12 @@ function __wbg_get_imports() {
23335
23517
  const ret = applyFullAccountState(getStringFromWasm0(arg0, arg1), JsAccountUpdate.__wrap(arg2));
23336
23518
  return ret;
23337
23519
  },
23520
+ __wbg_applySettingsMutations_633bdfc5efcbeab4: function(arg0, arg1, arg2, arg3) {
23521
+ var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
23522
+ wasm.__wbindgen_free(arg2, arg3 * 4, 4);
23523
+ const ret = applySettingsMutations(getStringFromWasm0(arg0, arg1), v0);
23524
+ return ret;
23525
+ },
23338
23526
  __wbg_applyStateSync_4577b4125b70be6e: function(arg0, arg1, arg2) {
23339
23527
  const ret = applyStateSync(getStringFromWasm0(arg0, arg1), JsStateSyncUpdate.__wrap(arg2));
23340
23528
  return ret;
@@ -23680,6 +23868,12 @@ function __wbg_get_imports() {
23680
23868
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
23681
23869
  }
23682
23870
  },
23871
+ __wbg_getInputNotesFromDetailsCommitments_c7c58c64df846c95: function(arg0, arg1, arg2, arg3) {
23872
+ var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
23873
+ wasm.__wbindgen_free(arg2, arg3 * 4, 4);
23874
+ const ret = getInputNotesFromDetailsCommitments(getStringFromWasm0(arg0, arg1), v0);
23875
+ return ret;
23876
+ },
23683
23877
  __wbg_getInputNotesFromIds_c19092f0da179fdf: function(arg0, arg1, arg2, arg3) {
23684
23878
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
23685
23879
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
@@ -23726,6 +23920,12 @@ function __wbg_get_imports() {
23726
23920
  const ret = getNoteTags(getStringFromWasm0(arg0, arg1));
23727
23921
  return ret;
23728
23922
  },
23923
+ __wbg_getOutputNotesFromDetailsCommitments_2b6cb89aa5ad7bd7: function(arg0, arg1, arg2, arg3) {
23924
+ var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
23925
+ wasm.__wbindgen_free(arg2, arg3 * 4, 4);
23926
+ const ret = getOutputNotesFromDetailsCommitments(getStringFromWasm0(arg0, arg1), v0);
23927
+ return ret;
23928
+ },
23729
23929
  __wbg_getOutputNotesFromIds_1cfcb787c56927d6: function(arg0, arg1, arg2, arg3) {
23730
23930
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
23731
23931
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
@@ -23994,6 +24194,10 @@ function __wbg_get_imports() {
23994
24194
  const ret = JsAccountUpdate.__unwrap(arg0);
23995
24195
  return ret;
23996
24196
  },
24197
+ __wbg_jssettingmutation_new: function(arg0) {
24198
+ const ret = JsSettingMutation.__wrap(arg0);
24199
+ return ret;
24200
+ },
23997
24201
  __wbg_jsstoragemapentry_new: function(arg0) {
23998
24202
  const ret = JsStorageMapEntry.__wrap(arg0);
23999
24203
  return ret;
@@ -24329,7 +24533,7 @@ function __wbg_get_imports() {
24329
24533
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24330
24534
  }
24331
24535
  },
24332
- __wbg_removeNoteTag_77e6e3497d921600: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
24536
+ __wbg_removeNoteTag_d9a0f5ba38c25246: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
24333
24537
  var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
24334
24538
  wasm.__wbindgen_free(arg2, arg3 * 1, 1);
24335
24539
  let v1;
@@ -24342,7 +24546,12 @@ function __wbg_get_imports() {
24342
24546
  v2 = getStringFromWasm0(arg6, arg7).slice();
24343
24547
  wasm.__wbindgen_free(arg6, arg7 * 1, 1);
24344
24548
  }
24345
- const ret = removeNoteTag(getStringFromWasm0(arg0, arg1), v0, v1, v2);
24549
+ let v3;
24550
+ if (arg8 !== 0) {
24551
+ v3 = getStringFromWasm0(arg8, arg9).slice();
24552
+ wasm.__wbindgen_free(arg8, arg9 * 1, 1);
24553
+ }
24554
+ const ret = removeNoteTag(getStringFromWasm0(arg0, arg1), v0, v1, v2, v3);
24346
24555
  return ret;
24347
24556
  },
24348
24557
  __wbg_removeSetting_39da4a2d256af0e2: function(arg0, arg1, arg2, arg3) {
@@ -24565,7 +24774,7 @@ function __wbg_get_imports() {
24565
24774
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24566
24775
  }
24567
24776
  },
24568
- __wbg_upsertAccountRecord_3fb1a14436632f21: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16) {
24777
+ __wbg_upsertAccountRecord_96a74a90d1ab5ddf: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17) {
24569
24778
  let deferred0_0;
24570
24779
  let deferred0_1;
24571
24780
  let deferred1_0;
@@ -24596,7 +24805,7 @@ function __wbg_get_imports() {
24596
24805
  v6 = getArrayU8FromWasm0(arg15, arg16).slice();
24597
24806
  wasm.__wbindgen_free(arg15, arg16 * 1, 1);
24598
24807
  }
24599
- 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);
24808
+ 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);
24600
24809
  return ret;
24601
24810
  } finally {
24602
24811
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
@@ -24640,13 +24849,11 @@ function __wbg_get_imports() {
24640
24849
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
24641
24850
  }
24642
24851
  },
24643
- __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) {
24852
+ __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) {
24644
24853
  let deferred0_0;
24645
24854
  let deferred0_1;
24646
24855
  let deferred6_0;
24647
24856
  let deferred6_1;
24648
- let deferred8_0;
24649
- let deferred8_1;
24650
24857
  let deferred9_0;
24651
24858
  let deferred9_1;
24652
24859
  try {
@@ -24669,8 +24876,11 @@ function __wbg_get_imports() {
24669
24876
  deferred6_1 = arg15;
24670
24877
  var v7 = getArrayU8FromWasm0(arg16, arg17).slice();
24671
24878
  wasm.__wbindgen_free(arg16, arg17 * 1, 1);
24672
- deferred8_0 = arg18;
24673
- deferred8_1 = arg19;
24879
+ let v8;
24880
+ if (arg18 !== 0) {
24881
+ v8 = getStringFromWasm0(arg18, arg19).slice();
24882
+ wasm.__wbindgen_free(arg18, arg19 * 1, 1);
24883
+ }
24674
24884
  deferred9_0 = arg20;
24675
24885
  deferred9_1 = arg21;
24676
24886
  var v10 = getArrayU8FromWasm0(arg23, arg24).slice();
@@ -24680,12 +24890,11 @@ function __wbg_get_imports() {
24680
24890
  v11 = getStringFromWasm0(arg27, arg28).slice();
24681
24891
  wasm.__wbindgen_free(arg27, arg28 * 1, 1);
24682
24892
  }
24683
- 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);
24893
+ 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);
24684
24894
  return ret;
24685
24895
  } finally {
24686
24896
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24687
24897
  wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
24688
- wasm.__wbindgen_free(deferred8_0, deferred8_1, 1);
24689
24898
  wasm.__wbindgen_free(deferred9_0, deferred9_1, 1);
24690
24899
  }
24691
24900
  },
@@ -24703,34 +24912,39 @@ function __wbg_get_imports() {
24703
24912
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24704
24913
  }
24705
24914
  },
24706
- __wbg_upsertOutputNote_086a8c1c81f11d3c: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17) {
24915
+ __wbg_upsertOutputNote_4d029c88a0e7d960: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19) {
24707
24916
  let deferred0_0;
24708
24917
  let deferred0_1;
24709
- let deferred3_0;
24710
- let deferred3_1;
24918
+ let deferred1_0;
24919
+ let deferred1_1;
24920
+ let deferred4_0;
24921
+ let deferred4_1;
24711
24922
  try {
24712
24923
  deferred0_0 = arg2;
24713
24924
  deferred0_1 = arg3;
24714
- var v1 = getArrayU8FromWasm0(arg4, arg5).slice();
24715
- wasm.__wbindgen_free(arg4, arg5 * 1, 1);
24925
+ deferred1_0 = arg4;
24926
+ deferred1_1 = arg5;
24716
24927
  var v2 = getArrayU8FromWasm0(arg6, arg7).slice();
24717
24928
  wasm.__wbindgen_free(arg6, arg7 * 1, 1);
24718
- deferred3_0 = arg8;
24719
- deferred3_1 = arg9;
24720
- var v4 = getArrayU8FromWasm0(arg10, arg11).slice();
24721
- wasm.__wbindgen_free(arg10, arg11 * 1, 1);
24722
- let v5;
24723
- if (arg12 !== 0) {
24724
- v5 = getStringFromWasm0(arg12, arg13).slice();
24725
- wasm.__wbindgen_free(arg12, arg13 * 1, 1);
24929
+ var v3 = getArrayU8FromWasm0(arg8, arg9).slice();
24930
+ wasm.__wbindgen_free(arg8, arg9 * 1, 1);
24931
+ deferred4_0 = arg10;
24932
+ deferred4_1 = arg11;
24933
+ var v5 = getArrayU8FromWasm0(arg12, arg13).slice();
24934
+ wasm.__wbindgen_free(arg12, arg13 * 1, 1);
24935
+ let v6;
24936
+ if (arg14 !== 0) {
24937
+ v6 = getStringFromWasm0(arg14, arg15).slice();
24938
+ wasm.__wbindgen_free(arg14, arg15 * 1, 1);
24726
24939
  }
24727
- var v6 = getArrayU8FromWasm0(arg16, arg17).slice();
24728
- wasm.__wbindgen_free(arg16, arg17 * 1, 1);
24729
- const ret = upsertOutputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), v1, v2, getStringFromWasm0(arg8, arg9), v4, v5, arg14 >>> 0, arg15, v6);
24940
+ var v7 = getArrayU8FromWasm0(arg18, arg19).slice();
24941
+ wasm.__wbindgen_free(arg18, arg19 * 1, 1);
24942
+ const ret = upsertOutputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), v2, v3, getStringFromWasm0(arg10, arg11), v5, v6, arg16 >>> 0, arg17, v7);
24730
24943
  return ret;
24731
24944
  } finally {
24732
24945
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24733
- wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
24946
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
24947
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
24734
24948
  }
24735
24949
  },
24736
24950
  __wbg_upsertStorageMapEntries_068d8303824fff58: function(arg0, arg1, arg2, arg3, arg4, arg5) {
@@ -24799,12 +25013,12 @@ function __wbg_get_imports() {
24799
25013
  return ret;
24800
25014
  },
24801
25015
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
24802
- // Cast intrinsic for `Closure(Closure { dtor_idx: 441, function: Function { arguments: [Externref], shim_idx: 793, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
25016
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 427, function: Function { arguments: [Externref], shim_idx: 793, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
24803
25017
  const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3f095fc116138c37, wasm_bindgen__convert__closures_____invoke__h5b85ca27a15b53fc);
24804
25018
  return ret;
24805
25019
  },
24806
25020
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
24807
- // Cast intrinsic for `Closure(Closure { dtor_idx: 441, function: Function { arguments: [], shim_idx: 442, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
25021
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 427, function: Function { arguments: [], shim_idx: 428, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
24808
25022
  const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3f095fc116138c37, wasm_bindgen__convert__closures_____invoke__h8c482c344300c6d3);
24809
25023
  return ret;
24810
25024
  },
@@ -25094,6 +25308,9 @@ const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undef
25094
25308
  const JsAccountUpdateFinalization = (typeof FinalizationRegistry === 'undefined')
25095
25309
  ? { register: () => {}, unregister: () => {} }
25096
25310
  : new FinalizationRegistry(ptr => wasm.__wbg_jsaccountupdate_free(ptr >>> 0, 1));
25311
+ const JsSettingMutationFinalization = (typeof FinalizationRegistry === 'undefined')
25312
+ ? { register: () => {}, unregister: () => {} }
25313
+ : new FinalizationRegistry(ptr => wasm.__wbg_jssettingmutation_free(ptr >>> 0, 1));
25097
25314
  const JsStateSyncUpdateFinalization = (typeof FinalizationRegistry === 'undefined')
25098
25315
  ? { register: () => {}, unregister: () => {} }
25099
25316
  : new FinalizationRegistry(ptr => wasm.__wbg_jsstatesyncupdate_free(ptr >>> 0, 1));
@@ -25726,5 +25943,5 @@ async function __wbg_init(module_or_path) {
25726
25943
  }
25727
25944
 
25728
25945
  const module$1 = new URL("assets/miden_client_web.wasm", import.meta.url);
25729
- export { Account, AccountArray, AccountBuilder, AccountBuilderResult, AccountCode, AccountComponent, AccountComponentCode, AccountDelta, AccountFile, AccountHeader, AccountId, AccountIdArray, AccountInterface, AccountProof, AccountReader, AccountStatus, AccountStorage, AccountStorageDelta, AccountStorageMode, AccountStorageRequirements, AccountType, AccountVaultDelta, Address, AdviceInputs, AdviceMap, AssetVault, AuthFalcon512RpoMultisigConfig, AuthScheme, AuthSecretKey, BasicFungibleFaucetComponent, BlockHeader, CodeBuilder, CommittedNote, ConsumableNoteRecord, Endpoint, ExecutedTransaction, Felt, FeltArray, FetchedAccount, FetchedNote, FlattenedU8Vec, ForeignAccount, ForeignAccountArray, FungibleAsset, FungibleAssetDelta, FungibleAssetDeltaItem, GetProceduresResultItem, InputNote, InputNoteRecord, InputNoteState, InputNotes, IntoUnderlyingByteSource, IntoUnderlyingSink, IntoUnderlyingSource, JsAccountUpdate, JsStateSyncUpdate, JsStorageMapEntry, JsStorageSlot, JsVaultAsset, Library, MerklePath, NetworkId, NetworkNoteStatusInfo, NetworkType, Note, NoteAndArgs, NoteAndArgsArray, NoteArray, NoteAssets, NoteAttachment, NoteAttachmentScheme, NoteConsumability, NoteConsumptionStatus, NoteDetails, NoteDetailsAndTag, NoteDetailsAndTagArray, NoteExecutionHint, NoteExportFormat, NoteFile, NoteFilter, NoteFilterTypes, NoteHeader, NoteId, NoteIdAndArgs, NoteIdAndArgsArray, NoteInclusionProof, NoteLocation, NoteMetadata, NoteRecipient, NoteRecipientArray, NoteScript, NoteStorage, NoteSyncBlock, NoteSyncInfo, NoteTag, NoteType, OutputNote, OutputNoteArray, OutputNoteRecord, OutputNoteState, OutputNotes, Package, PartialNote, Poseidon2, ProcedureThreshold, Program, ProvenTransaction, PublicKey, RpcClient, Rpo256, SerializedInputNoteData, SerializedOutputNoteData, SerializedTransactionData, Signature, SigningInputs, SigningInputsType, SlotAndKeys, SparseMerklePath, StorageMap, StorageMapEntry, StorageMapEntryJs, StorageMapInfo, StorageMapUpdate, StorageSlot, StorageSlotArray, SyncSummary, TestUtils, TokenSymbol, TransactionArgs, TransactionFilter, TransactionId, TransactionProver, TransactionRecord, TransactionRequest, TransactionRequestBuilder, TransactionResult, TransactionScript, TransactionScriptInputPair, TransactionScriptInputPairArray, TransactionStatus, TransactionStoreUpdate, TransactionSummary, WebClient, WebKeystoreApi, Word, createAuthFalcon512RpoMultisig, exportStore2 as exportStore, importStore, initSync, sequentialSumBench, setupLogging , __wbg_init, module$1 as __wasm_url };
25730
- //# sourceMappingURL=Cargo-OZMlHpic.js.map
25946
+ export { Account, AccountArray, AccountBuilder, AccountBuilderResult, AccountCode, AccountComponent, AccountComponentCode, AccountDelta, AccountFile, AccountHeader, AccountId, AccountIdArray, AccountInterface, AccountProof, AccountReader, AccountStatus, AccountStorage, AccountStorageDelta, AccountStorageMode, AccountStorageRequirements, AccountType, AccountVaultDelta, Address, AdviceInputs, AdviceMap, AssetVault, AuthFalcon512RpoMultisigConfig, AuthScheme, AuthSecretKey, BasicFungibleFaucetComponent, BlockHeader, CodeBuilder, CommittedNote, ConsumableNoteRecord, Endpoint, ExecutedTransaction, Felt, FeltArray, FetchedAccount, FetchedNote, FlattenedU8Vec, ForeignAccount, ForeignAccountArray, FungibleAsset, FungibleAssetDelta, FungibleAssetDeltaItem, GetProceduresResultItem, InputNote, InputNoteRecord, InputNoteState, InputNotes, IntoUnderlyingByteSource, IntoUnderlyingSink, IntoUnderlyingSource, JsAccountUpdate, JsSettingMutation, JsStateSyncUpdate, JsStorageMapEntry, JsStorageSlot, JsVaultAsset, Library, MerklePath, NetworkId, NetworkNoteStatusInfo, NetworkType, Note, NoteAndArgs, NoteAndArgsArray, NoteArray, NoteAssets, NoteAttachment, NoteAttachmentScheme, NoteConsumability, NoteConsumptionStatus, NoteDetails, NoteDetailsAndTag, NoteDetailsAndTagArray, NoteExecutionHint, NoteExportFormat, NoteFile, NoteFilter, NoteFilterTypes, NoteHeader, NoteId, NoteIdAndArgs, NoteIdAndArgsArray, NoteInclusionProof, NoteLocation, NoteMetadata, NoteRecipient, NoteRecipientArray, NoteScript, NoteStorage, NoteSyncBlock, NoteSyncInfo, NoteTag, NoteType, OutputNote, OutputNoteArray, OutputNoteRecord, OutputNoteState, OutputNotes, Package, PartialNote, Poseidon2, ProcedureThreshold, Program, ProvenTransaction, PublicKey, RpcClient, Rpo256, SerializedInputNoteData, SerializedOutputNoteData, SerializedTransactionData, Signature, SigningInputs, SigningInputsType, SlotAndKeys, SparseMerklePath, StorageMap, StorageMapEntry, StorageMapEntryJs, StorageMapInfo, StorageMapUpdate, StorageSlot, StorageSlotArray, SyncSummary, TestUtils, TokenSymbol, TransactionArgs, TransactionFilter, TransactionId, TransactionProver, TransactionRecord, TransactionRequest, TransactionRequestBuilder, TransactionResult, TransactionScript, TransactionScriptInputPair, TransactionScriptInputPairArray, TransactionStatus, TransactionStoreUpdate, TransactionSummary, WebClient, WebKeystoreApi, Word, createAuthFalcon512RpoMultisig, exportStore2 as exportStore, importStore, initSync, sequentialSumBench, setupLogging , __wbg_init, module$1 as __wasm_url };
25947
+ //# sourceMappingURL=Cargo-qHCIdWdN.js.map