@miden-sdk/miden-sdk 0.15.0-alpha.4 → 0.15.0-alpha.5

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 (59) hide show
  1. package/README.md +139 -9
  2. package/dist/mt/Cargo-smJQCGjz.js +26146 -0
  3. package/dist/mt/Cargo-smJQCGjz.js.map +1 -0
  4. package/dist/{api-types.d.ts → mt/api-types.d.ts} +154 -4
  5. package/dist/mt/assets/miden_client_web.wasm +0 -0
  6. package/dist/mt/crates/miden_client_web.d.ts +4791 -0
  7. package/dist/mt/eager.js +38 -0
  8. package/dist/mt/eager.js.map +1 -0
  9. package/dist/{index.d.ts → mt/index.d.ts} +4 -2
  10. package/dist/mt/index.js +3778 -0
  11. package/dist/mt/index.js.map +1 -0
  12. package/dist/{wasm.js → mt/wasm.js} +1 -1
  13. package/dist/mt/wasm.js.map +1 -0
  14. package/dist/mt/workerHelpers.js +28 -0
  15. package/dist/mt/workers/Cargo-smJQCGjz-q4GYXDiD.js +26147 -0
  16. package/dist/mt/workers/Cargo-smJQCGjz-q4GYXDiD.js.map +1 -0
  17. package/dist/mt/workers/assets/miden_client_web.wasm +0 -0
  18. package/dist/mt/workers/web-client-methods-worker.js +26885 -0
  19. package/dist/mt/workers/web-client-methods-worker.js.map +1 -0
  20. package/dist/{workers → mt/workers}/web-client-methods-worker.module.js +17 -1
  21. package/dist/mt/workers/web-client-methods-worker.module.js.map +1 -0
  22. package/dist/mt/workers/workerHelpers.js +28 -0
  23. package/dist/{Cargo-CVlXCH_2.js → st/Cargo-CG4XszZo.js} +698 -495
  24. package/dist/st/Cargo-CG4XszZo.js.map +1 -0
  25. package/dist/st/api-types.d.ts +1140 -0
  26. package/dist/{workers → st}/assets/miden_client_web.wasm +0 -0
  27. package/dist/{crates → st/crates}/miden_client_web.d.ts +342 -196
  28. package/dist/st/docs-entry.d.ts +38 -0
  29. package/dist/{eager.js → st/eager.js} +1 -1
  30. package/dist/st/eager.js.map +1 -0
  31. package/dist/st/index.d.ts +182 -0
  32. package/dist/{index.js → st/index.js} +425 -19
  33. package/dist/st/index.js.map +1 -0
  34. package/dist/st/wasm.js +23 -0
  35. package/dist/st/wasm.js.map +1 -0
  36. package/dist/{workers/Cargo-CVlXCH_2-CWA-5vlh.js → st/workers/Cargo-CG4XszZo-S7EHAZSa.js} +698 -495
  37. package/dist/st/workers/Cargo-CG4XszZo-S7EHAZSa.js.map +1 -0
  38. package/dist/{assets → st/workers/assets}/miden_client_web.wasm +0 -0
  39. package/dist/{workers → st/workers}/web-client-methods-worker.js +715 -496
  40. package/dist/st/workers/web-client-methods-worker.js.map +1 -0
  41. package/dist/st/workers/web-client-methods-worker.module.js +575 -0
  42. package/dist/st/workers/web-client-methods-worker.module.js.map +1 -0
  43. package/js/client.js +166 -2
  44. package/js/node/napi-compat.js +15 -0
  45. package/js/node-index.js +0 -1
  46. package/js/resources/accounts.js +4 -6
  47. package/js/resources/transactions.js +134 -0
  48. package/lazy/package.json +2 -2
  49. package/mt/lazy/package.json +4 -0
  50. package/mt/package.json +4 -0
  51. package/package.json +30 -15
  52. package/dist/Cargo-CVlXCH_2.js.map +0 -1
  53. package/dist/eager.js.map +0 -1
  54. package/dist/index.js.map +0 -1
  55. package/dist/wasm.js.map +0 -1
  56. package/dist/workers/Cargo-CVlXCH_2-CWA-5vlh.js.map +0 -1
  57. package/dist/workers/web-client-methods-worker.js.map +0 -1
  58. package/dist/workers/web-client-methods-worker.module.js.map +0 -1
  59. /package/dist/{docs-entry.d.ts → mt/docs-entry.d.ts} +0 -0
