@miden-sdk/miden-sdk 0.14.11 → 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/dist/mt/{Cargo-CZopJ--X.js → Cargo-smJQCGjz.js} +1111 -768
  2. package/dist/mt/Cargo-smJQCGjz.js.map +1 -0
  3. package/dist/mt/api-types.d.ts +122 -33
  4. package/dist/mt/assets/miden_client_web.wasm +0 -0
  5. package/dist/mt/crates/miden_client_web.d.ts +376 -303
  6. package/dist/mt/docs-entry.d.ts +3 -0
  7. package/dist/mt/eager.js +7 -4
  8. package/dist/mt/eager.js.map +1 -1
  9. package/dist/mt/index.d.ts +103 -10
  10. package/dist/mt/index.js +669 -312
  11. package/dist/mt/index.js.map +1 -1
  12. package/dist/mt/wasm.js +1 -1
  13. package/dist/mt/workerHelpers.js +1 -1
  14. package/dist/mt/workers/{Cargo-CZopJ--X-SsyOTzpb.js → Cargo-smJQCGjz-q4GYXDiD.js} +1111 -768
  15. package/dist/mt/workers/Cargo-smJQCGjz-q4GYXDiD.js.map +1 -0
  16. package/dist/mt/workers/assets/miden_client_web.wasm +0 -0
  17. package/dist/mt/workers/web-client-methods-worker.js +1140 -792
  18. package/dist/mt/workers/web-client-methods-worker.js.map +1 -1
  19. package/dist/mt/workers/web-client-methods-worker.module.js +23 -19
  20. package/dist/mt/workers/web-client-methods-worker.module.js.map +1 -1
  21. package/dist/mt/workers/workerHelpers.js +1 -1
  22. package/dist/st/{Cargo-DC6jSekr.js → Cargo-CG4XszZo.js} +1105 -763
  23. package/dist/st/Cargo-CG4XszZo.js.map +1 -0
  24. package/dist/st/api-types.d.ts +122 -33
  25. package/dist/st/assets/miden_client_web.wasm +0 -0
  26. package/dist/st/crates/miden_client_web.d.ts +376 -303
  27. package/dist/st/docs-entry.d.ts +3 -0
  28. package/dist/st/eager.js +7 -4
  29. package/dist/st/eager.js.map +1 -1
  30. package/dist/st/index.d.ts +103 -10
  31. package/dist/st/index.js +669 -312
  32. package/dist/st/index.js.map +1 -1
  33. package/dist/st/wasm.js +1 -1
  34. package/dist/st/workers/{Cargo-DC6jSekr-BG7C7m56.js → Cargo-CG4XszZo-S7EHAZSa.js} +1105 -763
  35. package/dist/st/workers/Cargo-CG4XszZo-S7EHAZSa.js.map +1 -0
  36. package/dist/st/workers/assets/miden_client_web.wasm +0 -0
  37. package/dist/st/workers/web-client-methods-worker.js +1134 -787
  38. package/dist/st/workers/web-client-methods-worker.js.map +1 -1
  39. package/dist/st/workers/web-client-methods-worker.module.js +23 -19
  40. package/dist/st/workers/web-client-methods-worker.module.js.map +1 -1
  41. package/js/client.js +491 -0
  42. package/js/node/client-factory.js +117 -0
  43. package/js/node/loader.js +138 -0
  44. package/js/node/napi-compat.js +253 -0
  45. package/js/node-index.js +194 -0
  46. package/js/resources/accounts.js +222 -0
  47. package/js/resources/compiler.js +74 -0
  48. package/js/resources/keystore.js +54 -0
  49. package/js/resources/notes.js +124 -0
  50. package/js/resources/settings.js +30 -0
  51. package/js/resources/tags.js +31 -0
  52. package/js/resources/transactions.js +667 -0
  53. package/js/standalone.js +109 -0
  54. package/js/utils.js +232 -0
  55. package/package.json +17 -2
  56. package/dist/mt/Cargo-CZopJ--X.js.map +0 -1
  57. package/dist/mt/workers/Cargo-CZopJ--X-SsyOTzpb.js.map +0 -1
  58. package/dist/st/Cargo-DC6jSekr.js.map +0 -1
  59. package/dist/st/workers/Cargo-DC6jSekr-BG7C7m56.js.map +0 -1
@@ -8280,7 +8280,7 @@ const V1_STORES = {
8280
8280
  [Table.Addresses]: indexes("address", "id"),
8281
8281
  [Table.Transactions]: indexes("id", "statusVariant"),
8282
8282
  [Table.TransactionScripts]: indexes("scriptRoot"),
8283
- [Table.InputNotes]: indexes("noteId", "nullifier", "stateDiscriminant", "[consumedBlockHeight+consumedTxOrder+noteId]"),
8283
+ [Table.InputNotes]: indexes("detailsCommitment", "noteId", "nullifier", "stateDiscriminant", "[consumedBlockHeight+consumedTxOrder+noteId]"),
8284
8284
  [Table.OutputNotes]: indexes("noteId", "recipientDigest", "stateDiscriminant", "nullifier"),
8285
8285
  [Table.NotesScripts]: indexes("scriptRoot"),
8286
8286
  [Table.StateSync]: indexes("id"),
@@ -9472,13 +9472,12 @@ async function getAccountIdByKeyCommitment(dbId, pubKeyCommitmentHex) {
9472
9472
  }
9473
9473
  }
9474
9474
 