@@ -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 CargoCVlXCH_2; });
8
+ wasmModule = await Promise.resolve().then(function () { return CargoCG4XszZo; });
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
@@ -23,6 +23,7 @@ async function loadWasm() {
23
23
  const WorkerAction = Object.freeze({
24
24
  INIT: "init",
25
25
  INIT_MOCK: "initMock",
26
+ INIT_THREAD_POOL: "initThreadPool",
26
27
  CALL_METHOD: "callMethod",
27
28
  EXECUTE_CALLBACK: "executeCallback",
28
29
  });
@@ -437,6 +438,7 @@ async function processMessage(event) {
437
438
  hasInsertKeyCb,
438
439
  hasSignCb,
439
440
  logLevel,
441
+ numThreads,
440
442
  ] = args;
441
443
  const wasm = await getWasmOrThrow();
442
444
 
@@ -444,6 +446,20 @@ async function processMessage(event) {
444
446
  wasm.setupLogging(logLevel);
445
447
  }
446
448
 
449
+ // Initialize rayon's thread pool inside THIS worker's WASM instance.
450
+ // The SDK runs every prove call here (NOT on the main thread), so a
451
+ // pool initialized only in main-thread WASM does not parallelize the
452
+ // prove. Without this, par_iter()/par_chunks() in miden-crypto +
453
+ // p3-maybe-rayon return rayon::current_num_threads() == 1 and fall
454
+ // through to sequential code despite the parallel features being on.
455
+ if (
456
+ numThreads &&
457
+ numThreads > 1 &&
458
+ typeof wasm.initThreadPool === "function"
459
+ ) {
460
+ await wasm.initThreadPool(numThreads);
461
+ }
462
+
447
463
  wasmWebClient = new wasm.WebClient();
448
464
 
449
465
  // Check if any callbacks are provided
@@ -8840,7 +8856,7 @@ const V1_STORES = {
8840
8856
  [Table.Addresses]: indexes("address", "id"),
8841
8857
  [Table.Transactions]: indexes("id", "statusVariant"),
8842
8858
  [Table.TransactionScripts]: indexes("scriptRoot"),
8843
- [Table.InputNotes]: indexes("noteId", "nullifier", "stateDiscriminant", "[consumedBlockHeight+consumedTxOrder+noteId]"),
8859
+ [Table.InputNotes]: indexes("detailsCommitment", "noteId", "nullifier", "stateDiscriminant", "[consumedBlockHeight+consumedTxOrder+noteId]"),
8844
8860
  [Table.OutputNotes]: indexes("noteId", "recipientDigest", "stateDiscriminant", "nullifier"),
8845
8861
  [Table.NotesScripts]: indexes("scriptRoot"),
8846
8862
  [Table.StateSync]: indexes("id"),
@@ -10032,13 +10048,12 @@ async function getAccountIdByKeyCommitment(dbId, pubKeyCommitmentHex) {
10032
10048
  }
10033
10049
  }
10034
10050
 
10035
- async function insertBlockHeader(dbId, blockNum, header, partialBlockchainPeaks, hasClientNotes) {
10051
+ async function insertBlockHeader(dbId, blockNum, header, hasClientNotes) {
10036
10052
  try {
10037
10053
  const db = getDatabase(dbId);
10038
10054
  const data = {
10039
10055
  blockNum: blockNum,
10040
10056
  header,
10041
- partialBlockchainPeaks,
10042
10057
  hasClientNotes: hasClientNotes.toString(),
10043
10058
  };
10044
10059
  // Mirror SQLite's `insert_block_header_tx`: do an INSERT OR IGNORE on the
@@ -10046,12 +10061,8 @@ async function insertBlockHeader(dbId, blockNum, header, partialBlockchainPeaks,
10046
10061
  // says so. Two callers hit this:
10047
10062
  // - Genesis flow — no existing row; the add succeeds.
10048
10063
  // - `get_and_store_authenticated_block` for a past block — a row
10049
- // written by `applyStateSync` typically already exists. Overwriting
10050
- // it would clobber the correct historical peaks (popcount ==
10051
- // block_num) with peaks from the caller's current `PartialMmr`
10052
- // forest (popcount == current sync height). Later reads of those
10053
- // peaks trip `MmrPeaks::new`'s InvalidPeaks validation and wedge
10054
- // sync for the rest of the session.
10064
+ // written by `applyStateSync` typically already exists. We keep that
10065
+ // row untouched.
10055
10066
  //
10056
10067
  // The `has_client_notes` upgrade is load-bearing: `get_tracked_block_
10057
10068
  // header_numbers` filters by this flag to seed `tracked_leaves`, which
@@ -10104,11 +10115,9 @@ async function getBlockHeaders(dbId, blockNumbers) {
10104
10115
  }
10105
10116
  else {
10106
10117
  const headerBase64 = uint8ArrayToBase64(result.header);
10107
- const partialBlockchainPeaksBase64 = uint8ArrayToBase64(result.partialBlockchainPeaks);
10108
10118
  return {
10109
10119
  blockNum: result.blockNum,
10110
10120
  header: headerBase64,
10111
- partialBlockchainPeaks: partialBlockchainPeaksBase64,
10112
10121
  hasClientNotes: result.hasClientNotes === "true",
10113
10122
  };
10114
10123
  }
@@ -10128,11 +10137,9 @@ async function getTrackedBlockHeaders(dbId) {
10128
10137
  .toArray();
10129
10138
  const processedRecords = await Promise.all(allMatchingRecords.map((record) => {
10130
10139
  const headerBase64 = uint8ArrayToBase64(record.header);
10131
- const partialBlockchainPeaksBase64 = uint8ArrayToBase64(record.partialBlockchainPeaks);
10132
10140
  return {
10133
10141
  blockNum: record.blockNum,
10134
10142
  header: headerBase64,
10135
- partialBlockchainPeaks: partialBlockchainPeaksBase64,
10136
10143
  hasClientNotes: record.hasClientNotes === "true",
10137
10144
  };
10138
10145
  }));
@@ -10155,22 +10162,31 @@ async function getTrackedBlockHeaderNumbers(dbId) {
10155
10162
  logWebStoreError(err, "Failed to get tracked block header numbers");
10156
10163
  }
10157
10164
  }
10158
- async function getPartialBlockchainPeaksByBlockNum(dbId, blockNum) {
10165
+ /**
10166
+ * Returns the blockchain peaks at the current sync height. Peaks live on the
10167
+ * `blockHeaders` row at `stateSync.blockNum` — the block that was the chain
10168
+ * tip when its sync ran. Returns `{ blockNum, peaks: undefined }` if the
10169
+ * stateSync row is missing or if that block was inserted via backfill
10170
+ * (which leaves `partialBlockchainPeaks` unset).
10171
+ */
10172
+ async function getCurrentBlockchainPeaks(dbId) {
10159
10173
  try {
10160
10174
  const db = getDatabase(dbId);
10161
- const blockHeader = await db.blockHeaders.get(blockNum);
10162
- if (blockHeader == undefined) {
10163
- return {
10164
- peaks: undefined,
10165
- };
10175
+ const stateSyncRow = await db.stateSync.get(1);
10176
+ if (stateSyncRow == undefined) {
10177
+ return { blockNum: 0, peaks: undefined };
10178
+ }
10179
+ const header = await db.blockHeaders.get(stateSyncRow.blockNum);
10180
+ if (header == undefined || header.partialBlockchainPeaks == undefined) {
10181
+ return { blockNum: stateSyncRow.blockNum, peaks: undefined };
10166
10182
  }
10167
- const partialBlockchainPeaksBase64 = uint8ArrayToBase64(blockHeader.partialBlockchainPeaks);
10168
10183
  return {
10169
- peaks: partialBlockchainPeaksBase64,
10184
+ blockNum: stateSyncRow.blockNum,
10185
+ peaks: uint8ArrayToBase64(header.partialBlockchainPeaks),
10170
10186
  };
10171
10187
  }
10172
10188
  catch (err) {
10173
- logWebStoreError(err, "Failed to get partial blockchain peaks");
10189
+ logWebStoreError(err, "Failed to get current blockchain peaks");
10174
10190
  }
10175
10191
  }
10176
10192
  async function getPartialBlockchainNodesAll(dbId) {
@@ -10488,13 +10504,20 @@ async function getNoteScript(dbId, scriptRoot) {
10488
10504
  logWebStoreError(err, "Failed to get note script from root");
10489
10505
  }
10490
10506
  }
10491
- async function upsertInputNote(dbId, noteId, assets, serialNumber, inputs, scriptRoot, serializedNoteScript, nullifier, serializedCreatedAt, stateDiscriminant, state, consumedBlockHeight, consumedTxOrder, consumerAccountId, tx) {
10507
+ async function upsertInputNote(dbId, detailsCommitment, noteId, assets, attachments, serialNumber, inputs, scriptRoot, serializedNoteScript, nullifier, serializedCreatedAt, stateDiscriminant, state, consumedBlockHeight, consumedTxOrder, consumerAccountId, tx) {
10492
10508
  const db = getDatabase(dbId);
10493
10509
  const doWork = async (t) => {
10494
10510
  try {
10495
10511
  const data = {
10496
- noteId,
10512
+ // The details commitment is the primary key. It is always present, even
10513
+ // for partial notes lacking a noteId, so a partial note that later gains
10514
+ // its noteId updates the same row instead of inserting a duplicate.
10515
+ detailsCommitment,
10516
+ // Convert null -> undefined so Dexie omits the noteId secondary index
10517
+ // for partial notes that don't have one yet.
10518
+ noteId: noteId ?? undefined,
10497
10519
  assets,
10520
+ attachments,
10498
10521
  serialNumber,
10499
10522
  inputs,
10500
10523
  scriptRoot,
@@ -10517,7 +10540,7 @@ async function upsertInputNote(dbId, noteId, assets, serialNumber, inputs, scrip
10517
10540
  /* v8 ignore next 3 — requires a mid-transaction Dexie write failure, not modelable with fake-indexeddb */
10518
10541
  }
10519
10542
  catch (error) {
10520
- logWebStoreError(error, `Error inserting note: ${noteId}`);
10543
+ logWebStoreError(error, `Error inserting note: ${detailsCommitment}`);
10521
10544
  }
10522
10545
  };
10523
10546
  return db.dexie.transaction("rw", db.inputNotes, db.notesScripts, doWork);
@@ -10580,13 +10603,14 @@ async function getInputNoteByOffset(dbId, states, consumerAccountId, blockStart,
10580
10603
  logWebStoreError(err, "Failed to get input note by offset");
10581
10604
  }
10582
10605
  }
10583
- async function upsertOutputNote(dbId, noteId, assets, recipientDigest, metadata, nullifier, expectedHeight, stateDiscriminant, state, tx) {
10606
+ async function upsertOutputNote(dbId, noteId, assets, attachments, recipientDigest, metadata, nullifier, expectedHeight, stateDiscriminant, state, tx) {
10584
10607
  const db = getDatabase(dbId);
10585
10608
  const doWork = async (t) => {
10586
10609
  try {
10587
10610
  const data = {
10588
10611
  noteId,
10589
10612
  assets,
10613
+ attachments,
10590
10614
  recipientDigest,
10591
10615
  metadata,
10592
10616
  nullifier: nullifier ? nullifier : undefined,
@@ -10607,6 +10631,7 @@ async function processInputNotes(dbId, notes) {
10607
10631
  const db = getDatabase(dbId);
10608
10632
  return await Promise.all(notes.map(async (note) => {
10609
10633
  const assetsBase64 = uint8ArrayToBase64(note.assets);
10634
+ const attachmentsBase64 = uint8ArrayToBase64(note.attachments);
10610
10635
  const serialNumberBase64 = uint8ArrayToBase64(note.serialNumber);
10611
10636
  const inputsBase64 = uint8ArrayToBase64(note.inputs);
10612
10637
  let serializedNoteScriptBase64 = undefined;
@@ -10619,6 +10644,7 @@ async function processInputNotes(dbId, notes) {
10619
10644
  const stateBase64 = uint8ArrayToBase64(note.state);
10620
10645
  return {
10621
10646
  assets: assetsBase64,
10647
+ attachments: attachmentsBase64,
10622
10648
  serialNumber: serialNumberBase64,
10623
10649
  inputs: inputsBase64,
10624
10650
  createdAt: note.serializedCreatedAt,
@@ -10630,10 +10656,12 @@ async function processInputNotes(dbId, notes) {
10630
10656
  async function processOutputNotes(notes) {
10631
10657
  return await Promise.all(notes.map((note) => {
10632
10658
  const assetsBase64 = uint8ArrayToBase64(note.assets);
10659
+ const attachmentsBase64 = uint8ArrayToBase64(note.attachments);
10633
10660
  const metadataBase64 = uint8ArrayToBase64(note.metadata);
10634
10661
  const stateBase64 = uint8ArrayToBase64(note.state);
10635
10662
  return {
10636
10663
  assets: assetsBase64,
10664
+ attachments: attachmentsBase64,
10637
10665
  recipientDigest: note.recipientDigest,
10638
10666
  metadata: metadataBase64,
10639
10667
  expectedHeight: note.expectedHeight,
@@ -10902,9 +10930,8 @@ async function removeNoteTag(dbId, tag, sourceNoteId, sourceAccountId) {
10902
10930
  }
10903
10931
  async function applyStateSync(dbId, stateUpdate) {
10904
10932
  const db = getDatabase(dbId);
10905
- const { blockNum, flattenedNewBlockHeaders, flattenedPartialBlockChainPeaks, newBlockNums, blockHasRelevantNotes, serializedNodeIds, serializedNodes, committedNoteIds, serializedInputNotes, serializedOutputNotes, accountUpdates, transactionUpdates, } = stateUpdate;
10933
+ const { blockNum, flattenedNewBlockHeaders, partialBlockchainPeaks, newBlockNums, blockHasRelevantNotes, serializedNodeIds, serializedNodes, committedNoteTagSources, serializedInputNotes, serializedOutputNotes, accountUpdates, transactionUpdates, } = stateUpdate;
10906
10934
  const newBlockHeaders = reconstructFlattenedVec(flattenedNewBlockHeaders);
10907
- const partialBlockchainPeaks = reconstructFlattenedVec(flattenedPartialBlockChainPeaks);
10908
10935
  const tablesToAccess = [
10909
10936
  db.stateSync,
10910
10937
  db.inputNotes,
@@ -10927,10 +10954,10 @@ async function applyStateSync(dbId, stateUpdate) {
10927
10954
  return await db.dexie.transaction("rw", tablesToAccess, async (tx) => {
10928
10955
  await Promise.all([
10929
10956
  Promise.all(serializedInputNotes.map((note) => {
10930
- return upsertInputNote(dbId, note.noteId, note.noteAssets, note.serialNumber, note.inputs, note.noteScriptRoot, note.noteScript, note.nullifier, note.createdAt, note.stateDiscriminant, note.state, note.consumedBlockHeight, note.consumedTxOrder, note.consumerAccountId);
10957
+ 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);
10931
10958
  })),
10932
10959
  Promise.all(serializedOutputNotes.map((note) => {
10933
- return upsertOutputNote(dbId, note.noteId, note.noteAssets, note.recipientDigest, note.metadata, note.nullifier, note.expectedHeight, note.stateDiscriminant, note.state);
10960
+ return upsertOutputNote(dbId, note.noteId, note.noteAssets, note.attachments, note.recipientDigest, note.metadata, note.nullifier, note.expectedHeight, note.stateDiscriminant, note.state);
10934
10961
  })),
10935
10962
  Promise.all(transactionUpdates.map((transactionRecord) => {
10936
10963
  let promises = [
@@ -10956,16 +10983,26 @@ async function applyStateSync(dbId, stateUpdate) {
10956
10983
  }))),
10957
10984
  updateSyncHeight(tx, blockNum),
10958
10985
  updatePartialBlockchainNodes(tx, serializedNodeIds, serializedNodes),
10959
- updateCommittedNoteTags(tx, committedNoteIds),
10986
+ updateCommittedNoteTags(tx, committedNoteTagSources),
10960
10987
  Promise.all(newBlockHeaders.map((newBlockHeader, i) => {
10961
- return updateBlockHeader(tx, newBlockNums[i], newBlockHeader, partialBlockchainPeaks[i], blockHasRelevantNotes[i] == 1);
10988
+ // Peaks are attached only to the chain-tip block (the one whose
10989
+ // blockNum matches the new sync height). That row is always
10990
+ // present in this iteration because `partial_blockchain_updates`
10991
+ // includes the chain tip header by construction.
10992
+ // TODO: potentially move this to be under the sync state info table
10993
+ // as currently done in SQLite
10994
+ const peaks = newBlockNums[i] === blockNum ? partialBlockchainPeaks : undefined;
10995
+ return updateBlockHeader(tx, newBlockNums[i], newBlockHeader, blockHasRelevantNotes[i] == 1, peaks);
10962
10996
  })),
10963
10997
  ]);
10964
10998
  });
10965
10999
  }
11000
+ /**
11001
+ * Advances `stateSync.blockNum` only when moving forward. Mirrors SQLite's
11002
+ * `UPDATE blockchain_checkpoint ... WHERE block_num < ?`.
11003
+ */
10966
11004
  async function updateSyncHeight(tx, blockNum) {
10967
11005
  try {
10968
- // Only update if moving forward to prevent race conditions
10969
11006
  const current = await tx.stateSync.get(1);
10970
11007
  if (!current || current.blockNum < blockNum) {
10971
11008
  await tx.stateSync.update(1, {
@@ -10977,13 +11014,13 @@ async function updateSyncHeight(tx, blockNum) {
10977
11014
  logWebStoreError(error, "Failed to update sync height");
10978
11015
  }
10979
11016
  }
10980
- async function updateBlockHeader(tx, blockNum, blockHeader, partialBlockchainPeaks, hasClientNotes) {
11017
+ async function updateBlockHeader(tx, blockNum, blockHeader, hasClientNotes, partialBlockchainPeaks) {
10981
11018
  try {
10982
11019
  const data = {
10983
11020
  blockNum: blockNum,
10984
11021
  header: blockHeader,
10985
- partialBlockchainPeaks,
10986
11022
  hasClientNotes: hasClientNotes.toString(),
11023
+ ...(partialBlockchainPeaks !== undefined && { partialBlockchainPeaks }),
10987
11024
  };
10988
11025
  const existingBlockHeader = await tx.blockHeaders.get(blockNum);
10989
11026
  if (!existingBlockHeader) {
@@ -11014,13 +11051,13 @@ async function updatePartialBlockchainNodes(tx, nodeIndexes, nodes) {
11014
11051
  logWebStoreError(err, "Failed to update partial blockchain nodes");
11015
11052
  }
11016
11053
  }
11017
- async function updateCommittedNoteTags(tx, inputNoteIds) {
11054
+ async function updateCommittedNoteTags(tx, committedNoteTagSources) {
11018
11055
  try {
11019
- for (let i = 0; i < inputNoteIds.length; i++) {
11020
- const noteId = inputNoteIds[i];
11056
+ for (let i = 0; i < committedNoteTagSources.length; i++) {
11057
+ const tagSource = committedNoteTagSources[i];
11021
11058
  await tx.tags
11022
11059
  .where("sourceNoteId")
11023
- .equals(noteId)
11060
+ .equals(tagSource)
11024
11061
  .delete();
11025
11062
  }
11026
11063
  }
@@ -11126,21 +11163,13 @@ class Account {
11126
11163
  return AccountId.__wrap(ret);
11127
11164
  }
11128
11165
  /**
11129
- * Returns true if the account is a faucet.
11166
+ * Returns true if the account exposes a fungible-faucet interface.
11130
11167
  * @returns {boolean}
11131
11168
  */
11132
11169
  isFaucet() {
11133
11170
  const ret = wasm.account_isFaucet(this.__wbg_ptr);
11134
11171
  return ret !== 0;
11135
11172
  }
11136
- /**
11137
- * Returns true if this is a network-owned account.
11138
- * @returns {boolean}
11139
- */
11140
- isNetwork() {
11141
- const ret = wasm.account_isNetwork(this.__wbg_ptr);
11142
- return ret !== 0;
11143
- }
11144
11173
  /**
11145
11174
  * Returns true if the account has not yet been committed to the chain.
11146
11175
  * @returns {boolean}
@@ -11166,21 +11195,13 @@ class Account {
11166
11195
  return ret !== 0;
11167
11196
  }
11168
11197
  /**
11169
- * Returns true if the account is a regular account (immutable or updatable code).
11198
+ * Returns true if the account is a regular (non-faucet) account.
11170
11199
  * @returns {boolean}
11171
11200
  */
11172
11201
  isRegularAccount() {
11173
11202
  const ret = wasm.account_isRegularAccount(this.__wbg_ptr);
11174
11203
  return ret !== 0;
11175
11204
  }
11176
- /**
11177
- * Returns true if the account can update its code.
11178
- * @returns {boolean}
11179
- */
11180
- isUpdatable() {
11181
- const ret = wasm.account_isUpdatable(this.__wbg_ptr);
11182
- return ret !== 0;
11183
- }
11184
11205
  /**
11185
11206
  * Returns the account nonce, which is incremented on every state update.
11186
11207
  * @returns {Felt}
@@ -11361,6 +11382,11 @@ class AccountBuilder {
11361
11382
  }
11362
11383
  /**
11363
11384
  * Sets the storage mode (public/private) for the account.
11385
+ *
11386
+ * The 0.15 protocol surface collapsed `AccountStorageMode` and `AccountType` into a
11387
+ * single 2-way `AccountType` flag: setting the storage mode IS setting the account
11388
+ * type. Calling both `accountType()` and `storageMode()` on the same builder is the
11389
+ * last-write-wins on the underlying flag. Method kept for JS-surface back-compat.
11364
11390
  * @param {AccountStorageMode} storage_mode
11365
11391
  * @returns {AccountBuilder}
11366
11392
  */
@@ -11627,6 +11653,11 @@ class AccountComponent {
11627
11653
  }
11628
11654
  /**
11629
11655
  * Marks the component as supporting all account types.
11656
+ *
11657
+ * The 0.15 protocol collapsed the per-account-type flag set on
11658
+ * `AccountComponentMetadata::new` — every component now applies to every account type
11659
+ * implicitly, so this method's job is to re-derive the metadata under the new
11660
+ * (name-only) constructor while keeping the JS API surface stable.
11630
11661
  * @returns {AccountComponent}
11631
11662
  */
11632
11663
  withSupportsAllTypes() {
@@ -11985,22 +12016,6 @@ class AccountId {
11985
12016
  }
11986
12017
  return AccountId.__wrap(ret[0]);
11987
12018
  }
11988
- /**
11989
- * Returns true if the ID refers to a faucet.
11990
- * @returns {boolean}
11991
- */
11992
- isFaucet() {
11993
- const ret = wasm.accountid_isFaucet(this.__wbg_ptr);
11994
- return ret !== 0;
11995
- }
11996
- /**
11997
- * Returns true if the ID is reserved for network accounts.
11998
- * @returns {boolean}
11999
- */
12000
- isNetwork() {
12001
- const ret = wasm.accountid_isNetwork(this.__wbg_ptr);
12002
- return ret !== 0;
12003
- }
12004
12019
  /**
12005
12020
  * Returns true if the account uses private storage.
12006
12021
  * @returns {boolean}
@@ -12017,14 +12032,6 @@ class AccountId {
12017
12032
  const ret = wasm.accountid_isPublic(this.__wbg_ptr);
12018
12033
  return ret !== 0;
12019
12034
  }
12020
- /**
12021
- * Returns true if the ID refers to a regular account.
12022
- * @returns {boolean}
12023
- */
12024
- isRegularAccount() {
12025
- const ret = wasm.accountid_isRegularAccount(this.__wbg_ptr);
12026
- return ret !== 0;
12027
- }
12028
12035
  /**
12029
12036
  * Returns the prefix field element storing metadata about version, type, and storage mode.
12030
12037
  * @returns {Felt}
@@ -12709,6 +12716,15 @@ if (Symbol.dispose) AccountStorageDelta.prototype[Symbol.dispose] = AccountStora
12709
12716
 
12710
12717
  /**
12711
12718
  * Storage visibility mode for an account.
12719
+ *
12720
+ * In the 0.15 protocol surface this is the same enum as `AccountType`
12721
+ * (the on-chain identifier no longer carries any faucet-vs-regular or
12722
+ * updatable-vs-immutable distinction), so internally we wrap an
12723
+ * `AccountType`. The standalone `AccountStorageMode` type still exists at
12724
+ * the JS API surface for backwards compatibility with code that wrote
12725
+ * `AccountStorageMode.public()` / `.private()`. The pre-existing `.network()`
12726
+ * constructor was removed — the network storage mode does not exist on the
12727
+ * 0.15 chain.
12712
12728
  */
12713
12729
  class AccountStorageMode {
12714
12730
  static __wrap(ptr) {
@@ -12744,14 +12760,6 @@ class AccountStorageMode {
12744
12760
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
12745
12761
  }
12746
12762
  }
12747
- /**
12748
- * Creates a network storage mode.
12749
- * @returns {AccountStorageMode}
12750
- */
12751
- static network() {
12752
- const ret = wasm.accountstoragemode_network();
12753
- return AccountStorageMode.__wrap(ret);
12754
- }
12755
12763
  /**
12756
12764
  * Creates a private storage mode.
12757
12765
  * @returns {AccountStorageMode}
@@ -12770,6 +12778,9 @@ class AccountStorageMode {
12770
12778
  }
12771
12779
  /**
12772
12780
  * Parses a storage mode from its string representation.
12781
+ *
12782
+ * Accepts `"private"` and `"public"`; any other input — including the
12783
+ * previously-supported `"network"` — is rejected.
12773
12784
  * @param {string} s
12774
12785
  * @returns {AccountStorageMode}
12775
12786
  */
@@ -12830,13 +12841,17 @@ class AccountStorageRequirements {
12830
12841
  if (Symbol.dispose) AccountStorageRequirements.prototype[Symbol.dispose] = AccountStorageRequirements.prototype.free;
12831
12842
 
12832
12843
  /**
12833
- * @enum {0 | 1 | 2 | 3}
12844
+ * Storage mode of an account. The 0.15 protocol collapses the previous
12845
+ * 4-way `{ FungibleFaucet, NonFungibleFaucet, RegularAccountImmutableCode,
12846
+ * RegularAccountUpdatableCode }` distinction into a 2-way storage flag —
12847
+ * faucet-vs-regular and updatable-vs-immutable distinctions are no longer
12848
+ * part of the on-chain `AccountType` and the API loses no information by
12849
+ * narrowing here too.
12850
+ * @enum {0 | 1}
12834
12851
  */
12835
12852
  const AccountType = Object.freeze({
12836
- FungibleFaucet: 0, "0": "FungibleFaucet",
12837
- NonFungibleFaucet: 1, "1": "NonFungibleFaucet",
12838
- RegularAccountImmutableCode: 2, "2": "RegularAccountImmutableCode",
12839
- RegularAccountUpdatableCode: 3, "3": "RegularAccountUpdatableCode",
12853
+ Private: 0, "0": "Private",
12854
+ Public: 1, "1": "Public",
12840
12855
  });
12841
12856
 
12842
12857
  /**
@@ -13198,6 +13213,17 @@ class AssetVault {
13198
13213
  }
13199
13214
  /**
13200
13215
  * Returns the balance for the given fungible faucet, or zero if absent.
13216
+ *
13217
+ * `get_balance` on the 0.15 surface keys by `AssetVaultKey`, not `AccountId`, and
13218
+ * validates the composition. The callback flag is `Disabled` because fungible balance
13219
+ * reads don't run asset callbacks. Returns zero on lookup error (`Err` arms here would
13220
+ * indicate the key was constructed wrong, which can't happen for fungible keys built
13221
+ * this way).
13222
+ *
13223
+ * NOTE: the `AssetVaultKey` encodes the callback flag, so this reports only the balance
13224
+ * of callback-*disabled* fungible assets. Faucets built by this SDK omit transfer policies
13225
+ * and therefore mint callback-disabled assets, so this is exact for them; an asset minted
13226
+ * elsewhere with callbacks enabled would not be counted here.
13201
13227
  * @param {AccountId} faucet_id
13202
13228
  * @returns {bigint}
13203
13229
  */
@@ -13434,6 +13460,9 @@ if (Symbol.dispose) AuthSecretKey.prototype[Symbol.dispose] = AuthSecretKey.prot
13434
13460
 
13435
13461
  /**
13436
13462
  * Provides metadata for a basic fungible faucet account component.
13463
+ *
13464
+ * Reads the on-chain [`FungibleFaucet`] component for the account, which holds the
13465
+ * per-token info (symbol/decimals/maxSupply).
13437
13466
  */
13438
13467
  class BasicFungibleFaucetComponent {
13439
13468
  static __wrap(ptr) {
@@ -13480,7 +13509,7 @@ class BasicFungibleFaucetComponent {
13480
13509
  * @returns {Felt}
13481
13510
  */
13482
13511
  maxSupply() {
13483
- const ret = wasm.accountid_prefix(this.__wbg_ptr);
13512
+ const ret = wasm.basicfungiblefaucetcomponent_maxSupply(this.__wbg_ptr);
13484
13513
  return Felt.__wrap(ret);
13485
13514
  }
13486
13515
  /**
@@ -13554,6 +13583,19 @@ class BlockHeader {
13554
13583
  const ret = wasm.blockheader_commitment(this.__wbg_ptr);
13555
13584
  return Word.__wrap(ret);
13556
13585
  }
13586
+ /**
13587
+ * Returns the account ID of the fungible faucet whose assets are accepted as the native
13588
+ * asset of the blockchain (i.e. the asset used for paying transaction verification fees).
13589
+ *
13590
+ * This is stored on-chain as part of the block's fee parameters, which means consumers can
13591
+ * discover the native faucet by reading any block header rather than hardcoding it per
13592
+ * network.
13593
+ * @returns {AccountId}
13594
+ */
13595
+ feeFaucetId() {
13596
+ const ret = wasm.blockheader_feeFaucetId(this.__wbg_ptr);
13597
+ return AccountId.__wrap(ret);
13598
+ }
13557
13599
  /**
13558
13600
  * Returns the note commitment root.
13559
13601
  * @returns {Word}
@@ -13794,14 +13836,6 @@ class CommittedNote {
13794
13836
  const ptr = this.__destroy_into_raw();
13795
13837
  wasm.__wbg_committednote_free(ptr, 0);
13796
13838
  }
13797
- /**
13798
- * Returns the full note metadata when the attachment payload is available.
13799
- * @returns {NoteMetadata | undefined}
13800
- */
13801
- fullMetadata() {
13802
- const ret = wasm.committednote_fullMetadata(this.__wbg_ptr);
13803
- return ret === 0 ? undefined : NoteMetadata.__wrap(ret);
13804
- }
13805
13839
  /**
13806
13840
  * Returns the inclusion path for the note in the block's note tree.
13807
13841
  * @returns {SparseMerklePath}
@@ -13820,9 +13854,6 @@ class CommittedNote {
13820
13854
  }
13821
13855
  /**
13822
13856
  * Returns the note metadata.
13823
- *
13824
- * If only metadata headers are available, the returned metadata contains
13825
- * the sender, note type, and tag without attachment payload.
13826
13857
  * @returns {NoteMetadata}
13827
13858
  */
13828
13859
  metadata() {
@@ -14198,11 +14229,17 @@ class Felt {
14198
14229
  }
14199
14230
  /**
14200
14231
  * Creates a new field element.
14232
+ *
14233
+ * Returns an error if `value` is outside the field's representable
14234
+ * range (`Felt::new` is fallible on the 0.15 protocol surface).
14201
14235
  * @param {bigint} value
14202
14236
  */
14203
14237
  constructor(value) {
14204
14238
  const ret = wasm.felt_new(value);
14205
- this.__wbg_ptr = ret >>> 0;
14239
+ if (ret[2]) {
14240
+ throw takeFromExternrefTable0(ret[1]);
14241
+ }
14242
+ this.__wbg_ptr = ret[0] >>> 0;
14206
14243
  FeltFinalization.register(this, this.__wbg_ptr, this);
14207
14244
  return this;
14208
14245
  }
@@ -14347,14 +14384,6 @@ class FetchedAccount {
14347
14384
  const ret = wasm.fetchedaccount_commitment(this.__wbg_ptr);
14348
14385
  return Word.__wrap(ret);
14349
14386
  }
14350
- /**
14351
- * Returns true when the account is a network account.
14352
- * @returns {boolean}
14353
- */
14354
- isNetwork() {
14355
- const ret = wasm.fetchedaccount_isNetwork(this.__wbg_ptr);
14356
- return ret !== 0;
14357
- }
14358
14387
  /**
14359
14388
  * Returns true when the account is private.
14360
14389
  * @returns {boolean}
@@ -14385,8 +14414,15 @@ if (Symbol.dispose) FetchedAccount.prototype[Symbol.dispose] = FetchedAccount.pr
14385
14414
  /**
14386
14415
  * Wrapper for a note fetched over RPC.
14387
14416
  *
14388
- * It contains the note header and inclusion proof. The note details are only present for
14389
- * public notes.
14417
+ * It carries the note ID, public metadata, and inclusion proof. The full note body is only
14418
+ * present for public notes; for private notes only the header-shaped fields and inclusion
14419
+ * proof are available — the body lives off-chain.
14420
+ *
14421
+ * 0.15 protocol surface: the on-chain `NoteHeader` now commits to a
14422
+ * `NoteDetailsCommitment` rather than the `NoteId`, so a `NoteHeader` can no longer be
14423
+ * reconstructed from header-shaped fields alone for private notes. We therefore expose
14424
+ * the constituent fields (`noteId`, `metadata`) directly on `FetchedNote` instead of a
14425
+ * `header` getter.
14390
14426
  */
14391
14427
  class FetchedNote {
14392
14428
  static __wrap(ptr) {
@@ -14418,12 +14454,18 @@ class FetchedNote {
14418
14454
  return ret === 0 ? undefined : InputNote.__wrap(ret);
14419
14455
  }
14420
14456
  /**
14421
- * The note's header, containing the ID and metadata.
14422
- * @returns {NoteHeader}
14457
+ * The note's attachments.
14458
+ *
14459
+ * 0.15 returns attachment content over RPC for both public and private notes, so this is
14460
+ * populated even when the note body itself is private. An empty array means the note
14461
+ * carries no attachments.
14462
+ * @returns {NoteAttachment[]}
14423
14463
  */
14424
- get header() {
14425
- const ret = wasm.fetchednote_header(this.__wbg_ptr);
14426
- return NoteHeader.__wrap(ret);
14464
+ get attachments() {
14465
+ const ret = wasm.fetchednote_attachments(this.__wbg_ptr);
14466
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
14467
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
14468
+ return v1;
14427
14469
  }
14428
14470
  /**
14429
14471
  * The note's inclusion proof.
@@ -14771,6 +14813,10 @@ class FungibleAssetDelta {
14771
14813
  }
14772
14814
  /**
14773
14815
  * Returns the delta amount for a given faucet, if present.
14816
+ *
14817
+ * The vault key here is the one used by the fungible-delta tree, which the upstream
14818
+ * surface keys with `AssetCallbackFlag::Disabled` — fungible balance deltas don't run
14819
+ * asset callbacks. `new_fungible` on the 0.15 surface is infallible.
14774
14820
  * @param {AccountId} faucet_id
14775
14821
  * @returns {bigint | undefined}
14776
14822
  */
@@ -14945,7 +14991,12 @@ class InputNote {
14945
14991
  return InputNote.__wrap(ret);
14946
14992
  }
14947
14993
  /**
14948
- * Returns the commitment to the note ID and metadata.
14994
+ * Returns the commitment to the note (its ID).
14995
+ *
14996
+ * Migration note (miden-client PR #2214): `Note::commitment()` was
14997
+ * removed on the 0.15 surface — the note ID *is* the commitment (it
14998
+ * hashes details + metadata). Return the underlying `NoteId` as a
14999
+ * `Word` so the JS API contract is unchanged.
14949
15000
  * @returns {Word}
14950
15001
  */
14951
15002
  commitment() {
@@ -15031,6 +15082,22 @@ class InputNoteRecord {
15031
15082
  const ptr = this.__destroy_into_raw();
15032
15083
  wasm.__wbg_inputnoterecord_free(ptr, 0);
15033
15084
  }
15085
+ /**
15086
+ * Returns the note's attachments.
15087
+ *
15088
+ * On the 0.15 surface the full attachment content (the packed words) lives
15089
+ * on the note record itself rather than on `NoteMetadata` (which only
15090
+ * carries the attachment headers). This exposes that content so JS callers
15091
+ * can decode payloads packed via the `createNoteAttachment` helper. An
15092
+ * empty array means the note carries no attachments.
15093
+ * @returns {NoteAttachment[]}
15094
+ */
15095
+ attachments() {
15096
+ const ret = wasm.inputnoterecord_attachments(this.__wbg_ptr);
15097
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
15098
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
15099
+ return v1;
15100
+ }
15034
15101
  /**
15035
15102
  * Returns the note commitment (id + metadata), if available.
15036
15103
  * @returns {Word | undefined}
@@ -15061,12 +15128,16 @@ class InputNoteRecord {
15061
15128
  return NoteDetails.__wrap(ret);
15062
15129
  }
15063
15130
  /**
15064
- * Returns the note ID.
15065
- * @returns {NoteId}
15131
+ * Returns the note ID when available.
15132
+ *
15133
+ * Migration note (miden-client PR #2214): `InputNoteRecord::id()`
15134
+ * returns `Option<NoteId>` — partial / metadata-less notes have no
15135
+ * metadata-bearing ID yet.
15136
+ * @returns {NoteId | undefined}
15066
15137
  */
15067
15138
  id() {
15068
15139
  const ret = wasm.inputnoterecord_id(this.__wbg_ptr);
15069
- return NoteId.__wrap(ret);
15140
+ return ret === 0 ? undefined : NoteId.__wrap(ret);
15070
15141
  }
15071
15142
  /**
15072
15143
  * Returns the inclusion proof when the note is authenticated.
@@ -15109,20 +15180,20 @@ class InputNoteRecord {
15109
15180
  return ret === 0 ? undefined : NoteMetadata.__wrap(ret);
15110
15181
  }
15111
15182
  /**
15112
- * Returns the nullifier for this note.
15113
- * @returns {string}
15183
+ * Returns the nullifier for this note when available.
15184
+ *
15185
+ * Migration note (miden-client PR #2214): `InputNoteRecord::nullifier()`
15186
+ * returns `Option<Nullifier>` — partial notes have no nullifier yet.
15187
+ * @returns {string | undefined}
15114
15188
  */
15115
15189
  nullifier() {
15116
- let deferred1_0;
15117
- let deferred1_1;
15118
- try {
15119
- const ret = wasm.inputnoterecord_nullifier(this.__wbg_ptr);
15120
- deferred1_0 = ret[0];
15121
- deferred1_1 = ret[1];
15122
- return getStringFromWasm0(ret[0], ret[1]);
15123
- } finally {
15124
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
15190
+ const ret = wasm.inputnoterecord_nullifier(this.__wbg_ptr);
15191
+ let v1;
15192
+ if (ret[0] !== 0) {
15193
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
15194
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15125
15195
  }
15196
+ return v1;
15126
15197
  }
15127
15198
  /**
15128
15199
  * Returns the current processing state for this note.
@@ -15352,6 +15423,21 @@ if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderly
15352
15423
 
15353
15424
  /**
15354
15425
  * Represents an update to a single account's state.
15426
+ *
15427
+ * `inspectable` is intentionally omitted (see #2183). When `inspectable` is
15428
+ * set on a struct with public fields, wasm-bindgen auto-generates a
15429
+ * `toJSON()` method that reads every field-getter — each of which calls
15430
+ * back into WASM via `__wbg_get_<class>_<field>(this.__wbg_ptr)`. Under
15431
+ * Next.js 16.2 dev-mode the patched `console.*` runs every non-primitive
15432
+ * argument through `safe-stable-stringify`, which invokes `toJSON()`
15433
+ * automatically. If the underlying pointer has been freed (or another
15434
+ * WASM call is in flight) the resulting `"null pointer passed to rust"`
15435
+ * trap propagates out of the user's `console.log` and crashes the
15436
+ * caller. Without `inspectable`, no `toJSON()` is emitted; JSON.stringify
15437
+ * falls back to `{}` (the wasm-bindgen wrapper has no own enumerable
15438
+ * data — it's all behind the `__wbg_ptr`), and the re-entry never
15439
+ * happens. Field access via the named getters still works exactly as
15440
+ * before; only the auto-stringification path is muted.
15355
15441
  */
15356
15442
  class JsAccountUpdate {
15357
15443
  static __wrap(ptr) {
@@ -15367,24 +15453,6 @@ class JsAccountUpdate {
15367
15453
  }
15368
15454
  return jsValue.__destroy_into_raw();
15369
15455
  }
15370
- toJSON() {
15371
- return {
15372
- accountCommitment: this.accountCommitment,
15373
- accountId: this.accountId,
15374
- accountSeed: this.accountSeed,
15375
- assets: this.assets,
15376
- codeRoot: this.codeRoot,
15377
- committed: this.committed,
15378
- nonce: this.nonce,
15379
- storageMapEntries: this.storageMapEntries,
15380
- storageRoot: this.storageRoot,
15381
- storageSlots: this.storageSlots,
15382
- vaultRoot: this.vaultRoot,
15383
- };
15384
- }
15385
- toString() {
15386
- return JSON.stringify(this);
15387
- }
15388
15456
  __destroy_into_raw() {
15389
15457
  const ptr = this.__wbg_ptr;
15390
15458
  this.__wbg_ptr = 0;
@@ -15696,11 +15764,12 @@ class JsStateSyncUpdate {
15696
15764
  return ret >>> 0;
15697
15765
  }
15698
15766
  /**
15699
- * IDs of note tags that should be removed from the client's local state.
15767
+ * Details-commitment hex of committed notes whose tracking tags
15768
+ * (`NoteTagSource::Note`) should be removed from the client's local state.
15700
15769
  * @returns {string[]}
15701
15770
  */
15702
- get committedNoteIds() {
15703
- const ret = wasm.__wbg_get_jsstatesyncupdate_committedNoteIds(this.__wbg_ptr);
15771
+ get committedNoteTagSources() {
15772
+ const ret = wasm.__wbg_get_jsstatesyncupdate_committedNoteTagSources(this.__wbg_ptr);
15704
15773
  var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
15705
15774
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
15706
15775
  return v1;
@@ -15713,15 +15782,6 @@ class JsStateSyncUpdate {
15713
15782
  const ret = wasm.__wbg_get_jsstatesyncupdate_flattenedNewBlockHeaders(this.__wbg_ptr);
15714
15783
  return FlattenedU8Vec.__wrap(ret);
15715
15784
  }
15716
- /**
15717
- * Flattened byte array containing partial blockchain peaks used for merkle tree
15718
- * verification.
15719
- * @returns {FlattenedU8Vec}
15720
- */
15721
- get flattenedPartialBlockChainPeaks() {
15722
- const ret = wasm.__wbg_get_jsstatesyncupdate_flattenedPartialBlockChainPeaks(this.__wbg_ptr);
15723
- return FlattenedU8Vec.__wrap(ret);
15724
- }
15725
15785
  /**
15726
15786
  * The block numbers corresponding to each header in `flattened_new_block_headers`.
15727
15787
  * This vec should have the same length as the number of headers, with each index
@@ -15734,6 +15794,18 @@ class JsStateSyncUpdate {
15734
15794
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
15735
15795
  return v1;
15736
15796
  }
15797
+ /**
15798
+ * Serialized MMR peaks at the new sync height (single set for the whole update).
15799
+ * Written onto the chain-tip block's `blockHeaders` row (the one whose
15800
+ * `blockNum` matches `block_num`) and read back by `getCurrentBlockchainPeaks`.
15801
+ * @returns {Uint8Array}
15802
+ */
15803
+ get partialBlockchainPeaks() {
15804
+ const ret = wasm.__wbg_get_jsstatesyncupdate_partialBlockchainPeaks(this.__wbg_ptr);
15805
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
15806
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15807
+ return v1;
15808
+ }
15737
15809
  /**
15738
15810
  * Input notes for this state update in serialized form.
15739
15811
  * @returns {SerializedInputNoteData[]}
@@ -15812,13 +15884,14 @@ class JsStateSyncUpdate {
15812
15884
  wasm.__wbg_set_jsstatesyncupdate_blockNum(this.__wbg_ptr, arg0);
15813
15885
  }
15814
15886
  /**
15815
- * IDs of note tags that should be removed from the client's local state.
15887
+ * Details-commitment hex of committed notes whose tracking tags
15888
+ * (`NoteTagSource::Note`) should be removed from the client's local state.
15816
15889
  * @param {string[]} arg0
15817
15890
  */
15818
- set committedNoteIds(arg0) {
15891
+ set committedNoteTagSources(arg0) {
15819
15892
  const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
15820
15893
  const len0 = WASM_VECTOR_LEN;
15821
- wasm.__wbg_set_jsstatesyncupdate_committedNoteIds(this.__wbg_ptr, ptr0, len0);
15894
+ wasm.__wbg_set_jsstatesyncupdate_committedNoteTagSources(this.__wbg_ptr, ptr0, len0);
15822
15895
  }
15823
15896
  /**
15824
15897
  * The new block headers for this state update, serialized into a flattened byte array.
@@ -15829,16 +15902,6 @@ class JsStateSyncUpdate {
15829
15902
  var ptr0 = arg0.__destroy_into_raw();
15830
15903
  wasm.__wbg_set_jsstatesyncupdate_flattenedNewBlockHeaders(this.__wbg_ptr, ptr0);
15831
15904
  }
15832
- /**
15833
- * Flattened byte array containing partial blockchain peaks used for merkle tree
15834
- * verification.
15835
- * @param {FlattenedU8Vec} arg0
15836
- */
15837
- set flattenedPartialBlockChainPeaks(arg0) {
15838
- _assertClass(arg0, FlattenedU8Vec);
15839
- var ptr0 = arg0.__destroy_into_raw();
15840
- wasm.__wbg_set_jsstatesyncupdate_flattenedPartialBlockChainPeaks(this.__wbg_ptr, ptr0);
15841
- }
15842
15905
  /**
15843
15906
  * The block numbers corresponding to each header in `flattened_new_block_headers`.
15844
15907
  * This vec should have the same length as the number of headers, with each index
@@ -15850,6 +15913,17 @@ class JsStateSyncUpdate {
15850
15913
  const len0 = WASM_VECTOR_LEN;
15851
15914
  wasm.__wbg_set_jsstatesyncupdate_newBlockNums(this.__wbg_ptr, ptr0, len0);
15852
15915
  }
15916
+ /**
15917
+ * Serialized MMR peaks at the new sync height (single set for the whole update).
15918
+ * Written onto the chain-tip block's `blockHeaders` row (the one whose
15919
+ * `blockNum` matches `block_num`) and read back by `getCurrentBlockchainPeaks`.
15920
+ * @param {Uint8Array} arg0
15921
+ */
15922
+ set partialBlockchainPeaks(arg0) {
15923
+ const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
15924
+ const len0 = WASM_VECTOR_LEN;
15925
+ wasm.__wbg_set_jsstatesyncupdate_partialBlockchainPeaks(this.__wbg_ptr, ptr0, len0);
15926
+ }
15853
15927
  /**
15854
15928
  * Input notes for this state update in serialized form.
15855
15929
  * @param {SerializedInputNoteData[]} arg0
@@ -15900,6 +15974,9 @@ if (Symbol.dispose) JsStateSyncUpdate.prototype[Symbol.dispose] = JsStateSyncUpd
15900
15974
 
15901
15975
  /**
15902
15976
  * A JavaScript representation of a storage map entry in an account.
15977
+ *
15978
+ * `inspectable` is intentionally omitted — see the note on
15979
+ * `JsAccountUpdate` for the full rationale (#2183).
15903
15980
  */
15904
15981
  class JsStorageMapEntry {
15905
15982
  static __wrap(ptr) {
@@ -15915,16 +15992,6 @@ class JsStorageMapEntry {
15915
15992
  }
15916
15993
  return jsValue.__destroy_into_raw();
15917
15994
  }
15918
- toJSON() {
15919
- return {
15920
- key: this.key,
15921
- slotName: this.slotName,
15922
- value: this.value,
15923
- };
15924
- }
15925
- toString() {
15926
- return JSON.stringify(this);
15927
- }
15928
15995
  __destroy_into_raw() {
15929
15996
  const ptr = this.__wbg_ptr;
15930
15997
  this.__wbg_ptr = 0;
@@ -16015,6 +16082,9 @@ if (Symbol.dispose) JsStorageMapEntry.prototype[Symbol.dispose] = JsStorageMapEn
16015
16082
 
16016
16083
  /**
16017
16084
  * A JavaScript representation of a storage slot in an account.
16085
+ *
16086
+ * `inspectable` is intentionally omitted — see the note on
16087
+ * `JsAccountUpdate` for the full rationale (#2183).
16018
16088
  */
16019
16089
  class JsStorageSlot {
16020
16090
  static __wrap(ptr) {
@@ -16030,16 +16100,6 @@ class JsStorageSlot {
16030
16100
  }
16031
16101
  return jsValue.__destroy_into_raw();
16032
16102
  }
16033
- toJSON() {
16034
- return {
16035
- slotName: this.slotName,
16036
- slotType: this.slotType,
16037
- slotValue: this.slotValue,
16038
- };
16039
- }
16040
- toString() {
16041
- return JSON.stringify(this);
16042
- }
16043
16103
  __destroy_into_raw() {
16044
16104
  const ptr = this.__wbg_ptr;
16045
16105
  this.__wbg_ptr = 0;
@@ -16120,6 +16180,9 @@ if (Symbol.dispose) JsStorageSlot.prototype[Symbol.dispose] = JsStorageSlot.prot
16120
16180
 
16121
16181
  /**
16122
16182
  * An object that contains a serialized vault asset.
16183
+ *
16184
+ * `inspectable` is intentionally omitted — see the note on
16185
+ * `JsAccountUpdate` for the full rationale (#2183).
16123
16186
  */
16124
16187
  class JsVaultAsset {
16125
16188
  static __wrap(ptr) {
@@ -16135,15 +16198,6 @@ class JsVaultAsset {
16135
16198
  }
16136
16199
  return jsValue.__destroy_into_raw();
16137
16200
  }
16138
- toJSON() {
16139
- return {
16140
- asset: this.asset,
16141
- vaultKey: this.vaultKey,
16142
- };
16143
- }
16144
- toString() {
16145
- return JSON.stringify(this);
16146
- }
16147
16201
  __destroy_into_raw() {
16148
16202
  const ptr = this.__wbg_ptr;
16149
16203
  this.__wbg_ptr = 0;
@@ -16491,7 +16545,12 @@ class Note {
16491
16545
  return NoteAssets.__wrap(ret);
16492
16546
  }
16493
16547
  /**
16494
- * Returns the commitment to the note ID and metadata.
16548
+ * Returns the commitment to the note (its ID).
16549
+ *
16550
+ * Migration note (miden-client PR #2214): `Note::commitment()` was
16551
+ * removed on the 0.15 surface — the note ID is the commitment. Return
16552
+ * the underlying `NoteId` as a `Word` so the JS API contract is
16553
+ * unchanged.
16495
16554
  * @returns {Word}
16496
16555
  */
16497
16556
  commitment() {
@@ -16557,7 +16616,7 @@ class Note {
16557
16616
  * @returns {NoteId}
16558
16617
  */
16559
16618
  id() {
16560
- const ret = wasm.accountheader_storageCommitment(this.__wbg_ptr);
16619
+ const ret = wasm.note_commitment(this.__wbg_ptr);
16561
16620
  return NoteId.__wrap(ret);
16562
16621
  }
16563
16622
  /**
@@ -16565,11 +16624,15 @@ class Note {
16565
16624
  * @returns {NoteMetadata}
16566
16625
  */
16567
16626
  metadata() {
16568
- const ret = wasm.note_metadata(this.__wbg_ptr);
16627
+ const ret = wasm.committednote_metadata(this.__wbg_ptr);
16569
16628
  return NoteMetadata.__wrap(ret);
16570
16629
  }
16571
16630
  /**
16572
16631
  * Creates a new note from the provided assets, metadata, and recipient.
16632
+ *
16633
+ * Migration note (miden-client PR #2214): `Note::new` now takes a
16634
+ * `PartialNoteMetadata` (not `NoteMetadata`). Extract the partial
16635
+ * fields from the JS-side `NoteMetadata` and reconstruct.
16573
16636
  * @param {NoteAssets} note_assets
16574
16637
  * @param {NoteMetadata} note_metadata
16575
16638
  * @param {NoteRecipient} note_recipient
@@ -16866,9 +16929,13 @@ if (Symbol.dispose) NoteAssets.prototype[Symbol.dispose] = NoteAssets.prototype.
16866
16929
  /**
16867
16930
  * An attachment to a note.
16868
16931
  *
16869
- * Note attachments provide additional context about how notes should be processed.
16870
- * For example, a network account target attachment indicates that the note should
16871
- * be consumed by a specific network account.
16932
+ * 0.15 protocol surface: an attachment is a `(scheme, content)` pair where
16933
+ * `content` is a flat `Vec<Word>` of 1..=256 words. The previous
16934
+ * `NoteAttachmentKind { Word, Array }` dispatch and the per-variant
16935
+ * `asWord` / `asArray` / `newWord` / `newArray` getters/constructors no
16936
+ * longer exist — content is always word-vector-shaped now. Use
16937
+ * `fromWord(scheme, word)` for the common single-word case or
16938
+ * `fromWords(scheme, words)` for multi-word content.
16872
16939
  */
16873
16940
  class NoteAttachment {
16874
16941
  static __wrap(ptr) {
@@ -16888,30 +16955,6 @@ class NoteAttachment {
16888
16955
  const ptr = this.__destroy_into_raw();
16889
16956
  wasm.__wbg_noteattachment_free(ptr, 0);
16890
16957
  }
16891
- /**
16892
- * Returns the content as an array of Felts if the attachment kind is Array, otherwise None.
16893
- * @returns {FeltArray | undefined}
16894
- */
16895
- asArray() {
16896
- const ret = wasm.noteattachment_asArray(this.__wbg_ptr);
16897
- return ret === 0 ? undefined : FeltArray.__wrap(ret);
16898
- }
16899
- /**
16900
- * Returns the content as a Word if the attachment kind is Word, otherwise None.
16901
- * @returns {Word | undefined}
16902
- */
16903
- asWord() {
16904
- const ret = wasm.noteattachment_asWord(this.__wbg_ptr);
16905
- return ret === 0 ? undefined : Word.__wrap(ret);
16906
- }
16907
- /**
16908
- * Returns the attachment kind.
16909
- * @returns {NoteAttachmentKind}
16910
- */
16911
- attachmentKind() {
16912
- const ret = wasm.noteattachment_attachmentKind(this.__wbg_ptr);
16913
- return ret;
16914
- }
16915
16958
  /**
16916
16959
  * Returns the attachment scheme.
16917
16960
  * @returns {NoteAttachmentScheme}
@@ -16921,81 +16964,90 @@ class NoteAttachment {
16921
16964
  return NoteAttachmentScheme.__wrap(ret);
16922
16965
  }
16923
16966
  /**
16924
- * Creates a default (empty) note attachment.
16967
+ * Creates a new note attachment from a single word.
16968
+ * @param {NoteAttachmentScheme} scheme
16969
+ * @param {Word} word
16970
+ * @returns {NoteAttachment}
16925
16971
  */
16926
- constructor() {
16927
- const ret = wasm.noteattachment_new();
16928
- this.__wbg_ptr = ret >>> 0;
16929
- NoteAttachmentFinalization.register(this, this.__wbg_ptr, this);
16930
- return this;
16972
+ static fromWord(scheme, word) {
16973
+ _assertClass(scheme, NoteAttachmentScheme);
16974
+ _assertClass(word, Word);
16975
+ const ret = wasm.noteattachment_fromWord(scheme.__wbg_ptr, word.__wbg_ptr);
16976
+ return NoteAttachment.__wrap(ret);
16931
16977
  }
16932
16978
  /**
16933
- * Creates a new note attachment with Array content from the provided elements.
16979
+ * Creates a new note attachment from a vector of words.
16980
+ *
16981
+ * # Errors
16982
+ * Returns an error if `words` is empty or exceeds `NoteAttachment::MAX_NUM_WORDS`.
16934
16983
  * @param {NoteAttachmentScheme} scheme
16935
- * @param {FeltArray} elements
16984
+ * @param {Word[]} words
16936
16985
  * @returns {NoteAttachment}
16937
16986
  */
16938
- static newArray(scheme, elements) {
16987
+ static fromWords(scheme, words) {
16939
16988
  _assertClass(scheme, NoteAttachmentScheme);
16940
- _assertClass(elements, FeltArray);
16941
- var ptr0 = elements.__destroy_into_raw();
16942
- const ret = wasm.noteattachment_newArray(scheme.__wbg_ptr, ptr0);
16989
+ const ptr0 = passArrayJsValueToWasm0(words, wasm.__wbindgen_malloc);
16990
+ const len0 = WASM_VECTOR_LEN;
16991
+ const ret = wasm.noteattachment_fromWords(scheme.__wbg_ptr, ptr0, len0);
16943
16992
  if (ret[2]) {
16944
16993
  throw takeFromExternrefTable0(ret[1]);
16945
16994
  }
16946
16995
  return NoteAttachment.__wrap(ret[0]);
16947
16996
  }
16948
16997
  /**
16949
- * Creates a new note attachment for a network account target.
16950
- *
16951
- * This attachment indicates that the note should be consumed by a specific network account.
16952
- * Network accounts are accounts whose storage mode is `Network`, meaning the network (nodes)
16953
- * can execute transactions on behalf of the account.
16998
+ * Creates a note attachment from an optional list of packed values.
16954
16999
  *
16955
- * # Arguments
16956
- * * `target_id` - The ID of the network account that should consume the note
16957
- * * `exec_hint` - A hint about when the note can be executed
17000
+ * Mirrors the encoding the JS-side `createNoteAttachment` helper performs
17001
+ * and preserves the `new NoteAttachment()` / `new NoteAttachment([...])`
17002
+ * ergonomics the package's own JS wrappers (`js/standalone.js`,
17003
+ * `js/resources/transactions.js`) rely on. The 0.15 surface has no truly
17004
+ * empty attachment (content is 1..=256 words), so the empty case is
17005
+ * represented as a single zero [`Word`] with the `none` scheme:
17006
+ * - no args / empty list → single zero-`Word`, `none` scheme.
17007
+ * - any number of values → padded to a whole number of `Word`s, `none` scheme.
16958
17008
  *
16959
17009
  * # Errors
16960
- * Returns an error if the target account is not a network account.
16961
- * @param {AccountId} target_id
16962
- * @param {NoteExecutionHint} exec_hint
16963
- * @returns {NoteAttachment}
17010
+ * Returns an error if a value is not a canonical field element, or if the
17011
+ * packed word count exceeds `NoteAttachment::MAX_NUM_WORDS`.
17012
+ * @param {BigUint64Array | null} [values]
16964
17013
  */
16965
- static newNetworkAccountTarget(target_id, exec_hint) {
16966
- _assertClass(target_id, AccountId);
16967
- _assertClass(exec_hint, NoteExecutionHint);
16968
- const ret = wasm.noteattachment_newNetworkAccountTarget(target_id.__wbg_ptr, exec_hint.__wbg_ptr);
17014
+ constructor(values) {
17015
+ var ptr0 = isLikeNone(values) ? 0 : passArray64ToWasm0(values, wasm.__wbindgen_malloc);
17016
+ var len0 = WASM_VECTOR_LEN;
17017
+ const ret = wasm.noteattachment_new(ptr0, len0);
16969
17018
  if (ret[2]) {
16970
17019
  throw takeFromExternrefTable0(ret[1]);
16971
17020
  }
16972
- return NoteAttachment.__wrap(ret[0]);
17021
+ this.__wbg_ptr = ret[0] >>> 0;
17022
+ NoteAttachmentFinalization.register(this, this.__wbg_ptr, this);
17023
+ return this;
16973
17024
  }
16974
17025
  /**
16975
- * Creates a new note attachment with Word content from the provided word.
16976
- * @param {NoteAttachmentScheme} scheme
16977
- * @param {Word} word
16978
- * @returns {NoteAttachment}
17026
+ * Returns the number of words in this attachment.
17027
+ * @returns {number}
16979
17028
  */
16980
- static newWord(scheme, word) {
16981
- _assertClass(scheme, NoteAttachmentScheme);
16982
- _assertClass(word, Word);
16983
- const ret = wasm.noteattachment_newWord(scheme.__wbg_ptr, word.__wbg_ptr);
16984
- return NoteAttachment.__wrap(ret);
17029
+ numWords() {
17030
+ const ret = wasm.noteattachment_numWords(this.__wbg_ptr);
17031
+ return ret;
17032
+ }
17033
+ /**
17034
+ * Returns the attachment content as its constituent words.
17035
+ *
17036
+ * The content is always word-vector-shaped on the 0.15 surface, so this is
17037
+ * the inverse of `fromWord` / `fromWords`: it yields the same `Word`s the
17038
+ * attachment was built from (in order), letting JS callers decode the
17039
+ * packed values back out.
17040
+ * @returns {Word[]}
17041
+ */
17042
+ toWords() {
17043
+ const ret = wasm.noteattachment_toWords(this.__wbg_ptr);
17044
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
17045
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
17046
+ return v1;
16985
17047
  }
16986
17048
  }
16987
17049
  if (Symbol.dispose) NoteAttachment.prototype[Symbol.dispose] = NoteAttachment.prototype.free;
16988
17050
 
16989
- /**
16990
- * Defines the payload shape of a note attachment.
16991
- * @enum {0 | 1 | 2}
16992
- */
16993
- const NoteAttachmentKind = Object.freeze({
16994
- None: 0, "0": "None",
16995
- Word: 1, "1": "Word",
16996
- Array: 2, "2": "Array",
16997
- });
16998
-
16999
17051
  /**
17000
17052
  * Describes the type of a note attachment.
17001
17053
  *
@@ -17020,14 +17072,6 @@ class NoteAttachmentScheme {
17020
17072
  const ptr = this.__destroy_into_raw();
17021
17073
  wasm.__wbg_noteattachmentscheme_free(ptr, 0);
17022
17074
  }
17023
- /**
17024
- * Returns the note attachment scheme as a u32.
17025
- * @returns {number}
17026
- */
17027
- asU32() {
17028
- const ret = wasm.noteattachmentscheme_asU32(this.__wbg_ptr);
17029
- return ret >>> 0;
17030
- }
17031
17075
  /**
17032
17076
  * Returns true if the attachment scheme is the reserved value that signals an absent scheme.
17033
17077
  * @returns {boolean}
@@ -17037,12 +17081,19 @@ class NoteAttachmentScheme {
17037
17081
  return ret !== 0;
17038
17082
  }
17039
17083
  /**
17040
- * Creates a new `NoteAttachmentScheme` from a u32.
17084
+ * Creates a new `NoteAttachmentScheme` from a u32 value.
17085
+ *
17086
+ * Errors if `scheme` is out of range (the 0.15 surface narrowed the
17087
+ * underlying type from u32 → u16, so values outside `0..=u16::MAX`
17088
+ * are rejected).
17041
17089
  * @param {number} scheme
17042
17090
  */
17043
17091
  constructor(scheme) {
17044
17092
  const ret = wasm.noteattachmentscheme_new(scheme);
17045
- this.__wbg_ptr = ret >>> 0;
17093
+ if (ret[2]) {
17094
+ throw takeFromExternrefTable0(ret[1]);
17095
+ }
17096
+ this.__wbg_ptr = ret[0] >>> 0;
17046
17097
  NoteAttachmentSchemeFinalization.register(this, this.__wbg_ptr, this);
17047
17098
  return this;
17048
17099
  }
@@ -17182,6 +17233,14 @@ if (Symbol.dispose) NoteConsumptionStatus.prototype[Symbol.dispose] = NoteConsum
17182
17233
  * Details of a note consisting of assets, script, inputs, and a serial number.
17183
17234
  *
17184
17235
  * See the {@link Note} type for more details.
17236
+ *
17237
+ * Migration note (miden-client PR #2214): `NoteDetails::id()` and
17238
+ * `NoteDetails::nullifier()` were removed on the 0.15 protocol surface —
17239
+ * the ID now requires a `NoteMetadata` to compute (see `NoteId::new`),
17240
+ * and the nullifier moved onto `InputNoteRecord` where it is optional.
17241
+ * Use `details_commitment()` on a containing record (e.g.
17242
+ * `InputNoteRecord::details_commitment`) for the metadata-independent
17243
+ * identifier.
17185
17244
  */
17186
17245
  class NoteDetails {
17187
17246
  static __wrap(ptr) {
@@ -17209,14 +17268,6 @@ class NoteDetails {
17209
17268
  const ret = wasm.notedetails_assets(this.__wbg_ptr);
17210
17269
  return NoteAssets.__wrap(ret);
17211
17270
  }
17212
- /**
17213
- * Returns the note identifier derived from these details.
17214
- * @returns {NoteId}
17215
- */
17216
- id() {
17217
- const ret = wasm.notedetails_id(this.__wbg_ptr);
17218
- return NoteId.__wrap(ret);
17219
- }
17220
17271
  /**
17221
17272
  * Creates a new set of note details from the given assets and recipient.
17222
17273
  * @param {NoteAssets} note_assets
@@ -17230,14 +17281,6 @@ class NoteDetails {
17230
17281
  NoteDetailsFinalization.register(this, this.__wbg_ptr, this);
17231
17282
  return this;
17232
17283
  }
17233
- /**
17234
- * Returns the note nullifier as a word.
17235
- * @returns {Word}
17236
- */
17237
- nullifier() {
17238
- const ret = wasm.notedetails_nullifier(this.__wbg_ptr);
17239
- return Word.__wrap(ret);
17240
- }
17241
17284
  /**
17242
17285
  * Returns the recipient which controls when the note can be consumed.
17243
17286
  * @returns {NoteRecipient}
@@ -17590,12 +17633,17 @@ class NoteFile {
17590
17633
  return ret === 0 ? undefined : NoteDetails.__wrap(ret);
17591
17634
  }
17592
17635
  /**
17593
- * Returns the note ID for any `NoteFile` variant.
17594
- * @returns {NoteId}
17636
+ * Returns the note ID when the file carries one.
17637
+ *
17638
+ * Migration note (miden-client PR #2214): `NoteDetails::id()` was
17639
+ * removed (computing the ID now requires `NoteMetadata`), so the
17640
+ * `NoteDetails`-only variant cannot synthesize one without extra
17641
+ * information. Returns `None` in that case.
17642
+ * @returns {NoteId | undefined}
17595
17643
  */
17596
17644
  noteId() {
17597
17645
  const ret = wasm.notefile_noteId(this.__wbg_ptr);
17598
- return NoteId.__wrap(ret);
17646
+ return ret === 0 ? undefined : NoteId.__wrap(ret);
17599
17647
  }
17600
17648
  /**
17601
17649
  * Returns the note tag hint when present.
@@ -17623,6 +17671,10 @@ class NoteFile {
17623
17671
  }
17624
17672
  /**
17625
17673
  * Returns the note nullifier when present.
17674
+ *
17675
+ * Migration note (miden-client PR #2214): `NoteDetails::nullifier()`
17676
+ * was removed (the nullifier moved onto `InputNoteRecord` and is
17677
+ * optional there), so the `NoteDetails`-only variant returns `None`.
17626
17678
  * @returns {string | undefined}
17627
17679
  */
17628
17680
  nullifier() {
@@ -17698,13 +17750,6 @@ const NoteFilterTypes = Object.freeze({
17698
17750
  * See `NoteId` and `NoteMetadata` for additional details.
17699
17751
  */
17700
17752
  class NoteHeader {
17701
- static __wrap(ptr) {
17702
- ptr = ptr >>> 0;
17703
- const obj = Object.create(NoteHeader.prototype);
17704
- obj.__wbg_ptr = ptr;
17705
- NoteHeaderFinalization.register(obj, obj.__wbg_ptr, obj);
17706
- return obj;
17707
- }
17708
17753
  __destroy_into_raw() {
17709
17754
  const ptr = this.__wbg_ptr;
17710
17755
  this.__wbg_ptr = 0;
@@ -17720,7 +17765,7 @@ class NoteHeader {
17720
17765
  * @returns {NoteId}
17721
17766
  */
17722
17767
  id() {
17723
- const ret = wasm.accountcode_commitment(this.__wbg_ptr);
17768
+ const ret = wasm.noteheader_id(this.__wbg_ptr);
17724
17769
  return NoteId.__wrap(ret);
17725
17770
  }
17726
17771
  /**
@@ -17731,14 +17776,6 @@ class NoteHeader {
17731
17776
  const ret = wasm.noteheader_metadata(this.__wbg_ptr);
17732
17777
  return NoteMetadata.__wrap(ret);
17733
17778
  }
17734
- /**
17735
- * Returns a commitment to the note ID and metadata.
17736
- * @returns {Word}
17737
- */
17738
- toCommitment() {
17739
- const ret = wasm.noteheader_toCommitment(this.__wbg_ptr);
17740
- return Word.__wrap(ret);
17741
- }
17742
17779
  }
17743
17780
  if (Symbol.dispose) NoteHeader.prototype[Symbol.dispose] = NoteHeader.prototype.free;
17744
17781
 
@@ -17747,16 +17784,14 @@ if (Symbol.dispose) NoteHeader.prototype[Symbol.dispose] = NoteHeader.prototype.
17747
17784
  *
17748
17785
  * Note ID is computed as:
17749
17786
  *
17750
- * > `hash(recipient, asset_commitment)`
17751
- *
17752
- * where `recipient` is defined as:
17787
+ * > `hash(details_commitment, metadata_commitment)`
17753
17788
  *
17754
- * > `hash(hash(hash(serial_num, ZERO), script_root), input_commitment)`
17755
- *
17756
- * This achieves the following properties:
17757
- * - Every note can be reduced to a single unique ID.
17758
- * - To compute a note ID, we do not need to know the note's `serial_num`. Knowing the hash of the
17759
- * `serial_num` (as well as script root, input commitment, and note assets) is sufficient.
17789
+ * On the 0.15 protocol surface the upstream `NoteId::new` signature
17790
+ * changed from `(recipient_digest, asset_commitment)` to
17791
+ * `(NoteDetailsCommitment, &NoteMetadata)`. The JS API exposes
17792
+ * `NoteId.fromRaw(word)` for constructing an ID from a pre-computed
17793
+ * 32-byte commitment word (the previous two-Word constructor has no
17794
+ * 0.15 equivalent).
17760
17795
  */
17761
17796
  class NoteId {
17762
17797
  static __wrap(ptr) {
@@ -17797,17 +17832,18 @@ class NoteId {
17797
17832
  return NoteId.__wrap(ret[0]);
17798
17833
  }
17799
17834
  /**
17800
- * Builds a note ID from the recipient and asset commitments.
17801
- * @param {Word} recipient_digest
17802
- * @param {Word} asset_commitment_digest
17835
+ * Builds a note ID from its raw commitment word.
17836
+ *
17837
+ * `word` must already encode the final note-ID commitment — the
17838
+ * metadata-mixing that the previous 2-Word constructor did is no
17839
+ * longer part of the protocol surface.
17840
+ * @param {Word} word
17841
+ * @returns {NoteId}
17803
17842
  */
17804
- constructor(recipient_digest, asset_commitment_digest) {
17805
- _assertClass(recipient_digest, Word);
17806
- _assertClass(asset_commitment_digest, Word);
17807
- const ret = wasm.noteid_new(recipient_digest.__wbg_ptr, asset_commitment_digest.__wbg_ptr);
17808
- this.__wbg_ptr = ret >>> 0;
17809
- NoteIdFinalization.register(this, this.__wbg_ptr, this);
17810
- return this;
17843
+ static fromRaw(word) {
17844
+ _assertClass(word, Word);
17845
+ const ret = wasm.accountcode_commitment(word.__wbg_ptr);
17846
+ return NoteId.__wrap(ret);
17811
17847
  }
17812
17848
  /**
17813
17849
  * Returns the canonical hex representation of the note ID.
@@ -18020,7 +18056,7 @@ class NoteLocation {
18020
18056
  * @returns {number}
18021
18057
  */
18022
18058
  blockNum() {
18023
- const ret = wasm.noteattachmentscheme_asU32(this.__wbg_ptr);
18059
+ const ret = wasm.notelocation_blockNum(this.__wbg_ptr);
18024
18060
  return ret >>> 0;
18025
18061
  }
18026
18062
  }
@@ -18029,8 +18065,13 @@ if (Symbol.dispose) NoteLocation.prototype[Symbol.dispose] = NoteLocation.protot
18029
18065
  /**
18030
18066
  * Metadata associated with a note.
18031
18067
  *
18032
- * This metadata includes the sender, note type, tag, and an optional attachment.
18033
- * Attachments provide additional context about how notes should be processed.
18068
+ * 0.15 protocol surface: `NoteMetadata` is now constructed from a
18069
+ * [`PartialNoteMetadata`] (sender / `note_type` / tag) plus a `NoteAttachments`
18070
+ * collection — the previous `with_tag` / `with_attachment` / `attachment`
18071
+ * methods on `NoteMetadata` were moved (`with_tag` lives on
18072
+ * `PartialNoteMetadata`) or removed (`with_attachment` / `attachment`).
18073
+ * The JS constructor narrows back to the common case of an
18074
+ * attachment-less metadata.
18034
18075
  */
18035
18076
  class NoteMetadata {
18036
18077
  static __wrap(ptr) {
@@ -18051,15 +18092,7 @@ class NoteMetadata {
18051
18092
  wasm.__wbg_notemetadata_free(ptr, 0);
18052
18093
  }
18053
18094
  /**
18054
- * Returns the attachment of the note.
18055
- * @returns {NoteAttachment}
18056
- */
18057
- attachment() {
18058
- const ret = wasm.notemetadata_attachment(this.__wbg_ptr);
18059
- return NoteAttachment.__wrap(ret);
18060
- }
18061
- /**
18062
- * Creates metadata for a note.
18095
+ * Creates metadata for a note with no attachments.
18063
18096
  * @param {AccountId} sender
18064
18097
  * @param {NoteType} note_type
18065
18098
  * @param {NoteTag} note_tag
@@ -18085,7 +18118,7 @@ class NoteMetadata {
18085
18118
  * @returns {AccountId}
18086
18119
  */
18087
18120
  sender() {
18088
- const ret = wasm.accountdelta_id(this.__wbg_ptr);
18121
+ const ret = wasm.notemetadata_sender(this.__wbg_ptr);
18089
18122
  return AccountId.__wrap(ret);
18090
18123
  }
18091
18124
  /**
@@ -18096,30 +18129,6 @@ class NoteMetadata {
18096
18129
  const ret = wasm.notemetadata_tag(this.__wbg_ptr);
18097
18130
  return NoteTag.__wrap(ret);
18098
18131
  }
18099
- /**
18100
- * Adds an attachment to this metadata and returns the updated metadata.
18101
- *
18102
- * Attachments provide additional context about how notes should be processed.
18103
- * For example, a `NetworkAccountTarget` attachment indicates that the note
18104
- * should be consumed by a specific network account.
18105
- * @param {NoteAttachment} attachment
18106
- * @returns {NoteMetadata}
18107
- */
18108
- withAttachment(attachment) {
18109
- _assertClass(attachment, NoteAttachment);
18110
- const ret = wasm.notemetadata_withAttachment(this.__wbg_ptr, attachment.__wbg_ptr);
18111
- return NoteMetadata.__wrap(ret);
18112
- }
18113
- /**
18114
- * Sets the tag for this metadata and returns the updated metadata.
18115
- * @param {NoteTag} tag
18116
- * @returns {NoteMetadata}
18117
- */
18118
- withTag(tag) {
18119
- _assertClass(tag, NoteTag);
18120
- const ret = wasm.notemetadata_withTag(this.__wbg_ptr, tag.__wbg_ptr);
18121
- return NoteMetadata.__wrap(ret);
18122
- }
18123
18132
  }
18124
18133
  if (Symbol.dispose) NoteMetadata.prototype[Symbol.dispose] = NoteMetadata.prototype.free;
18125
18134
 
@@ -18444,7 +18453,7 @@ class NoteStorage {
18444
18453
  if (Symbol.dispose) NoteStorage.prototype[Symbol.dispose] = NoteStorage.prototype.free;
18445
18454
 
18446
18455
  /**
18447
- * Represents a single block's worth of note sync data.
18456
+ * Represents a single block's worth of note sync data returned by `syncNotes`.
18448
18457
  */
18449
18458
  class NoteSyncBlock {
18450
18459
  static __wrap(ptr) {
@@ -18494,7 +18503,12 @@ class NoteSyncBlock {
18494
18503
  if (Symbol.dispose) NoteSyncBlock.prototype[Symbol.dispose] = NoteSyncBlock.prototype.free;
18495
18504
 
18496
18505
  /**
18497
- * Represents the response data from `syncNotes`.
18506
+ * Aggregates the response data from `syncNotes`: the per-block updates plus
18507
+ * the upper bound of the requested range.
18508
+ *
18509
+ * The previous `chain_tip` accessor is gone — the upstream `sync_notes` RPC
18510
+ * no longer returns the current chain tip on this endpoint. Use the
18511
+ * regular state-sync flow (`syncState`) for the latest synced height.
18498
18512
  */
18499
18513
  class NoteSyncInfo {
18500
18514
  static __wrap(ptr) {
@@ -18515,7 +18529,9 @@ class NoteSyncInfo {
18515
18529
  wasm.__wbg_notesyncinfo_free(ptr, 0);
18516
18530
  }
18517
18531
  /**
18518
- * Returns the first block header associated with matching notes, if any.
18532
+ * Returns the first block header with matching notes, if any. Convenience
18533
+ * for callers that only requested a single tag and want the most recent
18534
+ * inclusion block.
18519
18535
  * @returns {BlockHeader | undefined}
18520
18536
  */
18521
18537
  blockHeader() {
@@ -18523,15 +18539,16 @@ class NoteSyncInfo {
18523
18539
  return ret === 0 ? undefined : BlockHeader.__wrap(ret);
18524
18540
  }
18525
18541
  /**
18526
- * Returns the last block checked by the node. Used as a cursor for pagination.
18542
+ * Returns the upper bound of the block range scanned in this call (the
18543
+ * `blockTo` argument passed to `syncNotes`).
18527
18544
  * @returns {number}
18528
18545
  */
18529
18546
  blockTo() {
18530
- const ret = wasm.notesyncinfo_blockTo(this.__wbg_ptr);
18547
+ const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
18531
18548
  return ret >>> 0;
18532
18549
  }
18533
18550
  /**
18534
- * Returns the blocks containing matching notes.
18551
+ * Returns the per-block breakdown.
18535
18552
  * @returns {NoteSyncBlock[]}
18536
18553
  */
18537
18554
  blocks() {
@@ -18541,15 +18558,7 @@ class NoteSyncInfo {
18541
18558
  return v1;
18542
18559
  }
18543
18560
  /**
18544
- * Returns the latest block number in the chain.
18545
- * @returns {number}
18546
- */
18547
- chainTip() {
18548
- const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
18549
- return ret >>> 0;
18550
- }
18551
- /**
18552
- * Returns the first block MMR path associated with matching notes, if any.
18561
+ * Returns the MMR path of the first block with matching notes, if any.
18553
18562
  * @returns {MerklePath | undefined}
18554
18563
  */
18555
18564
  mmrPath() {
@@ -18557,7 +18566,7 @@ class NoteSyncInfo {
18557
18566
  return ret === 0 ? undefined : MerklePath.__wrap(ret);
18558
18567
  }
18559
18568
  /**
18560
- * Returns the committed notes across all matching blocks.
18569
+ * Returns every committed note across all matching blocks (flattened).
18561
18570
  * @returns {CommittedNote[]}
18562
18571
  */
18563
18572
  notes() {
@@ -18604,7 +18613,7 @@ class NoteTag {
18604
18613
  * @returns {number}
18605
18614
  */
18606
18615
  asU32() {
18607
- const ret = wasm.noteattachmentscheme_asU32(this.__wbg_ptr);
18616
+ const ret = wasm.notelocation_blockNum(this.__wbg_ptr);
18608
18617
  return ret >>> 0;
18609
18618
  }
18610
18619
  /**
@@ -18612,7 +18621,7 @@ class NoteTag {
18612
18621
  * @param {number} tag
18613
18622
  */
18614
18623
  constructor(tag) {
18615
- const ret = wasm.noteattachmentscheme_new(tag);
18624
+ const ret = wasm.notetag_new(tag);
18616
18625
  this.__wbg_ptr = ret >>> 0;
18617
18626
  NoteTagFinalization.register(this, this.__wbg_ptr, this);
18618
18627
  return this;
@@ -18725,7 +18734,7 @@ class OutputNote {
18725
18734
  * @returns {NoteMetadata}
18726
18735
  */
18727
18736
  metadata() {
18728
- const ret = wasm.outputnote_metadata(this.__wbg_ptr);
18737
+ const ret = wasm.committednote_metadata(this.__wbg_ptr);
18729
18738
  return NoteMetadata.__wrap(ret);
18730
18739
  }
18731
18740
  /**
@@ -18853,7 +18862,7 @@ class OutputNoteRecord {
18853
18862
  * @returns {number}
18854
18863
  */
18855
18864
  expectedHeight() {
18856
- const ret = wasm.blockheader_version(this.__wbg_ptr);
18865
+ const ret = wasm.outputnoterecord_expectedHeight(this.__wbg_ptr);
18857
18866
  return ret >>> 0;
18858
18867
  }
18859
18868
  /**
@@ -18893,7 +18902,7 @@ class OutputNoteRecord {
18893
18902
  * @returns {NoteMetadata}
18894
18903
  */
18895
18904
  metadata() {
18896
- const ret = wasm.outputnoterecord_metadata(this.__wbg_ptr);
18905
+ const ret = wasm.committednote_metadata(this.__wbg_ptr);
18897
18906
  return NoteMetadata.__wrap(ret);
18898
18907
  }
18899
18908
  /**
@@ -19124,7 +19133,7 @@ class PartialNote {
19124
19133
  * @returns {NoteMetadata}
19125
19134
  */
19126
19135
  metadata() {
19127
- const ret = wasm.partialnote_metadata(this.__wbg_ptr);
19136
+ const ret = wasm.committednote_metadata(this.__wbg_ptr);
19128
19137
  return NoteMetadata.__wrap(ret);
19129
19138
  }
19130
19139
  /**
@@ -19525,9 +19534,10 @@ class RpcClient {
19525
19534
  * Fetches a note script by its root hash from the connected Miden node.
19526
19535
  *
19527
19536
  * @param script_root - The root hash of the note script to fetch.
19528
- * @returns Promise that resolves to the `NoteScript`.
19537
+ * @returns Promise that resolves to the `NoteScript`, or `undefined` if the node has no
19538
+ * script for that root.
19529
19539
  * @param {Word} script_root
19530
- * @returns {Promise<NoteScript>}
19540
+ * @returns {Promise<NoteScript | undefined>}
19531
19541
  */
19532
19542
  getNoteScriptByRoot(script_root) {
19533
19543
  _assertClass(script_root, Word);
@@ -19581,15 +19591,15 @@ class RpcClient {
19581
19591
  }
19582
19592
  /**
19583
19593
  * Fetches notes matching the provided tags from the node.
19584
- * @param {number} block_num
19585
- * @param {number | null | undefined} block_to
19594
+ * @param {number} block_from
19595
+ * @param {number} block_to
19586
19596
  * @param {NoteTag[]} note_tags
19587
19597
  * @returns {Promise<NoteSyncInfo>}
19588
19598
  */
19589
- syncNotes(block_num, block_to, note_tags) {
19599
+ syncNotes(block_from, block_to, note_tags) {
19590
19600
  const ptr0 = passArrayJsValueToWasm0(note_tags, wasm.__wbindgen_malloc);
19591
19601
  const len0 = WASM_VECTOR_LEN;
19592
- const ret = wasm.rpcclient_syncNotes(this.__wbg_ptr, block_num, isLikeNone(block_to) ? 0x100000001 : (block_to) >>> 0, ptr0, len0);
19602
+ const ret = wasm.rpcclient_syncNotes(this.__wbg_ptr, block_from, block_to, ptr0, len0);
19593
19603
  return ret;
19594
19604
  }
19595
19605
  /**
@@ -19667,6 +19677,15 @@ class SerializedInputNoteData {
19667
19677
  const ptr = this.__destroy_into_raw();
19668
19678
  wasm.__wbg_serializedinputnotedata_free(ptr, 0);
19669
19679
  }
19680
+ /**
19681
+ * @returns {Uint8Array}
19682
+ */
19683
+ get attachments() {
19684
+ const ret = wasm.__wbg_get_serializedinputnotedata_attachments(this.__wbg_ptr);
19685
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
19686
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
19687
+ return v1;
19688
+ }
19670
19689
  /**
19671
19690
  * @returns {number | undefined}
19672
19691
  */
@@ -19708,6 +19727,21 @@ class SerializedInputNoteData {
19708
19727
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
19709
19728
  }
19710
19729
  }
19730
+ /**
19731
+ * @returns {string}
19732
+ */
19733
+ get detailsCommitment() {
19734
+ let deferred1_0;
19735
+ let deferred1_1;
19736
+ try {
19737
+ const ret = wasm.__wbg_get_serializedinputnotedata_detailsCommitment(this.__wbg_ptr);
19738
+ deferred1_0 = ret[0];
19739
+ deferred1_1 = ret[1];
19740
+ return getStringFromWasm0(ret[0], ret[1]);
19741
+ } finally {
19742
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
19743
+ }
19744
+ }
19711
19745
  /**
19712
19746
  * @returns {Uint8Array}
19713
19747
  */
@@ -19727,19 +19761,16 @@ class SerializedInputNoteData {
19727
19761
  return v1;
19728
19762
  }
19729
19763
  /**
19730
- * @returns {string}
19764
+ * @returns {string | undefined}
19731
19765
  */
19732
19766
  get noteId() {
19733
- let deferred1_0;
19734
- let deferred1_1;
19735
- try {
19736
- const ret = wasm.__wbg_get_serializedinputnotedata_noteId(this.__wbg_ptr);
19737
- deferred1_0 = ret[0];
19738
- deferred1_1 = ret[1];
19739
- return getStringFromWasm0(ret[0], ret[1]);
19740
- } finally {
19741
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
19767
+ const ret = wasm.__wbg_get_serializedinputnotedata_noteId(this.__wbg_ptr);
19768
+ let v1;
19769
+ if (ret[0] !== 0) {
19770
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
19771
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
19742
19772
  }
19773
+ return v1;
19743
19774
  }
19744
19775
  /**
19745
19776
  * @returns {string}
@@ -19805,6 +19836,14 @@ class SerializedInputNoteData {
19805
19836
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
19806
19837
  return v1;
19807
19838
  }
19839
+ /**
19840
+ * @param {Uint8Array} arg0
19841
+ */
19842
+ set attachments(arg0) {
19843
+ const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
19844
+ const len0 = WASM_VECTOR_LEN;
19845
+ wasm.__wbg_set_serializedinputnotedata_attachments(this.__wbg_ptr, ptr0, len0);
19846
+ }
19808
19847
  /**
19809
19848
  * @param {number | null} [arg0]
19810
19849
  */
@@ -19833,6 +19872,14 @@ class SerializedInputNoteData {
19833
19872
  const len0 = WASM_VECTOR_LEN;
19834
19873
  wasm.__wbg_set_serializedinputnotedata_createdAt(this.__wbg_ptr, ptr0, len0);
19835
19874
  }
19875
+ /**
19876
+ * @param {string} arg0
19877
+ */
19878
+ set detailsCommitment(arg0) {
19879
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
19880
+ const len0 = WASM_VECTOR_LEN;
19881
+ wasm.__wbg_set_serializedinputnotedata_detailsCommitment(this.__wbg_ptr, ptr0, len0);
19882
+ }
19836
19883
  /**
19837
19884
  * @param {Uint8Array} arg0
19838
19885
  */
@@ -19850,11 +19897,11 @@ class SerializedInputNoteData {
19850
19897
  wasm.__wbg_set_serializedinputnotedata_noteAssets(this.__wbg_ptr, ptr0, len0);
19851
19898
  }
19852
19899
  /**
19853
- * @param {string} arg0
19900
+ * @param {string | null} [arg0]
19854
19901
  */
19855
19902
  set noteId(arg0) {
19856
- const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
19857
- const len0 = WASM_VECTOR_LEN;
19903
+ var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
19904
+ var len0 = WASM_VECTOR_LEN;
19858
19905
  wasm.__wbg_set_serializedinputnotedata_noteId(this.__wbg_ptr, ptr0, len0);
19859
19906
  }
19860
19907
  /**
@@ -19930,6 +19977,15 @@ class SerializedOutputNoteData {
19930
19977
  const ptr = this.__destroy_into_raw();
19931
19978
  wasm.__wbg_serializedoutputnotedata_free(ptr, 0);
19932
19979
  }
19980
+ /**
19981
+ * @returns {Uint8Array}
19982
+ */
19983
+ get attachments() {
19984
+ const ret = wasm.__wbg_get_serializedoutputnotedata_attachments(this.__wbg_ptr);
19985
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
19986
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
19987
+ return v1;
19988
+ }
19933
19989
  /**
19934
19990
  * @returns {number}
19935
19991
  */
@@ -20013,6 +20069,14 @@ class SerializedOutputNoteData {
20013
20069
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
20014
20070
  return v1;
20015
20071
  }
20072
+ /**
20073
+ * @param {Uint8Array} arg0
20074
+ */
20075
+ set attachments(arg0) {
20076
+ const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
20077
+ const len0 = WASM_VECTOR_LEN;
20078
+ wasm.__wbg_set_serializedoutputnotedata_attachments(this.__wbg_ptr, ptr0, len0);
20079
+ }
20016
20080
  /**
20017
20081
  * @param {number} arg0
20018
20082
  */
@@ -20025,7 +20089,7 @@ class SerializedOutputNoteData {
20025
20089
  set metadata(arg0) {
20026
20090
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
20027
20091
  const len0 = WASM_VECTOR_LEN;
20028
- wasm.__wbg_set_serializedoutputnotedata_metadata(this.__wbg_ptr, ptr0, len0);
20092
+ wasm.__wbg_set_jsstatesyncupdate_blockHasRelevantNotes(this.__wbg_ptr, ptr0, len0);
20029
20093
  }
20030
20094
  /**
20031
20095
  * @param {Uint8Array} arg0
@@ -20057,7 +20121,7 @@ class SerializedOutputNoteData {
20057
20121
  set recipientDigest(arg0) {
20058
20122
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
20059
20123
  const len0 = WASM_VECTOR_LEN;
20060
- wasm.__wbg_set_jsstoragemapentry_value(this.__wbg_ptr, ptr0, len0);
20124
+ wasm.__wbg_set_jsaccountupdate_vaultRoot(this.__wbg_ptr, ptr0, len0);
20061
20125
  }
20062
20126
  /**
20063
20127
  * @param {number} arg0
@@ -20213,7 +20277,7 @@ class SerializedTransactionData {
20213
20277
  set status(arg0) {
20214
20278
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
20215
20279
  const len0 = WASM_VECTOR_LEN;
20216
- wasm.__wbg_set_serializedtransactiondata_status(this.__wbg_ptr, ptr0, len0);
20280
+ wasm.__wbg_set_serializedoutputnotedata_attachments(this.__wbg_ptr, ptr0, len0);
20217
20281
  }
20218
20282
  /**
20219
20283
  * @param {Uint8Array | null} [arg0]
@@ -20774,7 +20838,7 @@ class StorageMapInfo {
20774
20838
  * @returns {number}
20775
20839
  */
20776
20840
  blockNumber() {
20777
- const ret = wasm.notesyncinfo_blockTo(this.__wbg_ptr);
20841
+ const ret = wasm.storagemapinfo_blockNumber(this.__wbg_ptr);
20778
20842
  return ret >>> 0;
20779
20843
  }
20780
20844
  /**
@@ -20825,7 +20889,7 @@ class StorageMapUpdate {
20825
20889
  * @returns {number}
20826
20890
  */
20827
20891
  blockNum() {
20828
- const ret = wasm.storagemapupdate_blockNum(this.__wbg_ptr);
20892
+ const ret = wasm.committednote_tag(this.__wbg_ptr);
20829
20893
  return ret >>> 0;
20830
20894
  }
20831
20895
  /**
@@ -21461,6 +21525,33 @@ class TransactionProver {
21461
21525
  }
21462
21526
  return v1;
21463
21527
  }
21528
+ /**
21529
+ * Creates a prover that delegates `prove()` to a JavaScript callback.
21530
+ *
21531
+ * The callback receives the serialized [`TransactionInputs`] as a
21532
+ * `Uint8Array` and must return a `Promise<Uint8Array>` resolving to a
21533
+ * serialized [`ProvenTransaction`] (same encoding the gRPC remote
21534
+ * prover uses: `tx_inputs.to_bytes()` in, `ProvenTransaction::read_from_bytes`
21535
+ * out).
21536
+ *
21537
+ * Use case: routing prove to a native iOS / Android plugin
21538
+ * (`@miden/native-prover`) so mobile builds skip WASM prove entirely
21539
+ * — `WKWebView` can't be made cross-origin-isolated reliably and the
21540
+ * MT WASM bundle can't instantiate without `SharedArrayBuffer`, so the
21541
+ * host wraps a native Rust prover (built with the same `miden_tx`
21542
+ * crate) and exposes a JS-shaped callback over the Capacitor bridge.
21543
+ *
21544
+ * The SDK does NOT serialize the prover for persistence across
21545
+ * reloads (unlike `newRemoteProver`), since the callback is a
21546
+ * runtime JS reference. Hosts must recreate the prover on every
21547
+ * page load.
21548
+ * @param {Function} callback
21549
+ * @returns {TransactionProver}
21550
+ */
21551
+ static newCallbackProver(callback) {
21552
+ const ret = wasm.transactionprover_newCallbackProver(callback);
21553
+ return TransactionProver.__wrap(ret);
21554
+ }
21464
21555
  /**
21465
21556
  * Creates a prover that uses the local proving backend.
21466
21557
  * @returns {TransactionProver}
@@ -22870,8 +22961,20 @@ class WebClient {
22870
22961
  return ret;
22871
22962
  }
22872
22963
  /**
22964
+ * Imports a note file and returns the imported note's identifier.
22965
+ *
22966
+ * A note file that carries metadata — an explicit `NoteId` or a full note
22967
+ * with proof — resolves to a concrete `NoteId`, which is returned so the
22968
+ * caller can look the note up with [`get_input_note`]. A details-only file
22969
+ * (`NoteDetails`) has no metadata and therefore no `NoteId` yet, so its
22970
+ * metadata-independent details commitment is returned instead.
22971
+ *
22972
+ * Migration note (miden-client PR #2214): `Client::import_notes` now
22973
+ * returns `Vec<NoteDetailsCommitment>` rather than `Vec<NoteId>`, since
22974
+ * metadata-less imports have no note ID; this method recovers the `NoteId`
22975
+ * from the note file when one is available.
22873
22976
  * @param {NoteFile} note_file
22874
- * @returns {Promise<NoteId>}
22977
+ * @returns {Promise<string>}
22875
22978
  */
22876
22979
  importNoteFile(note_file) {
22877
22980
  _assertClass(note_file, NoteFile);
@@ -22915,6 +23018,35 @@ class WebClient {
22915
23018
  }
22916
23019
  return WebKeystoreApi.__wrap(ret[0]);
22917
23020
  }
23021
+ /**
23022
+ * Returns the raw JS value that the most recent sign-callback invocation
23023
+ * threw, or `null` if the last sign call succeeded (or no call has
23024
+ * happened yet).
23025
+ *
23026
+ * Combined with the serialized-call discipline enforced at the JS
23027
+ * `WebClient` wrapper, this lets a caller that caught a failed
23028
+ * `executeTransaction` / `submitNewTransaction` recover the original
23029
+ * JS error the signing callback threw — preserving any structured
23030
+ * metadata (e.g. a `reason: 'locked'` property) that the kernel-level
23031
+ * `auth::request` diagnostic would otherwise have erased.
23032
+ *
23033
+ * # Usage (TS)
23034
+ * ```ts
23035
+ * try {
23036
+ * await client.submitNewTransaction(acc, req);
23037
+ * } catch (e) {
23038
+ * const authErr = client.lastAuthError();
23039
+ * if (authErr && authErr.reason === 'locked') {
23040
+ * // wait for unlock, then retry
23041
+ * }
23042
+ * }
23043
+ * ```
23044
+ * @returns {any}
23045
+ */
23046
+ lastAuthError() {
23047
+ const ret = wasm.webclient_lastAuthError(this.__wbg_ptr);
23048
+ return ret;
23049
+ }
22918
23050
  /**
22919
23051
  * Returns all the existing setting keys from the store.
22920
23052
  * @returns {Promise<string[]>}
@@ -22975,19 +23107,27 @@ class WebClient {
22975
23107
  return TransactionRequest.__wrap(ret[0]);
22976
23108
  }
22977
23109
  /**
23110
+ * Creates, persists, and returns a new fungible faucet account.
23111
+ *
23112
+ * Only fungible faucets are supported, so passing `non_fungible = true` fails fast with a
23113
+ * clear message. The faucet is registered with mint and burn policies (both `AllowAll`); its
23114
+ * secret key is added to the keystore.
22978
23115
  * @param {AccountStorageMode} storage_mode
22979
23116
  * @param {boolean} non_fungible
23117
+ * @param {string} token_name
22980
23118
  * @param {string} token_symbol
22981
23119
  * @param {number} decimals
22982
23120
  * @param {bigint} max_supply
22983
23121
  * @param {AuthScheme} auth_scheme
22984
23122
  * @returns {Promise<Account>}
22985
23123
  */
22986
- newFaucet(storage_mode, non_fungible, token_symbol, decimals, max_supply, auth_scheme) {
23124
+ newFaucet(storage_mode, non_fungible, token_name, token_symbol, decimals, max_supply, auth_scheme) {
22987
23125
  _assertClass(storage_mode, AccountStorageMode);
22988
- const ptr0 = passStringToWasm0(token_symbol, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
23126
+ const ptr0 = passStringToWasm0(token_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
22989
23127
  const len0 = WASM_VECTOR_LEN;
22990
- const ret = wasm.webclient_newFaucet(this.__wbg_ptr, storage_mode.__wbg_ptr, non_fungible, ptr0, len0, decimals, max_supply, auth_scheme);
23128
+ const ptr1 = passStringToWasm0(token_symbol, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
23129
+ const len1 = WASM_VECTOR_LEN;
23130
+ const ret = wasm.webclient_newFaucet(this.__wbg_ptr, storage_mode.__wbg_ptr, non_fungible, ptr0, len0, ptr1, len1, decimals, max_supply, auth_scheme);
22991
23131
  return ret;
22992
23132
  }
22993
23133
  /**
@@ -23003,6 +23143,53 @@ class WebClient {
23003
23143
  const ret = wasm.webclient_newMintTransactionRequest(this.__wbg_ptr, target_account_id.__wbg_ptr, faucet_id.__wbg_ptr, note_type, amount);
23004
23144
  return ret;
23005
23145
  }
23146
+ /**
23147
+ * @param {Note} pswap_note
23148
+ * @param {AccountId} creator_account_id
23149
+ * @returns {TransactionRequest}
23150
+ */
23151
+ newPswapCancelTransactionRequest(pswap_note, creator_account_id) {
23152
+ _assertClass(pswap_note, Note);
23153
+ _assertClass(creator_account_id, AccountId);
23154
+ const ret = wasm.webclient_newPswapCancelTransactionRequest(this.__wbg_ptr, pswap_note.__wbg_ptr, creator_account_id.__wbg_ptr);
23155
+ if (ret[2]) {
23156
+ throw takeFromExternrefTable0(ret[1]);
23157
+ }
23158
+ return TransactionRequest.__wrap(ret[0]);
23159
+ }
23160
+ /**
23161
+ * @param {Note} pswap_note
23162
+ * @param {AccountId} consumer_account_id
23163
+ * @param {bigint} account_fill_amount
23164
+ * @param {bigint} note_fill_amount
23165
+ * @returns {TransactionRequest}
23166
+ */
23167
+ newPswapConsumeTransactionRequest(pswap_note, consumer_account_id, account_fill_amount, note_fill_amount) {
23168
+ _assertClass(pswap_note, Note);
23169
+ _assertClass(consumer_account_id, AccountId);
23170
+ const ret = wasm.webclient_newPswapConsumeTransactionRequest(this.__wbg_ptr, pswap_note.__wbg_ptr, consumer_account_id.__wbg_ptr, account_fill_amount, note_fill_amount);
23171
+ if (ret[2]) {
23172
+ throw takeFromExternrefTable0(ret[1]);
23173
+ }
23174
+ return TransactionRequest.__wrap(ret[0]);
23175
+ }
23176
+ /**
23177
+ * @param {AccountId} creator_account_id
23178
+ * @param {AccountId} offered_asset_faucet_id
23179
+ * @param {bigint} offered_asset_amount
23180
+ * @param {AccountId} requested_asset_faucet_id
23181
+ * @param {bigint} requested_asset_amount
23182
+ * @param {NoteType} note_type
23183
+ * @param {NoteType} payback_note_type
23184
+ * @returns {Promise<TransactionRequest>}
23185
+ */
23186
+ newPswapCreateTransactionRequest(creator_account_id, offered_asset_faucet_id, offered_asset_amount, requested_asset_faucet_id, requested_asset_amount, note_type, payback_note_type) {
23187
+ _assertClass(creator_account_id, AccountId);
23188
+ _assertClass(offered_asset_faucet_id, AccountId);
23189
+ _assertClass(requested_asset_faucet_id, AccountId);
23190
+ const ret = wasm.webclient_newPswapCreateTransactionRequest(this.__wbg_ptr, creator_account_id.__wbg_ptr, offered_asset_faucet_id.__wbg_ptr, offered_asset_amount, requested_asset_faucet_id.__wbg_ptr, requested_asset_amount, note_type, payback_note_type);
23191
+ return ret;
23192
+ }
23006
23193
  /**
23007
23194
  * @param {AccountId} sender_account_id
23008
23195
  * @param {AccountId} target_account_id
@@ -23382,13 +23569,20 @@ class Word {
23382
23569
  }
23383
23570
  /**
23384
23571
  * Creates a word from four numeric values.
23572
+ *
23573
+ * Each input must be a canonical field element, i.e. strictly less than the field modulus.
23574
+ * `Felt::new` (now fallible on the 0.15 surface) errors out on inputs at or beyond the
23575
+ * modulus; the error is surfaced to JS.
23385
23576
  * @param {BigUint64Array} u64_vec
23386
23577
  */
23387
23578
  constructor(u64_vec) {
23388
23579
  const ptr0 = passArray64ToWasm0(u64_vec, wasm.__wbindgen_malloc);
23389
23580
  const len0 = WASM_VECTOR_LEN;
23390
23581
  const ret = wasm.word_new(ptr0, len0);
23391
- this.__wbg_ptr = ret >>> 0;
23582
+ if (ret[2]) {
23583
+ throw takeFromExternrefTable0(ret[1]);
23584
+ }
23585
+ this.__wbg_ptr = ret[0] >>> 0;
23392
23586
  WordFinalization.register(this, this.__wbg_ptr, this);
23393
23587
  return this;
23394
23588
  }
@@ -23496,6 +23690,20 @@ function importStore(store_name, store_dump) {
23496
23690
  return ret;
23497
23691
  }
23498
23692
 
23693
+ /**
23694
+ * Single-threaded version of `parallel_sum_bench` for direct comparison.
23695
+ * Same workload, plain `iter()` — bypasses rayon entirely. Needs to live
23696
+ * on the WASM side rather than be reimplemented in JS so the workload is
23697
+ * bit-for-bit identical to `parallel_sum_bench` (same libm, same FP
23698
+ * determinism, same constant-folding resistance).
23699
+ * @param {bigint} n
23700
+ * @returns {bigint}
23701
+ */
23702
+ function sequentialSumBench(n) {
23703
+ const ret = wasm.sequentialSumBench(n);
23704
+ return BigInt.asUintN(64, ret);
23705
+ }
23706
+
23499
23707
  /**
23500
23708
  * Initializes the `tracing` subscriber that routes Rust log output to the
23501
23709
  * browser console via `console.log` / `console.warn` / `console.error`.
@@ -24002,6 +24210,10 @@ function __wbg_get_imports() {
24002
24210
  const ret = getBlockHeaders(getStringFromWasm0(arg0, arg1), v0);
24003
24211
  return ret;
24004
24212
  },
24213
+ __wbg_getCurrentBlockchainPeaks_f0d990ec54236a85: function(arg0, arg1) {
24214
+ const ret = getCurrentBlockchainPeaks(getStringFromWasm0(arg0, arg1));
24215
+ return ret;
24216
+ },
24005
24217
  __wbg_getForeignAccountCode_d4d803c5248469e8: function(arg0, arg1, arg2, arg3) {
24006
24218
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
24007
24219
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
@@ -24108,10 +24320,6 @@ function __wbg_get_imports() {
24108
24320
  const ret = getPartialBlockchainNodes(getStringFromWasm0(arg0, arg1), v0);
24109
24321
  return ret;
24110
24322
  },
24111
- __wbg_getPartialBlockchainPeaksByBlockNum_18d5c35d4c5bfbb9: function(arg0, arg1, arg2) {
24112
- const ret = getPartialBlockchainPeaksByBlockNum(getStringFromWasm0(arg0, arg1), arg2 >>> 0);
24113
- return ret;
24114
- },
24115
24323
  __wbg_getRandomValues_1c61fac11405ffdc: function() { return handleError(function (arg0, arg1) {
24116
24324
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
24117
24325
  }, arguments); },
@@ -24251,12 +24459,10 @@ function __wbg_get_imports() {
24251
24459
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
24252
24460
  }
24253
24461
  },
24254
- __wbg_insertBlockHeader_3477dcb5e51c9963: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
24462
+ __wbg_insertBlockHeader_23b7b30d0614926f: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24255
24463
  var v0 = getArrayU8FromWasm0(arg3, arg4).slice();
24256
24464
  wasm.__wbindgen_free(arg3, arg4 * 1, 1);
24257
- var v1 = getArrayU8FromWasm0(arg5, arg6).slice();
24258
- wasm.__wbindgen_free(arg5, arg6 * 1, 1);
24259
- const ret = insertBlockHeader(getStringFromWasm0(arg0, arg1), arg2 >>> 0, v0, v1, arg7 !== 0);
24465
+ const ret = insertBlockHeader(getStringFromWasm0(arg0, arg1), arg2 >>> 0, v0, arg5 !== 0);
24260
24466
  return ret;
24261
24467
  },
24262
24468
  __wbg_insertPartialBlockchainNodes_403400ec217229f2: function(arg0, arg1, arg2, arg3, arg4, arg5) {
@@ -24466,7 +24672,7 @@ function __wbg_get_imports() {
24466
24672
  const a = state0.a;
24467
24673
  state0.a = 0;
24468
24674
  try {
24469
- return wasm_bindgen__convert__closures_____invoke__hf3bad69ddb7e770e(a, state0.b, arg0, arg1);
24675
+ return wasm_bindgen__convert__closures_____invoke__h7a3c25b2fe6d77ec(a, state0.b, arg0, arg1);
24470
24676
  } finally {
24471
24677
  state0.a = a;
24472
24678
  }
@@ -24521,6 +24727,10 @@ function __wbg_get_imports() {
24521
24727
  const ret = NoteAndArgs.__unwrap(arg0);
24522
24728
  return ret;
24523
24729
  },
24730
+ __wbg_noteattachment_new: function(arg0) {
24731
+ const ret = NoteAttachment.__wrap(arg0);
24732
+ return ret;
24733
+ },
24524
24734
  __wbg_noteconsumability_new: function(arg0) {
24525
24735
  const ret = NoteConsumability.__wrap(arg0);
24526
24736
  return ret;
@@ -24984,46 +25194,53 @@ function __wbg_get_imports() {
24984
25194
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
24985
25195
  }
24986
25196
  },
24987
- __wbg_upsertInputNote_16ac41c463f69a4d: 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) {
25197
+ __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) {
24988
25198
  let deferred0_0;
24989
25199
  let deferred0_1;
24990
- let deferred4_0;
24991
- let deferred4_1;
24992
25200
  let deferred6_0;
24993
25201
  let deferred6_1;
24994
- let deferred7_0;
24995
- let deferred7_1;
25202
+ let deferred8_0;
25203
+ let deferred8_1;
25204
+ let deferred9_0;
25205
+ let deferred9_1;
24996
25206
  try {
24997
25207
  deferred0_0 = arg2;
24998
25208
  deferred0_1 = arg3;
24999
- var v1 = getArrayU8FromWasm0(arg4, arg5).slice();
25000
- wasm.__wbindgen_free(arg4, arg5 * 1, 1);
25209
+ let v1;
25210
+ if (arg4 !== 0) {
25211
+ v1 = getStringFromWasm0(arg4, arg5).slice();
25212
+ wasm.__wbindgen_free(arg4, arg5 * 1, 1);
25213
+ }
25001
25214
  var v2 = getArrayU8FromWasm0(arg6, arg7).slice();
25002
25215
  wasm.__wbindgen_free(arg6, arg7 * 1, 1);
25003
25216
  var v3 = getArrayU8FromWasm0(arg8, arg9).slice();
25004
25217
  wasm.__wbindgen_free(arg8, arg9 * 1, 1);
25005
- deferred4_0 = arg10;
25006
- deferred4_1 = arg11;
25218
+ var v4 = getArrayU8FromWasm0(arg10, arg11).slice();
25219
+ wasm.__wbindgen_free(arg10, arg11 * 1, 1);
25007
25220
  var v5 = getArrayU8FromWasm0(arg12, arg13).slice();
25008
25221
  wasm.__wbindgen_free(arg12, arg13 * 1, 1);
25009
25222
  deferred6_0 = arg14;
25010
25223
  deferred6_1 = arg15;
25011
- deferred7_0 = arg16;
25012
- deferred7_1 = arg17;
25013
- var v8 = getArrayU8FromWasm0(arg19, arg20).slice();
25014
- wasm.__wbindgen_free(arg19, arg20 * 1, 1);
25015
- let v9;
25016
- if (arg23 !== 0) {
25017
- v9 = getStringFromWasm0(arg23, arg24).slice();
25018
- wasm.__wbindgen_free(arg23, arg24 * 1, 1);
25224
+ var v7 = getArrayU8FromWasm0(arg16, arg17).slice();
25225
+ wasm.__wbindgen_free(arg16, arg17 * 1, 1);
25226
+ deferred8_0 = arg18;
25227
+ deferred8_1 = arg19;
25228
+ deferred9_0 = arg20;
25229
+ deferred9_1 = arg21;
25230
+ var v10 = getArrayU8FromWasm0(arg23, arg24).slice();
25231
+ wasm.__wbindgen_free(arg23, arg24 * 1, 1);
25232
+ let v11;
25233
+ if (arg27 !== 0) {
25234
+ v11 = getStringFromWasm0(arg27, arg28).slice();
25235
+ wasm.__wbindgen_free(arg27, arg28 * 1, 1);
25019
25236
  }
25020
- const ret = upsertInputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), v1, v2, v3, getStringFromWasm0(arg10, arg11), v5, getStringFromWasm0(arg14, arg15), getStringFromWasm0(arg16, arg17), arg18, v8, arg21 === 0x100000001 ? undefined : arg21, arg22 === 0x100000001 ? undefined : arg22, v9);
25237
+ 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);
25021
25238
  return ret;
25022
25239
  } finally {
25023
25240
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25024
- wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
25025
25241
  wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
25026
- wasm.__wbindgen_free(deferred7_0, deferred7_1, 1);
25242
+ wasm.__wbindgen_free(deferred8_0, deferred8_1, 1);
25243
+ wasm.__wbindgen_free(deferred9_0, deferred9_1, 1);
25027
25244
  }
25028
25245
  },
25029
25246
  __wbg_upsertNoteScript_77ad6333fd8d09bd: function(arg0, arg1, arg2, arg3, arg4, arg5) {
@@ -25040,32 +25257,34 @@ function __wbg_get_imports() {
25040
25257
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25041
25258
  }
25042
25259
  },
25043
- __wbg_upsertOutputNote_80bcb98476b58b0b: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) {
25260
+ __wbg_upsertOutputNote_086a8c1c81f11d3c: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17) {
25044
25261
  let deferred0_0;
25045
25262
  let deferred0_1;
25046
- let deferred2_0;
25047
- let deferred2_1;
25263
+ let deferred3_0;
25264
+ let deferred3_1;
25048
25265
  try {
25049
25266
  deferred0_0 = arg2;
25050
25267
  deferred0_1 = arg3;
25051
25268
  var v1 = getArrayU8FromWasm0(arg4, arg5).slice();
25052
25269
  wasm.__wbindgen_free(arg4, arg5 * 1, 1);
25053
- deferred2_0 = arg6;
25054
- deferred2_1 = arg7;
25055
- var v3 = getArrayU8FromWasm0(arg8, arg9).slice();
25056
- wasm.__wbindgen_free(arg8, arg9 * 1, 1);
25057
- let v4;
25058
- if (arg10 !== 0) {
25059
- v4 = getStringFromWasm0(arg10, arg11).slice();
25060
- wasm.__wbindgen_free(arg10, arg11 * 1, 1);
25270
+ var v2 = getArrayU8FromWasm0(arg6, arg7).slice();
25271
+ wasm.__wbindgen_free(arg6, arg7 * 1, 1);
25272
+ deferred3_0 = arg8;
25273
+ deferred3_1 = arg9;
25274
+ var v4 = getArrayU8FromWasm0(arg10, arg11).slice();
25275
+ wasm.__wbindgen_free(arg10, arg11 * 1, 1);
25276
+ let v5;
25277
+ if (arg12 !== 0) {
25278
+ v5 = getStringFromWasm0(arg12, arg13).slice();
25279
+ wasm.__wbindgen_free(arg12, arg13 * 1, 1);
25061
25280
  }
25062
- var v5 = getArrayU8FromWasm0(arg14, arg15).slice();
25063
- wasm.__wbindgen_free(arg14, arg15 * 1, 1);
25064
- const ret = upsertOutputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), v1, getStringFromWasm0(arg6, arg7), v3, v4, arg12 >>> 0, arg13, v5);
25281
+ var v6 = getArrayU8FromWasm0(arg16, arg17).slice();
25282
+ wasm.__wbindgen_free(arg16, arg17 * 1, 1);
25283
+ const ret = upsertOutputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), v1, v2, getStringFromWasm0(arg8, arg9), v4, v5, arg14 >>> 0, arg15, v6);
25065
25284
  return ret;
25066
25285
  } finally {
25067
25286
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25068
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
25287
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
25069
25288
  }
25070
25289
  },
25071
25290
  __wbg_upsertStorageMapEntries_068d8303824fff58: function(arg0, arg1, arg2, arg3, arg4, arg5) {
@@ -25134,13 +25353,13 @@ function __wbg_get_imports() {
25134
25353
  return ret;
25135
25354
  },
25136
25355
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
25137
- // Cast intrinsic for `Closure(Closure { dtor_idx: 359, function: Function { arguments: [Externref], shim_idx: 699, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
25138
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h521bf77e4c41e510, wasm_bindgen__convert__closures_____invoke__h305992f72ee30af3);
25356
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 441, function: Function { arguments: [Externref], shim_idx: 793, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
25357
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3f095fc116138c37, wasm_bindgen__convert__closures_____invoke__h5b85ca27a15b53fc);
25139
25358
  return ret;
25140
25359
  },
25141
25360
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
25142
- // Cast intrinsic for `Closure(Closure { dtor_idx: 359, function: Function { arguments: [], shim_idx: 360, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
25143
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h521bf77e4c41e510, wasm_bindgen__convert__closures_____invoke__h2aef54828e0d6e2f);
25361
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 441, function: Function { arguments: [], shim_idx: 442, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
25362
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3f095fc116138c37, wasm_bindgen__convert__closures_____invoke__h8c482c344300c6d3);
25144
25363
  return ret;
25145
25364
  },
25146
25365
  __wbindgen_cast_0000000000000003: function(arg0) {
@@ -25244,16 +25463,16 @@ function __wbg_get_imports() {
25244
25463
  };
25245
25464
  }
25246
25465
 
25247
- function wasm_bindgen__convert__closures_____invoke__h2aef54828e0d6e2f(arg0, arg1) {
25248
- wasm.wasm_bindgen__convert__closures_____invoke__h2aef54828e0d6e2f(arg0, arg1);
25466
+ function wasm_bindgen__convert__closures_____invoke__h8c482c344300c6d3(arg0, arg1) {
25467
+ wasm.wasm_bindgen__convert__closures_____invoke__h8c482c344300c6d3(arg0, arg1);
25249
25468
  }
25250
25469
 
25251
- function wasm_bindgen__convert__closures_____invoke__h305992f72ee30af3(arg0, arg1, arg2) {
25252
- wasm.wasm_bindgen__convert__closures_____invoke__h305992f72ee30af3(arg0, arg1, arg2);
25470
+ function wasm_bindgen__convert__closures_____invoke__h5b85ca27a15b53fc(arg0, arg1, arg2) {
25471
+ wasm.wasm_bindgen__convert__closures_____invoke__h5b85ca27a15b53fc(arg0, arg1, arg2);
25253
25472
  }
25254
25473
 
25255
- function wasm_bindgen__convert__closures_____invoke__hf3bad69ddb7e770e(arg0, arg1, arg2, arg3) {
25256
- wasm.wasm_bindgen__convert__closures_____invoke__hf3bad69ddb7e770e(arg0, arg1, arg2, arg3);
25474
+ function wasm_bindgen__convert__closures_____invoke__h7a3c25b2fe6d77ec(arg0, arg1, arg2, arg3) {
25475
+ wasm.wasm_bindgen__convert__closures_____invoke__h7a3c25b2fe6d77ec(arg0, arg1, arg2, arg3);
25257
25476
  }
25258
25477
 
25259
25478
 
@@ -26062,7 +26281,7 @@ async function __wbg_init(module_or_path) {
26062
26281
 
26063
26282
  const module$1 = new URL("assets/miden_client_web.wasm", self.location.href);
26064
26283
 
26065
- var CargoCVlXCH_2 = /*#__PURE__*/Object.freeze({
26284
+ var CargoCG4XszZo = /*#__PURE__*/Object.freeze({
26066
26285
  __proto__: null,
26067
26286
  Account: Account,
26068
26287
  AccountArray: AccountArray,
@@ -26134,7 +26353,6 @@ var CargoCVlXCH_2 = /*#__PURE__*/Object.freeze({
26134
26353
  NoteArray: NoteArray,
26135
26354
  NoteAssets: NoteAssets,
26136
26355
  NoteAttachment: NoteAttachment,
26137
- NoteAttachmentKind: NoteAttachmentKind,
26138
26356
  NoteAttachmentScheme: NoteAttachmentScheme,
26139
26357
  NoteConsumability: NoteConsumability,
26140
26358
  NoteConsumptionStatus: NoteConsumptionStatus,
@@ -26216,6 +26434,7 @@ var CargoCVlXCH_2 = /*#__PURE__*/Object.freeze({
26216
26434
  exportStore: exportStore2,
26217
26435
  importStore: importStore,
26218
26436
  initSync: initSync,
26437
+ sequentialSumBench: sequentialSumBench,
26219
26438
  setupLogging: setupLogging
26220
26439
  });
26221
26440
  //# sourceMappingURL=web-client-methods-worker.js.map