9475
- async function insertBlockHeader(dbId, blockNum, header, partialBlockchainPeaks, hasClientNotes) {
9475
+ async function insertBlockHeader(dbId, blockNum, header, hasClientNotes) {
9476
9476
  try {
9477
9477
  const db = getDatabase(dbId);
9478
9478
  const data = {
9479
9479
  blockNum: blockNum,
9480
9480
  header,
9481
- partialBlockchainPeaks,
9482
9481
  hasClientNotes: hasClientNotes.toString(),
9483
9482
  };
9484
9483
  // Mirror SQLite's `insert_block_header_tx`: do an INSERT OR IGNORE on the
@@ -9486,12 +9485,8 @@ async function insertBlockHeader(dbId, blockNum, header, partialBlockchainPeaks,
9486
9485
  // says so. Two callers hit this:
9487
9486
  // - Genesis flow — no existing row; the add succeeds.
9488
9487
  // - `get_and_store_authenticated_block` for a past block — a row
9489
- // written by `applyStateSync` typically already exists. Overwriting
9490
- // it would clobber the correct historical peaks (popcount ==
9491
- // block_num) with peaks from the caller's current `PartialMmr`
9492
- // forest (popcount == current sync height). Later reads of those
9493
- // peaks trip `MmrPeaks::new`'s InvalidPeaks validation and wedge
9494
- // sync for the rest of the session.
9488
+ // written by `applyStateSync` typically already exists. We keep that
9489
+ // row untouched.
9495
9490
  //
9496
9491
  // The `has_client_notes` upgrade is load-bearing: `get_tracked_block_
9497
9492
  // header_numbers` filters by this flag to seed `tracked_leaves`, which
@@ -9544,11 +9539,9 @@ async function getBlockHeaders(dbId, blockNumbers) {
9544
9539
  }
9545
9540
  else {
9546
9541
  const headerBase64 = uint8ArrayToBase64(result.header);
9547
- const partialBlockchainPeaksBase64 = uint8ArrayToBase64(result.partialBlockchainPeaks);
9548
9542
  return {
9549
9543
  blockNum: result.blockNum,
9550
9544
  header: headerBase64,
9551
- partialBlockchainPeaks: partialBlockchainPeaksBase64,
9552
9545
  hasClientNotes: result.hasClientNotes === "true",
9553
9546
  };
9554
9547
  }
@@ -9568,11 +9561,9 @@ async function getTrackedBlockHeaders(dbId) {
9568
9561
  .toArray();
9569
9562
  const processedRecords = await Promise.all(allMatchingRecords.map((record) => {
9570
9563
  const headerBase64 = uint8ArrayToBase64(record.header);
9571
- const partialBlockchainPeaksBase64 = uint8ArrayToBase64(record.partialBlockchainPeaks);
9572
9564
  return {
9573
9565
  blockNum: record.blockNum,
9574
9566
  header: headerBase64,
9575
- partialBlockchainPeaks: partialBlockchainPeaksBase64,
9576
9567
  hasClientNotes: record.hasClientNotes === "true",
9577
9568
  };
9578
9569
  }));
@@ -9595,22 +9586,31 @@ async function getTrackedBlockHeaderNumbers(dbId) {
9595
9586
  logWebStoreError(err, "Failed to get tracked block header numbers");
9596
9587
  }
9597
9588
  }
9598
- async function getPartialBlockchainPeaksByBlockNum(dbId, blockNum) {
9589
+ /**
9590
+ * Returns the blockchain peaks at the current sync height. Peaks live on the
9591
+ * `blockHeaders` row at `stateSync.blockNum` — the block that was the chain
9592
+ * tip when its sync ran. Returns `{ blockNum, peaks: undefined }` if the
9593
+ * stateSync row is missing or if that block was inserted via backfill
9594
+ * (which leaves `partialBlockchainPeaks` unset).
9595
+ */
9596
+ async function getCurrentBlockchainPeaks(dbId) {
9599
9597
  try {
9600
9598
  const db = getDatabase(dbId);
9601
- const blockHeader = await db.blockHeaders.get(blockNum);
9602
- if (blockHeader == undefined) {
9603
- return {
9604
- peaks: undefined,
9605
- };
9599
+ const stateSyncRow = await db.stateSync.get(1);
9600
+ if (stateSyncRow == undefined) {
9601
+ return { blockNum: 0, peaks: undefined };
9602
+ }
9603
+ const header = await db.blockHeaders.get(stateSyncRow.blockNum);
9604
+ if (header == undefined || header.partialBlockchainPeaks == undefined) {
9605
+ return { blockNum: stateSyncRow.blockNum, peaks: undefined };
9606
9606
  }
9607
- const partialBlockchainPeaksBase64 = uint8ArrayToBase64(blockHeader.partialBlockchainPeaks);
9608
9607
  return {
9609
- peaks: partialBlockchainPeaksBase64,
9608
+ blockNum: stateSyncRow.blockNum,
9609
+ peaks: uint8ArrayToBase64(header.partialBlockchainPeaks),
9610
9610
  };
9611
9611
  }
9612
9612
  catch (err) {
9613
- logWebStoreError(err, "Failed to get partial blockchain peaks");
9613
+ logWebStoreError(err, "Failed to get current blockchain peaks");
9614
9614
  }
9615
9615
  }
9616
9616
  async function getPartialBlockchainNodesAll(dbId) {
@@ -9650,19 +9650,34 @@ async function getPartialBlockchainNodesUpToInOrderIndex(dbId, maxInOrderIndex)
9650
9650
  logWebStoreError(err, "Failed to get partial blockchain nodes up to index");
9651
9651
  }
9652
9652
  }
9653
- async function pruneIrrelevantBlocks(dbId) {
9653
+ async function pruneIrrelevantBlocks(dbId, blocksToUntrack, nodeIdsToRemove) {
9654
9654
  try {
9655
9655
  const db = getDatabase(dbId);
9656
+ const numericNodeIds = nodeIdsToRemove.map(Number);
9656
9657
  const syncHeight = await db.stateSync.get(1);
9657
9658
  if (syncHeight == undefined) {
9658
9659
  throw Error("SyncHeight is undefined -- is the state sync table empty?");
9659
9660
  }
9660
- const allMatchingRecords = await db.blockHeaders
9661
- .where("hasClientNotes")
9662
- .equals("false")
9663
- .and((record) => record.blockNum !== 0 && record.blockNum !== syncHeight.blockNum)
9664
- .toArray();
9665
- await db.blockHeaders.bulkDelete(allMatchingRecords.map((r) => r.blockNum));
9661
+ await db.dexie.transaction("rw", db.blockHeaders, db.partialBlockchainNodes, async () => {
9662
+ // 1. Delete stale MMR authentication nodes.
9663
+ if (numericNodeIds.length > 0) {
9664
+ await db.partialBlockchainNodes.bulkDelete(numericNodeIds);
9665
+ }
9666
+ // 2. Mark untracked blocks as irrelevant.
9667
+ if (blocksToUntrack.length > 0) {
9668
+ await db.blockHeaders
9669
+ .where("blockNum")
9670
+ .anyOf(blocksToUntrack)
9671
+ .modify({ hasClientNotes: "false" });
9672
+ }
9673
+ // 3. Delete irrelevant block headers.
9674
+ const allMatchingRecords = await db.blockHeaders
9675
+ .where("hasClientNotes")
9676
+ .equals("false")
9677
+ .and((record) => record.blockNum !== 0 && record.blockNum !== syncHeight.blockNum)
9678
+ .toArray();
9679
+ await db.blockHeaders.bulkDelete(allMatchingRecords.map((r) => r.blockNum));
9680
+ });
9666
9681
  }
9667
9682
  catch (err) {
9668
9683
  logWebStoreError(err, "Failed to prune irrelevant blocks");
@@ -9913,13 +9928,20 @@ async function getNoteScript(dbId, scriptRoot) {
9913
9928
  logWebStoreError(err, "Failed to get note script from root");
9914
9929
  }
9915
9930
  }
9916
- async function upsertInputNote(dbId, noteId, assets, serialNumber, inputs, scriptRoot, serializedNoteScript, nullifier, serializedCreatedAt, stateDiscriminant, state, consumedBlockHeight, consumedTxOrder, consumerAccountId, tx) {
9931
+ async function upsertInputNote(dbId, detailsCommitment, noteId, assets, attachments, serialNumber, inputs, scriptRoot, serializedNoteScript, nullifier, serializedCreatedAt, stateDiscriminant, state, consumedBlockHeight, consumedTxOrder, consumerAccountId, tx) {
9917
9932
  const db = getDatabase(dbId);
9918
9933
  const doWork = async (t) => {
9919
9934
  try {
9920
9935
  const data = {
9921
- noteId,
9936
+ // The details commitment is the primary key. It is always present, even
9937
+ // for partial notes lacking a noteId, so a partial note that later gains
9938
+ // its noteId updates the same row instead of inserting a duplicate.
9939
+ detailsCommitment,
9940
+ // Convert null -> undefined so Dexie omits the noteId secondary index
9941
+ // for partial notes that don't have one yet.
9942
+ noteId: noteId ?? undefined,
9922
9943
  assets,
9944
+ attachments,
9923
9945
  serialNumber,
9924
9946
  inputs,
9925
9947
  scriptRoot,
@@ -9942,7 +9964,7 @@ async function upsertInputNote(dbId, noteId, assets, serialNumber, inputs, scrip
9942
9964
  /* v8 ignore next 3 — requires a mid-transaction Dexie write failure, not modelable with fake-indexeddb */
9943
9965
  }
9944
9966
  catch (error) {
9945
- logWebStoreError(error, `Error inserting note: ${noteId}`);
9967
+ logWebStoreError(error, `Error inserting note: ${detailsCommitment}`);
9946
9968
  }
9947
9969
  };
9948
9970
  return db.dexie.transaction("rw", db.inputNotes, db.notesScripts, doWork);
@@ -10005,13 +10027,14 @@ async function getInputNoteByOffset(dbId, states, consumerAccountId, blockStart,
10005
10027
  logWebStoreError(err, "Failed to get input note by offset");
10006
10028
  }
10007
10029
  }
10008
- async function upsertOutputNote(dbId, noteId, assets, recipientDigest, metadata, nullifier, expectedHeight, stateDiscriminant, state, tx) {
10030
+ async function upsertOutputNote(dbId, noteId, assets, attachments, recipientDigest, metadata, nullifier, expectedHeight, stateDiscriminant, state, tx) {
10009
10031
  const db = getDatabase(dbId);
10010
10032
  const doWork = async (t) => {
10011
10033
  try {
10012
10034
  const data = {
10013
10035
  noteId,
10014
10036
  assets,
10037
+ attachments,
10015
10038
  recipientDigest,
10016
10039
  metadata,
10017
10040
  nullifier: nullifier ? nullifier : undefined,
@@ -10032,6 +10055,7 @@ async function processInputNotes(dbId, notes) {
10032
10055
  const db = getDatabase(dbId);
10033
10056
  return await Promise.all(notes.map(async (note) => {
10034
10057
  const assetsBase64 = uint8ArrayToBase64(note.assets);
10058
+ const attachmentsBase64 = uint8ArrayToBase64(note.attachments);
10035
10059
  const serialNumberBase64 = uint8ArrayToBase64(note.serialNumber);
10036
10060
  const inputsBase64 = uint8ArrayToBase64(note.inputs);
10037
10061
  let serializedNoteScriptBase64 = undefined;
@@ -10044,6 +10068,7 @@ async function processInputNotes(dbId, notes) {
10044
10068
  const stateBase64 = uint8ArrayToBase64(note.state);
10045
10069
  return {
10046
10070
  assets: assetsBase64,
10071
+ attachments: attachmentsBase64,
10047
10072
  serialNumber: serialNumberBase64,
10048
10073
  inputs: inputsBase64,
10049
10074
  createdAt: note.serializedCreatedAt,
@@ -10055,10 +10080,12 @@ async function processInputNotes(dbId, notes) {
10055
10080
  async function processOutputNotes(notes) {
10056
10081
  return await Promise.all(notes.map((note) => {
10057
10082
  const assetsBase64 = uint8ArrayToBase64(note.assets);
10083
+ const attachmentsBase64 = uint8ArrayToBase64(note.attachments);
10058
10084
  const metadataBase64 = uint8ArrayToBase64(note.metadata);
10059
10085
  const stateBase64 = uint8ArrayToBase64(note.state);
10060
10086
  return {
10061
10087
  assets: assetsBase64,
10088
+ attachments: attachmentsBase64,
10062
10089
  recipientDigest: note.recipientDigest,
10063
10090
  metadata: metadataBase64,
10064
10091
  expectedHeight: note.expectedHeight,
@@ -10327,9 +10354,8 @@ async function removeNoteTag(dbId, tag, sourceNoteId, sourceAccountId) {
10327
10354
  }
10328
10355
  async function applyStateSync(dbId, stateUpdate) {
10329
10356
  const db = getDatabase(dbId);
10330
- const { blockNum, flattenedNewBlockHeaders, flattenedPartialBlockChainPeaks, newBlockNums, blockHasRelevantNotes, serializedNodeIds, serializedNodes, committedNoteIds, serializedInputNotes, serializedOutputNotes, accountUpdates, transactionUpdates, } = stateUpdate;
10357
+ const { blockNum, flattenedNewBlockHeaders, partialBlockchainPeaks, newBlockNums, blockHasRelevantNotes, serializedNodeIds, serializedNodes, committedNoteTagSources, serializedInputNotes, serializedOutputNotes, accountUpdates, transactionUpdates, } = stateUpdate;
10331
10358
  const newBlockHeaders = reconstructFlattenedVec(flattenedNewBlockHeaders);
10332
- const partialBlockchainPeaks = reconstructFlattenedVec(flattenedPartialBlockChainPeaks);
10333
10359
  const tablesToAccess = [
10334
10360
  db.stateSync,
10335
10361
  db.inputNotes,
@@ -10352,10 +10378,10 @@ async function applyStateSync(dbId, stateUpdate) {
10352
10378
  return await db.dexie.transaction("rw", tablesToAccess, async (tx) => {
10353
10379
  await Promise.all([
10354
10380
  Promise.all(serializedInputNotes.map((note) => {
10355
- 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);
10381
+ 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);
10356
10382
  })),
10357
10383
  Promise.all(serializedOutputNotes.map((note) => {
10358
- return upsertOutputNote(dbId, note.noteId, note.noteAssets, note.recipientDigest, note.metadata, note.nullifier, note.expectedHeight, note.stateDiscriminant, note.state);
10384
+ return upsertOutputNote(dbId, note.noteId, note.noteAssets, note.attachments, note.recipientDigest, note.metadata, note.nullifier, note.expectedHeight, note.stateDiscriminant, note.state);
10359
10385
  })),
10360
10386
  Promise.all(transactionUpdates.map((transactionRecord) => {
10361
10387
  let promises = [
@@ -10381,16 +10407,26 @@ async function applyStateSync(dbId, stateUpdate) {
10381
10407
  }))),
10382
10408
  updateSyncHeight(tx, blockNum),
10383
10409
  updatePartialBlockchainNodes(tx, serializedNodeIds, serializedNodes),
10384
- updateCommittedNoteTags(tx, committedNoteIds),
10410
+ updateCommittedNoteTags(tx, committedNoteTagSources),
10385
10411
  Promise.all(newBlockHeaders.map((newBlockHeader, i) => {
10386
- return updateBlockHeader(tx, newBlockNums[i], newBlockHeader, partialBlockchainPeaks[i], blockHasRelevantNotes[i] == 1);
10412
+ // Peaks are attached only to the chain-tip block (the one whose
10413
+ // blockNum matches the new sync height). That row is always
10414
+ // present in this iteration because `partial_blockchain_updates`
10415
+ // includes the chain tip header by construction.
10416
+ // TODO: potentially move this to be under the sync state info table
10417
+ // as currently done in SQLite
10418
+ const peaks = newBlockNums[i] === blockNum ? partialBlockchainPeaks : undefined;
10419
+ return updateBlockHeader(tx, newBlockNums[i], newBlockHeader, blockHasRelevantNotes[i] == 1, peaks);
10387
10420
  })),
10388
10421
  ]);
10389
10422
  });
10390
10423
  }
10424
+ /**
10425
+ * Advances `stateSync.blockNum` only when moving forward. Mirrors SQLite's
10426
+ * `UPDATE blockchain_checkpoint ... WHERE block_num < ?`.
10427
+ */
10391
10428
  async function updateSyncHeight(tx, blockNum) {
10392
10429
  try {
10393
- // Only update if moving forward to prevent race conditions
10394
10430
  const current = await tx.stateSync.get(1);
10395
10431
  if (!current || current.blockNum < blockNum) {
10396
10432
  await tx.stateSync.update(1, {
@@ -10402,13 +10438,13 @@ async function updateSyncHeight(tx, blockNum) {
10402
10438
  logWebStoreError(error, "Failed to update sync height");
10403
10439
  }
10404
10440
  }
10405
- async function updateBlockHeader(tx, blockNum, blockHeader, partialBlockchainPeaks, hasClientNotes) {
10441
+ async function updateBlockHeader(tx, blockNum, blockHeader, hasClientNotes, partialBlockchainPeaks) {
10406
10442
  try {
10407
10443
  const data = {
10408
10444
  blockNum: blockNum,
10409
10445
  header: blockHeader,
10410
- partialBlockchainPeaks,
10411
10446
  hasClientNotes: hasClientNotes.toString(),
10447
+ ...(partialBlockchainPeaks !== undefined && { partialBlockchainPeaks }),
10412
10448
  };
10413
10449
  const existingBlockHeader = await tx.blockHeaders.get(blockNum);
10414
10450
  if (!existingBlockHeader) {
@@ -10439,13 +10475,13 @@ async function updatePartialBlockchainNodes(tx, nodeIndexes, nodes) {
10439
10475
  logWebStoreError(err, "Failed to update partial blockchain nodes");
10440
10476
  }
10441
10477
  }
10442
- async function updateCommittedNoteTags(tx, inputNoteIds) {
10478
+ async function updateCommittedNoteTags(tx, committedNoteTagSources) {
10443
10479
  try {
10444
- for (let i = 0; i < inputNoteIds.length; i++) {
10445
- const noteId = inputNoteIds[i];
10480
+ for (let i = 0; i < committedNoteTagSources.length; i++) {
10481
+ const tagSource = committedNoteTagSources[i];
10446
10482
  await tx.tags
10447
10483
  .where("sourceNoteId")
10448
- .equals(noteId)
10484
+ .equals(tagSource)
10449
10485
  .delete();
10450
10486
  }
10451
10487
  }
@@ -10551,21 +10587,13 @@ class Account {
10551
10587
  return AccountId.__wrap(ret);
10552
10588
  }
10553
10589
  /**
10554
- * Returns true if the account is a faucet.
10590
+ * Returns true if the account exposes a fungible-faucet interface.
10555
10591
  * @returns {boolean}
10556
10592
  */
10557
10593
  isFaucet() {
10558
10594
  const ret = wasm.account_isFaucet(this.__wbg_ptr);
10559
10595
  return ret !== 0;
10560
10596
  }
10561
- /**
10562
- * Returns true if this is a network-owned account.
10563
- * @returns {boolean}
10564
- */
10565
- isNetwork() {
10566
- const ret = wasm.account_isNetwork(this.__wbg_ptr);
10567
- return ret !== 0;
10568
- }
10569
10597
  /**
10570
10598
  * Returns true if the account has not yet been committed to the chain.
10571
10599
  * @returns {boolean}
@@ -10591,21 +10619,13 @@ class Account {
10591
10619
  return ret !== 0;
10592
10620
  }
10593
10621
  /**
10594
- * Returns true if the account is a regular account (immutable or updatable code).
10622
+ * Returns true if the account is a regular (non-faucet) account.
10595
10623
  * @returns {boolean}
10596
10624
  */
10597
10625
  isRegularAccount() {
10598
10626
  const ret = wasm.account_isRegularAccount(this.__wbg_ptr);
10599
10627
  return ret !== 0;
10600
10628
  }
10601
- /**
10602
- * Returns true if the account can update its code.
10603
- * @returns {boolean}
10604
- */
10605
- isUpdatable() {
10606
- const ret = wasm.account_isUpdatable(this.__wbg_ptr);
10607
- return ret !== 0;
10608
- }
10609
10629
  /**
10610
10630
  * Returns the account nonce, which is incremented on every state update.
10611
10631
  * @returns {Felt}
@@ -10705,18 +10725,13 @@ class AccountArray {
10705
10725
  wasm.accountarray_push(this.__wbg_ptr, element.__wbg_ptr);
10706
10726
  }
10707
10727
  /**
10708
- * Replace the element at `index`. Borrows + clones the input
10709
- * (mirrors `push`), so the caller's JS handle remains valid
10710
- * after the call. Without this borrow, passing `elem` by
10711
- * value would move the underlying Rust value out of the
10712
- * caller's JS handle and any subsequent method on it would
10713
- * panic with `"null pointer passed to rust"`.
10714
10728
  * @param {number} index
10715
10729
  * @param {Account} elem
10716
10730
  */
10717
10731
  replaceAt(index, elem) {
10718
10732
  _assertClass(elem, Account);
10719
- const ret = wasm.accountarray_replaceAt(this.__wbg_ptr, index, elem.__wbg_ptr);
10733
+ var ptr0 = elem.__destroy_into_raw();
10734
+ const ret = wasm.accountarray_replaceAt(this.__wbg_ptr, index, ptr0);
10720
10735
  if (ret[1]) {
10721
10736
  throw takeFromExternrefTable0(ret[0]);
10722
10737
  }
@@ -10744,28 +10759,31 @@ class AccountBuilder {
10744
10759
  }
10745
10760
  /**
10746
10761
  * Sets the account type (regular, faucet, etc.).
10747
- *
10748
- * Accepts either a numeric WASM enum value (0–3) or a string name
10749
- * (`"FungibleFaucet"`, `"NonFungibleFaucet"`,
10750
- * `"RegularAccountImmutableCode"`, `"RegularAccountUpdatableCode"`).
10751
- * @param {any} account_type
10762
+ * @param {AccountType} account_type
10752
10763
  * @returns {AccountBuilder}
10753
10764
  */
10754
10765
  accountType(account_type) {
10755
- const ptr = this.__destroy_into_raw();
10756
- const ret = wasm.accountbuilder_accountType(ptr, account_type);
10766
+ const ret = wasm.accountbuilder_accountType(this.__wbg_ptr, account_type);
10767
+ return AccountBuilder.__wrap(ret);
10768
+ }
10769
+ /**
10770
+ * Builds the account (including merged storage schema commitment metadata) and returns it
10771
+ * together with the derived seed.
10772
+ * @returns {AccountBuilderResult}
10773
+ */
10774
+ build() {
10775
+ const ret = wasm.accountbuilder_build(this.__wbg_ptr);
10757
10776
  if (ret[2]) {
10758
10777
  throw takeFromExternrefTable0(ret[1]);
10759
10778
  }
10760
- return AccountBuilder.__wrap(ret[0]);
10779
+ return AccountBuilderResult.__wrap(ret[0]);
10761
10780
  }
10762
10781
  /**
10763
- * Builds the account and returns it together with the derived seed.
10782
+ * Builds the account without adding the schema commitment component (legacy behavior).
10764
10783
  * @returns {AccountBuilderResult}
10765
10784
  */
10766
- build() {
10767
- const ptr = this.__destroy_into_raw();
10768
- const ret = wasm.accountbuilder_build(ptr);
10785
+ buildWithoutSchemaCommitment() {
10786
+ const ret = wasm.accountbuilder_buildWithoutSchemaCommitment(this.__wbg_ptr);
10769
10787
  if (ret[2]) {
10770
10788
  throw takeFromExternrefTable0(ret[1]);
10771
10789
  }
@@ -10788,13 +10806,17 @@ class AccountBuilder {
10788
10806
  }
10789
10807
  /**
10790
10808
  * Sets the storage mode (public/private) for the account.
10809
+ *
10810
+ * The 0.15 protocol surface collapsed `AccountStorageMode` and `AccountType` into a
10811
+ * single 2-way `AccountType` flag: setting the storage mode IS setting the account
10812
+ * type. Calling both `accountType()` and `storageMode()` on the same builder is the
10813
+ * last-write-wins on the underlying flag. Method kept for JS-surface back-compat.
10791
10814
  * @param {AccountStorageMode} storage_mode
10792
10815
  * @returns {AccountBuilder}
10793
10816
  */
10794
10817
  storageMode(storage_mode) {
10795
- const ptr = this.__destroy_into_raw();
10796
10818
  _assertClass(storage_mode, AccountStorageMode);
10797
- const ret = wasm.accountbuilder_storageMode(ptr, storage_mode.__wbg_ptr);
10819
+ const ret = wasm.accountbuilder_storageMode(this.__wbg_ptr, storage_mode.__wbg_ptr);
10798
10820
  return AccountBuilder.__wrap(ret);
10799
10821
  }
10800
10822
  /**
@@ -10803,17 +10825,15 @@ class AccountBuilder {
10803
10825
  * @returns {AccountBuilder}
10804
10826
  */
10805
10827
  withAuthComponent(account_component) {
10806
- const ptr = this.__destroy_into_raw();
10807
10828
  _assertClass(account_component, AccountComponent);
10808
- const ret = wasm.accountbuilder_withAuthComponent(ptr, account_component.__wbg_ptr);
10829
+ const ret = wasm.accountbuilder_withAuthComponent(this.__wbg_ptr, account_component.__wbg_ptr);
10809
10830
  return AccountBuilder.__wrap(ret);
10810
10831
  }
10811
10832
  /**
10812
10833
  * @returns {AccountBuilder}
10813
10834
  */
10814
10835
  withBasicWalletComponent() {
10815
- const ptr = this.__destroy_into_raw();
10816
- const ret = wasm.accountbuilder_withBasicWalletComponent(ptr);
10836
+ const ret = wasm.accountbuilder_withBasicWalletComponent(this.__wbg_ptr);
10817
10837
  return AccountBuilder.__wrap(ret);
10818
10838
  }
10819
10839
  /**
@@ -10822,9 +10842,8 @@ class AccountBuilder {
10822
10842
  * @returns {AccountBuilder}
10823
10843
  */
10824
10844
  withComponent(account_component) {
10825
- const ptr = this.__destroy_into_raw();
10826
10845
  _assertClass(account_component, AccountComponent);
10827
- const ret = wasm.accountbuilder_withComponent(ptr, account_component.__wbg_ptr);
10846
+ const ret = wasm.accountbuilder_withComponent(this.__wbg_ptr, account_component.__wbg_ptr);
10828
10847
  return AccountBuilder.__wrap(ret);
10829
10848
  }
10830
10849
  /**
@@ -10832,8 +10851,7 @@ class AccountBuilder {
10832
10851
  * @returns {AccountBuilder}
10833
10852
  */
10834
10853
  withNoAuthComponent() {
10835
- const ptr = this.__destroy_into_raw();
10836
- const ret = wasm.accountbuilder_withNoAuthComponent(ptr);
10854
+ const ret = wasm.accountbuilder_withNoAuthComponent(this.__wbg_ptr);
10837
10855
  return AccountBuilder.__wrap(ret);
10838
10856
  }
10839
10857
  }
@@ -11011,7 +11029,8 @@ class AccountComponent {
11011
11029
  static fromPackage(_package, storage_slots) {
11012
11030
  _assertClass(_package, Package);
11013
11031
  _assertClass(storage_slots, StorageSlotArray);
11014
- const ret = wasm.accountcomponent_fromPackage(_package.__wbg_ptr, storage_slots.__wbg_ptr);
11032
+ var ptr0 = storage_slots.__destroy_into_raw();
11033
+ const ret = wasm.accountcomponent_fromPackage(_package.__wbg_ptr, ptr0);
11015
11034
  if (ret[2]) {
11016
11035
  throw takeFromExternrefTable0(ret[1]);
11017
11036
  }
@@ -11058,11 +11077,15 @@ class AccountComponent {
11058
11077
  }
11059
11078
  /**
11060
11079
  * Marks the component as supporting all account types.
11080
+ *
11081
+ * The 0.15 protocol collapsed the per-account-type flag set on
11082
+ * `AccountComponentMetadata::new` — every component now applies to every account type
11083
+ * implicitly, so this method's job is to re-derive the metadata under the new
11084
+ * (name-only) constructor while keeping the JS API surface stable.
11061
11085
  * @returns {AccountComponent}
11062
11086
  */
11063
11087
  withSupportsAllTypes() {
11064
- const ptr = this.__destroy_into_raw();
11065
- const ret = wasm.accountcomponent_withSupportsAllTypes(ptr);
11088
+ const ret = wasm.accountcomponent_withSupportsAllTypes(this.__wbg_ptr);
11066
11089
  return AccountComponent.__wrap(ret);
11067
11090
  }
11068
11091
  }
@@ -11417,22 +11440,6 @@ class AccountId {
11417
11440
  }
11418
11441
  return AccountId.__wrap(ret[0]);
11419
11442
  }
11420
- /**
11421
- * Returns true if the ID refers to a faucet.
11422
- * @returns {boolean}
11423
- */
11424
- isFaucet() {
11425
- const ret = wasm.accountid_isFaucet(this.__wbg_ptr);
11426
- return ret !== 0;
11427
- }
11428
- /**
11429
- * Returns true if the ID is reserved for network accounts.
11430
- * @returns {boolean}
11431
- */
11432
- isNetwork() {
11433
- const ret = wasm.accountid_isNetwork(this.__wbg_ptr);
11434
- return ret !== 0;
11435
- }
11436
11443
  /**
11437
11444
  * Returns true if the account uses private storage.
11438
11445
  * @returns {boolean}
@@ -11449,14 +11456,6 @@ class AccountId {
11449
11456
  const ret = wasm.accountid_isPublic(this.__wbg_ptr);
11450
11457
  return ret !== 0;
11451
11458
  }
11452
- /**
11453
- * Returns true if the ID refers to a regular account.
11454
- * @returns {boolean}
11455
- */
11456
- isRegularAccount() {
11457
- const ret = wasm.accountid_isRegularAccount(this.__wbg_ptr);
11458
- return ret !== 0;
11459
- }
11460
11459
  /**
11461
11460
  * Returns the prefix field element storing metadata about version, type, and storage mode.
11462
11461
  * @returns {Felt}
@@ -11574,18 +11573,13 @@ class AccountIdArray {
11574
11573
  wasm.accountidarray_push(this.__wbg_ptr, element.__wbg_ptr);
11575
11574
  }
11576
11575
  /**
11577
- * Replace the element at `index`. Borrows + clones the input
11578
- * (mirrors `push`), so the caller's JS handle remains valid
11579
- * after the call. Without this borrow, passing `elem` by
11580
- * value would move the underlying Rust value out of the
11581
- * caller's JS handle and any subsequent method on it would
11582
- * panic with `"null pointer passed to rust"`.
11583
11576
  * @param {number} index
11584
11577
  * @param {AccountId} elem
11585
11578
  */
11586
11579
  replaceAt(index, elem) {
11587
11580
  _assertClass(elem, AccountId);
11588
- const ret = wasm.accountidarray_replaceAt(this.__wbg_ptr, index, elem.__wbg_ptr);
11581
+ var ptr0 = elem.__destroy_into_raw();
11582
+ const ret = wasm.accountidarray_replaceAt(this.__wbg_ptr, index, ptr0);
11589
11583
  if (ret[1]) {
11590
11584
  throw takeFromExternrefTable0(ret[0]);
11591
11585
  }
@@ -11676,7 +11670,7 @@ class AccountProof {
11676
11670
  *
11677
11671
  * Each entry contains a `key` and `value` as `Word` objects.
11678
11672
  * @param {string} slot_name
11679
- * @returns {StorageMapEntry[] | undefined}
11673
+ * @returns {StorageMapEntryJs[] | undefined}
11680
11674
  */
11681
11675
  getStorageMapEntries(slot_name) {
11682
11676
  const ptr0 = passStringToWasm0(slot_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -11754,6 +11748,22 @@ class AccountProof {
11754
11748
  const ret = wasm.accountproof_numStorageSlots(this.__wbg_ptr);
11755
11749
  return ret === 0xFFFFFF ? undefined : ret;
11756
11750
  }
11751
+ /**
11752
+ * Returns the fungible assets in the account's vault, if vault details were included
11753
+ * in the proof response.
11754
+ *
11755
+ * Returns `undefined` if the account is private or vault data was not requested.
11756
+ * @returns {FungibleAsset[] | undefined}
11757
+ */
11758
+ vaultFungibleAssets() {
11759
+ const ret = wasm.accountproof_vaultFungibleAssets(this.__wbg_ptr);
11760
+ let v1;
11761
+ if (ret[0] !== 0) {
11762
+ v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
11763
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
11764
+ }
11765
+ return v1;
11766
+ }
11757
11767
  }
11758
11768
  if (Symbol.dispose) AccountProof.prototype[Symbol.dispose] = AccountProof.prototype.free;
11759
11769
 
@@ -12021,7 +12031,7 @@ class AccountStorage {
12021
12031
  * Returns `undefined` if the slot isn't a map or doesn't exist.
12022
12032
  * Returns `[]` if the map exists but is empty.
12023
12033
  * @param {string} slot_name
12024
- * @returns {JsStorageMapEntry[] | undefined}
12034
+ * @returns {StorageMapEntry[] | undefined}
12025
12035
  */
12026
12036
  getMapEntries(slot_name) {
12027
12037
  const ptr0 = passStringToWasm0(slot_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -12130,6 +12140,15 @@ if (Symbol.dispose) AccountStorageDelta.prototype[Symbol.dispose] = AccountStora
12130
12140
 
12131
12141
  /**
12132
12142
  * Storage visibility mode for an account.
12143
+ *
12144
+ * In the 0.15 protocol surface this is the same enum as `AccountType`
12145
+ * (the on-chain identifier no longer carries any faucet-vs-regular or
12146
+ * updatable-vs-immutable distinction), so internally we wrap an
12147
+ * `AccountType`. The standalone `AccountStorageMode` type still exists at
12148
+ * the JS API surface for backwards compatibility with code that wrote
12149
+ * `AccountStorageMode.public()` / `.private()`. The pre-existing `.network()`
12150
+ * constructor was removed — the network storage mode does not exist on the
12151
+ * 0.15 chain.
12133
12152
  */
12134
12153
  class AccountStorageMode {
12135
12154
  static __wrap(ptr) {
@@ -12165,14 +12184,6 @@ class AccountStorageMode {
12165
12184
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
12166
12185
  }
12167
12186
  }
12168
- /**
12169
- * Creates a network storage mode.
12170
- * @returns {AccountStorageMode}
12171
- */
12172
- static network() {
12173
- const ret = wasm.accountstoragemode_network();
12174
- return AccountStorageMode.__wrap(ret);
12175
- }
12176
12187
  /**
12177
12188
  * Creates a private storage mode.
12178
12189
  * @returns {AccountStorageMode}
@@ -12191,6 +12202,9 @@ class AccountStorageMode {
12191
12202
  }
12192
12203
  /**
12193
12204
  * Parses a storage mode from its string representation.
12205
+ *
12206
+ * Accepts `"private"` and `"public"`; any other input — including the
12207
+ * previously-supported `"network"` — is rejected.
12194
12208
  * @param {string} s
12195
12209
  * @returns {AccountStorageMode}
12196
12210
  */
@@ -12251,13 +12265,17 @@ class AccountStorageRequirements {
12251
12265
  if (Symbol.dispose) AccountStorageRequirements.prototype[Symbol.dispose] = AccountStorageRequirements.prototype.free;
12252
12266
 
12253
12267
  /**
12254
- * @enum {0 | 1 | 2 | 3}
12268
+ * Storage mode of an account. The 0.15 protocol collapses the previous
12269
+ * 4-way `{ FungibleFaucet, NonFungibleFaucet, RegularAccountImmutableCode,
12270
+ * RegularAccountUpdatableCode }` distinction into a 2-way storage flag —
12271
+ * faucet-vs-regular and updatable-vs-immutable distinctions are no longer
12272
+ * part of the on-chain `AccountType` and the API loses no information by
12273
+ * narrowing here too.
12274
+ * @enum {0 | 1}
12255
12275
  */
12256
12276
  const AccountType = Object.freeze({
12257
- FungibleFaucet: 0, "0": "FungibleFaucet",
12258
- NonFungibleFaucet: 1, "1": "NonFungibleFaucet",
12259
- RegularAccountImmutableCode: 2, "2": "RegularAccountImmutableCode",
12260
- RegularAccountUpdatableCode: 3, "3": "RegularAccountUpdatableCode",
12277
+ Private: 0, "0": "Private",
12278
+ Public: 1, "1": "Public",
12261
12279
  });
12262
12280
 
12263
12281
  /**
@@ -12555,13 +12573,14 @@ class AdviceMap {
12555
12573
  insert(key, value) {
12556
12574
  _assertClass(key, Word);
12557
12575
  _assertClass(value, FeltArray);
12558
- const ret = wasm.advicemap_insert(this.__wbg_ptr, key.__wbg_ptr, value.__wbg_ptr);
12559
- let v1;
12576
+ var ptr0 = value.__destroy_into_raw();
12577
+ const ret = wasm.advicemap_insert(this.__wbg_ptr, key.__wbg_ptr, ptr0);
12578
+ let v2;
12560
12579
  if (ret[0] !== 0) {
12561
- v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
12580
+ v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
12562
12581
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
12563
12582
  }
12564
- return v1;
12583
+ return v2;
12565
12584
  }
12566
12585
  /**
12567
12586
  * Creates an empty advice map.
@@ -12618,6 +12637,17 @@ class AssetVault {
12618
12637
  }
12619
12638
  /**
12620
12639
  * Returns the balance for the given fungible faucet, or zero if absent.
12640
+ *
12641
+ * `get_balance` on the 0.15 surface keys by `AssetVaultKey`, not `AccountId`, and
12642
+ * validates the composition. The callback flag is `Disabled` because fungible balance
12643
+ * reads don't run asset callbacks. Returns zero on lookup error (`Err` arms here would
12644
+ * indicate the key was constructed wrong, which can't happen for fungible keys built
12645
+ * this way).
12646
+ *
12647
+ * NOTE: the `AssetVaultKey` encodes the callback flag, so this reports only the balance
12648
+ * of callback-*disabled* fungible assets. Faucets built by this SDK omit transfer policies
12649
+ * and therefore mint callback-disabled assets, so this is exact for them; an asset minted
12650
+ * elsewhere with callbacks enabled would not be counted here.
12621
12651
  * @param {AccountId} faucet_id
12622
12652
  * @returns {bigint}
12623
12653
  */
@@ -12710,10 +12740,9 @@ class AuthFalcon512RpoMultisigConfig {
12710
12740
  * @returns {AuthFalcon512RpoMultisigConfig}
12711
12741
  */
12712
12742
  withProcThresholds(proc_thresholds) {
12713
- const ptr = this.__destroy_into_raw();
12714
12743
  const ptr0 = passArrayJsValueToWasm0(proc_thresholds, wasm.__wbindgen_malloc);
12715
12744
  const len0 = WASM_VECTOR_LEN;
12716
- const ret = wasm.authfalcon512rpomultisigconfig_withProcThresholds(ptr, ptr0, len0);
12745
+ const ret = wasm.authfalcon512rpomultisigconfig_withProcThresholds(this.__wbg_ptr, ptr0, len0);
12717
12746
  if (ret[2]) {
12718
12747
  throw takeFromExternrefTable0(ret[1]);
12719
12748
  }
@@ -12855,6 +12884,9 @@ if (Symbol.dispose) AuthSecretKey.prototype[Symbol.dispose] = AuthSecretKey.prot
12855
12884
 
12856
12885
  /**
12857
12886
  * Provides metadata for a basic fungible faucet account component.
12887
+ *
12888
+ * Reads the on-chain [`FungibleFaucet`] component for the account, which holds the
12889
+ * per-token info (symbol/decimals/maxSupply).
12858
12890
  */
12859
12891
  class BasicFungibleFaucetComponent {
12860
12892
  static __wrap(ptr) {
@@ -12901,7 +12933,7 @@ class BasicFungibleFaucetComponent {
12901
12933
  * @returns {Felt}
12902
12934
  */
12903
12935
  maxSupply() {
12904
- const ret = wasm.accountid_prefix(this.__wbg_ptr);
12936
+ const ret = wasm.basicfungiblefaucetcomponent_maxSupply(this.__wbg_ptr);
12905
12937
  return Felt.__wrap(ret);
12906
12938
  }
12907
12939
  /**
@@ -12984,8 +13016,8 @@ class BlockHeader {
12984
13016
  * network.
12985
13017
  * @returns {AccountId}
12986
13018
  */
12987
- nativeAssetId() {
12988
- const ret = wasm.blockheader_nativeAssetId(this.__wbg_ptr);
13019
+ feeFaucetId() {
13020
+ const ret = wasm.blockheader_feeFaucetId(this.__wbg_ptr);
12989
13021
  return AccountId.__wrap(ret);
12990
13022
  }
12991
13023
  /**
@@ -13228,14 +13260,6 @@ class CommittedNote {
13228
13260
  const ptr = this.__destroy_into_raw();
13229
13261
  wasm.__wbg_committednote_free(ptr, 0);
13230
13262
  }
13231
- /**
13232
- * Returns the full note metadata when the attachment payload is available.
13233
- * @returns {NoteMetadata | undefined}
13234
- */
13235
- fullMetadata() {
13236
- const ret = wasm.committednote_fullMetadata(this.__wbg_ptr);
13237
- return ret === 0 ? undefined : NoteMetadata.__wrap(ret);
13238
- }
13239
13263
  /**
13240
13264
  * Returns the inclusion path for the note in the block's note tree.
13241
13265
  * @returns {SparseMerklePath}
@@ -13254,9 +13278,6 @@ class CommittedNote {
13254
13278
  }
13255
13279
  /**
13256
13280
  * Returns the note metadata.
13257
- *
13258
- * If only metadata headers are available, the returned metadata contains
13259
- * the sender, note type, and tag without attachment payload.
13260
13281
  * @returns {NoteMetadata}
13261
13282
  */
13262
13283
  metadata() {
@@ -13631,12 +13652,18 @@ class Felt {
13631
13652
  return BigInt.asUintN(64, ret);
13632
13653
  }
13633
13654
  /**
13634
- * Creates a new field element from a u64 value.
13655
+ * Creates a new field element.
13656
+ *
13657
+ * Returns an error if `value` is outside the field's representable
13658
+ * range (`Felt::new` is fallible on the 0.15 protocol surface).
13635
13659
  * @param {bigint} value
13636
13660
  */
13637
13661
  constructor(value) {
13638
13662
  const ret = wasm.felt_new(value);
13639
- this.__wbg_ptr = ret >>> 0;
13663
+ if (ret[2]) {
13664
+ throw takeFromExternrefTable0(ret[1]);
13665
+ }
13666
+ this.__wbg_ptr = ret[0] >>> 0;
13640
13667
  FeltFinalization.register(this, this.__wbg_ptr, this);
13641
13668
  return this;
13642
13669
  }
@@ -13722,18 +13749,13 @@ class FeltArray {
13722
13749
  wasm.feltarray_push(this.__wbg_ptr, element.__wbg_ptr);
13723
13750
  }
13724
13751
  /**
13725
- * Replace the element at `index`. Borrows + clones the input
13726
- * (mirrors `push`), so the caller's JS handle remains valid
13727
- * after the call. Without this borrow, passing `elem` by
13728
- * value would move the underlying Rust value out of the
13729
- * caller's JS handle and any subsequent method on it would
13730
- * panic with `"null pointer passed to rust"`.
13731
13752
  * @param {number} index
13732
13753
  * @param {Felt} elem
13733
13754
  */
13734
13755
  replaceAt(index, elem) {
13735
13756
  _assertClass(elem, Felt);
13736
- const ret = wasm.feltarray_replaceAt(this.__wbg_ptr, index, elem.__wbg_ptr);
13757
+ var ptr0 = elem.__destroy_into_raw();
13758
+ const ret = wasm.feltarray_replaceAt(this.__wbg_ptr, index, ptr0);
13737
13759
  if (ret[1]) {
13738
13760
  throw takeFromExternrefTable0(ret[0]);
13739
13761
  }
@@ -13786,14 +13808,6 @@ class FetchedAccount {
13786
13808
  const ret = wasm.fetchedaccount_commitment(this.__wbg_ptr);
13787
13809
  return Word.__wrap(ret);
13788
13810
  }
13789
- /**
13790
- * Returns true when the account is a network account.
13791
- * @returns {boolean}
13792
- */
13793
- isNetwork() {
13794
- const ret = wasm.fetchedaccount_isNetwork(this.__wbg_ptr);
13795
- return ret !== 0;
13796
- }
13797
13811
  /**
13798
13812
  * Returns true when the account is private.
13799
13813
  * @returns {boolean}
@@ -13824,8 +13838,15 @@ if (Symbol.dispose) FetchedAccount.prototype[Symbol.dispose] = FetchedAccount.pr
13824
13838
  /**
13825
13839
  * Wrapper for a note fetched over RPC.
13826
13840
  *
13827
- * It contains the note header and inclusion proof. The note details are only present for
13828
- * public notes.
13841
+ * It carries the note ID, public metadata, and inclusion proof. The full note body is only
13842
+ * present for public notes; for private notes only the header-shaped fields and inclusion
13843
+ * proof are available — the body lives off-chain.
13844
+ *
13845
+ * 0.15 protocol surface: the on-chain `NoteHeader` now commits to a
13846
+ * `NoteDetailsCommitment` rather than the `NoteId`, so a `NoteHeader` can no longer be
13847
+ * reconstructed from header-shaped fields alone for private notes. We therefore expose
13848
+ * the constituent fields (`noteId`, `metadata`) directly on `FetchedNote` instead of a
13849
+ * `header` getter.
13829
13850
  */
13830
13851
  class FetchedNote {
13831
13852
  static __wrap(ptr) {
@@ -13857,12 +13878,18 @@ class FetchedNote {
13857
13878
  return ret === 0 ? undefined : InputNote.__wrap(ret);
13858
13879
  }
13859
13880
  /**
13860
- * The note's header, containing the ID and metadata.
13861
- * @returns {NoteHeader}
13881
+ * The note's attachments.
13882
+ *
13883
+ * 0.15 returns attachment content over RPC for both public and private notes, so this is
13884
+ * populated even when the note body itself is private. An empty array means the note
13885
+ * carries no attachments.
13886
+ * @returns {NoteAttachment[]}
13862
13887
  */
13863
- get header() {
13864
- const ret = wasm.fetchednote_header(this.__wbg_ptr);
13865
- return NoteHeader.__wrap(ret);
13888
+ get attachments() {
13889
+ const ret = wasm.fetchednote_attachments(this.__wbg_ptr);
13890
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
13891
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
13892
+ return v1;
13866
13893
  }
13867
13894
  /**
13868
13895
  * The note's inclusion proof.
@@ -14101,18 +14128,13 @@ class ForeignAccountArray {
14101
14128
  wasm.foreignaccountarray_push(this.__wbg_ptr, element.__wbg_ptr);
14102
14129
  }
14103
14130
  /**
14104
- * Replace the element at `index`. Borrows + clones the input
14105
- * (mirrors `push`), so the caller's JS handle remains valid
14106
- * after the call. Without this borrow, passing `elem` by
14107
- * value would move the underlying Rust value out of the
14108
- * caller's JS handle and any subsequent method on it would
14109
- * panic with `"null pointer passed to rust"`.
14110
14131
  * @param {number} index
14111
14132
  * @param {ForeignAccount} elem
14112
14133
  */
14113
14134
  replaceAt(index, elem) {
14114
14135
  _assertClass(elem, ForeignAccount);
14115
- const ret = wasm.foreignaccountarray_replaceAt(this.__wbg_ptr, index, elem.__wbg_ptr);
14136
+ var ptr0 = elem.__destroy_into_raw();
14137
+ const ret = wasm.foreignaccountarray_replaceAt(this.__wbg_ptr, index, ptr0);
14116
14138
  if (ret[1]) {
14117
14139
  throw takeFromExternrefTable0(ret[0]);
14118
14140
  }
@@ -14182,7 +14204,10 @@ class FungibleAsset {
14182
14204
  constructor(faucet_id, amount) {
14183
14205
  _assertClass(faucet_id, AccountId);
14184
14206
  const ret = wasm.fungibleasset_new(faucet_id.__wbg_ptr, amount);
14185
- this.__wbg_ptr = ret >>> 0;
14207
+ if (ret[2]) {
14208
+ throw takeFromExternrefTable0(ret[1]);
14209
+ }
14210
+ this.__wbg_ptr = ret[0] >>> 0;
14186
14211
  FungibleAssetFinalization.register(this, this.__wbg_ptr, this);
14187
14212
  return this;
14188
14213
  }
@@ -14212,6 +14237,10 @@ class FungibleAssetDelta {
14212
14237
  }
14213
14238
  /**
14214
14239
  * Returns the delta amount for a given faucet, if present.
14240
+ *
14241
+ * The vault key here is the one used by the fungible-delta tree, which the upstream
14242
+ * surface keys with `AssetCallbackFlag::Disabled` — fungible balance deltas don't run
14243
+ * asset callbacks. `new_fungible` on the 0.15 surface is infallible.
14215
14244
  * @param {AccountId} faucet_id
14216
14245
  * @returns {bigint | undefined}
14217
14246
  */
@@ -14386,7 +14415,12 @@ class InputNote {
14386
14415
  return InputNote.__wrap(ret);
14387
14416
  }
14388
14417
  /**
14389
- * Returns the commitment to the note ID and metadata.
14418
+ * Returns the commitment to the note (its ID).
14419
+ *
14420
+ * Migration note (miden-client PR #2214): `Note::commitment()` was
14421
+ * removed on the 0.15 surface — the note ID *is* the commitment (it
14422
+ * hashes details + metadata). Return the underlying `NoteId` as a
14423
+ * `Word` so the JS API contract is unchanged.
14390
14424
  * @returns {Word}
14391
14425
  */
14392
14426
  commitment() {
@@ -14472,6 +14506,22 @@ class InputNoteRecord {
14472
14506
  const ptr = this.__destroy_into_raw();
14473
14507
  wasm.__wbg_inputnoterecord_free(ptr, 0);
14474
14508
  }
14509
+ /**
14510
+ * Returns the note's attachments.
14511
+ *
14512
+ * On the 0.15 surface the full attachment content (the packed words) lives
14513
+ * on the note record itself rather than on `NoteMetadata` (which only
14514
+ * carries the attachment headers). This exposes that content so JS callers
14515
+ * can decode payloads packed via the `createNoteAttachment` helper. An
14516
+ * empty array means the note carries no attachments.
14517
+ * @returns {NoteAttachment[]}
14518
+ */
14519
+ attachments() {
14520
+ const ret = wasm.inputnoterecord_attachments(this.__wbg_ptr);
14521
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
14522
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
14523
+ return v1;
14524
+ }
14475
14525
  /**
14476
14526
  * Returns the note commitment (id + metadata), if available.
14477
14527
  * @returns {Word | undefined}
@@ -14502,12 +14552,16 @@ class InputNoteRecord {
14502
14552
  return NoteDetails.__wrap(ret);
14503
14553
  }
14504
14554
  /**
14505
- * Returns the note ID.
14506
- * @returns {NoteId}
14555
+ * Returns the note ID when available.
14556
+ *
14557
+ * Migration note (miden-client PR #2214): `InputNoteRecord::id()`
14558
+ * returns `Option<NoteId>` — partial / metadata-less notes have no
14559
+ * metadata-bearing ID yet.
14560
+ * @returns {NoteId | undefined}
14507
14561
  */
14508
14562
  id() {
14509
14563
  const ret = wasm.inputnoterecord_id(this.__wbg_ptr);
14510
- return NoteId.__wrap(ret);
14564
+ return ret === 0 ? undefined : NoteId.__wrap(ret);
14511
14565
  }
14512
14566
  /**
14513
14567
  * Returns the inclusion proof when the note is authenticated.
@@ -14550,20 +14604,20 @@ class InputNoteRecord {
14550
14604
  return ret === 0 ? undefined : NoteMetadata.__wrap(ret);
14551
14605
  }
14552
14606
  /**
14553
- * Returns the nullifier for this note.
14554
- * @returns {string}
14607
+ * Returns the nullifier for this note when available.
14608
+ *
14609
+ * Migration note (miden-client PR #2214): `InputNoteRecord::nullifier()`
14610
+ * returns `Option<Nullifier>` — partial notes have no nullifier yet.
14611
+ * @returns {string | undefined}
14555
14612
  */
14556
14613
  nullifier() {
14557
- let deferred1_0;
14558
- let deferred1_1;
14559
- try {
14560
- const ret = wasm.inputnoterecord_nullifier(this.__wbg_ptr);
14561
- deferred1_0 = ret[0];
14562
- deferred1_1 = ret[1];
14563
- return getStringFromWasm0(ret[0], ret[1]);
14564
- } finally {
14565
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
14614
+ const ret = wasm.inputnoterecord_nullifier(this.__wbg_ptr);
14615
+ let v1;
14616
+ if (ret[0] !== 0) {
14617
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
14618
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
14566
14619
  }
14620
+ return v1;
14567
14621
  }
14568
14622
  /**
14569
14623
  * Returns the current processing state for this note.
@@ -15134,11 +15188,12 @@ class JsStateSyncUpdate {
15134
15188
  return ret >>> 0;
15135
15189
  }
15136
15190
  /**
15137
- * IDs of note tags that should be removed from the client's local state.
15191
+ * Details-commitment hex of committed notes whose tracking tags
15192
+ * (`NoteTagSource::Note`) should be removed from the client's local state.
15138
15193
  * @returns {string[]}
15139
15194
  */
15140
- get committedNoteIds() {
15141
- const ret = wasm.__wbg_get_jsstatesyncupdate_committedNoteIds(this.__wbg_ptr);
15195
+ get committedNoteTagSources() {
15196
+ const ret = wasm.__wbg_get_jsstatesyncupdate_committedNoteTagSources(this.__wbg_ptr);
15142
15197
  var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
15143
15198
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
15144
15199
  return v1;
@@ -15151,15 +15206,6 @@ class JsStateSyncUpdate {
15151
15206
  const ret = wasm.__wbg_get_jsstatesyncupdate_flattenedNewBlockHeaders(this.__wbg_ptr);
15152
15207
  return FlattenedU8Vec.__wrap(ret);
15153
15208
  }
15154
- /**
15155
- * Flattened byte array containing partial blockchain peaks used for merkle tree
15156
- * verification.
15157
- * @returns {FlattenedU8Vec}
15158
- */
15159
- get flattenedPartialBlockChainPeaks() {
15160
- const ret = wasm.__wbg_get_jsstatesyncupdate_flattenedPartialBlockChainPeaks(this.__wbg_ptr);
15161
- return FlattenedU8Vec.__wrap(ret);
15162
- }
15163
15209
  /**
15164
15210
  * The block numbers corresponding to each header in `flattened_new_block_headers`.
15165
15211
  * This vec should have the same length as the number of headers, with each index
@@ -15172,6 +15218,18 @@ class JsStateSyncUpdate {
15172
15218
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
15173
15219
  return v1;
15174
15220
  }
15221
+ /**
15222
+ * Serialized MMR peaks at the new sync height (single set for the whole update).
15223
+ * Written onto the chain-tip block's `blockHeaders` row (the one whose
15224
+ * `blockNum` matches `block_num`) and read back by `getCurrentBlockchainPeaks`.
15225
+ * @returns {Uint8Array}
15226
+ */
15227
+ get partialBlockchainPeaks() {
15228
+ const ret = wasm.__wbg_get_jsstatesyncupdate_partialBlockchainPeaks(this.__wbg_ptr);
15229
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
15230
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15231
+ return v1;
15232
+ }
15175
15233
  /**
15176
15234
  * Input notes for this state update in serialized form.
15177
15235
  * @returns {SerializedInputNoteData[]}
@@ -15250,13 +15308,14 @@ class JsStateSyncUpdate {
15250
15308
  wasm.__wbg_set_jsstatesyncupdate_blockNum(this.__wbg_ptr, arg0);
15251
15309
  }
15252
15310
  /**
15253
- * IDs of note tags that should be removed from the client's local state.
15311
+ * Details-commitment hex of committed notes whose tracking tags
15312
+ * (`NoteTagSource::Note`) should be removed from the client's local state.
15254
15313
  * @param {string[]} arg0
15255
15314
  */
15256
- set committedNoteIds(arg0) {
15315
+ set committedNoteTagSources(arg0) {
15257
15316
  const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
15258
15317
  const len0 = WASM_VECTOR_LEN;
15259
- wasm.__wbg_set_jsstatesyncupdate_committedNoteIds(this.__wbg_ptr, ptr0, len0);
15318
+ wasm.__wbg_set_jsstatesyncupdate_committedNoteTagSources(this.__wbg_ptr, ptr0, len0);
15260
15319
  }
15261
15320
  /**
15262
15321
  * The new block headers for this state update, serialized into a flattened byte array.
@@ -15267,16 +15326,6 @@ class JsStateSyncUpdate {
15267
15326
  var ptr0 = arg0.__destroy_into_raw();
15268
15327
  wasm.__wbg_set_jsstatesyncupdate_flattenedNewBlockHeaders(this.__wbg_ptr, ptr0);
15269
15328
  }
15270
- /**
15271
- * Flattened byte array containing partial blockchain peaks used for merkle tree
15272
- * verification.
15273
- * @param {FlattenedU8Vec} arg0
15274
- */
15275
- set flattenedPartialBlockChainPeaks(arg0) {
15276
- _assertClass(arg0, FlattenedU8Vec);
15277
- var ptr0 = arg0.__destroy_into_raw();
15278
- wasm.__wbg_set_jsstatesyncupdate_flattenedPartialBlockChainPeaks(this.__wbg_ptr, ptr0);
15279
- }
15280
15329
  /**
15281
15330
  * The block numbers corresponding to each header in `flattened_new_block_headers`.
15282
15331
  * This vec should have the same length as the number of headers, with each index
@@ -15288,6 +15337,17 @@ class JsStateSyncUpdate {
15288
15337
  const len0 = WASM_VECTOR_LEN;
15289
15338
  wasm.__wbg_set_jsstatesyncupdate_newBlockNums(this.__wbg_ptr, ptr0, len0);
15290
15339
  }
15340
+ /**
15341
+ * Serialized MMR peaks at the new sync height (single set for the whole update).
15342
+ * Written onto the chain-tip block's `blockHeaders` row (the one whose
15343
+ * `blockNum` matches `block_num`) and read back by `getCurrentBlockchainPeaks`.
15344
+ * @param {Uint8Array} arg0
15345
+ */
15346
+ set partialBlockchainPeaks(arg0) {
15347
+ const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
15348
+ const len0 = WASM_VECTOR_LEN;
15349
+ wasm.__wbg_set_jsstatesyncupdate_partialBlockchainPeaks(this.__wbg_ptr, ptr0, len0);
15350
+ }
15291
15351
  /**
15292
15352
  * Input notes for this state update in serialized form.
15293
15353
  * @param {SerializedInputNoteData[]} arg0
@@ -15776,6 +15836,76 @@ class NetworkId {
15776
15836
  }
15777
15837
  if (Symbol.dispose) NetworkId.prototype[Symbol.dispose] = NetworkId.prototype.free;
15778
15838
 
15839
+ /**
15840
+ * Status of a network note in the node.
15841
+ */
15842
+ class NetworkNoteStatusInfo {
15843
+ static __wrap(ptr) {
15844
+ ptr = ptr >>> 0;
15845
+ const obj = Object.create(NetworkNoteStatusInfo.prototype);
15846
+ obj.__wbg_ptr = ptr;
15847
+ NetworkNoteStatusInfoFinalization.register(obj, obj.__wbg_ptr, obj);
15848
+ return obj;
15849
+ }
15850
+ __destroy_into_raw() {
15851
+ const ptr = this.__wbg_ptr;
15852
+ this.__wbg_ptr = 0;
15853
+ NetworkNoteStatusInfoFinalization.unregister(this);
15854
+ return ptr;
15855
+ }
15856
+ free() {
15857
+ const ptr = this.__destroy_into_raw();
15858
+ wasm.__wbg_networknotestatusinfo_free(ptr, 0);
15859
+ }
15860
+ /**
15861
+ * Returns the number of processing attempts.
15862
+ * @returns {number}
15863
+ */
15864
+ get attemptCount() {
15865
+ const ret = wasm.networknotestatusinfo_attemptCount(this.__wbg_ptr);
15866
+ return ret >>> 0;
15867
+ }
15868
+ /**
15869
+ * Returns the block number of the last processing attempt, if any.
15870
+ * @returns {number | undefined}
15871
+ */
15872
+ get lastAttemptBlockNum() {
15873
+ const ret = wasm.networknotestatusinfo_lastAttemptBlockNum(this.__wbg_ptr);
15874
+ return ret === 0x100000001 ? undefined : ret;
15875
+ }
15876
+ /**
15877
+ * Returns the last error message, if any.
15878
+ * @returns {string | undefined}
15879
+ */
15880
+ get lastError() {
15881
+ const ret = wasm.networknotestatusinfo_lastError(this.__wbg_ptr);
15882
+ let v1;
15883
+ if (ret[0] !== 0) {
15884
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
15885
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15886
+ }
15887
+ return v1;
15888
+ }
15889
+ /**
15890
+ * Returns the status as a string: `"Pending"`, `"NullifierInflight"`, `"Discarded"`, or
15891
+ * `"NullifierCommitted"`.
15892
+ * @returns {string}
15893
+ */
15894
+ get status() {
15895
+ let deferred1_0;
15896
+ let deferred1_1;
15897
+ try {
15898
+ const ret = wasm.networknotestatusinfo_status(this.__wbg_ptr);
15899
+ deferred1_0 = ret[0];
15900
+ deferred1_1 = ret[1];
15901
+ return getStringFromWasm0(ret[0], ret[1]);
15902
+ } finally {
15903
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
15904
+ }
15905
+ }
15906
+ }
15907
+ if (Symbol.dispose) NetworkNoteStatusInfo.prototype[Symbol.dispose] = NetworkNoteStatusInfo.prototype.free;
15908
+
15779
15909
  /**
15780
15910
  * The type of a Miden network.
15781
15911
  * @enum {0 | 1 | 2 | 3}
@@ -15839,7 +15969,12 @@ class Note {
15839
15969
  return NoteAssets.__wrap(ret);
15840
15970
  }
15841
15971
  /**
15842
- * Returns the commitment to the note ID and metadata.
15972
+ * Returns the commitment to the note (its ID).
15973
+ *
15974
+ * Migration note (miden-client PR #2214): `Note::commitment()` was
15975
+ * removed on the 0.15 surface — the note ID is the commitment. Return
15976
+ * the underlying `NoteId` as a `Word` so the JS API contract is
15977
+ * unchanged.
15843
15978
  * @returns {Word}
15844
15979
  */
15845
15980
  commitment() {
@@ -15905,7 +16040,7 @@ class Note {
15905
16040
  * @returns {NoteId}
15906
16041
  */
15907
16042
  id() {
15908
- const ret = wasm.accountheader_storageCommitment(this.__wbg_ptr);
16043
+ const ret = wasm.note_commitment(this.__wbg_ptr);
15909
16044
  return NoteId.__wrap(ret);
15910
16045
  }
15911
16046
  /**
@@ -15913,11 +16048,15 @@ class Note {
15913
16048
  * @returns {NoteMetadata}
15914
16049
  */
15915
16050
  metadata() {
15916
- const ret = wasm.note_metadata(this.__wbg_ptr);
16051
+ const ret = wasm.committednote_metadata(this.__wbg_ptr);
15917
16052
  return NoteMetadata.__wrap(ret);
15918
16053
  }
15919
16054
  /**
15920
16055
  * Creates a new note from the provided assets, metadata, and recipient.
16056
+ *
16057
+ * Migration note (miden-client PR #2214): `Note::new` now takes a
16058
+ * `PartialNoteMetadata` (not `NoteMetadata`). Extract the partial
16059
+ * fields from the JS-side `NoteMetadata` and reconstruct.
15921
16060
  * @param {NoteAssets} note_assets
15922
16061
  * @param {NoteMetadata} note_metadata
15923
16062
  * @param {NoteRecipient} note_recipient
@@ -16066,18 +16205,13 @@ class NoteAndArgsArray {
16066
16205
  wasm.noteandargsarray_push(this.__wbg_ptr, element.__wbg_ptr);
16067
16206
  }
16068
16207
  /**
16069
- * Replace the element at `index`. Borrows + clones the input
16070
- * (mirrors `push`), so the caller's JS handle remains valid
16071
- * after the call. Without this borrow, passing `elem` by
16072
- * value would move the underlying Rust value out of the
16073
- * caller's JS handle and any subsequent method on it would
16074
- * panic with `"null pointer passed to rust"`.
16075
16208
  * @param {number} index
16076
16209
  * @param {NoteAndArgs} elem
16077
16210
  */
16078
16211
  replaceAt(index, elem) {
16079
16212
  _assertClass(elem, NoteAndArgs);
16080
- const ret = wasm.noteandargsarray_replaceAt(this.__wbg_ptr, index, elem.__wbg_ptr);
16213
+ var ptr0 = elem.__destroy_into_raw();
16214
+ const ret = wasm.noteandargsarray_replaceAt(this.__wbg_ptr, index, ptr0);
16081
16215
  if (ret[1]) {
16082
16216
  throw takeFromExternrefTable0(ret[0]);
16083
16217
  }
@@ -16141,18 +16275,13 @@ class NoteArray {
16141
16275
  wasm.notearray_push(this.__wbg_ptr, element.__wbg_ptr);
16142
16276
  }
16143
16277
  /**
16144
- * Replace the element at `index`. Borrows + clones the input
16145
- * (mirrors `push`), so the caller's JS handle remains valid
16146
- * after the call. Without this borrow, passing `elem` by
16147
- * value would move the underlying Rust value out of the
16148
- * caller's JS handle and any subsequent method on it would
16149
- * panic with `"null pointer passed to rust"`.
16150
16278
  * @param {number} index
16151
16279
  * @param {Note} elem
16152
16280
  */
16153
16281
  replaceAt(index, elem) {
16154
16282
  _assertClass(elem, Note);
16155
- const ret = wasm.notearray_replaceAt(this.__wbg_ptr, index, elem.__wbg_ptr);
16283
+ var ptr0 = elem.__destroy_into_raw();
16284
+ const ret = wasm.notearray_replaceAt(this.__wbg_ptr, index, ptr0);
16156
16285
  if (ret[1]) {
16157
16286
  throw takeFromExternrefTable0(ret[0]);
16158
16287
  }
@@ -16224,9 +16353,13 @@ if (Symbol.dispose) NoteAssets.prototype[Symbol.dispose] = NoteAssets.prototype.
16224
16353
  /**
16225
16354
  * An attachment to a note.
16226
16355
  *
16227
- * Note attachments provide additional context about how notes should be processed.
16228
- * For example, a network account target attachment indicates that the note should
16229
- * be consumed by a specific network account.
16356
+ * 0.15 protocol surface: an attachment is a `(scheme, content)` pair where
16357
+ * `content` is a flat `Vec<Word>` of 1..=256 words. The previous
16358
+ * `NoteAttachmentKind { Word, Array }` dispatch and the per-variant
16359
+ * `asWord` / `asArray` / `newWord` / `newArray` getters/constructors no
16360
+ * longer exist — content is always word-vector-shaped now. Use
16361
+ * `fromWord(scheme, word)` for the common single-word case or
16362
+ * `fromWords(scheme, words)` for multi-word content.
16230
16363
  */
16231
16364
  class NoteAttachment {
16232
16365
  static __wrap(ptr) {
@@ -16246,30 +16379,6 @@ class NoteAttachment {
16246
16379
  const ptr = this.__destroy_into_raw();
16247
16380
  wasm.__wbg_noteattachment_free(ptr, 0);
16248
16381
  }
16249
- /**
16250
- * Returns the content as an array of Felts if the attachment kind is Array, otherwise None.
16251
- * @returns {FeltArray | undefined}
16252
- */
16253
- asArray() {
16254
- const ret = wasm.noteattachment_asArray(this.__wbg_ptr);
16255
- return ret === 0 ? undefined : FeltArray.__wrap(ret);
16256
- }
16257
- /**
16258
- * Returns the content as a Word if the attachment kind is Word, otherwise None.
16259
- * @returns {Word | undefined}
16260
- */
16261
- asWord() {
16262
- const ret = wasm.noteattachment_asWord(this.__wbg_ptr);
16263
- return ret === 0 ? undefined : Word.__wrap(ret);
16264
- }
16265
- /**
16266
- * Returns the attachment kind.
16267
- * @returns {NoteAttachmentKind}
16268
- */
16269
- attachmentKind() {
16270
- const ret = wasm.noteattachment_attachmentKind(this.__wbg_ptr);
16271
- return ret;
16272
- }
16273
16382
  /**
16274
16383
  * Returns the attachment scheme.
16275
16384
  * @returns {NoteAttachmentScheme}
@@ -16279,80 +16388,90 @@ class NoteAttachment {
16279
16388
  return NoteAttachmentScheme.__wrap(ret);
16280
16389
  }
16281
16390
  /**
16282
- * Creates a default (empty) note attachment.
16391
+ * Creates a new note attachment from a single word.
16392
+ * @param {NoteAttachmentScheme} scheme
16393
+ * @param {Word} word
16394
+ * @returns {NoteAttachment}
16283
16395
  */
16284
- constructor() {
16285
- const ret = wasm.noteattachment_new();
16286
- this.__wbg_ptr = ret >>> 0;
16287
- NoteAttachmentFinalization.register(this, this.__wbg_ptr, this);
16288
- return this;
16396
+ static fromWord(scheme, word) {
16397
+ _assertClass(scheme, NoteAttachmentScheme);
16398
+ _assertClass(word, Word);
16399
+ const ret = wasm.noteattachment_fromWord(scheme.__wbg_ptr, word.__wbg_ptr);
16400
+ return NoteAttachment.__wrap(ret);
16289
16401
  }
16290
16402
  /**
16291
- * Creates a new note attachment with Array content from the provided elements.
16403
+ * Creates a new note attachment from a vector of words.
16404
+ *
16405
+ * # Errors
16406
+ * Returns an error if `words` is empty or exceeds `NoteAttachment::MAX_NUM_WORDS`.
16292
16407
  * @param {NoteAttachmentScheme} scheme
16293
- * @param {FeltArray} elements
16408
+ * @param {Word[]} words
16294
16409
  * @returns {NoteAttachment}
16295
16410
  */
16296
- static newArray(scheme, elements) {
16411
+ static fromWords(scheme, words) {
16297
16412
  _assertClass(scheme, NoteAttachmentScheme);
16298
- _assertClass(elements, FeltArray);
16299
- const ret = wasm.noteattachment_newArray(scheme.__wbg_ptr, elements.__wbg_ptr);
16413
+ const ptr0 = passArrayJsValueToWasm0(words, wasm.__wbindgen_malloc);
16414
+ const len0 = WASM_VECTOR_LEN;
16415
+ const ret = wasm.noteattachment_fromWords(scheme.__wbg_ptr, ptr0, len0);
16300
16416
  if (ret[2]) {
16301
16417
  throw takeFromExternrefTable0(ret[1]);
16302
16418
  }
16303
16419
  return NoteAttachment.__wrap(ret[0]);
16304
16420
  }
16305
16421
  /**
16306
- * Creates a new note attachment for a network account target.
16422
+ * Creates a note attachment from an optional list of packed values.
16307
16423
  *
16308
- * This attachment indicates that the note should be consumed by a specific network account.
16309
- * Network accounts are accounts whose storage mode is `Network`, meaning the network (nodes)
16310
- * can execute transactions on behalf of the account.
16311
- *
16312
- * # Arguments
16313
- * * `target_id` - The ID of the network account that should consume the note
16314
- * * `exec_hint` - A hint about when the note can be executed
16424
+ * Mirrors the encoding the JS-side `createNoteAttachment` helper performs
16425
+ * and preserves the `new NoteAttachment()` / `new NoteAttachment([...])`
16426
+ * ergonomics the package's own JS wrappers (`js/standalone.js`,
16427
+ * `js/resources/transactions.js`) rely on. The 0.15 surface has no truly
16428
+ * empty attachment (content is 1..=256 words), so the empty case is
16429
+ * represented as a single zero [`Word`] with the `none` scheme:
16430
+ * - no args / empty list single zero-`Word`, `none` scheme.
16431
+ * - any number of values → padded to a whole number of `Word`s, `none` scheme.
16315
16432
  *
16316
16433
  * # Errors
16317
- * Returns an error if the target account is not a network account.
16318
- * @param {AccountId} target_id
16319
- * @param {NoteExecutionHint} exec_hint
16320
- * @returns {NoteAttachment}
16434
+ * Returns an error if a value is not a canonical field element, or if the
16435
+ * packed word count exceeds `NoteAttachment::MAX_NUM_WORDS`.
16436
+ * @param {BigUint64Array | null} [values]
16321
16437
  */
16322
- static newNetworkAccountTarget(target_id, exec_hint) {
16323
- _assertClass(target_id, AccountId);
16324
- _assertClass(exec_hint, NoteExecutionHint);
16325
- const ret = wasm.noteattachment_newNetworkAccountTarget(target_id.__wbg_ptr, exec_hint.__wbg_ptr);
16438
+ constructor(values) {
16439
+ var ptr0 = isLikeNone(values) ? 0 : passArray64ToWasm0(values, wasm.__wbindgen_malloc);
16440
+ var len0 = WASM_VECTOR_LEN;
16441
+ const ret = wasm.noteattachment_new(ptr0, len0);
16326
16442
  if (ret[2]) {
16327
16443
  throw takeFromExternrefTable0(ret[1]);
16328
16444
  }
16329
- return NoteAttachment.__wrap(ret[0]);
16445
+ this.__wbg_ptr = ret[0] >>> 0;
16446
+ NoteAttachmentFinalization.register(this, this.__wbg_ptr, this);
16447
+ return this;
16330
16448
  }
16331
16449
  /**
16332
- * Creates a new note attachment with Word content from the provided word.
16333
- * @param {NoteAttachmentScheme} scheme
16334
- * @param {Word} word
16335
- * @returns {NoteAttachment}
16450
+ * Returns the number of words in this attachment.
16451
+ * @returns {number}
16336
16452
  */
16337
- static newWord(scheme, word) {
16338
- _assertClass(scheme, NoteAttachmentScheme);
16339
- _assertClass(word, Word);
16340
- const ret = wasm.noteattachment_newWord(scheme.__wbg_ptr, word.__wbg_ptr);
16341
- return NoteAttachment.__wrap(ret);
16453
+ numWords() {
16454
+ const ret = wasm.noteattachment_numWords(this.__wbg_ptr);
16455
+ return ret;
16456
+ }
16457
+ /**
16458
+ * Returns the attachment content as its constituent words.
16459
+ *
16460
+ * The content is always word-vector-shaped on the 0.15 surface, so this is
16461
+ * the inverse of `fromWord` / `fromWords`: it yields the same `Word`s the
16462
+ * attachment was built from (in order), letting JS callers decode the
16463
+ * packed values back out.
16464
+ * @returns {Word[]}
16465
+ */
16466
+ toWords() {
16467
+ const ret = wasm.noteattachment_toWords(this.__wbg_ptr);
16468
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
16469
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
16470
+ return v1;
16342
16471
  }
16343
16472
  }
16344
16473
  if (Symbol.dispose) NoteAttachment.prototype[Symbol.dispose] = NoteAttachment.prototype.free;
16345
16474
 
16346
- /**
16347
- * Defines the payload shape of a note attachment.
16348
- * @enum {0 | 1 | 2}
16349
- */
16350
- const NoteAttachmentKind = Object.freeze({
16351
- None: 0, "0": "None",
16352
- Word: 1, "1": "Word",
16353
- Array: 2, "2": "Array",
16354
- });
16355
-
16356
16475
  /**
16357
16476
  * Describes the type of a note attachment.
16358
16477
  *
@@ -16377,14 +16496,6 @@ class NoteAttachmentScheme {
16377
16496
  const ptr = this.__destroy_into_raw();
16378
16497
  wasm.__wbg_noteattachmentscheme_free(ptr, 0);
16379
16498
  }
16380
- /**
16381
- * Returns the note attachment scheme as a u32.
16382
- * @returns {number}
16383
- */
16384
- asU32() {
16385
- const ret = wasm.noteattachmentscheme_asU32(this.__wbg_ptr);
16386
- return ret >>> 0;
16387
- }
16388
16499
  /**
16389
16500
  * Returns true if the attachment scheme is the reserved value that signals an absent scheme.
16390
16501
  * @returns {boolean}
@@ -16394,12 +16505,19 @@ class NoteAttachmentScheme {
16394
16505
  return ret !== 0;
16395
16506
  }
16396
16507
  /**
16397
- * Creates a new `NoteAttachmentScheme` from a u32.
16508
+ * Creates a new `NoteAttachmentScheme` from a u32 value.
16509
+ *
16510
+ * Errors if `scheme` is out of range (the 0.15 surface narrowed the
16511
+ * underlying type from u32 → u16, so values outside `0..=u16::MAX`
16512
+ * are rejected).
16398
16513
  * @param {number} scheme
16399
16514
  */
16400
16515
  constructor(scheme) {
16401
16516
  const ret = wasm.noteattachmentscheme_new(scheme);
16402
- this.__wbg_ptr = ret >>> 0;
16517
+ if (ret[2]) {
16518
+ throw takeFromExternrefTable0(ret[1]);
16519
+ }
16520
+ this.__wbg_ptr = ret[0] >>> 0;
16403
16521
  NoteAttachmentSchemeFinalization.register(this, this.__wbg_ptr, this);
16404
16522
  return this;
16405
16523
  }
@@ -16539,6 +16657,14 @@ if (Symbol.dispose) NoteConsumptionStatus.prototype[Symbol.dispose] = NoteConsum
16539
16657
  * Details of a note consisting of assets, script, inputs, and a serial number.
16540
16658
  *
16541
16659
  * See the {@link Note} type for more details.
16660
+ *
16661
+ * Migration note (miden-client PR #2214): `NoteDetails::id()` and
16662
+ * `NoteDetails::nullifier()` were removed on the 0.15 protocol surface —
16663
+ * the ID now requires a `NoteMetadata` to compute (see `NoteId::new`),
16664
+ * and the nullifier moved onto `InputNoteRecord` where it is optional.
16665
+ * Use `details_commitment()` on a containing record (e.g.
16666
+ * `InputNoteRecord::details_commitment`) for the metadata-independent
16667
+ * identifier.
16542
16668
  */
16543
16669
  class NoteDetails {
16544
16670
  static __wrap(ptr) {
@@ -16566,14 +16692,6 @@ class NoteDetails {
16566
16692
  const ret = wasm.notedetails_assets(this.__wbg_ptr);
16567
16693
  return NoteAssets.__wrap(ret);
16568
16694
  }
16569
- /**
16570
- * Returns the note identifier derived from these details.
16571
- * @returns {NoteId}
16572
- */
16573
- id() {
16574
- const ret = wasm.notedetails_id(this.__wbg_ptr);
16575
- return NoteId.__wrap(ret);
16576
- }
16577
16695
  /**
16578
16696
  * Creates a new set of note details from the given assets and recipient.
16579
16697
  * @param {NoteAssets} note_assets
@@ -16587,14 +16705,6 @@ class NoteDetails {
16587
16705
  NoteDetailsFinalization.register(this, this.__wbg_ptr, this);
16588
16706
  return this;
16589
16707
  }
16590
- /**
16591
- * Returns the note nullifier as a word.
16592
- * @returns {Word}
16593
- */
16594
- nullifier() {
16595
- const ret = wasm.notedetails_nullifier(this.__wbg_ptr);
16596
- return Word.__wrap(ret);
16597
- }
16598
16708
  /**
16599
16709
  * Returns the recipient which controls when the note can be consumed.
16600
16710
  * @returns {NoteRecipient}
@@ -16723,18 +16833,13 @@ class NoteDetailsAndTagArray {
16723
16833
  wasm.notedetailsandtagarray_push(this.__wbg_ptr, element.__wbg_ptr);
16724
16834
  }
16725
16835
  /**
16726
- * Replace the element at `index`. Borrows + clones the input
16727
- * (mirrors `push`), so the caller's JS handle remains valid
16728
- * after the call. Without this borrow, passing `elem` by
16729
- * value would move the underlying Rust value out of the
16730
- * caller's JS handle and any subsequent method on it would
16731
- * panic with `"null pointer passed to rust"`.
16732
16836
  * @param {number} index
16733
16837
  * @param {NoteDetailsAndTag} elem
16734
16838
  */
16735
16839
  replaceAt(index, elem) {
16736
16840
  _assertClass(elem, NoteDetailsAndTag);
16737
- const ret = wasm.notedetailsandtagarray_replaceAt(this.__wbg_ptr, index, elem.__wbg_ptr);
16841
+ var ptr0 = elem.__destroy_into_raw();
16842
+ const ret = wasm.notedetailsandtagarray_replaceAt(this.__wbg_ptr, index, ptr0);
16738
16843
  if (ret[1]) {
16739
16844
  throw takeFromExternrefTable0(ret[0]);
16740
16845
  }
@@ -16952,12 +17057,17 @@ class NoteFile {
16952
17057
  return ret === 0 ? undefined : NoteDetails.__wrap(ret);
16953
17058
  }
16954
17059
  /**
16955
- * Returns the note ID for any `NoteFile` variant.
16956
- * @returns {NoteId}
17060
+ * Returns the note ID when the file carries one.
17061
+ *
17062
+ * Migration note (miden-client PR #2214): `NoteDetails::id()` was
17063
+ * removed (computing the ID now requires `NoteMetadata`), so the
17064
+ * `NoteDetails`-only variant cannot synthesize one without extra
17065
+ * information. Returns `None` in that case.
17066
+ * @returns {NoteId | undefined}
16957
17067
  */
16958
17068
  noteId() {
16959
17069
  const ret = wasm.notefile_noteId(this.__wbg_ptr);
16960
- return NoteId.__wrap(ret);
17070
+ return ret === 0 ? undefined : NoteId.__wrap(ret);
16961
17071
  }
16962
17072
  /**
16963
17073
  * Returns the note tag hint when present.
@@ -16985,6 +17095,10 @@ class NoteFile {
16985
17095
  }
16986
17096
  /**
16987
17097
  * Returns the note nullifier when present.
17098
+ *
17099
+ * Migration note (miden-client PR #2214): `NoteDetails::nullifier()`
17100
+ * was removed (the nullifier moved onto `InputNoteRecord` and is
17101
+ * optional there), so the `NoteDetails`-only variant returns `None`.
16988
17102
  * @returns {string | undefined}
16989
17103
  */
16990
17104
  nullifier() {
@@ -17060,13 +17174,6 @@ const NoteFilterTypes = Object.freeze({
17060
17174
  * See `NoteId` and `NoteMetadata` for additional details.
17061
17175
  */
17062
17176
  class NoteHeader {
17063
- static __wrap(ptr) {
17064
- ptr = ptr >>> 0;
17065
- const obj = Object.create(NoteHeader.prototype);
17066
- obj.__wbg_ptr = ptr;
17067
- NoteHeaderFinalization.register(obj, obj.__wbg_ptr, obj);
17068
- return obj;
17069
- }
17070
17177
  __destroy_into_raw() {
17071
17178
  const ptr = this.__wbg_ptr;
17072
17179
  this.__wbg_ptr = 0;
@@ -17082,7 +17189,7 @@ class NoteHeader {
17082
17189
  * @returns {NoteId}
17083
17190
  */
17084
17191
  id() {
17085
- const ret = wasm.accountcode_commitment(this.__wbg_ptr);
17192
+ const ret = wasm.noteheader_id(this.__wbg_ptr);
17086
17193
  return NoteId.__wrap(ret);
17087
17194
  }
17088
17195
  /**
@@ -17093,14 +17200,6 @@ class NoteHeader {
17093
17200
  const ret = wasm.noteheader_metadata(this.__wbg_ptr);
17094
17201
  return NoteMetadata.__wrap(ret);
17095
17202
  }
17096
- /**
17097
- * Returns a commitment to the note ID and metadata.
17098
- * @returns {Word}
17099
- */
17100
- toCommitment() {
17101
- const ret = wasm.noteheader_toCommitment(this.__wbg_ptr);
17102
- return Word.__wrap(ret);
17103
- }
17104
17203
  }
17105
17204
  if (Symbol.dispose) NoteHeader.prototype[Symbol.dispose] = NoteHeader.prototype.free;
17106
17205
 
@@ -17109,16 +17208,14 @@ if (Symbol.dispose) NoteHeader.prototype[Symbol.dispose] = NoteHeader.prototype.
17109
17208
  *
17110
17209
  * Note ID is computed as:
17111
17210
  *
17112
- * > `hash(recipient, asset_commitment)`
17113
- *
17114
- * where `recipient` is defined as:
17115
- *
17116
- * > `hash(hash(hash(serial_num, ZERO), script_root), input_commitment)`
17211
+ * > `hash(details_commitment, metadata_commitment)`
17117
17212
  *
17118
- * This achieves the following properties:
17119
- * - Every note can be reduced to a single unique ID.
17120
- * - To compute a note ID, we do not need to know the note's `serial_num`. Knowing the hash of the
17121
- * `serial_num` (as well as script root, input commitment, and note assets) is sufficient.
17213
+ * On the 0.15 protocol surface the upstream `NoteId::new` signature
17214
+ * changed from `(recipient_digest, asset_commitment)` to
17215
+ * `(NoteDetailsCommitment, &NoteMetadata)`. The JS API exposes
17216
+ * `NoteId.fromRaw(word)` for constructing an ID from a pre-computed
17217
+ * 32-byte commitment word (the previous two-Word constructor has no
17218
+ * 0.15 equivalent).
17122
17219
  */
17123
17220
  class NoteId {
17124
17221
  static __wrap(ptr) {
@@ -17159,17 +17256,18 @@ class NoteId {
17159
17256
  return NoteId.__wrap(ret[0]);
17160
17257
  }
17161
17258
  /**
17162
- * Builds a note ID from the recipient and asset commitments.
17163
- * @param {Word} recipient_digest
17164
- * @param {Word} asset_commitment_digest
17259
+ * Builds a note ID from its raw commitment word.
17260
+ *
17261
+ * `word` must already encode the final note-ID commitment — the
17262
+ * metadata-mixing that the previous 2-Word constructor did is no
17263
+ * longer part of the protocol surface.
17264
+ * @param {Word} word
17265
+ * @returns {NoteId}
17165
17266
  */
17166
- constructor(recipient_digest, asset_commitment_digest) {
17167
- _assertClass(recipient_digest, Word);
17168
- _assertClass(asset_commitment_digest, Word);
17169
- const ret = wasm.noteid_new(recipient_digest.__wbg_ptr, asset_commitment_digest.__wbg_ptr);
17170
- this.__wbg_ptr = ret >>> 0;
17171
- NoteIdFinalization.register(this, this.__wbg_ptr, this);
17172
- return this;
17267
+ static fromRaw(word) {
17268
+ _assertClass(word, Word);
17269
+ const ret = wasm.accountcode_commitment(word.__wbg_ptr);
17270
+ return NoteId.__wrap(ret);
17173
17271
  }
17174
17272
  /**
17175
17273
  * Returns the canonical hex representation of the note ID.
@@ -17294,18 +17392,13 @@ class NoteIdAndArgsArray {
17294
17392
  wasm.noteidandargsarray_push(this.__wbg_ptr, element.__wbg_ptr);
17295
17393
  }
17296
17394
  /**
17297
- * Replace the element at `index`. Borrows + clones the input
17298
- * (mirrors `push`), so the caller's JS handle remains valid
17299
- * after the call. Without this borrow, passing `elem` by
17300
- * value would move the underlying Rust value out of the
17301
- * caller's JS handle and any subsequent method on it would
17302
- * panic with `"null pointer passed to rust"`.
17303
17395
  * @param {number} index
17304
17396
  * @param {NoteIdAndArgs} elem
17305
17397
  */
17306
17398
  replaceAt(index, elem) {
17307
17399
  _assertClass(elem, NoteIdAndArgs);
17308
- const ret = wasm.noteidandargsarray_replaceAt(this.__wbg_ptr, index, elem.__wbg_ptr);
17400
+ var ptr0 = elem.__destroy_into_raw();
17401
+ const ret = wasm.noteidandargsarray_replaceAt(this.__wbg_ptr, index, ptr0);
17309
17402
  if (ret[1]) {
17310
17403
  throw takeFromExternrefTable0(ret[0]);
17311
17404
  }
@@ -17387,7 +17480,7 @@ class NoteLocation {
17387
17480
  * @returns {number}
17388
17481
  */
17389
17482
  blockNum() {
17390
- const ret = wasm.noteattachmentscheme_asU32(this.__wbg_ptr);
17483
+ const ret = wasm.notelocation_blockNum(this.__wbg_ptr);
17391
17484
  return ret >>> 0;
17392
17485
  }
17393
17486
  }
@@ -17396,8 +17489,13 @@ if (Symbol.dispose) NoteLocation.prototype[Symbol.dispose] = NoteLocation.protot
17396
17489
  /**
17397
17490
  * Metadata associated with a note.
17398
17491
  *
17399
- * This metadata includes the sender, note type, tag, and an optional attachment.
17400
- * Attachments provide additional context about how notes should be processed.
17492
+ * 0.15 protocol surface: `NoteMetadata` is now constructed from a
17493
+ * [`PartialNoteMetadata`] (sender / `note_type` / tag) plus a `NoteAttachments`
17494
+ * collection — the previous `with_tag` / `with_attachment` / `attachment`
17495
+ * methods on `NoteMetadata` were moved (`with_tag` lives on
17496
+ * `PartialNoteMetadata`) or removed (`with_attachment` / `attachment`).
17497
+ * The JS constructor narrows back to the common case of an
17498
+ * attachment-less metadata.
17401
17499
  */
17402
17500
  class NoteMetadata {
17403
17501
  static __wrap(ptr) {
@@ -17418,15 +17516,7 @@ class NoteMetadata {
17418
17516
  wasm.__wbg_notemetadata_free(ptr, 0);
17419
17517
  }
17420
17518
  /**
17421
- * Returns the attachment of the note.
17422
- * @returns {NoteAttachment}
17423
- */
17424
- attachment() {
17425
- const ret = wasm.notemetadata_attachment(this.__wbg_ptr);
17426
- return NoteAttachment.__wrap(ret);
17427
- }
17428
- /**
17429
- * Creates metadata for a note.
17519
+ * Creates metadata for a note with no attachments.
17430
17520
  * @param {AccountId} sender
17431
17521
  * @param {NoteType} note_type
17432
17522
  * @param {NoteTag} note_tag
@@ -17452,7 +17542,7 @@ class NoteMetadata {
17452
17542
  * @returns {AccountId}
17453
17543
  */
17454
17544
  sender() {
17455
- const ret = wasm.accountdelta_id(this.__wbg_ptr);
17545
+ const ret = wasm.notemetadata_sender(this.__wbg_ptr);
17456
17546
  return AccountId.__wrap(ret);
17457
17547
  }
17458
17548
  /**
@@ -17463,30 +17553,6 @@ class NoteMetadata {
17463
17553
  const ret = wasm.notemetadata_tag(this.__wbg_ptr);
17464
17554
  return NoteTag.__wrap(ret);
17465
17555
  }
17466
- /**
17467
- * Adds an attachment to this metadata and returns the updated metadata.
17468
- *
17469
- * Attachments provide additional context about how notes should be processed.
17470
- * For example, a `NetworkAccountTarget` attachment indicates that the note
17471
- * should be consumed by a specific network account.
17472
- * @param {NoteAttachment} attachment
17473
- * @returns {NoteMetadata}
17474
- */
17475
- withAttachment(attachment) {
17476
- _assertClass(attachment, NoteAttachment);
17477
- const ret = wasm.notemetadata_withAttachment(this.__wbg_ptr, attachment.__wbg_ptr);
17478
- return NoteMetadata.__wrap(ret);
17479
- }
17480
- /**
17481
- * Sets the tag for this metadata and returns the updated metadata.
17482
- * @param {NoteTag} tag
17483
- * @returns {NoteMetadata}
17484
- */
17485
- withTag(tag) {
17486
- _assertClass(tag, NoteTag);
17487
- const ret = wasm.notemetadata_withTag(this.__wbg_ptr, tag.__wbg_ptr);
17488
- return NoteMetadata.__wrap(ret);
17489
- }
17490
17556
  }
17491
17557
  if (Symbol.dispose) NoteMetadata.prototype[Symbol.dispose] = NoteMetadata.prototype.free;
17492
17558
 
@@ -17631,18 +17697,13 @@ class NoteRecipientArray {
17631
17697
  wasm.noterecipientarray_push(this.__wbg_ptr, element.__wbg_ptr);
17632
17698
  }
17633
17699
  /**
17634
- * Replace the element at `index`. Borrows + clones the input
17635
- * (mirrors `push`), so the caller's JS handle remains valid
17636
- * after the call. Without this borrow, passing `elem` by
17637
- * value would move the underlying Rust value out of the
17638
- * caller's JS handle and any subsequent method on it would
17639
- * panic with `"null pointer passed to rust"`.
17640
17700
  * @param {number} index
17641
17701
  * @param {NoteRecipient} elem
17642
17702
  */
17643
17703
  replaceAt(index, elem) {
17644
17704
  _assertClass(elem, NoteRecipient);
17645
- const ret = wasm.noterecipientarray_replaceAt(this.__wbg_ptr, index, elem.__wbg_ptr);
17705
+ var ptr0 = elem.__destroy_into_raw();
17706
+ const ret = wasm.noterecipientarray_replaceAt(this.__wbg_ptr, index, ptr0);
17646
17707
  if (ret[1]) {
17647
17708
  throw takeFromExternrefTable0(ret[0]);
17648
17709
  }
@@ -17803,7 +17864,8 @@ class NoteStorage {
17803
17864
  */
17804
17865
  constructor(felt_array) {
17805
17866
  _assertClass(felt_array, FeltArray);
17806
- const ret = wasm.notestorage_new(felt_array.__wbg_ptr);
17867
+ var ptr0 = felt_array.__destroy_into_raw();
17868
+ const ret = wasm.notestorage_new(ptr0);
17807
17869
  if (ret[2]) {
17808
17870
  throw takeFromExternrefTable0(ret[1]);
17809
17871
  }
@@ -17815,7 +17877,7 @@ class NoteStorage {
17815
17877
  if (Symbol.dispose) NoteStorage.prototype[Symbol.dispose] = NoteStorage.prototype.free;
17816
17878
 
17817
17879
  /**
17818
- * Represents a single block's worth of note sync data.
17880
+ * Represents a single block's worth of note sync data returned by `syncNotes`.
17819
17881
  */
17820
17882
  class NoteSyncBlock {
17821
17883
  static __wrap(ptr) {
@@ -17865,7 +17927,12 @@ class NoteSyncBlock {
17865
17927
  if (Symbol.dispose) NoteSyncBlock.prototype[Symbol.dispose] = NoteSyncBlock.prototype.free;
17866
17928
 
17867
17929
  /**
17868
- * Represents the response data from `syncNotes`.
17930
+ * Aggregates the response data from `syncNotes`: the per-block updates plus
17931
+ * the upper bound of the requested range.
17932
+ *
17933
+ * The previous `chain_tip` accessor is gone — the upstream `sync_notes` RPC
17934
+ * no longer returns the current chain tip on this endpoint. Use the
17935
+ * regular state-sync flow (`syncState`) for the latest synced height.
17869
17936
  */
17870
17937
  class NoteSyncInfo {
17871
17938
  static __wrap(ptr) {
@@ -17886,7 +17953,9 @@ class NoteSyncInfo {
17886
17953
  wasm.__wbg_notesyncinfo_free(ptr, 0);
17887
17954
  }
17888
17955
  /**
17889
- * Returns the first block header associated with matching notes, if any.
17956
+ * Returns the first block header with matching notes, if any. Convenience
17957
+ * for callers that only requested a single tag and want the most recent
17958
+ * inclusion block.
17890
17959
  * @returns {BlockHeader | undefined}
17891
17960
  */
17892
17961
  blockHeader() {
@@ -17894,15 +17963,16 @@ class NoteSyncInfo {
17894
17963
  return ret === 0 ? undefined : BlockHeader.__wrap(ret);
17895
17964
  }
17896
17965
  /**
17897
- * Returns the last block checked by the node. Used as a cursor for pagination.
17966
+ * Returns the upper bound of the block range scanned in this call (the
17967
+ * `blockTo` argument passed to `syncNotes`).
17898
17968
  * @returns {number}
17899
17969
  */
17900
17970
  blockTo() {
17901
- const ret = wasm.notesyncinfo_blockTo(this.__wbg_ptr);
17971
+ const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
17902
17972
  return ret >>> 0;
17903
17973
  }
17904
17974
  /**
17905
- * Returns the blocks containing matching notes.
17975
+ * Returns the per-block breakdown.
17906
17976
  * @returns {NoteSyncBlock[]}
17907
17977
  */
17908
17978
  blocks() {
@@ -17912,15 +17982,7 @@ class NoteSyncInfo {
17912
17982
  return v1;
17913
17983
  }
17914
17984
  /**
17915
- * Returns the latest block number in the chain.
17916
- * @returns {number}
17917
- */
17918
- chainTip() {
17919
- const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
17920
- return ret >>> 0;
17921
- }
17922
- /**
17923
- * Returns the first block MMR path associated with matching notes, if any.
17985
+ * Returns the MMR path of the first block with matching notes, if any.
17924
17986
  * @returns {MerklePath | undefined}
17925
17987
  */
17926
17988
  mmrPath() {
@@ -17928,7 +17990,7 @@ class NoteSyncInfo {
17928
17990
  return ret === 0 ? undefined : MerklePath.__wrap(ret);
17929
17991
  }
17930
17992
  /**
17931
- * Returns the committed notes across all matching blocks.
17993
+ * Returns every committed note across all matching blocks (flattened).
17932
17994
  * @returns {CommittedNote[]}
17933
17995
  */
17934
17996
  notes() {
@@ -17975,7 +18037,7 @@ class NoteTag {
17975
18037
  * @returns {number}
17976
18038
  */
17977
18039
  asU32() {
17978
- const ret = wasm.noteattachmentscheme_asU32(this.__wbg_ptr);
18040
+ const ret = wasm.notelocation_blockNum(this.__wbg_ptr);
17979
18041
  return ret >>> 0;
17980
18042
  }
17981
18043
  /**
@@ -17983,7 +18045,7 @@ class NoteTag {
17983
18045
  * @param {number} tag
17984
18046
  */
17985
18047
  constructor(tag) {
17986
- const ret = wasm.noteattachmentscheme_new(tag);
18048
+ const ret = wasm.notetag_new(tag);
17987
18049
  this.__wbg_ptr = ret >>> 0;
17988
18050
  NoteTagFinalization.register(this, this.__wbg_ptr, this);
17989
18051
  return this;
@@ -18088,8 +18150,7 @@ class OutputNote {
18088
18150
  * @returns {Note | undefined}
18089
18151
  */
18090
18152
  intoFull() {
18091
- const ptr = this.__destroy_into_raw();
18092
- const ret = wasm.outputnote_intoFull(ptr);
18153
+ const ret = wasm.outputnote_intoFull(this.__wbg_ptr);
18093
18154
  return ret === 0 ? undefined : Note.__wrap(ret);
18094
18155
  }
18095
18156
  /**
@@ -18097,7 +18158,7 @@ class OutputNote {
18097
18158
  * @returns {NoteMetadata}
18098
18159
  */
18099
18160
  metadata() {
18100
- const ret = wasm.outputnote_metadata(this.__wbg_ptr);
18161
+ const ret = wasm.committednote_metadata(this.__wbg_ptr);
18101
18162
  return NoteMetadata.__wrap(ret);
18102
18163
  }
18103
18164
  /**
@@ -18177,18 +18238,13 @@ class OutputNoteArray {
18177
18238
  wasm.outputnotearray_push(this.__wbg_ptr, element.__wbg_ptr);
18178
18239
  }
18179
18240
  /**
18180
- * Replace the element at `index`. Borrows + clones the input
18181
- * (mirrors `push`), so the caller's JS handle remains valid
18182
- * after the call. Without this borrow, passing `elem` by
18183
- * value would move the underlying Rust value out of the
18184
- * caller's JS handle and any subsequent method on it would
18185
- * panic with `"null pointer passed to rust"`.
18186
18241
  * @param {number} index
18187
18242
  * @param {OutputNote} elem
18188
18243
  */
18189
18244
  replaceAt(index, elem) {
18190
18245
  _assertClass(elem, OutputNote);
18191
- const ret = wasm.outputnotearray_replaceAt(this.__wbg_ptr, index, elem.__wbg_ptr);
18246
+ var ptr0 = elem.__destroy_into_raw();
18247
+ const ret = wasm.outputnotearray_replaceAt(this.__wbg_ptr, index, ptr0);
18192
18248
  if (ret[1]) {
18193
18249
  throw takeFromExternrefTable0(ret[0]);
18194
18250
  }
@@ -18230,7 +18286,7 @@ class OutputNoteRecord {
18230
18286
  * @returns {number}
18231
18287
  */
18232
18288
  expectedHeight() {
18233
- const ret = wasm.blockheader_version(this.__wbg_ptr);
18289
+ const ret = wasm.outputnoterecord_expectedHeight(this.__wbg_ptr);
18234
18290
  return ret >>> 0;
18235
18291
  }
18236
18292
  /**
@@ -18270,7 +18326,7 @@ class OutputNoteRecord {
18270
18326
  * @returns {NoteMetadata}
18271
18327
  */
18272
18328
  metadata() {
18273
- const ret = wasm.outputnoterecord_metadata(this.__wbg_ptr);
18329
+ const ret = wasm.committednote_metadata(this.__wbg_ptr);
18274
18330
  return NoteMetadata.__wrap(ret);
18275
18331
  }
18276
18332
  /**
@@ -18501,7 +18557,7 @@ class PartialNote {
18501
18557
  * @returns {NoteMetadata}
18502
18558
  */
18503
18559
  metadata() {
18504
- const ret = wasm.partialnote_metadata(this.__wbg_ptr);
18560
+ const ret = wasm.committednote_metadata(this.__wbg_ptr);
18505
18561
  return NoteMetadata.__wrap(ret);
18506
18562
  }
18507
18563
  /**
@@ -18536,7 +18592,8 @@ class Poseidon2 {
18536
18592
  */
18537
18593
  static hashElements(felt_array) {
18538
18594
  _assertClass(felt_array, FeltArray);
18539
- const ret = wasm.poseidon2_hashElements(felt_array.__wbg_ptr);
18595
+ var ptr0 = felt_array.__destroy_into_raw();
18596
+ const ret = wasm.poseidon2_hashElements(ptr0);
18540
18597
  return Word.__wrap(ret);
18541
18598
  }
18542
18599
  }
@@ -18868,20 +18925,43 @@ class RpcClient {
18868
18925
  }
18869
18926
  /**
18870
18927
  * Fetches a block header by number. When `block_num` is undefined, returns the latest header.
18928
+ *
18929
+ * @param `block_num` - Optional block number. When `undefined`, returns the latest header.
18930
+ * @param `include_mmr_proof` - When `true`, includes the MMR proof in the response. Defaults
18931
+ * to `false` when `undefined`.
18871
18932
  * @param {number | null} [block_num]
18933
+ * @param {boolean | null} [include_mmr_proof]
18872
18934
  * @returns {Promise<BlockHeader>}
18873
18935
  */
18874
- getBlockHeaderByNumber(block_num) {
18875
- const ret = wasm.rpcclient_getBlockHeaderByNumber(this.__wbg_ptr, isLikeNone(block_num) ? 0x100000001 : (block_num) >>> 0);
18936
+ getBlockHeaderByNumber(block_num, include_mmr_proof) {
18937
+ const ret = wasm.rpcclient_getBlockHeaderByNumber(this.__wbg_ptr, isLikeNone(block_num) ? 0x100000001 : (block_num) >>> 0, isLikeNone(include_mmr_proof) ? 0xFFFFFF : include_mmr_proof ? 1 : 0);
18938
+ return ret;
18939
+ }
18940
+ /**
18941
+ * Fetches the processing status of a network note by its ID.
18942
+ *
18943
+ * Returns information about the note's current status in the network,
18944
+ * including whether it is pending, processed, discarded, or committed,
18945
+ * along with error details and attempt count.
18946
+ *
18947
+ * @param `note_id` - The ID of the note to query.
18948
+ * @returns Promise that resolves to a `NetworkNoteStatusInfo` object.
18949
+ * @param {NoteId} note_id
18950
+ * @returns {Promise<NetworkNoteStatusInfo>}
18951
+ */
18952
+ getNetworkNoteStatus(note_id) {
18953
+ _assertClass(note_id, NoteId);
18954
+ const ret = wasm.rpcclient_getNetworkNoteStatus(this.__wbg_ptr, note_id.__wbg_ptr);
18876
18955
  return ret;
18877
18956
  }
18878
18957
  /**
18879
18958
  * Fetches a note script by its root hash from the connected Miden node.
18880
18959
  *
18881
18960
  * @param script_root - The root hash of the note script to fetch.
18882
- * @returns Promise that resolves to the `NoteScript`.
18961
+ * @returns Promise that resolves to the `NoteScript`, or `undefined` if the node has no
18962
+ * script for that root.
18883
18963
  * @param {Word} script_root
18884
- * @returns {Promise<NoteScript>}
18964
+ * @returns {Promise<NoteScript | undefined>}
18885
18965
  */
18886
18966
  getNoteScriptByRoot(script_root) {
18887
18967
  _assertClass(script_root, Word);
@@ -18935,15 +19015,15 @@ class RpcClient {
18935
19015
  }
18936
19016
  /**
18937
19017
  * Fetches notes matching the provided tags from the node.
18938
- * @param {number} block_num
18939
- * @param {number | null | undefined} block_to
19018
+ * @param {number} block_from
19019
+ * @param {number} block_to
18940
19020
  * @param {NoteTag[]} note_tags
18941
19021
  * @returns {Promise<NoteSyncInfo>}
18942
19022
  */
18943
- syncNotes(block_num, block_to, note_tags) {
19023
+ syncNotes(block_from, block_to, note_tags) {
18944
19024
  const ptr0 = passArrayJsValueToWasm0(note_tags, wasm.__wbindgen_malloc);
18945
19025
  const len0 = WASM_VECTOR_LEN;
18946
- const ret = wasm.rpcclient_syncNotes(this.__wbg_ptr, block_num, isLikeNone(block_to) ? 0x100000001 : (block_to) >>> 0, ptr0, len0);
19026
+ const ret = wasm.rpcclient_syncNotes(this.__wbg_ptr, block_from, block_to, ptr0, len0);
18947
19027
  return ret;
18948
19028
  }
18949
19029
  /**
@@ -18990,7 +19070,8 @@ class Rpo256 {
18990
19070
  */
18991
19071
  static hashElements(felt_array) {
18992
19072
  _assertClass(felt_array, FeltArray);
18993
- const ret = wasm.rpo256_hashElements(felt_array.__wbg_ptr);
19073
+ var ptr0 = felt_array.__destroy_into_raw();
19074
+ const ret = wasm.rpo256_hashElements(ptr0);
18994
19075
  return Word.__wrap(ret);
18995
19076
  }
18996
19077
  }
@@ -19020,6 +19101,15 @@ class SerializedInputNoteData {
19020
19101
  const ptr = this.__destroy_into_raw();
19021
19102
  wasm.__wbg_serializedinputnotedata_free(ptr, 0);
19022
19103
  }
19104
+ /**
19105
+ * @returns {Uint8Array}
19106
+ */
19107
+ get attachments() {
19108
+ const ret = wasm.__wbg_get_serializedinputnotedata_attachments(this.__wbg_ptr);
19109
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
19110
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
19111
+ return v1;
19112
+ }
19023
19113
  /**
19024
19114
  * @returns {number | undefined}
19025
19115
  */
@@ -19061,6 +19151,21 @@ class SerializedInputNoteData {
19061
19151
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
19062
19152
  }
19063
19153
  }
19154
+ /**
19155
+ * @returns {string}
19156
+ */
19157
+ get detailsCommitment() {
19158
+ let deferred1_0;
19159
+ let deferred1_1;
19160
+ try {
19161
+ const ret = wasm.__wbg_get_serializedinputnotedata_detailsCommitment(this.__wbg_ptr);
19162
+ deferred1_0 = ret[0];
19163
+ deferred1_1 = ret[1];
19164
+ return getStringFromWasm0(ret[0], ret[1]);
19165
+ } finally {
19166
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
19167
+ }
19168
+ }
19064
19169
  /**
19065
19170
  * @returns {Uint8Array}
19066
19171
  */
@@ -19080,19 +19185,16 @@ class SerializedInputNoteData {
19080
19185
  return v1;
19081
19186
  }
19082
19187
  /**
19083
- * @returns {string}
19188
+ * @returns {string | undefined}
19084
19189
  */
19085
19190
  get noteId() {
19086
- let deferred1_0;
19087
- let deferred1_1;
19088
- try {
19089
- const ret = wasm.__wbg_get_serializedinputnotedata_noteId(this.__wbg_ptr);
19090
- deferred1_0 = ret[0];
19091
- deferred1_1 = ret[1];
19092
- return getStringFromWasm0(ret[0], ret[1]);
19093
- } finally {
19094
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
19191
+ const ret = wasm.__wbg_get_serializedinputnotedata_noteId(this.__wbg_ptr);
19192
+ let v1;
19193
+ if (ret[0] !== 0) {
19194
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
19195
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
19095
19196
  }
19197
+ return v1;
19096
19198
  }
19097
19199
  /**
19098
19200
  * @returns {string}
@@ -19158,6 +19260,14 @@ class SerializedInputNoteData {
19158
19260
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
19159
19261
  return v1;
19160
19262
  }
19263
+ /**
19264
+ * @param {Uint8Array} arg0
19265
+ */
19266
+ set attachments(arg0) {
19267
+ const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
19268
+ const len0 = WASM_VECTOR_LEN;
19269
+ wasm.__wbg_set_serializedinputnotedata_attachments(this.__wbg_ptr, ptr0, len0);
19270
+ }
19161
19271
  /**
19162
19272
  * @param {number | null} [arg0]
19163
19273
  */
@@ -19186,6 +19296,14 @@ class SerializedInputNoteData {
19186
19296
  const len0 = WASM_VECTOR_LEN;
19187
19297
  wasm.__wbg_set_serializedinputnotedata_createdAt(this.__wbg_ptr, ptr0, len0);
19188
19298
  }
19299
+ /**
19300
+ * @param {string} arg0
19301
+ */
19302
+ set detailsCommitment(arg0) {
19303
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
19304
+ const len0 = WASM_VECTOR_LEN;
19305
+ wasm.__wbg_set_serializedinputnotedata_detailsCommitment(this.__wbg_ptr, ptr0, len0);
19306
+ }
19189
19307
  /**
19190
19308
  * @param {Uint8Array} arg0
19191
19309
  */
@@ -19203,11 +19321,11 @@ class SerializedInputNoteData {
19203
19321
  wasm.__wbg_set_serializedinputnotedata_noteAssets(this.__wbg_ptr, ptr0, len0);
19204
19322
  }
19205
19323
  /**
19206
- * @param {string} arg0
19324
+ * @param {string | null} [arg0]
19207
19325
  */
19208
19326
  set noteId(arg0) {
19209
- const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
19210
- const len0 = WASM_VECTOR_LEN;
19327
+ var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
19328
+ var len0 = WASM_VECTOR_LEN;
19211
19329
  wasm.__wbg_set_serializedinputnotedata_noteId(this.__wbg_ptr, ptr0, len0);
19212
19330
  }
19213
19331
  /**
@@ -19283,6 +19401,15 @@ class SerializedOutputNoteData {
19283
19401
  const ptr = this.__destroy_into_raw();
19284
19402
  wasm.__wbg_serializedoutputnotedata_free(ptr, 0);
19285
19403
  }
19404
+ /**
19405
+ * @returns {Uint8Array}
19406
+ */
19407
+ get attachments() {
19408
+ const ret = wasm.__wbg_get_serializedoutputnotedata_attachments(this.__wbg_ptr);
19409
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
19410
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
19411
+ return v1;
19412
+ }
19286
19413
  /**
19287
19414
  * @returns {number}
19288
19415
  */
@@ -19366,6 +19493,14 @@ class SerializedOutputNoteData {
19366
19493
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
19367
19494
  return v1;
19368
19495
  }
19496
+ /**
19497
+ * @param {Uint8Array} arg0
19498
+ */
19499
+ set attachments(arg0) {
19500
+ const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
19501
+ const len0 = WASM_VECTOR_LEN;
19502
+ wasm.__wbg_set_serializedoutputnotedata_attachments(this.__wbg_ptr, ptr0, len0);
19503
+ }
19369
19504
  /**
19370
19505
  * @param {number} arg0
19371
19506
  */
@@ -19378,7 +19513,7 @@ class SerializedOutputNoteData {
19378
19513
  set metadata(arg0) {
19379
19514
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
19380
19515
  const len0 = WASM_VECTOR_LEN;
19381
- wasm.__wbg_set_serializedoutputnotedata_metadata(this.__wbg_ptr, ptr0, len0);
19516
+ wasm.__wbg_set_jsstatesyncupdate_blockHasRelevantNotes(this.__wbg_ptr, ptr0, len0);
19382
19517
  }
19383
19518
  /**
19384
19519
  * @param {Uint8Array} arg0
@@ -19410,7 +19545,7 @@ class SerializedOutputNoteData {
19410
19545
  set recipientDigest(arg0) {
19411
19546
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
19412
19547
  const len0 = WASM_VECTOR_LEN;
19413
- wasm.__wbg_set_jsstoragemapentry_value(this.__wbg_ptr, ptr0, len0);
19548
+ wasm.__wbg_set_jsaccountupdate_vaultRoot(this.__wbg_ptr, ptr0, len0);
19414
19549
  }
19415
19550
  /**
19416
19551
  * @param {number} arg0
@@ -19566,7 +19701,7 @@ class SerializedTransactionData {
19566
19701
  set status(arg0) {
19567
19702
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
19568
19703
  const len0 = WASM_VECTOR_LEN;
19569
- wasm.__wbg_set_serializedtransactiondata_status(this.__wbg_ptr, ptr0, len0);
19704
+ wasm.__wbg_set_serializedoutputnotedata_attachments(this.__wbg_ptr, ptr0, len0);
19570
19705
  }
19571
19706
  /**
19572
19707
  * @param {Uint8Array | null} [arg0]
@@ -19957,9 +20092,6 @@ class StorageMap {
19957
20092
  }
19958
20093
  if (Symbol.dispose) StorageMap.prototype[Symbol.dispose] = StorageMap.prototype.free;
19959
20094
 
19960
- /**
19961
- * A key-value entry from a storage map.
19962
- */
19963
20095
  class StorageMapEntry {
19964
20096
  static __wrap(ptr) {
19965
20097
  ptr = ptr >>> 0;
@@ -19968,6 +20100,16 @@ class StorageMapEntry {
19968
20100
  StorageMapEntryFinalization.register(obj, obj.__wbg_ptr, obj);
19969
20101
  return obj;
19970
20102
  }
20103
+ toJSON() {
20104
+ return {
20105
+ key: this.key,
20106
+ root: this.root,
20107
+ value: this.value,
20108
+ };
20109
+ }
20110
+ toString() {
20111
+ return JSON.stringify(this);
20112
+ }
19971
20113
  __destroy_into_raw() {
19972
20114
  const ptr = this.__wbg_ptr;
19973
20115
  this.__wbg_ptr = 0;
@@ -19978,6 +20120,99 @@ class StorageMapEntry {
19978
20120
  const ptr = this.__destroy_into_raw();
19979
20121
  wasm.__wbg_storagemapentry_free(ptr, 0);
19980
20122
  }
20123
+ /**
20124
+ * @returns {string}
20125
+ */
20126
+ get key() {
20127
+ let deferred1_0;
20128
+ let deferred1_1;
20129
+ try {
20130
+ const ret = wasm.__wbg_get_storagemapentry_key(this.__wbg_ptr);
20131
+ deferred1_0 = ret[0];
20132
+ deferred1_1 = ret[1];
20133
+ return getStringFromWasm0(ret[0], ret[1]);
20134
+ } finally {
20135
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
20136
+ }
20137
+ }
20138
+ /**
20139
+ * @returns {string}
20140
+ */
20141
+ get root() {
20142
+ let deferred1_0;
20143
+ let deferred1_1;
20144
+ try {
20145
+ const ret = wasm.__wbg_get_storagemapentry_root(this.__wbg_ptr);
20146
+ deferred1_0 = ret[0];
20147
+ deferred1_1 = ret[1];
20148
+ return getStringFromWasm0(ret[0], ret[1]);
20149
+ } finally {
20150
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
20151
+ }
20152
+ }
20153
+ /**
20154
+ * @returns {string}
20155
+ */
20156
+ get value() {
20157
+ let deferred1_0;
20158
+ let deferred1_1;
20159
+ try {
20160
+ const ret = wasm.__wbg_get_storagemapentry_value(this.__wbg_ptr);
20161
+ deferred1_0 = ret[0];
20162
+ deferred1_1 = ret[1];
20163
+ return getStringFromWasm0(ret[0], ret[1]);
20164
+ } finally {
20165
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
20166
+ }
20167
+ }
20168
+ /**
20169
+ * @param {string} arg0
20170
+ */
20171
+ set key(arg0) {
20172
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
20173
+ const len0 = WASM_VECTOR_LEN;
20174
+ wasm.__wbg_set_jsstoragemapentry_key(this.__wbg_ptr, ptr0, len0);
20175
+ }
20176
+ /**
20177
+ * @param {string} arg0
20178
+ */
20179
+ set root(arg0) {
20180
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
20181
+ const len0 = WASM_VECTOR_LEN;
20182
+ wasm.__wbg_set_jsaccountupdate_storageRoot(this.__wbg_ptr, ptr0, len0);
20183
+ }
20184
+ /**
20185
+ * @param {string} arg0
20186
+ */
20187
+ set value(arg0) {
20188
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
20189
+ const len0 = WASM_VECTOR_LEN;
20190
+ wasm.__wbg_set_jsstoragemapentry_value(this.__wbg_ptr, ptr0, len0);
20191
+ }
20192
+ }
20193
+ if (Symbol.dispose) StorageMapEntry.prototype[Symbol.dispose] = StorageMapEntry.prototype.free;
20194
+
20195
+ /**
20196
+ * A key-value entry from a storage map.
20197
+ */
20198
+ class StorageMapEntryJs {
20199
+ static __wrap(ptr) {
20200
+ ptr = ptr >>> 0;
20201
+ const obj = Object.create(StorageMapEntryJs.prototype);
20202
+ obj.__wbg_ptr = ptr;
20203
+ StorageMapEntryJsFinalization.register(obj, obj.__wbg_ptr, obj);
20204
+ return obj;
20205
+ }
20206
+ __destroy_into_raw() {
20207
+ const ptr = this.__wbg_ptr;
20208
+ this.__wbg_ptr = 0;
20209
+ StorageMapEntryJsFinalization.unregister(this);
20210
+ return ptr;
20211
+ }
20212
+ free() {
20213
+ const ptr = this.__destroy_into_raw();
20214
+ wasm.__wbg_storagemapentryjs_free(ptr, 0);
20215
+ }
19981
20216
  /**
19982
20217
  * Returns the storage map key.
19983
20218
  * @returns {Word}
@@ -19995,7 +20230,7 @@ class StorageMapEntry {
19995
20230
  return Word.__wrap(ret);
19996
20231
  }
19997
20232
  }
19998
- if (Symbol.dispose) StorageMapEntry.prototype[Symbol.dispose] = StorageMapEntry.prototype.free;
20233
+ if (Symbol.dispose) StorageMapEntryJs.prototype[Symbol.dispose] = StorageMapEntryJs.prototype.free;
19999
20234
 
20000
20235
  /**
20001
20236
  * Information about storage map updates for an account, as returned by the
@@ -20027,7 +20262,7 @@ class StorageMapInfo {
20027
20262
  * @returns {number}
20028
20263
  */
20029
20264
  blockNumber() {
20030
- const ret = wasm.notesyncinfo_blockTo(this.__wbg_ptr);
20265
+ const ret = wasm.storagemapinfo_blockNumber(this.__wbg_ptr);
20031
20266
  return ret >>> 0;
20032
20267
  }
20033
20268
  /**
@@ -20078,7 +20313,7 @@ class StorageMapUpdate {
20078
20313
  * @returns {number}
20079
20314
  */
20080
20315
  blockNum() {
20081
- const ret = wasm.storagemapupdate_blockNum(this.__wbg_ptr);
20316
+ const ret = wasm.committednote_tag(this.__wbg_ptr);
20082
20317
  return ret >>> 0;
20083
20318
  }
20084
20319
  /**
@@ -20248,18 +20483,13 @@ class StorageSlotArray {
20248
20483
  wasm.storageslotarray_push(this.__wbg_ptr, element.__wbg_ptr);
20249
20484
  }
20250
20485
  /**
20251
- * Replace the element at `index`. Borrows + clones the input
20252
- * (mirrors `push`), so the caller's JS handle remains valid
20253
- * after the call. Without this borrow, passing `elem` by
20254
- * value would move the underlying Rust value out of the
20255
- * caller's JS handle and any subsequent method on it would
20256
- * panic with `"null pointer passed to rust"`.
20257
20486
  * @param {number} index
20258
20487
  * @param {StorageSlot} elem
20259
20488
  */
20260
20489
  replaceAt(index, elem) {
20261
20490
  _assertClass(elem, StorageSlot);
20262
- const ret = wasm.storageslotarray_replaceAt(this.__wbg_ptr, index, elem.__wbg_ptr);
20491
+ var ptr0 = elem.__destroy_into_raw();
20492
+ const ret = wasm.storageslotarray_replaceAt(this.__wbg_ptr, index, ptr0);
20263
20493
  if (ret[1]) {
20264
20494
  throw takeFromExternrefTable0(ret[0]);
20265
20495
  }
@@ -21029,9 +21259,11 @@ class TransactionRequestBuilder {
21029
21259
  * @returns {TransactionRequest}
21030
21260
  */
21031
21261
  build() {
21032
- const ptr = this.__destroy_into_raw();
21033
- const ret = wasm.transactionrequestbuilder_build(ptr);
21034
- return TransactionRequest.__wrap(ret);
21262
+ const ret = wasm.transactionrequestbuilder_build(this.__wbg_ptr);
21263
+ if (ret[2]) {
21264
+ throw takeFromExternrefTable0(ret[1]);
21265
+ }
21266
+ return TransactionRequest.__wrap(ret[0]);
21035
21267
  }
21036
21268
  /**
21037
21269
  * Merges an advice map to be available during script execution.
@@ -21039,16 +21271,15 @@ class TransactionRequestBuilder {
21039
21271
  * @returns {TransactionRequestBuilder}
21040
21272
  */
21041
21273
  extendAdviceMap(advice_map) {
21042
- const ptr = this.__destroy_into_raw();
21043
21274
  _assertClass(advice_map, AdviceMap);
21044
- const ret = wasm.transactionrequestbuilder_extendAdviceMap(ptr, advice_map.__wbg_ptr);
21275
+ const ret = wasm.transactionrequestbuilder_extendAdviceMap(this.__wbg_ptr, advice_map.__wbg_ptr);
21045
21276
  return TransactionRequestBuilder.__wrap(ret);
21046
21277
  }
21047
21278
  /**
21048
21279
  * Creates a new empty transaction request builder.
21049
21280
  */
21050
21281
  constructor() {
21051
- const ret = wasm.transactionrequestbuilder_new();
21282
+ const ret = wasm.transactionrequestbuilder_js_new();
21052
21283
  this.__wbg_ptr = ret >>> 0;
21053
21284
  TransactionRequestBuilderFinalization.register(this, this.__wbg_ptr, this);
21054
21285
  return this;
@@ -21059,9 +21290,8 @@ class TransactionRequestBuilder {
21059
21290
  * @returns {TransactionRequestBuilder}
21060
21291
  */
21061
21292
  withAuthArg(auth_arg) {
21062
- const ptr = this.__destroy_into_raw();
21063
21293
  _assertClass(auth_arg, Word);
21064
- const ret = wasm.transactionrequestbuilder_withAuthArg(ptr, auth_arg.__wbg_ptr);
21294
+ const ret = wasm.transactionrequestbuilder_withAuthArg(this.__wbg_ptr, auth_arg.__wbg_ptr);
21065
21295
  return TransactionRequestBuilder.__wrap(ret);
21066
21296
  }
21067
21297
  /**
@@ -21070,9 +21300,8 @@ class TransactionRequestBuilder {
21070
21300
  * @returns {TransactionRequestBuilder}
21071
21301
  */
21072
21302
  withCustomScript(script) {
21073
- const ptr = this.__destroy_into_raw();
21074
21303
  _assertClass(script, TransactionScript);
21075
- const ret = wasm.transactionrequestbuilder_withCustomScript(ptr, script.__wbg_ptr);
21304
+ const ret = wasm.transactionrequestbuilder_withCustomScript(this.__wbg_ptr, script.__wbg_ptr);
21076
21305
  return TransactionRequestBuilder.__wrap(ret);
21077
21306
  }
21078
21307
  /**
@@ -21081,9 +21310,9 @@ class TransactionRequestBuilder {
21081
21310
  * @returns {TransactionRequestBuilder}
21082
21311
  */
21083
21312
  withExpectedFutureNotes(note_details_and_tag) {
21084
- const ptr = this.__destroy_into_raw();
21085
21313
  _assertClass(note_details_and_tag, NoteDetailsAndTagArray);
21086
- const ret = wasm.transactionrequestbuilder_withExpectedFutureNotes(ptr, note_details_and_tag.__wbg_ptr);
21314
+ var ptr0 = note_details_and_tag.__destroy_into_raw();
21315
+ const ret = wasm.transactionrequestbuilder_withExpectedFutureNotes(this.__wbg_ptr, ptr0);
21087
21316
  return TransactionRequestBuilder.__wrap(ret);
21088
21317
  }
21089
21318
  /**
@@ -21092,9 +21321,9 @@ class TransactionRequestBuilder {
21092
21321
  * @returns {TransactionRequestBuilder}
21093
21322
  */
21094
21323
  withExpectedOutputRecipients(recipients) {
21095
- const ptr = this.__destroy_into_raw();
21096
21324
  _assertClass(recipients, NoteRecipientArray);
21097
- const ret = wasm.transactionrequestbuilder_withExpectedOutputRecipients(ptr, recipients.__wbg_ptr);
21325
+ var ptr0 = recipients.__destroy_into_raw();
21326
+ const ret = wasm.transactionrequestbuilder_withExpectedOutputRecipients(this.__wbg_ptr, ptr0);
21098
21327
  return TransactionRequestBuilder.__wrap(ret);
21099
21328
  }
21100
21329
  /**
@@ -21103,8 +21332,7 @@ class TransactionRequestBuilder {
21103
21332
  * @returns {TransactionRequestBuilder}
21104
21333
  */
21105
21334
  withExpirationDelta(expiration_delta) {
21106
- const ptr = this.__destroy_into_raw();
21107
- const ret = wasm.transactionrequestbuilder_withExpirationDelta(ptr, expiration_delta);
21335
+ const ret = wasm.transactionrequestbuilder_withExpirationDelta(this.__wbg_ptr, expiration_delta);
21108
21336
  return TransactionRequestBuilder.__wrap(ret);
21109
21337
  }
21110
21338
  /**
@@ -21113,9 +21341,9 @@ class TransactionRequestBuilder {
21113
21341
  * @returns {TransactionRequestBuilder}
21114
21342
  */
21115
21343
  withForeignAccounts(foreign_accounts) {
21116
- const ptr = this.__destroy_into_raw();
21117
21344
  _assertClass(foreign_accounts, ForeignAccountArray);
21118
- const ret = wasm.transactionrequestbuilder_withForeignAccounts(ptr, foreign_accounts.__wbg_ptr);
21345
+ var ptr0 = foreign_accounts.__destroy_into_raw();
21346
+ const ret = wasm.transactionrequestbuilder_withForeignAccounts(this.__wbg_ptr, ptr0);
21119
21347
  return TransactionRequestBuilder.__wrap(ret);
21120
21348
  }
21121
21349
  /**
@@ -21124,9 +21352,9 @@ class TransactionRequestBuilder {
21124
21352
  * @returns {TransactionRequestBuilder}
21125
21353
  */
21126
21354
  withInputNotes(notes) {
21127
- const ptr = this.__destroy_into_raw();
21128
21355
  _assertClass(notes, NoteAndArgsArray);
21129
- const ret = wasm.transactionrequestbuilder_withInputNotes(ptr, notes.__wbg_ptr);
21356
+ var ptr0 = notes.__destroy_into_raw();
21357
+ const ret = wasm.transactionrequestbuilder_withInputNotes(this.__wbg_ptr, ptr0);
21130
21358
  return TransactionRequestBuilder.__wrap(ret);
21131
21359
  }
21132
21360
  /**
@@ -21135,9 +21363,9 @@ class TransactionRequestBuilder {
21135
21363
  * @returns {TransactionRequestBuilder}
21136
21364
  */
21137
21365
  withOwnOutputNotes(notes) {
21138
- const ptr = this.__destroy_into_raw();
21139
21366
  _assertClass(notes, NoteArray);
21140
- const ret = wasm.transactionrequestbuilder_withOwnOutputNotes(ptr, notes.__wbg_ptr);
21367
+ var ptr0 = notes.__destroy_into_raw();
21368
+ const ret = wasm.transactionrequestbuilder_withOwnOutputNotes(this.__wbg_ptr, ptr0);
21141
21369
  return TransactionRequestBuilder.__wrap(ret);
21142
21370
  }
21143
21371
  /**
@@ -21146,9 +21374,8 @@ class TransactionRequestBuilder {
21146
21374
  * @returns {TransactionRequestBuilder}
21147
21375
  */
21148
21376
  withScriptArg(script_arg) {
21149
- const ptr = this.__destroy_into_raw();
21150
21377
  _assertClass(script_arg, Word);
21151
- const ret = wasm.transactionrequestbuilder_withScriptArg(ptr, script_arg.__wbg_ptr);
21378
+ const ret = wasm.transactionrequestbuilder_withScriptArg(this.__wbg_ptr, script_arg.__wbg_ptr);
21152
21379
  return TransactionRequestBuilder.__wrap(ret);
21153
21380
  }
21154
21381
  }
@@ -21323,7 +21550,8 @@ class TransactionScriptInputPair {
21323
21550
  _assertClass(word, Word);
21324
21551
  var ptr0 = word.__destroy_into_raw();
21325
21552
  _assertClass(felts, FeltArray);
21326
- const ret = wasm.transactionscriptinputpair_new(ptr0, felts.__wbg_ptr);
21553
+ var ptr1 = felts.__destroy_into_raw();
21554
+ const ret = wasm.transactionscriptinputpair_new(ptr0, ptr1);
21327
21555
  this.__wbg_ptr = ret >>> 0;
21328
21556
  TransactionScriptInputPairFinalization.register(this, this.__wbg_ptr, this);
21329
21557
  return this;
@@ -21395,18 +21623,13 @@ class TransactionScriptInputPairArray {
21395
21623
  wasm.transactionscriptinputpairarray_push(this.__wbg_ptr, element.__wbg_ptr);
21396
21624
  }
21397
21625
  /**
21398
- * Replace the element at `index`. Borrows + clones the input
21399
- * (mirrors `push`), so the caller's JS handle remains valid
21400
- * after the call. Without this borrow, passing `elem` by
21401
- * value would move the underlying Rust value out of the
21402
- * caller's JS handle and any subsequent method on it would
21403
- * panic with `"null pointer passed to rust"`.
21404
21626
  * @param {number} index
21405
21627
  * @param {TransactionScriptInputPair} elem
21406
21628
  */
21407
21629
  replaceAt(index, elem) {
21408
21630
  _assertClass(elem, TransactionScriptInputPair);
21409
- const ret = wasm.transactionscriptinputpairarray_replaceAt(this.__wbg_ptr, index, elem.__wbg_ptr);
21631
+ var ptr0 = elem.__destroy_into_raw();
21632
+ const ret = wasm.transactionscriptinputpairarray_replaceAt(this.__wbg_ptr, index, ptr0);
21410
21633
  if (ret[1]) {
21411
21634
  throw takeFromExternrefTable0(ret[0]);
21412
21635
  }
@@ -21720,15 +21943,23 @@ class WebClient {
21720
21943
  * const balance = await reader.getBalance(faucetId);
21721
21944
  * ```
21722
21945
  * @param {AccountId} account_id
21723
- * @returns {AccountReader}
21946
+ * @returns {Promise<AccountReader>}
21724
21947
  */
21725
21948
  accountReader(account_id) {
21726
21949
  _assertClass(account_id, AccountId);
21727
21950
  const ret = wasm.webclient_accountReader(this.__wbg_ptr, account_id.__wbg_ptr);
21728
- if (ret[2]) {
21729
- throw takeFromExternrefTable0(ret[1]);
21730
- }
21731
- return AccountReader.__wrap(ret[0]);
21951
+ return ret;
21952
+ }
21953
+ /**
21954
+ * @param {AccountId} account_id
21955
+ * @param {AuthSecretKey} secret_key
21956
+ * @returns {Promise<void>}
21957
+ */
21958
+ addAccountSecretKeyToWebStore(account_id, secret_key) {
21959
+ _assertClass(account_id, AccountId);
21960
+ _assertClass(secret_key, AuthSecretKey);
21961
+ const ret = wasm.webclient_addAccountSecretKeyToWebStore(this.__wbg_ptr, account_id.__wbg_ptr, secret_key.__wbg_ptr);
21962
+ return ret;
21732
21963
  }
21733
21964
  /**
21734
21965
  * @param {string} tag
@@ -21777,6 +22008,9 @@ class WebClient {
21777
22008
  * * `store_name`: Optional name for the web store. If `None`, the store name defaults to
21778
22009
  * `MidenClientDB_{network_id}`, where `network_id` is derived from the `node_url`.
21779
22010
  * Explicitly setting this allows for creating multiple isolated clients.
22011
+ * * `debug_mode`: Optional flag to enable debug mode for transaction execution. When enabled,
22012
+ * the transaction executor records additional information useful for debugging. Defaults to
22013
+ * disabled.
21780
22014
  * @param {string | null} [node_url]
21781
22015
  * @param {string | null} [node_note_transport_url]
21782
22016
  * @param {Uint8Array | null} [seed]
@@ -21809,6 +22043,8 @@ class WebClient {
21809
22043
  * * `get_key_cb`: Callback to retrieve the secret key bytes for a given public key.
21810
22044
  * * `insert_key_cb`: Callback to persist a secret key.
21811
22045
  * * `sign_cb`: Callback to produce serialized signature bytes for the provided inputs.
22046
+ * * `debug_mode`: Optional flag to enable debug mode for transaction execution. Defaults to
22047
+ * disabled.
21812
22048
  * @param {string | null} [node_url]
21813
22049
  * @param {string | null} [node_note_transport_url]
21814
22050
  * @param {Uint8Array | null} [seed]
@@ -21832,14 +22068,11 @@ class WebClient {
21832
22068
  return ret;
21833
22069
  }
21834
22070
  /**
21835
- * @returns {CodeBuilder}
22071
+ * @returns {Promise<CodeBuilder>}
21836
22072
  */
21837
22073
  createCodeBuilder() {
21838
22074
  const ret = wasm.webclient_createCodeBuilder(this.__wbg_ptr);
21839
- if (ret[2]) {
21840
- throw takeFromExternrefTable0(ret[1]);
21841
- }
21842
- return CodeBuilder.__wrap(ret[0]);
22075
+ return ret;
21843
22076
  }
21844
22077
  /**
21845
22078
  * Creates a new client with a mock RPC API. Useful for testing purposes and proof-of-concept
@@ -21847,7 +22080,7 @@ class WebClient {
21847
22080
  * @param {Uint8Array | null} [seed]
21848
22081
  * @param {Uint8Array | null} [serialized_mock_chain]
21849
22082
  * @param {Uint8Array | null} [serialized_mock_note_transport_node]
21850
- * @returns {Promise<any>}
22083
+ * @returns {Promise<string>}
21851
22084
  */
21852
22085
  createMockClient(seed, serialized_mock_chain, serialized_mock_note_transport_node) {
21853
22086
  var ptr0 = isLikeNone(seed) ? 0 : passArray8ToWasm0(seed, wasm.__wbindgen_malloc);
@@ -21894,7 +22127,8 @@ class WebClient {
21894
22127
  _assertClass(tx_script, TransactionScript);
21895
22128
  _assertClass(advice_inputs, AdviceInputs);
21896
22129
  _assertClass(foreign_accounts, ForeignAccountArray);
21897
- const ret = wasm.webclient_executeProgram(this.__wbg_ptr, account_id.__wbg_ptr, tx_script.__wbg_ptr, advice_inputs.__wbg_ptr, foreign_accounts.__wbg_ptr);
22130
+ var ptr0 = foreign_accounts.__destroy_into_raw();
22131
+ const ret = wasm.webclient_executeProgram(this.__wbg_ptr, account_id.__wbg_ptr, tx_script.__wbg_ptr, advice_inputs.__wbg_ptr, ptr0);
21898
22132
  return ret;
21899
22133
  }
21900
22134
  /**
@@ -21921,7 +22155,8 @@ class WebClient {
21921
22155
  */
21922
22156
  exportAccountFile(account_id) {
21923
22157
  _assertClass(account_id, AccountId);
21924
- const ret = wasm.webclient_exportAccountFile(this.__wbg_ptr, account_id.__wbg_ptr);
22158
+ var ptr0 = account_id.__destroy_into_raw();
22159
+ const ret = wasm.webclient_exportAccountFile(this.__wbg_ptr, ptr0);
21925
22160
  return ret;
21926
22161
  }
21927
22162
  /**
@@ -21969,6 +22204,30 @@ class WebClient {
21969
22204
  const ret = wasm.webclient_getAccount(this.__wbg_ptr, account_id.__wbg_ptr);
21970
22205
  return ret;
21971
22206
  }
22207
+ /**
22208
+ * Retrieves an authentication secret key from the keystore given a public key commitment.
22209
+ *
22210
+ * The public key commitment should correspond to one of the keys tracked by the keystore.
22211
+ * Returns the associated [`AuthSecretKey`] if found, or an error if not found.
22212
+ * @param {Word} pub_key_commitment
22213
+ * @returns {Promise<AuthSecretKey>}
22214
+ */
22215
+ getAccountAuthByPubKeyCommitment(pub_key_commitment) {
22216
+ _assertClass(pub_key_commitment, Word);
22217
+ const ret = wasm.webclient_getAccountAuthByPubKeyCommitment(this.__wbg_ptr, pub_key_commitment.__wbg_ptr);
22218
+ return ret;
22219
+ }
22220
+ /**
22221
+ * Retrieves the full account data for the account associated with the given public key
22222
+ * commitment, returning `null` if no account is found.
22223
+ * @param {Word} pub_key_commitment
22224
+ * @returns {Promise<Account | undefined>}
22225
+ */
22226
+ getAccountByKeyCommitment(pub_key_commitment) {
22227
+ _assertClass(pub_key_commitment, Word);
22228
+ const ret = wasm.webclient_getAccountByKeyCommitment(this.__wbg_ptr, pub_key_commitment.__wbg_ptr);
22229
+ return ret;
22230
+ }
21972
22231
  /**
21973
22232
  * Retrieves the account code for a specific account.
21974
22233
  *
@@ -22066,7 +22325,20 @@ class WebClient {
22066
22325
  return ret;
22067
22326
  }
22068
22327
  /**
22069
- * Retrieves the setting value for `key`, or `None` if it hasn’t been set.
22328
+ * Returns all public key commitments associated with the given account ID.
22329
+ *
22330
+ * These commitments can be used with [`getAccountAuthByPubKeyCommitment`]
22331
+ * to retrieve the corresponding secret keys from the keystore.
22332
+ * @param {AccountId} account_id
22333
+ * @returns {Promise<Word[]>}
22334
+ */
22335
+ getPublicKeyCommitmentsOfAccount(account_id) {
22336
+ _assertClass(account_id, AccountId);
22337
+ const ret = wasm.webclient_getPublicKeyCommitmentsOfAccount(this.__wbg_ptr, account_id.__wbg_ptr);
22338
+ return ret;
22339
+ }
22340
+ /**
22341
+ * Retrieves the setting value for `key`, or `None` if it hasn't been set.
22070
22342
  * @param {string} key
22071
22343
  * @returns {Promise<any | undefined>}
22072
22344
  */
@@ -22095,7 +22367,7 @@ class WebClient {
22095
22367
  }
22096
22368
  /**
22097
22369
  * @param {AccountId} account_id
22098
- * @returns {Promise<any>}
22370
+ * @returns {Promise<void>}
22099
22371
  */
22100
22372
  importAccountById(account_id) {
22101
22373
  _assertClass(account_id, AccountId);
@@ -22104,7 +22376,7 @@ class WebClient {
22104
22376
  }
22105
22377
  /**
22106
22378
  * @param {AccountFile} account_file
22107
- * @returns {Promise<any>}
22379
+ * @returns {Promise<string>}
22108
22380
  */
22109
22381
  importAccountFile(account_file) {
22110
22382
  _assertClass(account_file, AccountFile);
@@ -22113,8 +22385,20 @@ class WebClient {
22113
22385
  return ret;
22114
22386
  }
22115
22387
  /**
22388
+ * Imports a note file and returns the imported note's identifier.
22389
+ *
22390
+ * A note file that carries metadata — an explicit `NoteId` or a full note
22391
+ * with proof — resolves to a concrete `NoteId`, which is returned so the
22392
+ * caller can look the note up with [`get_input_note`]. A details-only file
22393
+ * (`NoteDetails`) has no metadata and therefore no `NoteId` yet, so its
22394
+ * metadata-independent details commitment is returned instead.
22395
+ *
22396
+ * Migration note (miden-client PR #2214): `Client::import_notes` now
22397
+ * returns `Vec<NoteDetailsCommitment>` rather than `Vec<NoteId>`, since
22398
+ * metadata-less imports have no note ID; this method recovers the `NoteId`
22399
+ * from the note file when one is available.
22116
22400
  * @param {NoteFile} note_file
22117
- * @returns {Promise<NoteId>}
22401
+ * @returns {Promise<string>}
22118
22402
  */
22119
22403
  importNoteFile(note_file) {
22120
22404
  _assertClass(note_file, NoteFile);
@@ -22196,7 +22480,7 @@ class WebClient {
22196
22480
  return ret;
22197
22481
  }
22198
22482
  /**
22199
- * @returns {Promise<any>}
22483
+ * @returns {Promise<string[]>}
22200
22484
  */
22201
22485
  listTags() {
22202
22486
  const ret = wasm.webclient_listTags(this.__wbg_ptr);
@@ -22247,19 +22531,27 @@ class WebClient {
22247
22531
  return TransactionRequest.__wrap(ret[0]);
22248
22532
  }
22249
22533
  /**
22534
+ * Creates, persists, and returns a new fungible faucet account.
22535
+ *
22536
+ * Only fungible faucets are supported, so passing `non_fungible = true` fails fast with a
22537
+ * clear message. The faucet is registered with mint and burn policies (both `AllowAll`); its
22538
+ * secret key is added to the keystore.
22250
22539
  * @param {AccountStorageMode} storage_mode
22251
22540
  * @param {boolean} non_fungible
22541
+ * @param {string} token_name
22252
22542
  * @param {string} token_symbol
22253
22543
  * @param {number} decimals
22254
22544
  * @param {bigint} max_supply
22255
22545
  * @param {AuthScheme} auth_scheme
22256
22546
  * @returns {Promise<Account>}
22257
22547
  */
22258
- newFaucet(storage_mode, non_fungible, token_symbol, decimals, max_supply, auth_scheme) {
22548
+ newFaucet(storage_mode, non_fungible, token_name, token_symbol, decimals, max_supply, auth_scheme) {
22259
22549
  _assertClass(storage_mode, AccountStorageMode);
22260
- const ptr0 = passStringToWasm0(token_symbol, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
22550
+ const ptr0 = passStringToWasm0(token_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
22261
22551
  const len0 = WASM_VECTOR_LEN;
22262
- const ret = wasm.webclient_newFaucet(this.__wbg_ptr, storage_mode.__wbg_ptr, non_fungible, ptr0, len0, decimals, max_supply, auth_scheme);
22552
+ const ptr1 = passStringToWasm0(token_symbol, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
22553
+ const len1 = WASM_VECTOR_LEN;
22554
+ const ret = wasm.webclient_newFaucet(this.__wbg_ptr, storage_mode.__wbg_ptr, non_fungible, ptr0, len0, ptr1, len1, decimals, max_supply, auth_scheme);
22263
22555
  return ret;
22264
22556
  }
22265
22557
  /**
@@ -22267,17 +22559,61 @@ class WebClient {
22267
22559
  * @param {AccountId} faucet_id
22268
22560
  * @param {NoteType} note_type
22269
22561
  * @param {bigint} amount
22270
- * @returns {TransactionRequest}
22562
+ * @returns {Promise<TransactionRequest>}
22271
22563
  */
22272
22564
  newMintTransactionRequest(target_account_id, faucet_id, note_type, amount) {
22273
22565
  _assertClass(target_account_id, AccountId);
22274
22566
  _assertClass(faucet_id, AccountId);
22275
22567
  const ret = wasm.webclient_newMintTransactionRequest(this.__wbg_ptr, target_account_id.__wbg_ptr, faucet_id.__wbg_ptr, note_type, amount);
22568
+ return ret;
22569
+ }
22570
+ /**
22571
+ * @param {Note} pswap_note
22572
+ * @param {AccountId} creator_account_id
22573
+ * @returns {TransactionRequest}
22574
+ */
22575
+ newPswapCancelTransactionRequest(pswap_note, creator_account_id) {
22576
+ _assertClass(pswap_note, Note);
22577
+ _assertClass(creator_account_id, AccountId);
22578
+ const ret = wasm.webclient_newPswapCancelTransactionRequest(this.__wbg_ptr, pswap_note.__wbg_ptr, creator_account_id.__wbg_ptr);
22276
22579
  if (ret[2]) {
22277
22580
  throw takeFromExternrefTable0(ret[1]);
22278
22581
  }
22279
22582
  return TransactionRequest.__wrap(ret[0]);
22280
22583
  }
22584
+ /**
22585
+ * @param {Note} pswap_note
22586
+ * @param {AccountId} consumer_account_id
22587
+ * @param {bigint} account_fill_amount
22588
+ * @param {bigint} note_fill_amount
22589
+ * @returns {TransactionRequest}
22590
+ */
22591
+ newPswapConsumeTransactionRequest(pswap_note, consumer_account_id, account_fill_amount, note_fill_amount) {
22592
+ _assertClass(pswap_note, Note);
22593
+ _assertClass(consumer_account_id, AccountId);
22594
+ const ret = wasm.webclient_newPswapConsumeTransactionRequest(this.__wbg_ptr, pswap_note.__wbg_ptr, consumer_account_id.__wbg_ptr, account_fill_amount, note_fill_amount);
22595
+ if (ret[2]) {
22596
+ throw takeFromExternrefTable0(ret[1]);
22597
+ }
22598
+ return TransactionRequest.__wrap(ret[0]);
22599
+ }
22600
+ /**
22601
+ * @param {AccountId} creator_account_id
22602
+ * @param {AccountId} offered_asset_faucet_id
22603
+ * @param {bigint} offered_asset_amount
22604
+ * @param {AccountId} requested_asset_faucet_id
22605
+ * @param {bigint} requested_asset_amount
22606
+ * @param {NoteType} note_type
22607
+ * @param {NoteType} payback_note_type
22608
+ * @returns {Promise<TransactionRequest>}
22609
+ */
22610
+ newPswapCreateTransactionRequest(creator_account_id, offered_asset_faucet_id, offered_asset_amount, requested_asset_faucet_id, requested_asset_amount, note_type, payback_note_type) {
22611
+ _assertClass(creator_account_id, AccountId);
22612
+ _assertClass(offered_asset_faucet_id, AccountId);
22613
+ _assertClass(requested_asset_faucet_id, AccountId);
22614
+ 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);
22615
+ return ret;
22616
+ }
22281
22617
  /**
22282
22618
  * @param {AccountId} sender_account_id
22283
22619
  * @param {AccountId} target_account_id
@@ -22286,17 +22622,14 @@ class WebClient {
22286
22622
  * @param {bigint} amount
22287
22623
  * @param {number | null} [recall_height]
22288
22624
  * @param {number | null} [timelock_height]
22289
- * @returns {TransactionRequest}
22625
+ * @returns {Promise<TransactionRequest>}
22290
22626
  */
22291
22627
  newSendTransactionRequest(sender_account_id, target_account_id, faucet_id, note_type, amount, recall_height, timelock_height) {
22292
22628
  _assertClass(sender_account_id, AccountId);
22293
22629
  _assertClass(target_account_id, AccountId);
22294
22630
  _assertClass(faucet_id, AccountId);
22295
22631
  const ret = wasm.webclient_newSendTransactionRequest(this.__wbg_ptr, sender_account_id.__wbg_ptr, target_account_id.__wbg_ptr, faucet_id.__wbg_ptr, note_type, amount, isLikeNone(recall_height) ? 0x100000001 : (recall_height) >>> 0, isLikeNone(timelock_height) ? 0x100000001 : (timelock_height) >>> 0);
22296
- if (ret[2]) {
22297
- throw takeFromExternrefTable0(ret[1]);
22298
- }
22299
- return TransactionRequest.__wrap(ret[0]);
22632
+ return ret;
22300
22633
  }
22301
22634
  /**
22302
22635
  * @param {AccountId} sender_account_id
@@ -22306,17 +22639,14 @@ class WebClient {
22306
22639
  * @param {bigint} requested_asset_amount
22307
22640
  * @param {NoteType} note_type
22308
22641
  * @param {NoteType} payback_note_type
22309
- * @returns {TransactionRequest}
22642
+ * @returns {Promise<TransactionRequest>}
22310
22643
  */
22311
22644
  newSwapTransactionRequest(sender_account_id, offered_asset_faucet_id, offered_asset_amount, requested_asset_faucet_id, requested_asset_amount, note_type, payback_note_type) {
22312
22645
  _assertClass(sender_account_id, AccountId);
22313
22646
  _assertClass(offered_asset_faucet_id, AccountId);
22314
22647
  _assertClass(requested_asset_faucet_id, AccountId);
22315
22648
  const ret = wasm.webclient_newSwapTransactionRequest(this.__wbg_ptr, sender_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);
22316
- if (ret[2]) {
22317
- throw takeFromExternrefTable0(ret[1]);
22318
- }
22319
- return TransactionRequest.__wrap(ret[0]);
22649
+ return ret;
22320
22650
  }
22321
22651
  /**
22322
22652
  * @param {AccountStorageMode} storage_mode
@@ -22332,39 +22662,28 @@ class WebClient {
22332
22662
  const ret = wasm.webclient_newWallet(this.__wbg_ptr, storage_mode.__wbg_ptr, mutable, auth_scheme, ptr0, len0);
22333
22663
  return ret;
22334
22664
  }
22335
- proveBlock() {
22336
- const ret = wasm.webclient_proveBlock(this.__wbg_ptr);
22337
- if (ret[1]) {
22338
- throw takeFromExternrefTable0(ret[0]);
22339
- }
22340
- }
22341
22665
  /**
22342
- * Generates a transaction proof using the client's default (local) prover.
22343
- * @param {TransactionResult} transaction_result
22344
- * @returns {Promise<ProvenTransaction>}
22666
+ * @returns {Promise<void>}
22345
22667
  */
22346
- proveTransaction(transaction_result) {
22347
- _assertClass(transaction_result, TransactionResult);
22348
- const ret = wasm.webclient_proveTransaction(this.__wbg_ptr, transaction_result.__wbg_ptr);
22668
+ proveBlock() {
22669
+ const ret = wasm.webclient_proveBlock(this.__wbg_ptr);
22349
22670
  return ret;
22350
22671
  }
22351
22672
  /**
22352
- * Generates a transaction proof using the provided prover.
22353
- *
22354
- * Takes the prover by reference so the JS-side handle is NOT consumed
22355
- * by wasm-bindgen. Taking `TransactionProver` by value would transfer
22356
- * ownership on each call, invalidating the JS object's internal WASM
22357
- * handle; after one use, subsequent calls from JS would pass a dangling
22358
- * handle that wasm-bindgen interprets as `None`, silently falling back
22359
- * to the local prover.
22673
+ * Generates a transaction proof using either the provided prover or the client's default
22674
+ * prover if none is supplied.
22360
22675
  * @param {TransactionResult} transaction_result
22361
- * @param {TransactionProver} prover
22676
+ * @param {TransactionProver | null} [prover]
22362
22677
  * @returns {Promise<ProvenTransaction>}
22363
22678
  */
22364
- proveTransactionWithProver(transaction_result, prover) {
22679
+ proveTransaction(transaction_result, prover) {
22365
22680
  _assertClass(transaction_result, TransactionResult);
22366
- _assertClass(prover, TransactionProver);
22367
- const ret = wasm.webclient_proveTransactionWithProver(this.__wbg_ptr, transaction_result.__wbg_ptr, prover.__wbg_ptr);
22681
+ let ptr0 = 0;
22682
+ if (!isLikeNone(prover)) {
22683
+ _assertClass(prover, TransactionProver);
22684
+ ptr0 = prover.__destroy_into_raw();
22685
+ }
22686
+ const ret = wasm.webclient_proveTransaction(this.__wbg_ptr, transaction_result.__wbg_ptr, ptr0);
22368
22687
  return ret;
22369
22688
  }
22370
22689
  /**
@@ -22433,29 +22752,19 @@ class WebClient {
22433
22752
  }
22434
22753
  /**
22435
22754
  * Returns the inner serialized mock chain if it exists.
22436
- * @returns {Uint8Array}
22755
+ * @returns {Promise<Uint8Array>}
22437
22756
  */
22438
22757
  serializeMockChain() {
22439
22758
  const ret = wasm.webclient_serializeMockChain(this.__wbg_ptr);
22440
- if (ret[3]) {
22441
- throw takeFromExternrefTable0(ret[2]);
22442
- }
22443
- var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
22444
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
22445
- return v1;
22759
+ return ret;
22446
22760
  }
22447
22761
  /**
22448
22762
  * Returns the inner serialized mock note transport node if it exists.
22449
- * @returns {Uint8Array}
22763
+ * @returns {Promise<Uint8Array>}
22450
22764
  */
22451
22765
  serializeMockNoteTransportNode() {
22452
22766
  const ret = wasm.webclient_serializeMockNoteTransportNode(this.__wbg_ptr);
22453
- if (ret[3]) {
22454
- throw takeFromExternrefTable0(ret[2]);
22455
- }
22456
- var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
22457
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
22458
- return v1;
22767
+ return ret;
22459
22768
  }
22460
22769
  /**
22461
22770
  * Sets a setting key-value in the store. It can then be retrieved using `get_setting`.
@@ -22471,25 +22780,11 @@ class WebClient {
22471
22780
  }
22472
22781
  /**
22473
22782
  * Returns the identifier of the underlying store (e.g. `IndexedDB` database name, file path).
22474
- * @returns {string}
22783
+ * @returns {Promise<string>}
22475
22784
  */
22476
22785
  storeIdentifier() {
22477
- let deferred2_0;
22478
- let deferred2_1;
22479
- try {
22480
- const ret = wasm.webclient_storeIdentifier(this.__wbg_ptr);
22481
- var ptr1 = ret[0];
22482
- var len1 = ret[1];
22483
- if (ret[3]) {
22484
- ptr1 = 0; len1 = 0;
22485
- throw takeFromExternrefTable0(ret[2]);
22486
- }
22487
- deferred2_0 = ptr1;
22488
- deferred2_1 = len1;
22489
- return getStringFromWasm0(ptr1, len1);
22490
- } finally {
22491
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
22492
- }
22786
+ const ret = wasm.webclient_storeIdentifier(this.__wbg_ptr);
22787
+ return ret;
22493
22788
  }
22494
22789
  /**
22495
22790
  * Executes a transaction specified by the request against the specified account,
@@ -22555,11 +22850,11 @@ class WebClient {
22555
22850
  return ret;
22556
22851
  }
22557
22852
  /**
22558
- * @returns {boolean}
22853
+ * @returns {Promise<boolean>}
22559
22854
  */
22560
22855
  usesMockChain() {
22561
22856
  const ret = wasm.webclient_usesMockChain(this.__wbg_ptr);
22562
- return ret !== 0;
22857
+ return ret;
22563
22858
  }
22564
22859
  }
22565
22860
  if (Symbol.dispose) WebClient.prototype[Symbol.dispose] = WebClient.prototype.free;
@@ -22684,7 +22979,6 @@ class Word {
22684
22979
  }
22685
22980
  /**
22686
22981
  * Creates a Word from a hex string.
22687
- * Fails if the provided string is not a valid hex representation of a Word.
22688
22982
  * @param {string} hex
22689
22983
  * @returns {Word}
22690
22984
  */
@@ -22698,14 +22992,21 @@ class Word {
22698
22992
  return Word.__wrap(ret[0]);
22699
22993
  }
22700
22994
  /**
22701
- * Creates a word from four u64 values.
22995
+ * Creates a word from four numeric values.
22996
+ *
22997
+ * Each input must be a canonical field element, i.e. strictly less than the field modulus.
22998
+ * `Felt::new` (now fallible on the 0.15 surface) errors out on inputs at or beyond the
22999
+ * modulus; the error is surfaced to JS.
22702
23000
  * @param {BigUint64Array} u64_vec
22703
23001
  */
22704
23002
  constructor(u64_vec) {
22705
23003
  const ptr0 = passArray64ToWasm0(u64_vec, wasm.__wbindgen_malloc);
22706
23004
  const len0 = WASM_VECTOR_LEN;
22707
23005
  const ret = wasm.word_new(ptr0, len0);
22708
- this.__wbg_ptr = ret >>> 0;
23006
+ if (ret[2]) {
23007
+ throw takeFromExternrefTable0(ret[1]);
23008
+ }
23009
+ this.__wbg_ptr = ret[0] >>> 0;
22709
23010
  WordFinalization.register(this, this.__wbg_ptr, this);
22710
23011
  return this;
22711
23012
  }
@@ -22755,7 +23056,7 @@ class Word {
22755
23056
  }
22756
23057
  }
22757
23058
  /**
22758
- * Returns the word as an array of u64 values.
23059
+ * Returns the word as an array of numeric values.
22759
23060
  * @returns {BigUint64Array}
22760
23061
  */
22761
23062
  toU64s() {
@@ -22973,6 +23274,10 @@ function __wbg_get_imports() {
22973
23274
  const ret = AccountProof.__wrap(arg0);
22974
23275
  return ret;
22975
23276
  },
23277
+ __wbg_accountreader_new: function(arg0) {
23278
+ const ret = AccountReader.__wrap(arg0);
23279
+ return ret;
23280
+ },
22976
23281
  __wbg_accountstatus_new: function(arg0) {
22977
23282
  const ret = AccountStatus.__wrap(arg0);
22978
23283
  return ret;
@@ -22981,7 +23286,7 @@ function __wbg_get_imports() {
22981
23286
  const ret = AccountStorage.__wrap(arg0);
22982
23287
  return ret;
22983
23288
  },
22984
- __wbg_addNoteTag_71f455acb2c33097: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
23289
+ __wbg_addNoteTag_40dad1e41d8a6415: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
22985
23290
  var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
22986
23291
  wasm.__wbindgen_free(arg2, arg3 * 1, 1);
22987
23292
  let v1;
@@ -23004,15 +23309,15 @@ function __wbg_get_imports() {
23004
23309
  __wbg_append_a992ccc37aa62dc4: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
23005
23310
  arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
23006
23311
  }, arguments); },
23007
- __wbg_applyFullAccountState_c2b7ca372af269ca: function(arg0, arg1, arg2) {
23312
+ __wbg_applyFullAccountState_0f46ca4819ec19a2: function(arg0, arg1, arg2) {
23008
23313
  const ret = applyFullAccountState(getStringFromWasm0(arg0, arg1), JsAccountUpdate.__wrap(arg2));
23009
23314
  return ret;
23010
23315
  },
23011
- __wbg_applyStateSync_91fddc562c8bef62: function(arg0, arg1, arg2) {
23316
+ __wbg_applyStateSync_4577b4125b70be6e: function(arg0, arg1, arg2) {
23012
23317
  const ret = applyStateSync(getStringFromWasm0(arg0, arg1), JsStateSyncUpdate.__wrap(arg2));
23013
23318
  return ret;
23014
23319
  },
23015
- __wbg_applyTransactionDelta_4dddecb0b77b7669: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20) {
23320
+ __wbg_applyTransactionDelta_956ac5d25a74f4f2: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20) {
23016
23321
  let deferred0_0;
23017
23322
  let deferred0_1;
23018
23323
  let deferred1_0;
@@ -23121,6 +23426,10 @@ function __wbg_get_imports() {
23121
23426
  __wbg_close_a79afee31de55b36: function() { return handleError(function (arg0) {
23122
23427
  arg0.close();
23123
23428
  }, arguments); },
23429
+ __wbg_codebuilder_new: function(arg0) {
23430
+ const ret = CodeBuilder.__wrap(arg0);
23431
+ return ret;
23432
+ },
23124
23433
  __wbg_committednote_new: function(arg0) {
23125
23434
  const ret = CommittedNote.__wrap(arg0);
23126
23435
  return ret;
@@ -23147,7 +23456,7 @@ function __wbg_get_imports() {
23147
23456
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23148
23457
  }
23149
23458
  },
23150
- __wbg_exportStore_7414a54978b6564b: function(arg0, arg1) {
23459
+ __wbg_exportStore_6122bc835ba1335e: function(arg0, arg1) {
23151
23460
  const ret = exportStore(getStringFromWasm0(arg0, arg1));
23152
23461
  return ret;
23153
23462
  },
@@ -23179,7 +23488,7 @@ function __wbg_get_imports() {
23179
23488
  const ret = FetchedNote.__wrap(arg0);
23180
23489
  return ret;
23181
23490
  },
23182
- __wbg_forceImportStore_ec328e296b0a4bff: function(arg0, arg1, arg2) {
23491
+ __wbg_forceImportStore_fee039594a1dd764: function(arg0, arg1, arg2) {
23183
23492
  const ret = forceImportStore(getStringFromWasm0(arg0, arg1), arg2);
23184
23493
  return ret;
23185
23494
  },
@@ -23199,7 +23508,7 @@ function __wbg_get_imports() {
23199
23508
  const ret = FungibleAssetDeltaItem.__wrap(arg0);
23200
23509
  return ret;
23201
23510
  },
23202
- __wbg_getAccountAddresses_e92f560e33b96c28: function(arg0, arg1, arg2, arg3) {
23511
+ __wbg_getAccountAddresses_c2905210853e4c1d: function(arg0, arg1, arg2, arg3) {
23203
23512
  let deferred0_0;
23204
23513
  let deferred0_1;
23205
23514
  try {
@@ -23211,7 +23520,7 @@ function __wbg_get_imports() {
23211
23520
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23212
23521
  }
23213
23522
  },
23214
- __wbg_getAccountAuthByPubKeyCommitment_28efb17c33476b84: function(arg0, arg1, arg2, arg3) {
23523
+ __wbg_getAccountAuthByPubKeyCommitment_aa1c1ea910be8702: function(arg0, arg1, arg2, arg3) {
23215
23524
  let deferred0_0;
23216
23525
  let deferred0_1;
23217
23526
  try {
@@ -23223,7 +23532,7 @@ function __wbg_get_imports() {
23223
23532
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23224
23533
  }
23225
23534
  },
23226
- __wbg_getAccountCode_188958db8c438bab: function(arg0, arg1, arg2, arg3) {
23535
+ __wbg_getAccountCode_624d99224830e698: function(arg0, arg1, arg2, arg3) {
23227
23536
  let deferred0_0;
23228
23537
  let deferred0_1;
23229
23538
  try {
@@ -23235,7 +23544,7 @@ function __wbg_get_imports() {
23235
23544
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23236
23545
  }
23237
23546
  },
23238
- __wbg_getAccountHeaderByCommitment_4e6fa83d25c41363: function(arg0, arg1, arg2, arg3) {
23547
+ __wbg_getAccountHeaderByCommitment_87400f84a64deb6f: function(arg0, arg1, arg2, arg3) {
23239
23548
  let deferred0_0;
23240
23549
  let deferred0_1;
23241
23550
  try {
@@ -23247,7 +23556,7 @@ function __wbg_get_imports() {
23247
23556
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23248
23557
  }
23249
23558
  },
23250
- __wbg_getAccountHeader_aabe60772170d684: function(arg0, arg1, arg2, arg3) {
23559
+ __wbg_getAccountHeader_1bfe2e4c80c39a5a: function(arg0, arg1, arg2, arg3) {
23251
23560
  let deferred0_0;
23252
23561
  let deferred0_1;
23253
23562
  try {
@@ -23259,7 +23568,7 @@ function __wbg_get_imports() {
23259
23568
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23260
23569
  }
23261
23570
  },
23262
- __wbg_getAccountIdByKeyCommitment_3802e17bf8d3c9b9: function(arg0, arg1, arg2, arg3) {
23571
+ __wbg_getAccountIdByKeyCommitment_119e889c02d0a383: function(arg0, arg1, arg2, arg3) {
23263
23572
  let deferred0_0;
23264
23573
  let deferred0_1;
23265
23574
  try {
@@ -23271,11 +23580,11 @@ function __wbg_get_imports() {
23271
23580
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23272
23581
  }
23273
23582
  },
23274
- __wbg_getAccountIds_8d429d26691ebece: function(arg0, arg1) {
23583
+ __wbg_getAccountIds_b7c51b913d5bf21d: function(arg0, arg1) {
23275
23584
  const ret = getAccountIds(getStringFromWasm0(arg0, arg1));
23276
23585
  return ret;
23277
23586
  },
23278
- __wbg_getAccountStorageMaps_60eba620d7ef3115: function(arg0, arg1, arg2, arg3) {
23587
+ __wbg_getAccountStorageMaps_ea32cd8cf6fc6297: function(arg0, arg1, arg2, arg3) {
23279
23588
  let deferred0_0;
23280
23589
  let deferred0_1;
23281
23590
  try {
@@ -23287,7 +23596,7 @@ function __wbg_get_imports() {
23287
23596
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23288
23597
  }
23289
23598
  },
23290
- __wbg_getAccountStorage_2e39fb9ee52b36ab: function(arg0, arg1, arg2, arg3, arg4, arg5) {
23599
+ __wbg_getAccountStorage_277a00af1ae659dd: function(arg0, arg1, arg2, arg3, arg4, arg5) {
23291
23600
  let deferred0_0;
23292
23601
  let deferred0_1;
23293
23602
  try {
@@ -23301,7 +23610,7 @@ function __wbg_get_imports() {
23301
23610
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23302
23611
  }
23303
23612
  },
23304
- __wbg_getAccountVaultAssets_f4af786007a4cd8a: function(arg0, arg1, arg2, arg3, arg4, arg5) {
23613
+ __wbg_getAccountVaultAssets_e588f7c19992bf5a: function(arg0, arg1, arg2, arg3, arg4, arg5) {
23305
23614
  let deferred0_0;
23306
23615
  let deferred0_1;
23307
23616
  try {
@@ -23315,23 +23624,27 @@ function __wbg_get_imports() {
23315
23624
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23316
23625
  }
23317
23626
  },
23318
- __wbg_getAllAccountHeaders_41bc150e0b8348ab: function(arg0, arg1) {
23627
+ __wbg_getAllAccountHeaders_cc5df55ad899e5ca: function(arg0, arg1) {
23319
23628
  const ret = getAllAccountHeaders(getStringFromWasm0(arg0, arg1));
23320
23629
  return ret;
23321
23630
  },
23322
- __wbg_getBlockHeaders_d37fd9c6e0f0fc3c: function(arg0, arg1, arg2, arg3) {
23631
+ __wbg_getBlockHeaders_08a8804e4b3ff442: function(arg0, arg1, arg2, arg3) {
23323
23632
  var v0 = getArrayU32FromWasm0(arg2, arg3).slice();
23324
23633
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
23325
23634
  const ret = getBlockHeaders(getStringFromWasm0(arg0, arg1), v0);
23326
23635
  return ret;
23327
23636
  },
23328
- __wbg_getForeignAccountCode_07c810d364cd77ae: function(arg0, arg1, arg2, arg3) {
23637
+ __wbg_getCurrentBlockchainPeaks_f0d990ec54236a85: function(arg0, arg1) {
23638
+ const ret = getCurrentBlockchainPeaks(getStringFromWasm0(arg0, arg1));
23639
+ return ret;
23640
+ },
23641
+ __wbg_getForeignAccountCode_d4d803c5248469e8: function(arg0, arg1, arg2, arg3) {
23329
23642
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
23330
23643
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
23331
23644
  const ret = getForeignAccountCode(getStringFromWasm0(arg0, arg1), v0);
23332
23645
  return ret;
23333
23646
  },
23334
- __wbg_getInputNoteByOffset_677e9a33e6340b5d: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
23647
+ __wbg_getInputNoteByOffset_a1163c6c190c7bc0: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
23335
23648
  let deferred1_0;
23336
23649
  let deferred1_1;
23337
23650
  try {
@@ -23345,25 +23658,25 @@ function __wbg_get_imports() {
23345
23658
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
23346
23659
  }
23347
23660
  },
23348
- __wbg_getInputNotesFromIds_44862afd379bbbb6: function(arg0, arg1, arg2, arg3) {
23661
+ __wbg_getInputNotesFromIds_c19092f0da179fdf: function(arg0, arg1, arg2, arg3) {
23349
23662
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
23350
23663
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
23351
23664
  const ret = getInputNotesFromIds(getStringFromWasm0(arg0, arg1), v0);
23352
23665
  return ret;
23353
23666
  },
23354
- __wbg_getInputNotesFromNullifiers_2ec2c4e148b8f834: function(arg0, arg1, arg2, arg3) {
23667
+ __wbg_getInputNotesFromNullifiers_ef5e3e241e8f14b9: function(arg0, arg1, arg2, arg3) {
23355
23668
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
23356
23669
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
23357
23670
  const ret = getInputNotesFromNullifiers(getStringFromWasm0(arg0, arg1), v0);
23358
23671
  return ret;
23359
23672
  },
23360
- __wbg_getInputNotes_8e59018ef0fd9758: function(arg0, arg1, arg2, arg3) {
23673
+ __wbg_getInputNotes_9a2890b2c05db53e: function(arg0, arg1, arg2, arg3) {
23361
23674
  var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
23362
23675
  wasm.__wbindgen_free(arg2, arg3 * 1, 1);
23363
23676
  const ret = getInputNotes(getStringFromWasm0(arg0, arg1), v0);
23364
23677
  return ret;
23365
23678
  },
23366
- __wbg_getKeyCommitmentsByAccountId_8d83fa814d1cc718: function(arg0, arg1, arg2, arg3) {
23679
+ __wbg_getKeyCommitmentsByAccountId_98d1052aa93e54d1: function(arg0, arg1, arg2, arg3) {
23367
23680
  let deferred0_0;
23368
23681
  let deferred0_1;
23369
23682
  try {
@@ -23375,7 +23688,7 @@ function __wbg_get_imports() {
23375
23688
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23376
23689
  }
23377
23690
  },
23378
- __wbg_getNoteScript_fe7c88df1db18389: function(arg0, arg1, arg2, arg3) {
23691
+ __wbg_getNoteScript_f33c8718fc90d2c4: function(arg0, arg1, arg2, arg3) {
23379
23692
  let deferred0_0;
23380
23693
  let deferred0_1;
23381
23694
  try {
@@ -23387,33 +23700,33 @@ function __wbg_get_imports() {
23387
23700
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23388
23701
  }
23389
23702
  },
23390
- __wbg_getNoteTags_75edb9d48492a785: function(arg0, arg1) {
23703
+ __wbg_getNoteTags_e2ed88e636d0ad2a: function(arg0, arg1) {
23391
23704
  const ret = getNoteTags(getStringFromWasm0(arg0, arg1));
23392
23705
  return ret;
23393
23706
  },
23394
- __wbg_getOutputNotesFromIds_6db6231c439f3c87: function(arg0, arg1, arg2, arg3) {
23707
+ __wbg_getOutputNotesFromIds_1cfcb787c56927d6: function(arg0, arg1, arg2, arg3) {
23395
23708
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
23396
23709
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
23397
23710
  const ret = getOutputNotesFromIds(getStringFromWasm0(arg0, arg1), v0);
23398
23711
  return ret;
23399
23712
  },
23400
- __wbg_getOutputNotesFromNullifiers_30c2ca006c9640f8: function(arg0, arg1, arg2, arg3) {
23713
+ __wbg_getOutputNotesFromNullifiers_ab2d0529c918ceb6: function(arg0, arg1, arg2, arg3) {
23401
23714
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
23402
23715
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
23403
23716
  const ret = getOutputNotesFromNullifiers(getStringFromWasm0(arg0, arg1), v0);
23404
23717
  return ret;
23405
23718
  },
23406
- __wbg_getOutputNotes_7a0d64dede8d64be: function(arg0, arg1, arg2, arg3) {
23719
+ __wbg_getOutputNotes_3ce2621bbaa0b67a: function(arg0, arg1, arg2, arg3) {
23407
23720
  var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
23408
23721
  wasm.__wbindgen_free(arg2, arg3 * 1, 1);
23409
23722
  const ret = getOutputNotes(getStringFromWasm0(arg0, arg1), v0);
23410
23723
  return ret;
23411
23724
  },
23412
- __wbg_getPartialBlockchainNodesAll_15a5f0a63644f546: function(arg0, arg1) {
23725
+ __wbg_getPartialBlockchainNodesAll_97b2296b6f446165: function(arg0, arg1) {
23413
23726
  const ret = getPartialBlockchainNodesAll(getStringFromWasm0(arg0, arg1));
23414
23727
  return ret;
23415
23728
  },
23416
- __wbg_getPartialBlockchainNodesUpToInOrderIndex_6742a36d7d26c921: function(arg0, arg1, arg2, arg3) {
23729
+ __wbg_getPartialBlockchainNodesUpToInOrderIndex_a00a947793bcac3c: function(arg0, arg1, arg2, arg3) {
23417
23730
  let deferred0_0;
23418
23731
  let deferred0_1;
23419
23732
  try {
@@ -23425,16 +23738,12 @@ function __wbg_get_imports() {
23425
23738
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23426
23739
  }
23427
23740
  },
23428
- __wbg_getPartialBlockchainNodes_35c67e8f4bfd8da6: function(arg0, arg1, arg2, arg3) {
23741
+ __wbg_getPartialBlockchainNodes_ed95c0aed168e0bd: function(arg0, arg1, arg2, arg3) {
23429
23742
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
23430
23743
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
23431
23744
  const ret = getPartialBlockchainNodes(getStringFromWasm0(arg0, arg1), v0);
23432
23745
  return ret;
23433
23746
  },
23434
- __wbg_getPartialBlockchainPeaksByBlockNum_5a9240ed1087ee15: function(arg0, arg1, arg2) {
23435
- const ret = getPartialBlockchainPeaksByBlockNum(getStringFromWasm0(arg0, arg1), arg2 >>> 0);
23436
- return ret;
23437
- },
23438
23747
  __wbg_getRandomValues_1c61fac11405ffdc: function() { return handleError(function (arg0, arg1) {
23439
23748
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
23440
23749
  }, arguments); },
@@ -23442,7 +23751,7 @@ function __wbg_get_imports() {
23442
23751
  const ret = arg0.getReader();
23443
23752
  return ret;
23444
23753
  }, arguments); },
23445
- __wbg_getSetting_25ab76d54f719ecd: function(arg0, arg1, arg2, arg3) {
23754
+ __wbg_getSetting_ae10044e2d623298: function(arg0, arg1, arg2, arg3) {
23446
23755
  let deferred0_0;
23447
23756
  let deferred0_1;
23448
23757
  try {
@@ -23454,7 +23763,7 @@ function __wbg_get_imports() {
23454
23763
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23455
23764
  }
23456
23765
  },
23457
- __wbg_getSyncHeight_d852979e2c8c1c32: function(arg0, arg1) {
23766
+ __wbg_getSyncHeight_58fc6088ffc73f66: function(arg0, arg1) {
23458
23767
  const ret = getSyncHeight(getStringFromWasm0(arg0, arg1));
23459
23768
  return ret;
23460
23769
  },
@@ -23462,15 +23771,15 @@ function __wbg_get_imports() {
23462
23771
  const ret = arg0.getTime();
23463
23772
  return ret;
23464
23773
  },
23465
- __wbg_getTrackedBlockHeaderNumbers_7a6dd9bd482b7c1f: function(arg0, arg1) {
23774
+ __wbg_getTrackedBlockHeaderNumbers_5ff16c5dbe739bda: function(arg0, arg1) {
23466
23775
  const ret = getTrackedBlockHeaderNumbers(getStringFromWasm0(arg0, arg1));
23467
23776
  return ret;
23468
23777
  },
23469
- __wbg_getTrackedBlockHeaders_921ecf4c4bdc8c6f: function(arg0, arg1) {
23778
+ __wbg_getTrackedBlockHeaders_b20d19487c2d6df9: function(arg0, arg1) {
23470
23779
  const ret = getTrackedBlockHeaders(getStringFromWasm0(arg0, arg1));
23471
23780
  return ret;
23472
23781
  },
23473
- __wbg_getTransactions_cb4af339938ce981: function(arg0, arg1, arg2, arg3) {
23782
+ __wbg_getTransactions_162de0ea1d0f2668: function(arg0, arg1, arg2, arg3) {
23474
23783
  let deferred0_0;
23475
23784
  let deferred0_1;
23476
23785
  try {
@@ -23482,7 +23791,7 @@ function __wbg_get_imports() {
23482
23791
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23483
23792
  }
23484
23793
  },
23485
- __wbg_getUnspentInputNoteNullifiers_1d2344145aa0e85d: function(arg0, arg1) {
23794
+ __wbg_getUnspentInputNoteNullifiers_252553121097b242: function(arg0, arg1) {
23486
23795
  const ret = getUnspentInputNoteNullifiers(getStringFromWasm0(arg0, arg1));
23487
23796
  return ret;
23488
23797
  },
@@ -23526,7 +23835,7 @@ function __wbg_get_imports() {
23526
23835
  const ret = InputNoteRecord.__wrap(arg0);
23527
23836
  return ret;
23528
23837
  },
23529
- __wbg_insertAccountAddress_e0c46f8e053193e9: function(arg0, arg1, arg2, arg3, arg4, arg5) {
23838
+ __wbg_insertAccountAddress_a6b2f038c55aee0a: function(arg0, arg1, arg2, arg3, arg4, arg5) {
23530
23839
  let deferred0_0;
23531
23840
  let deferred0_1;
23532
23841
  try {
@@ -23540,7 +23849,7 @@ function __wbg_get_imports() {
23540
23849
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23541
23850
  }
23542
23851
  },
23543
- __wbg_insertAccountAuth_07cdbb9f21acbbe0: function(arg0, arg1, arg2, arg3, arg4, arg5) {
23852
+ __wbg_insertAccountAuth_adb2bbf98e1c34d4: function(arg0, arg1, arg2, arg3, arg4, arg5) {
23544
23853
  let deferred0_0;
23545
23854
  let deferred0_1;
23546
23855
  let deferred1_0;
@@ -23557,7 +23866,7 @@ function __wbg_get_imports() {
23557
23866
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
23558
23867
  }
23559
23868
  },
23560
- __wbg_insertAccountKeyMapping_73ff296a94f45b01: function(arg0, arg1, arg2, arg3, arg4, arg5) {
23869
+ __wbg_insertAccountKeyMapping_47e616ac5977fb9c: function(arg0, arg1, arg2, arg3, arg4, arg5) {
23561
23870
  let deferred0_0;
23562
23871
  let deferred0_1;
23563
23872
  let deferred1_0;
@@ -23574,15 +23883,13 @@ function __wbg_get_imports() {
23574
23883
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
23575
23884
  }
23576
23885
  },
23577
- __wbg_insertBlockHeader_cd3837e26c067658: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
23886
+ __wbg_insertBlockHeader_23b7b30d0614926f: function(arg0, arg1, arg2, arg3, arg4, arg5) {
23578
23887
  var v0 = getArrayU8FromWasm0(arg3, arg4).slice();
23579
23888
  wasm.__wbindgen_free(arg3, arg4 * 1, 1);
23580
- var v1 = getArrayU8FromWasm0(arg5, arg6).slice();
23581
- wasm.__wbindgen_free(arg5, arg6 * 1, 1);
23582
- const ret = insertBlockHeader(getStringFromWasm0(arg0, arg1), arg2 >>> 0, v0, v1, arg7 !== 0);
23889
+ const ret = insertBlockHeader(getStringFromWasm0(arg0, arg1), arg2 >>> 0, v0, arg5 !== 0);
23583
23890
  return ret;
23584
23891
  },
23585
- __wbg_insertPartialBlockchainNodes_dc6809b37ef4b562: function(arg0, arg1, arg2, arg3, arg4, arg5) {
23892
+ __wbg_insertPartialBlockchainNodes_403400ec217229f2: function(arg0, arg1, arg2, arg3, arg4, arg5) {
23586
23893
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
23587
23894
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
23588
23895
  var v1 = getArrayJsValueFromWasm0(arg4, arg5).slice();
@@ -23590,7 +23897,7 @@ function __wbg_get_imports() {
23590
23897
  const ret = insertPartialBlockchainNodes(getStringFromWasm0(arg0, arg1), v0, v1);
23591
23898
  return ret;
23592
23899
  },
23593
- __wbg_insertSetting_11f6d3c419315d2a: function(arg0, arg1, arg2, arg3, arg4, arg5) {
23900
+ __wbg_insertSetting_fcdab04463e418b0: function(arg0, arg1, arg2, arg3, arg4, arg5) {
23594
23901
  let deferred0_0;
23595
23902
  let deferred0_1;
23596
23903
  try {
@@ -23604,7 +23911,7 @@ function __wbg_get_imports() {
23604
23911
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23605
23912
  }
23606
23913
  },
23607
- __wbg_insertTransactionScript_54c2f4f1423a8889: function(arg0, arg1, arg2, arg3, arg4, arg5) {
23914
+ __wbg_insertTransactionScript_a97df45bc8841578: function(arg0, arg1, arg2, arg3, arg4, arg5) {
23608
23915
  var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
23609
23916
  wasm.__wbindgen_free(arg2, arg3 * 1, 1);
23610
23917
  let v1;
@@ -23697,11 +24004,11 @@ function __wbg_get_imports() {
23697
24004
  const ret = arg0.length;
23698
24005
  return ret;
23699
24006
  },
23700
- __wbg_listSettingKeys_7a01958cfea9e4ce: function(arg0, arg1) {
24007
+ __wbg_listSettingKeys_aa9e036a0e93602e: function(arg0, arg1) {
23701
24008
  const ret = listSettingKeys(getStringFromWasm0(arg0, arg1));
23702
24009
  return ret;
23703
24010
  },
23704
- __wbg_lockAccount_4f46ad492483b226: function(arg0, arg1, arg2, arg3) {
24011
+ __wbg_lockAccount_00786cae6f7ea636: function(arg0, arg1, arg2, arg3) {
23705
24012
  let deferred0_0;
23706
24013
  let deferred0_1;
23707
24014
  try {
@@ -23754,6 +24061,10 @@ function __wbg_get_imports() {
23754
24061
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
23755
24062
  }
23756
24063
  }, arguments); },
24064
+ __wbg_networknotestatusinfo_new: function(arg0) {
24065
+ const ret = NetworkNoteStatusInfo.__wrap(arg0);
24066
+ return ret;
24067
+ },
23757
24068
  __wbg_new_0_73afc35eb544e539: function() {
23758
24069
  const ret = new Date();
23759
24070
  return ret;
@@ -23785,7 +24096,7 @@ function __wbg_get_imports() {
23785
24096
  const a = state0.a;
23786
24097
  state0.a = 0;
23787
24098
  try {
23788
- return wasm_bindgen__convert__closures_____invoke__h22101db9f01e45e1(a, state0.b, arg0, arg1);
24099
+ return wasm_bindgen__convert__closures_____invoke__h7a3c25b2fe6d77ec(a, state0.b, arg0, arg1);
23789
24100
  } finally {
23790
24101
  state0.a = a;
23791
24102
  }
@@ -23840,6 +24151,10 @@ function __wbg_get_imports() {
23840
24151
  const ret = NoteAndArgs.__unwrap(arg0);
23841
24152
  return ret;
23842
24153
  },
24154
+ __wbg_noteattachment_new: function(arg0) {
24155
+ const ret = NoteAttachment.__wrap(arg0);
24156
+ return ret;
24157
+ },
23843
24158
  __wbg_noteconsumability_new: function(arg0) {
23844
24159
  const ret = NoteConsumability.__wrap(arg0);
23845
24160
  return ret;
@@ -23892,7 +24207,7 @@ function __wbg_get_imports() {
23892
24207
  const ret = NoteTag.__unwrap(arg0);
23893
24208
  return ret;
23894
24209
  },
23895
- __wbg_openDatabase_1e6c970bd99986cc: function(arg0, arg1, arg2, arg3) {
24210
+ __wbg_openDatabase_8cdde169e05fa396: function(arg0, arg1, arg2, arg3) {
23896
24211
  const ret = openDatabase(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
23897
24212
  return ret;
23898
24213
  },
@@ -23923,7 +24238,7 @@ function __wbg_get_imports() {
23923
24238
  const ret = ProvenTransaction.__wrap(arg0);
23924
24239
  return ret;
23925
24240
  },
23926
- __wbg_pruneAccountHistory_b9f8ae9cc42b0264: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24241
+ __wbg_pruneAccountHistory_77197f52f4287754: function(arg0, arg1, arg2, arg3, arg4, arg5) {
23927
24242
  let deferred0_0;
23928
24243
  let deferred0_1;
23929
24244
  let deferred1_0;
@@ -23940,8 +24255,12 @@ function __wbg_get_imports() {
23940
24255
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
23941
24256
  }
23942
24257
  },
23943
- __wbg_pruneIrrelevantBlocks_fd53c6ee9a1529de: function(arg0, arg1) {
23944
- const ret = pruneIrrelevantBlocks(getStringFromWasm0(arg0, arg1));
24258
+ __wbg_pruneIrrelevantBlocks_649b0446c426cb86: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24259
+ var v0 = getArrayU32FromWasm0(arg2, arg3).slice();
24260
+ wasm.__wbindgen_free(arg2, arg3 * 4, 4);
24261
+ var v1 = getArrayJsValueFromWasm0(arg4, arg5).slice();
24262
+ wasm.__wbindgen_free(arg4, arg5 * 4, 4);
24263
+ const ret = pruneIrrelevantBlocks(getStringFromWasm0(arg0, arg1), v0, v1);
23945
24264
  return ret;
23946
24265
  },
23947
24266
  __wbg_queueMicrotask_0aa0a927f78f5d98: function(arg0) {
@@ -23958,13 +24277,13 @@ function __wbg_get_imports() {
23958
24277
  __wbg_releaseLock_aa5846c2494b3032: function(arg0) {
23959
24278
  arg0.releaseLock();
23960
24279
  },
23961
- __wbg_removeAccountAddress_d84a263da31a63b1: function(arg0, arg1, arg2, arg3) {
24280
+ __wbg_removeAccountAddress_fc888f883a71bd4f: function(arg0, arg1, arg2, arg3) {
23962
24281
  var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
23963
24282
  wasm.__wbindgen_free(arg2, arg3 * 1, 1);
23964
24283
  const ret = removeAccountAddress(getStringFromWasm0(arg0, arg1), v0);
23965
24284
  return ret;
23966
24285
  },
23967
- __wbg_removeAccountAuth_15fe803d63fd684f: function(arg0, arg1, arg2, arg3) {
24286
+ __wbg_removeAccountAuth_8f11e01dd6099b42: function(arg0, arg1, arg2, arg3) {
23968
24287
  let deferred0_0;
23969
24288
  let deferred0_1;
23970
24289
  try {
@@ -23976,7 +24295,7 @@ function __wbg_get_imports() {
23976
24295
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23977
24296
  }
23978
24297
  },
23979
- __wbg_removeAllMappingsForKey_2a75a1ee44704b87: function(arg0, arg1, arg2, arg3) {
24298
+ __wbg_removeAllMappingsForKey_1fd0c55cb2cd0b61: function(arg0, arg1, arg2, arg3) {
23980
24299
  let deferred0_0;
23981
24300
  let deferred0_1;
23982
24301
  try {
@@ -23988,7 +24307,7 @@ function __wbg_get_imports() {
23988
24307
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23989
24308
  }
23990
24309
  },
23991
- __wbg_removeNoteTag_3ffdd59c60d02d5d: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
24310
+ __wbg_removeNoteTag_77e6e3497d921600: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
23992
24311
  var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
23993
24312
  wasm.__wbindgen_free(arg2, arg3 * 1, 1);
23994
24313
  let v1;
@@ -24004,7 +24323,7 @@ function __wbg_get_imports() {
24004
24323
  const ret = removeNoteTag(getStringFromWasm0(arg0, arg1), v0, v1, v2);
24005
24324
  return ret;
24006
24325
  },
24007
- __wbg_removeSetting_ee0741372caba813: function(arg0, arg1, arg2, arg3) {
24326
+ __wbg_removeSetting_39da4a2d256af0e2: function(arg0, arg1, arg2, arg3) {
24008
24327
  let deferred0_0;
24009
24328
  let deferred0_1;
24010
24329
  try {
@@ -24140,6 +24459,10 @@ function __wbg_get_imports() {
24140
24459
  const ret = StorageMapEntry.__wrap(arg0);
24141
24460
  return ret;
24142
24461
  },
24462
+ __wbg_storagemapentryjs_new: function(arg0) {
24463
+ const ret = StorageMapEntryJs.__wrap(arg0);
24464
+ return ret;
24465
+ },
24143
24466
  __wbg_storagemapinfo_new: function(arg0) {
24144
24467
  const ret = StorageMapInfo.__wrap(arg0);
24145
24468
  return ret;
@@ -24180,6 +24503,10 @@ function __wbg_get_imports() {
24180
24503
  const ret = TransactionRecord.__wrap(arg0);
24181
24504
  return ret;
24182
24505
  },
24506
+ __wbg_transactionrequest_new: function(arg0) {
24507
+ const ret = TransactionRequest.__wrap(arg0);
24508
+ return ret;
24509
+ },
24183
24510
  __wbg_transactionresult_new: function(arg0) {
24184
24511
  const ret = TransactionResult.__wrap(arg0);
24185
24512
  return ret;
@@ -24196,13 +24523,13 @@ function __wbg_get_imports() {
24196
24523
  const ret = TransactionSummary.__wrap(arg0);
24197
24524
  return ret;
24198
24525
  },
24199
- __wbg_undoAccountStates_3bb81f0b4777af78: function(arg0, arg1, arg2, arg3) {
24526
+ __wbg_undoAccountStates_e36a3027b0d94828: function(arg0, arg1, arg2, arg3) {
24200
24527
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
24201
24528
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
24202
24529
  const ret = undoAccountStates(getStringFromWasm0(arg0, arg1), v0);
24203
24530
  return ret;
24204
24531
  },
24205
- __wbg_upsertAccountCode_f54a1c88bec60044: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24532
+ __wbg_upsertAccountCode_a57f0b2098ba7190: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24206
24533
  let deferred0_0;
24207
24534
  let deferred0_1;
24208
24535
  try {
@@ -24216,7 +24543,7 @@ function __wbg_get_imports() {
24216
24543
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24217
24544
  }
24218
24545
  },
24219
- __wbg_upsertAccountRecord_d32c88004f7a361f: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16) {
24546
+ __wbg_upsertAccountRecord_3fb1a14436632f21: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16) {
24220
24547
  let deferred0_0;
24221
24548
  let deferred0_1;
24222
24549
  let deferred1_0;
@@ -24258,7 +24585,7 @@ function __wbg_get_imports() {
24258
24585
  wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
24259
24586
  }
24260
24587
  },
24261
- __wbg_upsertAccountStorage_dc9b3f362de53588: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24588
+ __wbg_upsertAccountStorage_cd428602fca677b1: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24262
24589
  let deferred0_0;
24263
24590
  let deferred0_1;
24264
24591
  try {
@@ -24272,7 +24599,7 @@ function __wbg_get_imports() {
24272
24599
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24273
24600
  }
24274
24601
  },
24275
- __wbg_upsertForeignAccountCode_bc9c9b983d44be62: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
24602
+ __wbg_upsertForeignAccountCode_ea1c872f50b83cf7: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
24276
24603
  let deferred0_0;
24277
24604
  let deferred0_1;
24278
24605
  let deferred2_0;
@@ -24291,49 +24618,56 @@ function __wbg_get_imports() {
24291
24618
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
24292
24619
  }
24293
24620
  },
24294
- __wbg_upsertInputNote_e7e2d594002d33f0: 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) {
24621
+ __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) {
24295
24622
  let deferred0_0;
24296
24623
  let deferred0_1;
24297
- let deferred4_0;
24298
- let deferred4_1;
24299
24624
  let deferred6_0;
24300
24625
  let deferred6_1;
24301
- let deferred7_0;
24302
- let deferred7_1;
24626
+ let deferred8_0;
24627
+ let deferred8_1;
24628
+ let deferred9_0;
24629
+ let deferred9_1;
24303
24630
  try {
24304
24631
  deferred0_0 = arg2;
24305
24632
  deferred0_1 = arg3;
24306
- var v1 = getArrayU8FromWasm0(arg4, arg5).slice();
24307
- wasm.__wbindgen_free(arg4, arg5 * 1, 1);
24633
+ let v1;
24634
+ if (arg4 !== 0) {
24635
+ v1 = getStringFromWasm0(arg4, arg5).slice();
24636
+ wasm.__wbindgen_free(arg4, arg5 * 1, 1);
24637
+ }
24308
24638
  var v2 = getArrayU8FromWasm0(arg6, arg7).slice();
24309
24639
  wasm.__wbindgen_free(arg6, arg7 * 1, 1);
24310
24640
  var v3 = getArrayU8FromWasm0(arg8, arg9).slice();
24311
24641
  wasm.__wbindgen_free(arg8, arg9 * 1, 1);
24312
- deferred4_0 = arg10;
24313
- deferred4_1 = arg11;
24642
+ var v4 = getArrayU8FromWasm0(arg10, arg11).slice();
24643
+ wasm.__wbindgen_free(arg10, arg11 * 1, 1);
24314
24644
  var v5 = getArrayU8FromWasm0(arg12, arg13).slice();
24315
24645
  wasm.__wbindgen_free(arg12, arg13 * 1, 1);
24316
24646
  deferred6_0 = arg14;
24317
24647
  deferred6_1 = arg15;
24318
- deferred7_0 = arg16;
24319
- deferred7_1 = arg17;
24320
- var v8 = getArrayU8FromWasm0(arg19, arg20).slice();
24321
- wasm.__wbindgen_free(arg19, arg20 * 1, 1);
24322
- let v9;
24323
- if (arg23 !== 0) {
24324
- v9 = getStringFromWasm0(arg23, arg24).slice();
24325
- wasm.__wbindgen_free(arg23, arg24 * 1, 1);
24648
+ var v7 = getArrayU8FromWasm0(arg16, arg17).slice();
24649
+ wasm.__wbindgen_free(arg16, arg17 * 1, 1);
24650
+ deferred8_0 = arg18;
24651
+ deferred8_1 = arg19;
24652
+ deferred9_0 = arg20;
24653
+ deferred9_1 = arg21;
24654
+ var v10 = getArrayU8FromWasm0(arg23, arg24).slice();
24655
+ wasm.__wbindgen_free(arg23, arg24 * 1, 1);
24656
+ let v11;
24657
+ if (arg27 !== 0) {
24658
+ v11 = getStringFromWasm0(arg27, arg28).slice();
24659
+ wasm.__wbindgen_free(arg27, arg28 * 1, 1);
24326
24660
  }
24327
- 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);
24661
+ 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);
24328
24662
  return ret;
24329
24663
  } finally {
24330
24664
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24331
- wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
24332
24665
  wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
24333
- wasm.__wbindgen_free(deferred7_0, deferred7_1, 1);
24666
+ wasm.__wbindgen_free(deferred8_0, deferred8_1, 1);
24667
+ wasm.__wbindgen_free(deferred9_0, deferred9_1, 1);
24334
24668
  }
24335
24669
  },
24336
- __wbg_upsertNoteScript_e5262374e58464a5: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24670
+ __wbg_upsertNoteScript_77ad6333fd8d09bd: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24337
24671
  let deferred0_0;
24338
24672
  let deferred0_1;
24339
24673
  try {
@@ -24347,35 +24681,37 @@ function __wbg_get_imports() {
24347
24681
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24348
24682
  }
24349
24683
  },
24350
- __wbg_upsertOutputNote_fb601f7b4e18f75d: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) {
24684
+ __wbg_upsertOutputNote_086a8c1c81f11d3c: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17) {
24351
24685
  let deferred0_0;
24352
24686
  let deferred0_1;
24353
- let deferred2_0;
24354
- let deferred2_1;
24687
+ let deferred3_0;
24688
+ let deferred3_1;
24355
24689
  try {
24356
24690
  deferred0_0 = arg2;
24357
24691
  deferred0_1 = arg3;
24358
24692
  var v1 = getArrayU8FromWasm0(arg4, arg5).slice();
24359
24693
  wasm.__wbindgen_free(arg4, arg5 * 1, 1);
24360
- deferred2_0 = arg6;
24361
- deferred2_1 = arg7;
24362
- var v3 = getArrayU8FromWasm0(arg8, arg9).slice();
24363
- wasm.__wbindgen_free(arg8, arg9 * 1, 1);
24364
- let v4;
24365
- if (arg10 !== 0) {
24366
- v4 = getStringFromWasm0(arg10, arg11).slice();
24367
- wasm.__wbindgen_free(arg10, arg11 * 1, 1);
24694
+ var v2 = getArrayU8FromWasm0(arg6, arg7).slice();
24695
+ wasm.__wbindgen_free(arg6, arg7 * 1, 1);
24696
+ deferred3_0 = arg8;
24697
+ deferred3_1 = arg9;
24698
+ var v4 = getArrayU8FromWasm0(arg10, arg11).slice();
24699
+ wasm.__wbindgen_free(arg10, arg11 * 1, 1);
24700
+ let v5;
24701
+ if (arg12 !== 0) {
24702
+ v5 = getStringFromWasm0(arg12, arg13).slice();
24703
+ wasm.__wbindgen_free(arg12, arg13 * 1, 1);
24368
24704
  }
24369
- var v5 = getArrayU8FromWasm0(arg14, arg15).slice();
24370
- wasm.__wbindgen_free(arg14, arg15 * 1, 1);
24371
- const ret = upsertOutputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), v1, getStringFromWasm0(arg6, arg7), v3, v4, arg12 >>> 0, arg13, v5);
24705
+ var v6 = getArrayU8FromWasm0(arg16, arg17).slice();
24706
+ wasm.__wbindgen_free(arg16, arg17 * 1, 1);
24707
+ const ret = upsertOutputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), v1, v2, getStringFromWasm0(arg8, arg9), v4, v5, arg14 >>> 0, arg15, v6);
24372
24708
  return ret;
24373
24709
  } finally {
24374
24710
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24375
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
24711
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
24376
24712
  }
24377
24713
  },
24378
- __wbg_upsertStorageMapEntries_875ece6c792aece8: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24714
+ __wbg_upsertStorageMapEntries_068d8303824fff58: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24379
24715
  let deferred0_0;
24380
24716
  let deferred0_1;
24381
24717
  try {
@@ -24389,7 +24725,7 @@ function __wbg_get_imports() {
24389
24725
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24390
24726
  }
24391
24727
  },
24392
- __wbg_upsertTransactionRecord_5f9c83704ca38dc5: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) {
24728
+ __wbg_upsertTransactionRecord_a285bd5d3fd5a278: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) {
24393
24729
  let deferred0_0;
24394
24730
  let deferred0_1;
24395
24731
  try {
@@ -24410,7 +24746,7 @@ function __wbg_get_imports() {
24410
24746
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24411
24747
  }
24412
24748
  },
24413
- __wbg_upsertVaultAssets_acbcc6d51cb80ac5: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24749
+ __wbg_upsertVaultAssets_53ecfc329186db4e: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24414
24750
  let deferred0_0;
24415
24751
  let deferred0_1;
24416
24752
  try {
@@ -24441,13 +24777,13 @@ function __wbg_get_imports() {
24441
24777
  return ret;
24442
24778
  },
24443
24779
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
24444
- // Cast intrinsic for `Closure(Closure { dtor_idx: 360, function: Function { arguments: [Externref], shim_idx: 698, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
24445
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h10c3fe8f433ba3dd, wasm_bindgen__convert__closures_____invoke__h69bc00ec8b9a6549);
24780
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 441, function: Function { arguments: [Externref], shim_idx: 793, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
24781
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3f095fc116138c37, wasm_bindgen__convert__closures_____invoke__h5b85ca27a15b53fc);
24446
24782
  return ret;
24447
24783
  },
24448
24784
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
24449
- // Cast intrinsic for `Closure(Closure { dtor_idx: 360, function: Function { arguments: [], shim_idx: 361, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
24450
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h10c3fe8f433ba3dd, wasm_bindgen__convert__closures_____invoke__h5c73a4a324493889);
24785
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 441, function: Function { arguments: [], shim_idx: 442, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
24786
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3f095fc116138c37, wasm_bindgen__convert__closures_____invoke__h8c482c344300c6d3);
24451
24787
  return ret;
24452
24788
  },
24453
24789
  __wbindgen_cast_0000000000000003: function(arg0) {
@@ -24551,16 +24887,16 @@ function __wbg_get_imports() {
24551
24887
  };
24552
24888
  }
24553
24889
 
24554
- function wasm_bindgen__convert__closures_____invoke__h5c73a4a324493889(arg0, arg1) {
24555
- wasm.wasm_bindgen__convert__closures_____invoke__h5c73a4a324493889(arg0, arg1);
24890
+ function wasm_bindgen__convert__closures_____invoke__h8c482c344300c6d3(arg0, arg1) {
24891
+ wasm.wasm_bindgen__convert__closures_____invoke__h8c482c344300c6d3(arg0, arg1);
24556
24892
  }
24557
24893
 
24558
- function wasm_bindgen__convert__closures_____invoke__h69bc00ec8b9a6549(arg0, arg1, arg2) {
24559
- wasm.wasm_bindgen__convert__closures_____invoke__h69bc00ec8b9a6549(arg0, arg1, arg2);
24894
+ function wasm_bindgen__convert__closures_____invoke__h5b85ca27a15b53fc(arg0, arg1, arg2) {
24895
+ wasm.wasm_bindgen__convert__closures_____invoke__h5b85ca27a15b53fc(arg0, arg1, arg2);
24560
24896
  }
24561
24897
 
24562
- function wasm_bindgen__convert__closures_____invoke__h22101db9f01e45e1(arg0, arg1, arg2, arg3) {
24563
- wasm.wasm_bindgen__convert__closures_____invoke__h22101db9f01e45e1(arg0, arg1, arg2, arg3);
24898
+ function wasm_bindgen__convert__closures_____invoke__h7a3c25b2fe6d77ec(arg0, arg1, arg2, arg3) {
24899
+ wasm.wasm_bindgen__convert__closures_____invoke__h7a3c25b2fe6d77ec(arg0, arg1, arg2, arg3);
24564
24900
  }
24565
24901
 
24566
24902
 
@@ -24757,6 +25093,9 @@ const MerklePathFinalization = (typeof FinalizationRegistry === 'undefined')
24757
25093
  const NetworkIdFinalization = (typeof FinalizationRegistry === 'undefined')
24758
25094
  ? { register: () => {}, unregister: () => {} }
24759
25095
  : new FinalizationRegistry(ptr => wasm.__wbg_networkid_free(ptr >>> 0, 1));
25096
+ const NetworkNoteStatusInfoFinalization = (typeof FinalizationRegistry === 'undefined')
25097
+ ? { register: () => {}, unregister: () => {} }
25098
+ : new FinalizationRegistry(ptr => wasm.__wbg_networknotestatusinfo_free(ptr >>> 0, 1));
24760
25099
  const NoteFinalization = (typeof FinalizationRegistry === 'undefined')
24761
25100
  ? { register: () => {}, unregister: () => {} }
24762
25101
  : new FinalizationRegistry(ptr => wasm.__wbg_note_free(ptr >>> 0, 1));
@@ -24910,6 +25249,9 @@ const StorageMapFinalization = (typeof FinalizationRegistry === 'undefined')
24910
25249
  const StorageMapEntryFinalization = (typeof FinalizationRegistry === 'undefined')
24911
25250
  ? { register: () => {}, unregister: () => {} }
24912
25251
  : new FinalizationRegistry(ptr => wasm.__wbg_storagemapentry_free(ptr >>> 0, 1));
25252
+ const StorageMapEntryJsFinalization = (typeof FinalizationRegistry === 'undefined')
25253
+ ? { register: () => {}, unregister: () => {} }
25254
+ : new FinalizationRegistry(ptr => wasm.__wbg_storagemapentryjs_free(ptr >>> 0, 1));
24913
25255
  const StorageMapInfoFinalization = (typeof FinalizationRegistry === 'undefined')
24914
25256
  ? { register: () => {}, unregister: () => {} }
24915
25257
  : new FinalizationRegistry(ptr => wasm.__wbg_storagemapinfo_free(ptr >>> 0, 1));
@@ -25363,5 +25705,5 @@ async function __wbg_init(module_or_path) {
25363
25705
 
25364
25706
  const module$1 = new URL("assets/miden_client_web.wasm", import.meta.url);
25365
25707
 
25366
- export { Account, AccountArray, AccountBuilder, AccountBuilderResult, AccountCode, AccountComponent, AccountComponentCode, AccountDelta, AccountFile, AccountHeader, AccountId, AccountIdArray, AccountInterface, AccountProof, AccountReader, AccountStatus, AccountStorage, AccountStorageDelta, AccountStorageMode, AccountStorageRequirements, AccountType, AccountVaultDelta, Address, AdviceInputs, AdviceMap, AssetVault, AuthFalcon512RpoMultisigConfig, AuthScheme, AuthSecretKey, BasicFungibleFaucetComponent, BlockHeader, CodeBuilder, CommittedNote, ConsumableNoteRecord, Endpoint, ExecutedTransaction, Felt, FeltArray, FetchedAccount, FetchedNote, FlattenedU8Vec, ForeignAccount, ForeignAccountArray, FungibleAsset, FungibleAssetDelta, FungibleAssetDeltaItem, GetProceduresResultItem, InputNote, InputNoteRecord, InputNoteState, InputNotes, IntoUnderlyingByteSource, IntoUnderlyingSink, IntoUnderlyingSource, JsAccountUpdate, JsStateSyncUpdate, JsStorageMapEntry, JsStorageSlot, JsVaultAsset, Library, MerklePath, NetworkId, NetworkType, Note, NoteAndArgs, NoteAndArgsArray, NoteArray, NoteAssets, NoteAttachment, NoteAttachmentKind, NoteAttachmentScheme, NoteConsumability, NoteConsumptionStatus, NoteDetails, NoteDetailsAndTag, NoteDetailsAndTagArray, NoteExecutionHint, NoteExportFormat, NoteFile, NoteFilter, NoteFilterTypes, NoteHeader, NoteId, NoteIdAndArgs, NoteIdAndArgsArray, NoteInclusionProof, NoteLocation, NoteMetadata, NoteRecipient, NoteRecipientArray, NoteScript, NoteStorage, NoteSyncBlock, NoteSyncInfo, NoteTag, NoteType, OutputNote, OutputNoteArray, OutputNoteRecord, OutputNoteState, OutputNotes, Package, PartialNote, Poseidon2, ProcedureThreshold, Program, ProvenTransaction, PublicKey, RpcClient, Rpo256, SerializedInputNoteData, SerializedOutputNoteData, SerializedTransactionData, Signature, SigningInputs, SigningInputsType, SlotAndKeys, SparseMerklePath, StorageMap, StorageMapEntry, StorageMapInfo, StorageMapUpdate, StorageSlot, StorageSlotArray, SyncSummary, TestUtils, TokenSymbol, TransactionArgs, TransactionFilter, TransactionId, TransactionProver, TransactionRecord, TransactionRequest, TransactionRequestBuilder, TransactionResult, TransactionScript, TransactionScriptInputPair, TransactionScriptInputPairArray, TransactionStatus, TransactionStoreUpdate, TransactionSummary, WebClient, WebKeystoreApi, Word, module$1 as __wasm_url, __wbg_init, createAuthFalcon512RpoMultisig, exportStore2 as exportStore, importStore, initSync, sequentialSumBench, setupLogging };
25367
- //# sourceMappingURL=Cargo-DC6jSekr-BG7C7m56.js.map
25708
+ export { Account, AccountArray, AccountBuilder, AccountBuilderResult, AccountCode, AccountComponent, AccountComponentCode, AccountDelta, AccountFile, AccountHeader, AccountId, AccountIdArray, AccountInterface, AccountProof, AccountReader, AccountStatus, AccountStorage, AccountStorageDelta, AccountStorageMode, AccountStorageRequirements, AccountType, AccountVaultDelta, Address, AdviceInputs, AdviceMap, AssetVault, AuthFalcon512RpoMultisigConfig, AuthScheme, AuthSecretKey, BasicFungibleFaucetComponent, BlockHeader, CodeBuilder, CommittedNote, ConsumableNoteRecord, Endpoint, ExecutedTransaction, Felt, FeltArray, FetchedAccount, FetchedNote, FlattenedU8Vec, ForeignAccount, ForeignAccountArray, FungibleAsset, FungibleAssetDelta, FungibleAssetDeltaItem, GetProceduresResultItem, InputNote, InputNoteRecord, InputNoteState, InputNotes, IntoUnderlyingByteSource, IntoUnderlyingSink, IntoUnderlyingSource, JsAccountUpdate, JsStateSyncUpdate, JsStorageMapEntry, JsStorageSlot, JsVaultAsset, Library, MerklePath, NetworkId, NetworkNoteStatusInfo, NetworkType, Note, NoteAndArgs, NoteAndArgsArray, NoteArray, NoteAssets, NoteAttachment, NoteAttachmentScheme, NoteConsumability, NoteConsumptionStatus, NoteDetails, NoteDetailsAndTag, NoteDetailsAndTagArray, NoteExecutionHint, NoteExportFormat, NoteFile, NoteFilter, NoteFilterTypes, NoteHeader, NoteId, NoteIdAndArgs, NoteIdAndArgsArray, NoteInclusionProof, NoteLocation, NoteMetadata, NoteRecipient, NoteRecipientArray, NoteScript, NoteStorage, NoteSyncBlock, NoteSyncInfo, NoteTag, NoteType, OutputNote, OutputNoteArray, OutputNoteRecord, OutputNoteState, OutputNotes, Package, PartialNote, Poseidon2, ProcedureThreshold, Program, ProvenTransaction, PublicKey, RpcClient, Rpo256, SerializedInputNoteData, SerializedOutputNoteData, SerializedTransactionData, Signature, SigningInputs, SigningInputsType, SlotAndKeys, SparseMerklePath, StorageMap, StorageMapEntry, StorageMapEntryJs, StorageMapInfo, StorageMapUpdate, StorageSlot, StorageSlotArray, SyncSummary, TestUtils, TokenSymbol, TransactionArgs, TransactionFilter, TransactionId, TransactionProver, TransactionRecord, TransactionRequest, TransactionRequestBuilder, TransactionResult, TransactionScript, TransactionScriptInputPair, TransactionScriptInputPairArray, TransactionStatus, TransactionStoreUpdate, TransactionSummary, WebClient, WebKeystoreApi, Word, module$1 as __wasm_url, __wbg_init, createAuthFalcon512RpoMultisig, exportStore2 as exportStore, importStore, initSync, sequentialSumBench, setupLogging };
25709
+ //# sourceMappingURL=Cargo-CG4XszZo-S7EHAZSa.js.map