@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
@@ -5,7 +5,7 @@
5
5
  async function loadWasm() {
6
6
  let wasmModule;
7
7
  if (!undefined || (undefined && !undefined.SSR)) {
8
- wasmModule = await Promise.resolve().then(function () { return CargoDC6jSekr; });
8
+ wasmModule = await Promise.resolve().then(function () { return CargoCG4XszZo; });
9
9
  // The Cargo glue's __wbg_init TLA is stripped by the rollup build to
10
10
  // prevent blocking WKWebView module evaluation. Call it explicitly here
11
11
  // with the WASM URL that the Cargo glue pre-resolves (relative to its
@@ -251,14 +251,12 @@ const methodHandlers = {
251
251
 
252
252
  const prover = proverPayload
253
253
  ? wasm.TransactionProver.deserialize(proverPayload)
254
- : null;
255
-
256
- const proven = prover
257
- ? await wasmWebClient.proveTransactionWithProver(
258
- transactionResult,
259
- prover
260
- )
261
- : await wasmWebClient.proveTransaction(transactionResult);
254
+ : undefined;
255
+
256
+ const proven = await wasmWebClient.proveTransaction(
257
+ transactionResult,
258
+ prover
259
+ );
262
260
  const serializedProven = proven.serialize();
263
261
  return serializedProven.buffer;
264
262
  },
@@ -311,7 +309,7 @@ const methodHandlers = {
311
309
  // Deserialize the prover from the serialized payload
312
310
  const prover = proverPayload
313
311
  ? wasm.TransactionProver.deserialize(proverPayload)
314
- : null;
312
+ : undefined;
315
313
 
316
314
  const result = await wasmWebClient.executeTransaction(
317
315
  accountId,
@@ -320,9 +318,7 @@ const methodHandlers = {
320
318
 
321
319
  const transactionId = result.id().toHex();
322
320
 
323
- const proven = prover
324
- ? await wasmWebClient.proveTransactionWithProver(result, prover)
325
- : await wasmWebClient.proveTransaction(result);
321
+ const proven = await wasmWebClient.proveTransaction(result, prover);
326
322
  const submissionHeight = await wasmWebClient.submitProvenTransaction(
327
323
  proven,
328
324
  result
@@ -375,14 +371,18 @@ methodHandlers[MethodName.SUBMIT_NEW_TRANSACTION_MOCK] = async (args) => {
375
371
 
376
372
  const result = await methodHandlers[MethodName.SUBMIT_NEW_TRANSACTION](args);
377
373
 
374
+ const updatedMockChain = (await wasmWebClient.serializeMockChain()).buffer;
375
+ const updatedMockNoteTransportNode = (
376
+ await wasmWebClient.serializeMockNoteTransportNode()
377
+ ).buffer;
378
+
378
379
  return {
379
380
  transactionId: result.transactionId,
380
381
  submissionHeight: result.submissionHeight,
381
382
  serializedTransactionResult: result.serializedTransactionResult,
382
383
  serializedTransactionUpdate: result.serializedTransactionUpdate,
383
- serializedMockChain: wasmWebClient.serializeMockChain().buffer,
384
- serializedMockNoteTransportNode:
385
- wasmWebClient.serializeMockNoteTransportNode().buffer,
384
+ serializedMockChain: updatedMockChain,
385
+ serializedMockNoteTransportNode: updatedMockNoteTransportNode,
386
386
  };
387
387
  };
388
388
 
@@ -407,14 +407,18 @@ methodHandlers[MethodName.SUBMIT_NEW_TRANSACTION_WITH_PROVER_MOCK] = async (
407
407
  const result =
408
408
  await methodHandlers[MethodName.SUBMIT_NEW_TRANSACTION_WITH_PROVER](args);
409
409
 
410
+ const updatedMockChain = (await wasmWebClient.serializeMockChain()).buffer;
411
+ const updatedMockNoteTransportNode = (
412
+ await wasmWebClient.serializeMockNoteTransportNode()
413
+ ).buffer;
414
+
410
415
  return {
411
416
  transactionId: result.transactionId,
412
417
  submissionHeight: result.submissionHeight,
413
418
  serializedTransactionResult: result.serializedTransactionResult,
414
419
  serializedTransactionUpdate: result.serializedTransactionUpdate,
415
- serializedMockChain: wasmWebClient.serializeMockChain().buffer,
416
- serializedMockNoteTransportNode:
417
- wasmWebClient.serializeMockNoteTransportNode().buffer,
420
+ serializedMockChain: updatedMockChain,
421
+ serializedMockNoteTransportNode: updatedMockNoteTransportNode,
418
422
  };
419
423
  };
420
424
 
@@ -8852,7 +8856,7 @@ const V1_STORES = {
8852
8856
  [Table.Addresses]: indexes("address", "id"),
8853
8857
  [Table.Transactions]: indexes("id", "statusVariant"),
8854
8858
  [Table.TransactionScripts]: indexes("scriptRoot"),
8855
- [Table.InputNotes]: indexes("noteId", "nullifier", "stateDiscriminant", "[consumedBlockHeight+consumedTxOrder+noteId]"),
8859
+ [Table.InputNotes]: indexes("detailsCommitment", "noteId", "nullifier", "stateDiscriminant", "[consumedBlockHeight+consumedTxOrder+noteId]"),
8856
8860
  [Table.OutputNotes]: indexes("noteId", "recipientDigest", "stateDiscriminant", "nullifier"),
8857
8861
  [Table.NotesScripts]: indexes("scriptRoot"),
8858
8862
  [Table.StateSync]: indexes("id"),
@@ -10044,13 +10048,12 @@ async function getAccountIdByKeyCommitment(dbId, pubKeyCommitmentHex) {
10044
10048
  }
10045
10049
  }
10046
10050
 
10047
- async function insertBlockHeader(dbId, blockNum, header, partialBlockchainPeaks, hasClientNotes) {
10051
+ async function insertBlockHeader(dbId, blockNum, header, hasClientNotes) {
10048
10052
  try {
10049
10053
  const db = getDatabase(dbId);
10050
10054
  const data = {
10051
10055
  blockNum: blockNum,
10052
10056
  header,
10053
- partialBlockchainPeaks,
10054
10057
  hasClientNotes: hasClientNotes.toString(),
10055
10058
  };
10056
10059
  // Mirror SQLite's `insert_block_header_tx`: do an INSERT OR IGNORE on the
@@ -10058,12 +10061,8 @@ async function insertBlockHeader(dbId, blockNum, header, partialBlockchainPeaks,
10058
10061
  // says so. Two callers hit this:
10059
10062
  // - Genesis flow — no existing row; the add succeeds.
10060
10063
  // - `get_and_store_authenticated_block` for a past block — a row
10061
- // written by `applyStateSync` typically already exists. Overwriting
10062
- // it would clobber the correct historical peaks (popcount ==
10063
- // block_num) with peaks from the caller's current `PartialMmr`
10064
- // forest (popcount == current sync height). Later reads of those
10065
- // peaks trip `MmrPeaks::new`'s InvalidPeaks validation and wedge
10066
- // sync for the rest of the session.
10064
+ // written by `applyStateSync` typically already exists. We keep that
10065
+ // row untouched.
10067
10066
  //
10068
10067
  // The `has_client_notes` upgrade is load-bearing: `get_tracked_block_
10069
10068
  // header_numbers` filters by this flag to seed `tracked_leaves`, which
@@ -10116,11 +10115,9 @@ async function getBlockHeaders(dbId, blockNumbers) {
10116
10115
  }
10117
10116
  else {
10118
10117
  const headerBase64 = uint8ArrayToBase64(result.header);
10119
- const partialBlockchainPeaksBase64 = uint8ArrayToBase64(result.partialBlockchainPeaks);
10120
10118
  return {
10121
10119
  blockNum: result.blockNum,
10122
10120
  header: headerBase64,
10123
- partialBlockchainPeaks: partialBlockchainPeaksBase64,
10124
10121
  hasClientNotes: result.hasClientNotes === "true",
10125
10122
  };
10126
10123
  }
@@ -10140,11 +10137,9 @@ async function getTrackedBlockHeaders(dbId) {
10140
10137
  .toArray();
10141
10138
  const processedRecords = await Promise.all(allMatchingRecords.map((record) => {
10142
10139
  const headerBase64 = uint8ArrayToBase64(record.header);
10143
- const partialBlockchainPeaksBase64 = uint8ArrayToBase64(record.partialBlockchainPeaks);
10144
10140
  return {
10145
10141
  blockNum: record.blockNum,
10146
10142
  header: headerBase64,
10147
- partialBlockchainPeaks: partialBlockchainPeaksBase64,
10148
10143
  hasClientNotes: record.hasClientNotes === "true",
10149
10144
  };
10150
10145
  }));
@@ -10167,22 +10162,31 @@ async function getTrackedBlockHeaderNumbers(dbId) {
10167
10162
  logWebStoreError(err, "Failed to get tracked block header numbers");
10168
10163
  }
10169
10164
  }
10170
- async function getPartialBlockchainPeaksByBlockNum(dbId, blockNum) {
10165
+ /**
10166
+ * Returns the blockchain peaks at the current sync height. Peaks live on the
10167
+ * `blockHeaders` row at `stateSync.blockNum` — the block that was the chain
10168
+ * tip when its sync ran. Returns `{ blockNum, peaks: undefined }` if the
10169
+ * stateSync row is missing or if that block was inserted via backfill
10170
+ * (which leaves `partialBlockchainPeaks` unset).
10171
+ */
10172
+ async function getCurrentBlockchainPeaks(dbId) {
10171
10173
  try {
10172
10174
  const db = getDatabase(dbId);
10173
- const blockHeader = await db.blockHeaders.get(blockNum);
10174
- if (blockHeader == undefined) {
10175
- return {
10176
- peaks: undefined,
10177
- };
10175
+ const stateSyncRow = await db.stateSync.get(1);
10176
+ if (stateSyncRow == undefined) {
10177
+ return { blockNum: 0, peaks: undefined };
10178
+ }
10179
+ const header = await db.blockHeaders.get(stateSyncRow.blockNum);
10180
+ if (header == undefined || header.partialBlockchainPeaks == undefined) {
10181
+ return { blockNum: stateSyncRow.blockNum, peaks: undefined };
10178
10182
  }
10179
- const partialBlockchainPeaksBase64 = uint8ArrayToBase64(blockHeader.partialBlockchainPeaks);
10180
10183
  return {
10181
- peaks: partialBlockchainPeaksBase64,
10184
+ blockNum: stateSyncRow.blockNum,
10185
+ peaks: uint8ArrayToBase64(header.partialBlockchainPeaks),
10182
10186
  };
10183
10187
  }
10184
10188
  catch (err) {
10185
- logWebStoreError(err, "Failed to get partial blockchain peaks");
10189
+ logWebStoreError(err, "Failed to get current blockchain peaks");
10186
10190
  }
10187
10191
  }
10188
10192
  async function getPartialBlockchainNodesAll(dbId) {
@@ -10222,19 +10226,34 @@ async function getPartialBlockchainNodesUpToInOrderIndex(dbId, maxInOrderIndex)
10222
10226
  logWebStoreError(err, "Failed to get partial blockchain nodes up to index");
10223
10227
  }
10224
10228
  }
10225
- async function pruneIrrelevantBlocks(dbId) {
10229
+ async function pruneIrrelevantBlocks(dbId, blocksToUntrack, nodeIdsToRemove) {
10226
10230
  try {
10227
10231
  const db = getDatabase(dbId);
10232
+ const numericNodeIds = nodeIdsToRemove.map(Number);
10228
10233
  const syncHeight = await db.stateSync.get(1);
10229
10234
  if (syncHeight == undefined) {
10230
10235
  throw Error("SyncHeight is undefined -- is the state sync table empty?");
10231
10236
  }
10232
- const allMatchingRecords = await db.blockHeaders
10233
- .where("hasClientNotes")
10234
- .equals("false")
10235
- .and((record) => record.blockNum !== 0 && record.blockNum !== syncHeight.blockNum)
10236
- .toArray();
10237
- await db.blockHeaders.bulkDelete(allMatchingRecords.map((r) => r.blockNum));
10237
+ await db.dexie.transaction("rw", db.blockHeaders, db.partialBlockchainNodes, async () => {
10238
+ // 1. Delete stale MMR authentication nodes.
10239
+ if (numericNodeIds.length > 0) {
10240
+ await db.partialBlockchainNodes.bulkDelete(numericNodeIds);
10241
+ }
10242
+ // 2. Mark untracked blocks as irrelevant.
10243
+ if (blocksToUntrack.length > 0) {
10244
+ await db.blockHeaders
10245
+ .where("blockNum")
10246
+ .anyOf(blocksToUntrack)
10247
+ .modify({ hasClientNotes: "false" });
10248
+ }
10249
+ // 3. Delete irrelevant block headers.
10250
+ const allMatchingRecords = await db.blockHeaders
10251
+ .where("hasClientNotes")
10252
+ .equals("false")
10253
+ .and((record) => record.blockNum !== 0 && record.blockNum !== syncHeight.blockNum)
10254
+ .toArray();
10255
+ await db.blockHeaders.bulkDelete(allMatchingRecords.map((r) => r.blockNum));
10256
+ });
10238
10257
  }
10239
10258
  catch (err) {
10240
10259
  logWebStoreError(err, "Failed to prune irrelevant blocks");
@@ -10485,13 +10504,20 @@ async function getNoteScript(dbId, scriptRoot) {
10485
10504
  logWebStoreError(err, "Failed to get note script from root");
10486
10505
  }
10487
10506
  }
10488
- async function upsertInputNote(dbId, noteId, assets, serialNumber, inputs, scriptRoot, serializedNoteScript, nullifier, serializedCreatedAt, stateDiscriminant, state, consumedBlockHeight, consumedTxOrder, consumerAccountId, tx) {
10507
+ async function upsertInputNote(dbId, detailsCommitment, noteId, assets, attachments, serialNumber, inputs, scriptRoot, serializedNoteScript, nullifier, serializedCreatedAt, stateDiscriminant, state, consumedBlockHeight, consumedTxOrder, consumerAccountId, tx) {
10489
10508
  const db = getDatabase(dbId);
10490
10509
  const doWork = async (t) => {
10491
10510
  try {
10492
10511
  const data = {
10493
- noteId,
10512
+ // The details commitment is the primary key. It is always present, even
10513
+ // for partial notes lacking a noteId, so a partial note that later gains
10514
+ // its noteId updates the same row instead of inserting a duplicate.
10515
+ detailsCommitment,
10516
+ // Convert null -> undefined so Dexie omits the noteId secondary index
10517
+ // for partial notes that don't have one yet.
10518
+ noteId: noteId ?? undefined,
10494
10519
  assets,
10520
+ attachments,
10495
10521
  serialNumber,
10496
10522
  inputs,
10497
10523
  scriptRoot,
@@ -10514,7 +10540,7 @@ async function upsertInputNote(dbId, noteId, assets, serialNumber, inputs, scrip
10514
10540
  /* v8 ignore next 3 — requires a mid-transaction Dexie write failure, not modelable with fake-indexeddb */
10515
10541
  }
10516
10542
  catch (error) {
10517
- logWebStoreError(error, `Error inserting note: ${noteId}`);
10543
+ logWebStoreError(error, `Error inserting note: ${detailsCommitment}`);
10518
10544
  }
10519
10545
  };
10520
10546
  return db.dexie.transaction("rw", db.inputNotes, db.notesScripts, doWork);
@@ -10577,13 +10603,14 @@ async function getInputNoteByOffset(dbId, states, consumerAccountId, blockStart,
10577
10603
  logWebStoreError(err, "Failed to get input note by offset");
10578
10604
  }
10579
10605
  }
10580
- async function upsertOutputNote(dbId, noteId, assets, recipientDigest, metadata, nullifier, expectedHeight, stateDiscriminant, state, tx) {
10606
+ async function upsertOutputNote(dbId, noteId, assets, attachments, recipientDigest, metadata, nullifier, expectedHeight, stateDiscriminant, state, tx) {
10581
10607
  const db = getDatabase(dbId);
10582
10608
  const doWork = async (t) => {
10583
10609
  try {
10584
10610
  const data = {
10585
10611
  noteId,
10586
10612
  assets,
10613
+ attachments,
10587
10614
  recipientDigest,
10588
10615
  metadata,
10589
10616
  nullifier: nullifier ? nullifier : undefined,
@@ -10604,6 +10631,7 @@ async function processInputNotes(dbId, notes) {
10604
10631
  const db = getDatabase(dbId);
10605
10632
  return await Promise.all(notes.map(async (note) => {
10606
10633
  const assetsBase64 = uint8ArrayToBase64(note.assets);
10634
+ const attachmentsBase64 = uint8ArrayToBase64(note.attachments);
10607
10635
  const serialNumberBase64 = uint8ArrayToBase64(note.serialNumber);
10608
10636
  const inputsBase64 = uint8ArrayToBase64(note.inputs);
10609
10637
  let serializedNoteScriptBase64 = undefined;
@@ -10616,6 +10644,7 @@ async function processInputNotes(dbId, notes) {
10616
10644
  const stateBase64 = uint8ArrayToBase64(note.state);
10617
10645
  return {
10618
10646
  assets: assetsBase64,
10647
+ attachments: attachmentsBase64,
10619
10648
  serialNumber: serialNumberBase64,
10620
10649
  inputs: inputsBase64,
10621
10650
  createdAt: note.serializedCreatedAt,
@@ -10627,10 +10656,12 @@ async function processInputNotes(dbId, notes) {
10627
10656
  async function processOutputNotes(notes) {
10628
10657
  return await Promise.all(notes.map((note) => {
10629
10658
  const assetsBase64 = uint8ArrayToBase64(note.assets);
10659
+ const attachmentsBase64 = uint8ArrayToBase64(note.attachments);
10630
10660
  const metadataBase64 = uint8ArrayToBase64(note.metadata);
10631
10661
  const stateBase64 = uint8ArrayToBase64(note.state);
10632
10662
  return {
10633
10663
  assets: assetsBase64,
10664
+ attachments: attachmentsBase64,
10634
10665
  recipientDigest: note.recipientDigest,
10635
10666
  metadata: metadataBase64,
10636
10667
  expectedHeight: note.expectedHeight,
@@ -10899,9 +10930,8 @@ async function removeNoteTag(dbId, tag, sourceNoteId, sourceAccountId) {
10899
10930
  }
10900
10931
  async function applyStateSync(dbId, stateUpdate) {
10901
10932
  const db = getDatabase(dbId);
10902
- const { blockNum, flattenedNewBlockHeaders, flattenedPartialBlockChainPeaks, newBlockNums, blockHasRelevantNotes, serializedNodeIds, serializedNodes, committedNoteIds, serializedInputNotes, serializedOutputNotes, accountUpdates, transactionUpdates, } = stateUpdate;
10933
+ const { blockNum, flattenedNewBlockHeaders, partialBlockchainPeaks, newBlockNums, blockHasRelevantNotes, serializedNodeIds, serializedNodes, committedNoteTagSources, serializedInputNotes, serializedOutputNotes, accountUpdates, transactionUpdates, } = stateUpdate;
10903
10934
  const newBlockHeaders = reconstructFlattenedVec(flattenedNewBlockHeaders);
10904
- const partialBlockchainPeaks = reconstructFlattenedVec(flattenedPartialBlockChainPeaks);
10905
10935
  const tablesToAccess = [
10906
10936
  db.stateSync,
10907
10937
  db.inputNotes,
@@ -10924,10 +10954,10 @@ async function applyStateSync(dbId, stateUpdate) {
10924
10954
  return await db.dexie.transaction("rw", tablesToAccess, async (tx) => {
10925
10955
  await Promise.all([
10926
10956
  Promise.all(serializedInputNotes.map((note) => {
10927
- return upsertInputNote(dbId, note.noteId, note.noteAssets, note.serialNumber, note.inputs, note.noteScriptRoot, note.noteScript, note.nullifier, note.createdAt, note.stateDiscriminant, note.state, note.consumedBlockHeight, note.consumedTxOrder, note.consumerAccountId);
10957
+ return upsertInputNote(dbId, note.detailsCommitment, note.noteId, note.noteAssets, note.attachments, note.serialNumber, note.inputs, note.noteScriptRoot, note.noteScript, note.nullifier, note.createdAt, note.stateDiscriminant, note.state, note.consumedBlockHeight, note.consumedTxOrder, note.consumerAccountId);
10928
10958
  })),
10929
10959
  Promise.all(serializedOutputNotes.map((note) => {
10930
- return upsertOutputNote(dbId, note.noteId, note.noteAssets, note.recipientDigest, note.metadata, note.nullifier, note.expectedHeight, note.stateDiscriminant, note.state);
10960
+ return upsertOutputNote(dbId, note.noteId, note.noteAssets, note.attachments, note.recipientDigest, note.metadata, note.nullifier, note.expectedHeight, note.stateDiscriminant, note.state);
10931
10961
  })),
10932
10962
  Promise.all(transactionUpdates.map((transactionRecord) => {
10933
10963
  let promises = [
@@ -10953,16 +10983,26 @@ async function applyStateSync(dbId, stateUpdate) {
10953
10983
  }))),
10954
10984
  updateSyncHeight(tx, blockNum),
10955
10985
  updatePartialBlockchainNodes(tx, serializedNodeIds, serializedNodes),
10956
- updateCommittedNoteTags(tx, committedNoteIds),
10986
+ updateCommittedNoteTags(tx, committedNoteTagSources),
10957
10987
  Promise.all(newBlockHeaders.map((newBlockHeader, i) => {
10958
- return updateBlockHeader(tx, newBlockNums[i], newBlockHeader, partialBlockchainPeaks[i], blockHasRelevantNotes[i] == 1);
10988
+ // Peaks are attached only to the chain-tip block (the one whose
10989
+ // blockNum matches the new sync height). That row is always
10990
+ // present in this iteration because `partial_blockchain_updates`
10991
+ // includes the chain tip header by construction.
10992
+ // TODO: potentially move this to be under the sync state info table
10993
+ // as currently done in SQLite
10994
+ const peaks = newBlockNums[i] === blockNum ? partialBlockchainPeaks : undefined;
10995
+ return updateBlockHeader(tx, newBlockNums[i], newBlockHeader, blockHasRelevantNotes[i] == 1, peaks);
10959
10996
  })),
10960
10997
  ]);
10961
10998
  });
10962
10999
  }
11000
+ /**
11001
+ * Advances `stateSync.blockNum` only when moving forward. Mirrors SQLite's
11002
+ * `UPDATE blockchain_checkpoint ... WHERE block_num < ?`.
11003
+ */
10963
11004
  async function updateSyncHeight(tx, blockNum) {
10964
11005
  try {
10965
- // Only update if moving forward to prevent race conditions
10966
11006
  const current = await tx.stateSync.get(1);
10967
11007
  if (!current || current.blockNum < blockNum) {
10968
11008
  await tx.stateSync.update(1, {
@@ -10974,13 +11014,13 @@ async function updateSyncHeight(tx, blockNum) {
10974
11014
  logWebStoreError(error, "Failed to update sync height");
10975
11015
  }
10976
11016
  }
10977
- async function updateBlockHeader(tx, blockNum, blockHeader, partialBlockchainPeaks, hasClientNotes) {
11017
+ async function updateBlockHeader(tx, blockNum, blockHeader, hasClientNotes, partialBlockchainPeaks) {
10978
11018
  try {
10979
11019
  const data = {
10980
11020
  blockNum: blockNum,
10981
11021
  header: blockHeader,
10982
- partialBlockchainPeaks,
10983
11022
  hasClientNotes: hasClientNotes.toString(),
11023
+ ...(partialBlockchainPeaks !== undefined && { partialBlockchainPeaks }),
10984
11024
  };
10985
11025
  const existingBlockHeader = await tx.blockHeaders.get(blockNum);
10986
11026
  if (!existingBlockHeader) {
@@ -11011,13 +11051,13 @@ async function updatePartialBlockchainNodes(tx, nodeIndexes, nodes) {
11011
11051
  logWebStoreError(err, "Failed to update partial blockchain nodes");
11012
11052
  }
11013
11053
  }
11014
- async function updateCommittedNoteTags(tx, inputNoteIds) {
11054
+ async function updateCommittedNoteTags(tx, committedNoteTagSources) {
11015
11055
  try {
11016
- for (let i = 0; i < inputNoteIds.length; i++) {
11017
- const noteId = inputNoteIds[i];
11056
+ for (let i = 0; i < committedNoteTagSources.length; i++) {
11057
+ const tagSource = committedNoteTagSources[i];
11018
11058
  await tx.tags
11019
11059
  .where("sourceNoteId")
11020
- .equals(noteId)
11060
+ .equals(tagSource)
11021
11061
  .delete();
11022
11062
  }
11023
11063
  }
@@ -11123,21 +11163,13 @@ class Account {
11123
11163
  return AccountId.__wrap(ret);
11124
11164
  }
11125
11165
  /**
11126
- * Returns true if the account is a faucet.
11166
+ * Returns true if the account exposes a fungible-faucet interface.
11127
11167
  * @returns {boolean}
11128
11168
  */
11129
11169
  isFaucet() {
11130
11170
  const ret = wasm.account_isFaucet(this.__wbg_ptr);
11131
11171
  return ret !== 0;
11132
11172
  }
11133
- /**
11134
- * Returns true if this is a network-owned account.
11135
- * @returns {boolean}
11136
- */
11137
- isNetwork() {
11138
- const ret = wasm.account_isNetwork(this.__wbg_ptr);
11139
- return ret !== 0;
11140
- }
11141
11173
  /**
11142
11174
  * Returns true if the account has not yet been committed to the chain.
11143
11175
  * @returns {boolean}
@@ -11163,21 +11195,13 @@ class Account {
11163
11195
  return ret !== 0;
11164
11196
  }
11165
11197
  /**
11166
- * Returns true if the account is a regular account (immutable or updatable code).
11198
+ * Returns true if the account is a regular (non-faucet) account.
11167
11199
  * @returns {boolean}
11168
11200
  */
11169
11201
  isRegularAccount() {
11170
11202
  const ret = wasm.account_isRegularAccount(this.__wbg_ptr);
11171
11203
  return ret !== 0;
11172
11204
  }
11173
- /**
11174
- * Returns true if the account can update its code.
11175
- * @returns {boolean}
11176
- */
11177
- isUpdatable() {
11178
- const ret = wasm.account_isUpdatable(this.__wbg_ptr);
11179
- return ret !== 0;
11180
- }
11181
11205
  /**
11182
11206
  * Returns the account nonce, which is incremented on every state update.
11183
11207
  * @returns {Felt}
@@ -11277,18 +11301,13 @@ class AccountArray {
11277
11301
  wasm.accountarray_push(this.__wbg_ptr, element.__wbg_ptr);
11278
11302
  }
11279
11303
  /**
11280
- * Replace the element at `index`. Borrows + clones the input
11281
- * (mirrors `push`), so the caller's JS handle remains valid
11282
- * after the call. Without this borrow, passing `elem` by
11283
- * value would move the underlying Rust value out of the
11284
- * caller's JS handle and any subsequent method on it would
11285
- * panic with `"null pointer passed to rust"`.
11286
11304
  * @param {number} index
11287
11305
  * @param {Account} elem
11288
11306
  */
11289
11307
  replaceAt(index, elem) {
11290
11308
  _assertClass(elem, Account);
11291
- const ret = wasm.accountarray_replaceAt(this.__wbg_ptr, index, elem.__wbg_ptr);
11309
+ var ptr0 = elem.__destroy_into_raw();
11310
+ const ret = wasm.accountarray_replaceAt(this.__wbg_ptr, index, ptr0);
11292
11311
  if (ret[1]) {
11293
11312
  throw takeFromExternrefTable0(ret[0]);
11294
11313
  }
@@ -11316,28 +11335,31 @@ class AccountBuilder {
11316
11335
  }
11317
11336
  /**
11318
11337
  * Sets the account type (regular, faucet, etc.).
11319
- *
11320
- * Accepts either a numeric WASM enum value (0–3) or a string name
11321
- * (`"FungibleFaucet"`, `"NonFungibleFaucet"`,
11322
- * `"RegularAccountImmutableCode"`, `"RegularAccountUpdatableCode"`).
11323
- * @param {any} account_type
11338
+ * @param {AccountType} account_type
11324
11339
  * @returns {AccountBuilder}
11325
11340
  */
11326
11341
  accountType(account_type) {
11327
- const ptr = this.__destroy_into_raw();
11328
- const ret = wasm.accountbuilder_accountType(ptr, account_type);
11342
+ const ret = wasm.accountbuilder_accountType(this.__wbg_ptr, account_type);
11343
+ return AccountBuilder.__wrap(ret);
11344
+ }
11345
+ /**
11346
+ * Builds the account (including merged storage schema commitment metadata) and returns it
11347
+ * together with the derived seed.
11348
+ * @returns {AccountBuilderResult}
11349
+ */
11350
+ build() {
11351
+ const ret = wasm.accountbuilder_build(this.__wbg_ptr);
11329
11352
  if (ret[2]) {
11330
11353
  throw takeFromExternrefTable0(ret[1]);
11331
11354
  }
11332
- return AccountBuilder.__wrap(ret[0]);
11355
+ return AccountBuilderResult.__wrap(ret[0]);
11333
11356
  }
11334
11357
  /**
11335
- * Builds the account and returns it together with the derived seed.
11358
+ * Builds the account without adding the schema commitment component (legacy behavior).
11336
11359
  * @returns {AccountBuilderResult}
11337
11360
  */
11338
- build() {
11339
- const ptr = this.__destroy_into_raw();
11340
- const ret = wasm.accountbuilder_build(ptr);
11361
+ buildWithoutSchemaCommitment() {
11362
+ const ret = wasm.accountbuilder_buildWithoutSchemaCommitment(this.__wbg_ptr);
11341
11363
  if (ret[2]) {
11342
11364
  throw takeFromExternrefTable0(ret[1]);
11343
11365
  }
@@ -11360,13 +11382,17 @@ class AccountBuilder {
11360
11382
  }
11361
11383
  /**
11362
11384
  * Sets the storage mode (public/private) for the account.
11385
+ *
11386
+ * The 0.15 protocol surface collapsed `AccountStorageMode` and `AccountType` into a
11387
+ * single 2-way `AccountType` flag: setting the storage mode IS setting the account
11388
+ * type. Calling both `accountType()` and `storageMode()` on the same builder is the
11389
+ * last-write-wins on the underlying flag. Method kept for JS-surface back-compat.
11363
11390
  * @param {AccountStorageMode} storage_mode
11364
11391
  * @returns {AccountBuilder}
11365
11392
  */
11366
11393
  storageMode(storage_mode) {
11367
- const ptr = this.__destroy_into_raw();
11368
11394
  _assertClass(storage_mode, AccountStorageMode);
11369
- const ret = wasm.accountbuilder_storageMode(ptr, storage_mode.__wbg_ptr);
11395
+ const ret = wasm.accountbuilder_storageMode(this.__wbg_ptr, storage_mode.__wbg_ptr);
11370
11396
  return AccountBuilder.__wrap(ret);
11371
11397
  }
11372
11398
  /**
@@ -11375,17 +11401,15 @@ class AccountBuilder {
11375
11401
  * @returns {AccountBuilder}
11376
11402
  */
11377
11403
  withAuthComponent(account_component) {
11378
- const ptr = this.__destroy_into_raw();
11379
11404
  _assertClass(account_component, AccountComponent);
11380
- const ret = wasm.accountbuilder_withAuthComponent(ptr, account_component.__wbg_ptr);
11405
+ const ret = wasm.accountbuilder_withAuthComponent(this.__wbg_ptr, account_component.__wbg_ptr);
11381
11406
  return AccountBuilder.__wrap(ret);
11382
11407
  }
11383
11408
  /**
11384
11409
  * @returns {AccountBuilder}
11385
11410
  */
11386
11411
  withBasicWalletComponent() {
11387
- const ptr = this.__destroy_into_raw();
11388
- const ret = wasm.accountbuilder_withBasicWalletComponent(ptr);
11412
+ const ret = wasm.accountbuilder_withBasicWalletComponent(this.__wbg_ptr);
11389
11413
  return AccountBuilder.__wrap(ret);
11390
11414
  }
11391
11415
  /**
@@ -11394,9 +11418,8 @@ class AccountBuilder {
11394
11418
  * @returns {AccountBuilder}
11395
11419
  */
11396
11420
  withComponent(account_component) {
11397
- const ptr = this.__destroy_into_raw();
11398
11421
  _assertClass(account_component, AccountComponent);
11399
- const ret = wasm.accountbuilder_withComponent(ptr, account_component.__wbg_ptr);
11422
+ const ret = wasm.accountbuilder_withComponent(this.__wbg_ptr, account_component.__wbg_ptr);
11400
11423
  return AccountBuilder.__wrap(ret);
11401
11424
  }
11402
11425
  /**
@@ -11404,8 +11427,7 @@ class AccountBuilder {
11404
11427
  * @returns {AccountBuilder}
11405
11428
  */
11406
11429
  withNoAuthComponent() {
11407
- const ptr = this.__destroy_into_raw();
11408
- const ret = wasm.accountbuilder_withNoAuthComponent(ptr);
11430
+ const ret = wasm.accountbuilder_withNoAuthComponent(this.__wbg_ptr);
11409
11431
  return AccountBuilder.__wrap(ret);
11410
11432
  }
11411
11433
  }
@@ -11583,7 +11605,8 @@ class AccountComponent {
11583
11605
  static fromPackage(_package, storage_slots) {
11584
11606
  _assertClass(_package, Package);
11585
11607
  _assertClass(storage_slots, StorageSlotArray);
11586
- const ret = wasm.accountcomponent_fromPackage(_package.__wbg_ptr, storage_slots.__wbg_ptr);
11608
+ var ptr0 = storage_slots.__destroy_into_raw();
11609
+ const ret = wasm.accountcomponent_fromPackage(_package.__wbg_ptr, ptr0);
11587
11610
  if (ret[2]) {
11588
11611
  throw takeFromExternrefTable0(ret[1]);
11589
11612
  }
@@ -11630,11 +11653,15 @@ class AccountComponent {
11630
11653
  }
11631
11654
  /**
11632
11655
  * Marks the component as supporting all account types.
11656
+ *
11657
+ * The 0.15 protocol collapsed the per-account-type flag set on
11658
+ * `AccountComponentMetadata::new` — every component now applies to every account type
11659
+ * implicitly, so this method's job is to re-derive the metadata under the new
11660
+ * (name-only) constructor while keeping the JS API surface stable.
11633
11661
  * @returns {AccountComponent}
11634
11662
  */
11635
11663
  withSupportsAllTypes() {
11636
- const ptr = this.__destroy_into_raw();
11637
- const ret = wasm.accountcomponent_withSupportsAllTypes(ptr);
11664
+ const ret = wasm.accountcomponent_withSupportsAllTypes(this.__wbg_ptr);
11638
11665
  return AccountComponent.__wrap(ret);
11639
11666
  }
11640
11667
  }
@@ -11989,22 +12016,6 @@ class AccountId {
11989
12016
  }
11990
12017
  return AccountId.__wrap(ret[0]);
11991
12018
  }
11992
- /**
11993
- * Returns true if the ID refers to a faucet.
11994
- * @returns {boolean}
11995
- */
11996
- isFaucet() {
11997
- const ret = wasm.accountid_isFaucet(this.__wbg_ptr);
11998
- return ret !== 0;
11999
- }
12000
- /**
12001
- * Returns true if the ID is reserved for network accounts.
12002
- * @returns {boolean}
12003
- */
12004
- isNetwork() {
12005
- const ret = wasm.accountid_isNetwork(this.__wbg_ptr);
12006
- return ret !== 0;
12007
- }
12008
12019
  /**
12009
12020
  * Returns true if the account uses private storage.
12010
12021
  * @returns {boolean}
@@ -12021,14 +12032,6 @@ class AccountId {
12021
12032
  const ret = wasm.accountid_isPublic(this.__wbg_ptr);
12022
12033
  return ret !== 0;
12023
12034
  }
12024
- /**
12025
- * Returns true if the ID refers to a regular account.
12026
- * @returns {boolean}
12027
- */
12028
- isRegularAccount() {
12029
- const ret = wasm.accountid_isRegularAccount(this.__wbg_ptr);
12030
- return ret !== 0;
12031
- }
12032
12035
  /**
12033
12036
  * Returns the prefix field element storing metadata about version, type, and storage mode.
12034
12037
  * @returns {Felt}
@@ -12146,18 +12149,13 @@ class AccountIdArray {
12146
12149
  wasm.accountidarray_push(this.__wbg_ptr, element.__wbg_ptr);
12147
12150
  }
12148
12151
  /**
12149
- * Replace the element at `index`. Borrows + clones the input
12150
- * (mirrors `push`), so the caller's JS handle remains valid
12151
- * after the call. Without this borrow, passing `elem` by
12152
- * value would move the underlying Rust value out of the
12153
- * caller's JS handle and any subsequent method on it would
12154
- * panic with `"null pointer passed to rust"`.
12155
12152
  * @param {number} index
12156
12153
  * @param {AccountId} elem
12157
12154
  */
12158
12155
  replaceAt(index, elem) {
12159
12156
  _assertClass(elem, AccountId);
12160
- const ret = wasm.accountidarray_replaceAt(this.__wbg_ptr, index, elem.__wbg_ptr);
12157
+ var ptr0 = elem.__destroy_into_raw();
12158
+ const ret = wasm.accountidarray_replaceAt(this.__wbg_ptr, index, ptr0);
12161
12159
  if (ret[1]) {
12162
12160
  throw takeFromExternrefTable0(ret[0]);
12163
12161
  }
@@ -12248,7 +12246,7 @@ class AccountProof {
12248
12246
  *
12249
12247
  * Each entry contains a `key` and `value` as `Word` objects.
12250
12248
  * @param {string} slot_name
12251
- * @returns {StorageMapEntry[] | undefined}
12249
+ * @returns {StorageMapEntryJs[] | undefined}
12252
12250
  */
12253
12251
  getStorageMapEntries(slot_name) {
12254
12252
  const ptr0 = passStringToWasm0(slot_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -12326,6 +12324,22 @@ class AccountProof {
12326
12324
  const ret = wasm.accountproof_numStorageSlots(this.__wbg_ptr);
12327
12325
  return ret === 0xFFFFFF ? undefined : ret;
12328
12326
  }
12327
+ /**
12328
+ * Returns the fungible assets in the account's vault, if vault details were included
12329
+ * in the proof response.
12330
+ *
12331
+ * Returns `undefined` if the account is private or vault data was not requested.
12332
+ * @returns {FungibleAsset[] | undefined}
12333
+ */
12334
+ vaultFungibleAssets() {
12335
+ const ret = wasm.accountproof_vaultFungibleAssets(this.__wbg_ptr);
12336
+ let v1;
12337
+ if (ret[0] !== 0) {
12338
+ v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
12339
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
12340
+ }
12341
+ return v1;
12342
+ }
12329
12343
  }
12330
12344
  if (Symbol.dispose) AccountProof.prototype[Symbol.dispose] = AccountProof.prototype.free;
12331
12345
 
@@ -12593,7 +12607,7 @@ class AccountStorage {
12593
12607
  * Returns `undefined` if the slot isn't a map or doesn't exist.
12594
12608
  * Returns `[]` if the map exists but is empty.
12595
12609
  * @param {string} slot_name
12596
- * @returns {JsStorageMapEntry[] | undefined}
12610
+ * @returns {StorageMapEntry[] | undefined}
12597
12611
  */
12598
12612
  getMapEntries(slot_name) {
12599
12613
  const ptr0 = passStringToWasm0(slot_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -12702,6 +12716,15 @@ if (Symbol.dispose) AccountStorageDelta.prototype[Symbol.dispose] = AccountStora
12702
12716
 
12703
12717
  /**
12704
12718
  * Storage visibility mode for an account.
12719
+ *
12720
+ * In the 0.15 protocol surface this is the same enum as `AccountType`
12721
+ * (the on-chain identifier no longer carries any faucet-vs-regular or
12722
+ * updatable-vs-immutable distinction), so internally we wrap an
12723
+ * `AccountType`. The standalone `AccountStorageMode` type still exists at
12724
+ * the JS API surface for backwards compatibility with code that wrote
12725
+ * `AccountStorageMode.public()` / `.private()`. The pre-existing `.network()`
12726
+ * constructor was removed — the network storage mode does not exist on the
12727
+ * 0.15 chain.
12705
12728
  */
12706
12729
  class AccountStorageMode {
12707
12730
  static __wrap(ptr) {
@@ -12737,14 +12760,6 @@ class AccountStorageMode {
12737
12760
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
12738
12761
  }
12739
12762
  }
12740
- /**
12741
- * Creates a network storage mode.
12742
- * @returns {AccountStorageMode}
12743
- */
12744
- static network() {
12745
- const ret = wasm.accountstoragemode_network();
12746
- return AccountStorageMode.__wrap(ret);
12747
- }
12748
12763
  /**
12749
12764
  * Creates a private storage mode.
12750
12765
  * @returns {AccountStorageMode}
@@ -12763,6 +12778,9 @@ class AccountStorageMode {
12763
12778
  }
12764
12779
  /**
12765
12780
  * Parses a storage mode from its string representation.
12781
+ *
12782
+ * Accepts `"private"` and `"public"`; any other input — including the
12783
+ * previously-supported `"network"` — is rejected.
12766
12784
  * @param {string} s
12767
12785
  * @returns {AccountStorageMode}
12768
12786
  */
@@ -12823,13 +12841,17 @@ class AccountStorageRequirements {
12823
12841
  if (Symbol.dispose) AccountStorageRequirements.prototype[Symbol.dispose] = AccountStorageRequirements.prototype.free;
12824
12842
 
12825
12843
  /**
12826
- * @enum {0 | 1 | 2 | 3}
12844
+ * Storage mode of an account. The 0.15 protocol collapses the previous
12845
+ * 4-way `{ FungibleFaucet, NonFungibleFaucet, RegularAccountImmutableCode,
12846
+ * RegularAccountUpdatableCode }` distinction into a 2-way storage flag —
12847
+ * faucet-vs-regular and updatable-vs-immutable distinctions are no longer
12848
+ * part of the on-chain `AccountType` and the API loses no information by
12849
+ * narrowing here too.
12850
+ * @enum {0 | 1}
12827
12851
  */
12828
12852
  const AccountType = Object.freeze({
12829
- FungibleFaucet: 0, "0": "FungibleFaucet",
12830
- NonFungibleFaucet: 1, "1": "NonFungibleFaucet",
12831
- RegularAccountImmutableCode: 2, "2": "RegularAccountImmutableCode",
12832
- RegularAccountUpdatableCode: 3, "3": "RegularAccountUpdatableCode",
12853
+ Private: 0, "0": "Private",
12854
+ Public: 1, "1": "Public",
12833
12855
  });
12834
12856
 
12835
12857
  /**
@@ -13127,13 +13149,14 @@ class AdviceMap {
13127
13149
  insert(key, value) {
13128
13150
  _assertClass(key, Word);
13129
13151
  _assertClass(value, FeltArray);
13130
- const ret = wasm.advicemap_insert(this.__wbg_ptr, key.__wbg_ptr, value.__wbg_ptr);
13131
- let v1;
13152
+ var ptr0 = value.__destroy_into_raw();
13153
+ const ret = wasm.advicemap_insert(this.__wbg_ptr, key.__wbg_ptr, ptr0);
13154
+ let v2;
13132
13155
  if (ret[0] !== 0) {
13133
- v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
13156
+ v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
13134
13157
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
13135
13158
  }
13136
- return v1;
13159
+ return v2;
13137
13160
  }
13138
13161
  /**
13139
13162
  * Creates an empty advice map.
@@ -13190,6 +13213,17 @@ class AssetVault {
13190
13213
  }
13191
13214
  /**
13192
13215
  * Returns the balance for the given fungible faucet, or zero if absent.
13216
+ *
13217
+ * `get_balance` on the 0.15 surface keys by `AssetVaultKey`, not `AccountId`, and
13218
+ * validates the composition. The callback flag is `Disabled` because fungible balance
13219
+ * reads don't run asset callbacks. Returns zero on lookup error (`Err` arms here would
13220
+ * indicate the key was constructed wrong, which can't happen for fungible keys built
13221
+ * this way).
13222
+ *
13223
+ * NOTE: the `AssetVaultKey` encodes the callback flag, so this reports only the balance
13224
+ * of callback-*disabled* fungible assets. Faucets built by this SDK omit transfer policies
13225
+ * and therefore mint callback-disabled assets, so this is exact for them; an asset minted
13226
+ * elsewhere with callbacks enabled would not be counted here.
13193
13227
  * @param {AccountId} faucet_id
13194
13228
  * @returns {bigint}
13195
13229
  */
@@ -13282,10 +13316,9 @@ class AuthFalcon512RpoMultisigConfig {
13282
13316
  * @returns {AuthFalcon512RpoMultisigConfig}
13283
13317
  */
13284
13318
  withProcThresholds(proc_thresholds) {
13285
- const ptr = this.__destroy_into_raw();
13286
13319
  const ptr0 = passArrayJsValueToWasm0(proc_thresholds, wasm.__wbindgen_malloc);
13287
13320
  const len0 = WASM_VECTOR_LEN;
13288
- const ret = wasm.authfalcon512rpomultisigconfig_withProcThresholds(ptr, ptr0, len0);
13321
+ const ret = wasm.authfalcon512rpomultisigconfig_withProcThresholds(this.__wbg_ptr, ptr0, len0);
13289
13322
  if (ret[2]) {
13290
13323
  throw takeFromExternrefTable0(ret[1]);
13291
13324
  }
@@ -13427,6 +13460,9 @@ if (Symbol.dispose) AuthSecretKey.prototype[Symbol.dispose] = AuthSecretKey.prot
13427
13460
 
13428
13461
  /**
13429
13462
  * Provides metadata for a basic fungible faucet account component.
13463
+ *
13464
+ * Reads the on-chain [`FungibleFaucet`] component for the account, which holds the
13465
+ * per-token info (symbol/decimals/maxSupply).
13430
13466
  */
13431
13467
  class BasicFungibleFaucetComponent {
13432
13468
  static __wrap(ptr) {
@@ -13473,7 +13509,7 @@ class BasicFungibleFaucetComponent {
13473
13509
  * @returns {Felt}
13474
13510
  */
13475
13511
  maxSupply() {
13476
- const ret = wasm.accountid_prefix(this.__wbg_ptr);
13512
+ const ret = wasm.basicfungiblefaucetcomponent_maxSupply(this.__wbg_ptr);
13477
13513
  return Felt.__wrap(ret);
13478
13514
  }
13479
13515
  /**
@@ -13556,8 +13592,8 @@ class BlockHeader {
13556
13592
  * network.
13557
13593
  * @returns {AccountId}
13558
13594
  */
13559
- nativeAssetId() {
13560
- const ret = wasm.blockheader_nativeAssetId(this.__wbg_ptr);
13595
+ feeFaucetId() {
13596
+ const ret = wasm.blockheader_feeFaucetId(this.__wbg_ptr);
13561
13597
  return AccountId.__wrap(ret);
13562
13598
  }
13563
13599
  /**
@@ -13800,14 +13836,6 @@ class CommittedNote {
13800
13836
  const ptr = this.__destroy_into_raw();
13801
13837
  wasm.__wbg_committednote_free(ptr, 0);
13802
13838
  }
13803
- /**
13804
- * Returns the full note metadata when the attachment payload is available.
13805
- * @returns {NoteMetadata | undefined}
13806
- */
13807
- fullMetadata() {
13808
- const ret = wasm.committednote_fullMetadata(this.__wbg_ptr);
13809
- return ret === 0 ? undefined : NoteMetadata.__wrap(ret);
13810
- }
13811
13839
  /**
13812
13840
  * Returns the inclusion path for the note in the block's note tree.
13813
13841
  * @returns {SparseMerklePath}
@@ -13826,9 +13854,6 @@ class CommittedNote {
13826
13854
  }
13827
13855
  /**
13828
13856
  * Returns the note metadata.
13829
- *
13830
- * If only metadata headers are available, the returned metadata contains
13831
- * the sender, note type, and tag without attachment payload.
13832
13857
  * @returns {NoteMetadata}
13833
13858
  */
13834
13859
  metadata() {
@@ -14203,12 +14228,18 @@ class Felt {
14203
14228
  return BigInt.asUintN(64, ret);
14204
14229
  }
14205
14230
  /**
14206
- * Creates a new field element from a u64 value.
14231
+ * Creates a new field element.
14232
+ *
14233
+ * Returns an error if `value` is outside the field's representable
14234
+ * range (`Felt::new` is fallible on the 0.15 protocol surface).
14207
14235
  * @param {bigint} value
14208
14236
  */
14209
14237
  constructor(value) {
14210
14238
  const ret = wasm.felt_new(value);
14211
- this.__wbg_ptr = ret >>> 0;
14239
+ if (ret[2]) {
14240
+ throw takeFromExternrefTable0(ret[1]);
14241
+ }
14242
+ this.__wbg_ptr = ret[0] >>> 0;
14212
14243
  FeltFinalization.register(this, this.__wbg_ptr, this);
14213
14244
  return this;
14214
14245
  }
@@ -14294,18 +14325,13 @@ class FeltArray {
14294
14325
  wasm.feltarray_push(this.__wbg_ptr, element.__wbg_ptr);
14295
14326
  }
14296
14327
  /**
14297
- * Replace the element at `index`. Borrows + clones the input
14298
- * (mirrors `push`), so the caller's JS handle remains valid
14299
- * after the call. Without this borrow, passing `elem` by
14300
- * value would move the underlying Rust value out of the
14301
- * caller's JS handle and any subsequent method on it would
14302
- * panic with `"null pointer passed to rust"`.
14303
14328
  * @param {number} index
14304
14329
  * @param {Felt} elem
14305
14330
  */
14306
14331
  replaceAt(index, elem) {
14307
14332
  _assertClass(elem, Felt);
14308
- const ret = wasm.feltarray_replaceAt(this.__wbg_ptr, index, elem.__wbg_ptr);
14333
+ var ptr0 = elem.__destroy_into_raw();
14334
+ const ret = wasm.feltarray_replaceAt(this.__wbg_ptr, index, ptr0);
14309
14335
  if (ret[1]) {
14310
14336
  throw takeFromExternrefTable0(ret[0]);
14311
14337
  }
@@ -14358,14 +14384,6 @@ class FetchedAccount {
14358
14384
  const ret = wasm.fetchedaccount_commitment(this.__wbg_ptr);
14359
14385
  return Word.__wrap(ret);
14360
14386
  }
14361
- /**
14362
- * Returns true when the account is a network account.
14363
- * @returns {boolean}
14364
- */
14365
- isNetwork() {
14366
- const ret = wasm.fetchedaccount_isNetwork(this.__wbg_ptr);
14367
- return ret !== 0;
14368
- }
14369
14387
  /**
14370
14388
  * Returns true when the account is private.
14371
14389
  * @returns {boolean}
@@ -14396,8 +14414,15 @@ if (Symbol.dispose) FetchedAccount.prototype[Symbol.dispose] = FetchedAccount.pr
14396
14414
  /**
14397
14415
  * Wrapper for a note fetched over RPC.
14398
14416
  *
14399
- * It contains the note header and inclusion proof. The note details are only present for
14400
- * public notes.
14417
+ * It carries the note ID, public metadata, and inclusion proof. The full note body is only
14418
+ * present for public notes; for private notes only the header-shaped fields and inclusion
14419
+ * proof are available — the body lives off-chain.
14420
+ *
14421
+ * 0.15 protocol surface: the on-chain `NoteHeader` now commits to a
14422
+ * `NoteDetailsCommitment` rather than the `NoteId`, so a `NoteHeader` can no longer be
14423
+ * reconstructed from header-shaped fields alone for private notes. We therefore expose
14424
+ * the constituent fields (`noteId`, `metadata`) directly on `FetchedNote` instead of a
14425
+ * `header` getter.
14401
14426
  */
14402
14427
  class FetchedNote {
14403
14428
  static __wrap(ptr) {
@@ -14429,12 +14454,18 @@ class FetchedNote {
14429
14454
  return ret === 0 ? undefined : InputNote.__wrap(ret);
14430
14455
  }
14431
14456
  /**
14432
- * The note's header, containing the ID and metadata.
14433
- * @returns {NoteHeader}
14457
+ * The note's attachments.
14458
+ *
14459
+ * 0.15 returns attachment content over RPC for both public and private notes, so this is
14460
+ * populated even when the note body itself is private. An empty array means the note
14461
+ * carries no attachments.
14462
+ * @returns {NoteAttachment[]}
14434
14463
  */
14435
- get header() {
14436
- const ret = wasm.fetchednote_header(this.__wbg_ptr);
14437
- return NoteHeader.__wrap(ret);
14464
+ get attachments() {
14465
+ const ret = wasm.fetchednote_attachments(this.__wbg_ptr);
14466
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
14467
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
14468
+ return v1;
14438
14469
  }
14439
14470
  /**
14440
14471
  * The note's inclusion proof.
@@ -14673,18 +14704,13 @@ class ForeignAccountArray {
14673
14704
  wasm.foreignaccountarray_push(this.__wbg_ptr, element.__wbg_ptr);
14674
14705
  }
14675
14706
  /**
14676
- * Replace the element at `index`. Borrows + clones the input
14677
- * (mirrors `push`), so the caller's JS handle remains valid
14678
- * after the call. Without this borrow, passing `elem` by
14679
- * value would move the underlying Rust value out of the
14680
- * caller's JS handle and any subsequent method on it would
14681
- * panic with `"null pointer passed to rust"`.
14682
14707
  * @param {number} index
14683
14708
  * @param {ForeignAccount} elem
14684
14709
  */
14685
14710
  replaceAt(index, elem) {
14686
14711
  _assertClass(elem, ForeignAccount);
14687
- const ret = wasm.foreignaccountarray_replaceAt(this.__wbg_ptr, index, elem.__wbg_ptr);
14712
+ var ptr0 = elem.__destroy_into_raw();
14713
+ const ret = wasm.foreignaccountarray_replaceAt(this.__wbg_ptr, index, ptr0);
14688
14714
  if (ret[1]) {
14689
14715
  throw takeFromExternrefTable0(ret[0]);
14690
14716
  }
@@ -14754,7 +14780,10 @@ class FungibleAsset {
14754
14780
  constructor(faucet_id, amount) {
14755
14781
  _assertClass(faucet_id, AccountId);
14756
14782
  const ret = wasm.fungibleasset_new(faucet_id.__wbg_ptr, amount);
14757
- this.__wbg_ptr = ret >>> 0;
14783
+ if (ret[2]) {
14784
+ throw takeFromExternrefTable0(ret[1]);
14785
+ }
14786
+ this.__wbg_ptr = ret[0] >>> 0;
14758
14787
  FungibleAssetFinalization.register(this, this.__wbg_ptr, this);
14759
14788
  return this;
14760
14789
  }
@@ -14784,6 +14813,10 @@ class FungibleAssetDelta {
14784
14813
  }
14785
14814
  /**
14786
14815
  * Returns the delta amount for a given faucet, if present.
14816
+ *
14817
+ * The vault key here is the one used by the fungible-delta tree, which the upstream
14818
+ * surface keys with `AssetCallbackFlag::Disabled` — fungible balance deltas don't run
14819
+ * asset callbacks. `new_fungible` on the 0.15 surface is infallible.
14787
14820
  * @param {AccountId} faucet_id
14788
14821
  * @returns {bigint | undefined}
14789
14822
  */
@@ -14958,7 +14991,12 @@ class InputNote {
14958
14991
  return InputNote.__wrap(ret);
14959
14992
  }
14960
14993
  /**
14961
- * Returns the commitment to the note ID and metadata.
14994
+ * Returns the commitment to the note (its ID).
14995
+ *
14996
+ * Migration note (miden-client PR #2214): `Note::commitment()` was
14997
+ * removed on the 0.15 surface — the note ID *is* the commitment (it
14998
+ * hashes details + metadata). Return the underlying `NoteId` as a
14999
+ * `Word` so the JS API contract is unchanged.
14962
15000
  * @returns {Word}
14963
15001
  */
14964
15002
  commitment() {
@@ -15044,6 +15082,22 @@ class InputNoteRecord {
15044
15082
  const ptr = this.__destroy_into_raw();
15045
15083
  wasm.__wbg_inputnoterecord_free(ptr, 0);
15046
15084
  }
15085
+ /**
15086
+ * Returns the note's attachments.
15087
+ *
15088
+ * On the 0.15 surface the full attachment content (the packed words) lives
15089
+ * on the note record itself rather than on `NoteMetadata` (which only
15090
+ * carries the attachment headers). This exposes that content so JS callers
15091
+ * can decode payloads packed via the `createNoteAttachment` helper. An
15092
+ * empty array means the note carries no attachments.
15093
+ * @returns {NoteAttachment[]}
15094
+ */
15095
+ attachments() {
15096
+ const ret = wasm.inputnoterecord_attachments(this.__wbg_ptr);
15097
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
15098
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
15099
+ return v1;
15100
+ }
15047
15101
  /**
15048
15102
  * Returns the note commitment (id + metadata), if available.
15049
15103
  * @returns {Word | undefined}
@@ -15074,12 +15128,16 @@ class InputNoteRecord {
15074
15128
  return NoteDetails.__wrap(ret);
15075
15129
  }
15076
15130
  /**
15077
- * Returns the note ID.
15078
- * @returns {NoteId}
15131
+ * Returns the note ID when available.
15132
+ *
15133
+ * Migration note (miden-client PR #2214): `InputNoteRecord::id()`
15134
+ * returns `Option<NoteId>` — partial / metadata-less notes have no
15135
+ * metadata-bearing ID yet.
15136
+ * @returns {NoteId | undefined}
15079
15137
  */
15080
15138
  id() {
15081
15139
  const ret = wasm.inputnoterecord_id(this.__wbg_ptr);
15082
- return NoteId.__wrap(ret);
15140
+ return ret === 0 ? undefined : NoteId.__wrap(ret);
15083
15141
  }
15084
15142
  /**
15085
15143
  * Returns the inclusion proof when the note is authenticated.
@@ -15122,20 +15180,20 @@ class InputNoteRecord {
15122
15180
  return ret === 0 ? undefined : NoteMetadata.__wrap(ret);
15123
15181
  }
15124
15182
  /**
15125
- * Returns the nullifier for this note.
15126
- * @returns {string}
15183
+ * Returns the nullifier for this note when available.
15184
+ *
15185
+ * Migration note (miden-client PR #2214): `InputNoteRecord::nullifier()`
15186
+ * returns `Option<Nullifier>` — partial notes have no nullifier yet.
15187
+ * @returns {string | undefined}
15127
15188
  */
15128
15189
  nullifier() {
15129
- let deferred1_0;
15130
- let deferred1_1;
15131
- try {
15132
- const ret = wasm.inputnoterecord_nullifier(this.__wbg_ptr);
15133
- deferred1_0 = ret[0];
15134
- deferred1_1 = ret[1];
15135
- return getStringFromWasm0(ret[0], ret[1]);
15136
- } finally {
15137
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
15190
+ const ret = wasm.inputnoterecord_nullifier(this.__wbg_ptr);
15191
+ let v1;
15192
+ if (ret[0] !== 0) {
15193
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
15194
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15138
15195
  }
15196
+ return v1;
15139
15197
  }
15140
15198
  /**
15141
15199
  * Returns the current processing state for this note.
@@ -15706,11 +15764,12 @@ class JsStateSyncUpdate {
15706
15764
  return ret >>> 0;
15707
15765
  }
15708
15766
  /**
15709
- * IDs of note tags that should be removed from the client's local state.
15767
+ * Details-commitment hex of committed notes whose tracking tags
15768
+ * (`NoteTagSource::Note`) should be removed from the client's local state.
15710
15769
  * @returns {string[]}
15711
15770
  */
15712
- get committedNoteIds() {
15713
- const ret = wasm.__wbg_get_jsstatesyncupdate_committedNoteIds(this.__wbg_ptr);
15771
+ get committedNoteTagSources() {
15772
+ const ret = wasm.__wbg_get_jsstatesyncupdate_committedNoteTagSources(this.__wbg_ptr);
15714
15773
  var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
15715
15774
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
15716
15775
  return v1;
@@ -15723,15 +15782,6 @@ class JsStateSyncUpdate {
15723
15782
  const ret = wasm.__wbg_get_jsstatesyncupdate_flattenedNewBlockHeaders(this.__wbg_ptr);
15724
15783
  return FlattenedU8Vec.__wrap(ret);
15725
15784
  }
15726
- /**
15727
- * Flattened byte array containing partial blockchain peaks used for merkle tree
15728
- * verification.
15729
- * @returns {FlattenedU8Vec}
15730
- */
15731
- get flattenedPartialBlockChainPeaks() {
15732
- const ret = wasm.__wbg_get_jsstatesyncupdate_flattenedPartialBlockChainPeaks(this.__wbg_ptr);
15733
- return FlattenedU8Vec.__wrap(ret);
15734
- }
15735
15785
  /**
15736
15786
  * The block numbers corresponding to each header in `flattened_new_block_headers`.
15737
15787
  * This vec should have the same length as the number of headers, with each index
@@ -15744,6 +15794,18 @@ class JsStateSyncUpdate {
15744
15794
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
15745
15795
  return v1;
15746
15796
  }
15797
+ /**
15798
+ * Serialized MMR peaks at the new sync height (single set for the whole update).
15799
+ * Written onto the chain-tip block's `blockHeaders` row (the one whose
15800
+ * `blockNum` matches `block_num`) and read back by `getCurrentBlockchainPeaks`.
15801
+ * @returns {Uint8Array}
15802
+ */
15803
+ get partialBlockchainPeaks() {
15804
+ const ret = wasm.__wbg_get_jsstatesyncupdate_partialBlockchainPeaks(this.__wbg_ptr);
15805
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
15806
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15807
+ return v1;
15808
+ }
15747
15809
  /**
15748
15810
  * Input notes for this state update in serialized form.
15749
15811
  * @returns {SerializedInputNoteData[]}
@@ -15822,13 +15884,14 @@ class JsStateSyncUpdate {
15822
15884
  wasm.__wbg_set_jsstatesyncupdate_blockNum(this.__wbg_ptr, arg0);
15823
15885
  }
15824
15886
  /**
15825
- * IDs of note tags that should be removed from the client's local state.
15887
+ * Details-commitment hex of committed notes whose tracking tags
15888
+ * (`NoteTagSource::Note`) should be removed from the client's local state.
15826
15889
  * @param {string[]} arg0
15827
15890
  */
15828
- set committedNoteIds(arg0) {
15891
+ set committedNoteTagSources(arg0) {
15829
15892
  const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
15830
15893
  const len0 = WASM_VECTOR_LEN;
15831
- wasm.__wbg_set_jsstatesyncupdate_committedNoteIds(this.__wbg_ptr, ptr0, len0);
15894
+ wasm.__wbg_set_jsstatesyncupdate_committedNoteTagSources(this.__wbg_ptr, ptr0, len0);
15832
15895
  }
15833
15896
  /**
15834
15897
  * The new block headers for this state update, serialized into a flattened byte array.
@@ -15839,16 +15902,6 @@ class JsStateSyncUpdate {
15839
15902
  var ptr0 = arg0.__destroy_into_raw();
15840
15903
  wasm.__wbg_set_jsstatesyncupdate_flattenedNewBlockHeaders(this.__wbg_ptr, ptr0);
15841
15904
  }
15842
- /**
15843
- * Flattened byte array containing partial blockchain peaks used for merkle tree
15844
- * verification.
15845
- * @param {FlattenedU8Vec} arg0
15846
- */
15847
- set flattenedPartialBlockChainPeaks(arg0) {
15848
- _assertClass(arg0, FlattenedU8Vec);
15849
- var ptr0 = arg0.__destroy_into_raw();
15850
- wasm.__wbg_set_jsstatesyncupdate_flattenedPartialBlockChainPeaks(this.__wbg_ptr, ptr0);
15851
- }
15852
15905
  /**
15853
15906
  * The block numbers corresponding to each header in `flattened_new_block_headers`.
15854
15907
  * This vec should have the same length as the number of headers, with each index
@@ -15860,6 +15913,17 @@ class JsStateSyncUpdate {
15860
15913
  const len0 = WASM_VECTOR_LEN;
15861
15914
  wasm.__wbg_set_jsstatesyncupdate_newBlockNums(this.__wbg_ptr, ptr0, len0);
15862
15915
  }
15916
+ /**
15917
+ * Serialized MMR peaks at the new sync height (single set for the whole update).
15918
+ * Written onto the chain-tip block's `blockHeaders` row (the one whose
15919
+ * `blockNum` matches `block_num`) and read back by `getCurrentBlockchainPeaks`.
15920
+ * @param {Uint8Array} arg0
15921
+ */
15922
+ set partialBlockchainPeaks(arg0) {
15923
+ const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
15924
+ const len0 = WASM_VECTOR_LEN;
15925
+ wasm.__wbg_set_jsstatesyncupdate_partialBlockchainPeaks(this.__wbg_ptr, ptr0, len0);
15926
+ }
15863
15927
  /**
15864
15928
  * Input notes for this state update in serialized form.
15865
15929
  * @param {SerializedInputNoteData[]} arg0
@@ -16348,6 +16412,76 @@ class NetworkId {
16348
16412
  }
16349
16413
  if (Symbol.dispose) NetworkId.prototype[Symbol.dispose] = NetworkId.prototype.free;
16350
16414
 
16415
+ /**
16416
+ * Status of a network note in the node.
16417
+ */
16418
+ class NetworkNoteStatusInfo {
16419
+ static __wrap(ptr) {
16420
+ ptr = ptr >>> 0;
16421
+ const obj = Object.create(NetworkNoteStatusInfo.prototype);
16422
+ obj.__wbg_ptr = ptr;
16423
+ NetworkNoteStatusInfoFinalization.register(obj, obj.__wbg_ptr, obj);
16424
+ return obj;
16425
+ }
16426
+ __destroy_into_raw() {
16427
+ const ptr = this.__wbg_ptr;
16428
+ this.__wbg_ptr = 0;
16429
+ NetworkNoteStatusInfoFinalization.unregister(this);
16430
+ return ptr;
16431
+ }
16432
+ free() {
16433
+ const ptr = this.__destroy_into_raw();
16434
+ wasm.__wbg_networknotestatusinfo_free(ptr, 0);
16435
+ }
16436
+ /**
16437
+ * Returns the number of processing attempts.
16438
+ * @returns {number}
16439
+ */
16440
+ get attemptCount() {
16441
+ const ret = wasm.networknotestatusinfo_attemptCount(this.__wbg_ptr);
16442
+ return ret >>> 0;
16443
+ }
16444
+ /**
16445
+ * Returns the block number of the last processing attempt, if any.
16446
+ * @returns {number | undefined}
16447
+ */
16448
+ get lastAttemptBlockNum() {
16449
+ const ret = wasm.networknotestatusinfo_lastAttemptBlockNum(this.__wbg_ptr);
16450
+ return ret === 0x100000001 ? undefined : ret;
16451
+ }
16452
+ /**
16453
+ * Returns the last error message, if any.
16454
+ * @returns {string | undefined}
16455
+ */
16456
+ get lastError() {
16457
+ const ret = wasm.networknotestatusinfo_lastError(this.__wbg_ptr);
16458
+ let v1;
16459
+ if (ret[0] !== 0) {
16460
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
16461
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
16462
+ }
16463
+ return v1;
16464
+ }
16465
+ /**
16466
+ * Returns the status as a string: `"Pending"`, `"NullifierInflight"`, `"Discarded"`, or
16467
+ * `"NullifierCommitted"`.
16468
+ * @returns {string}
16469
+ */
16470
+ get status() {
16471
+ let deferred1_0;
16472
+ let deferred1_1;
16473
+ try {
16474
+ const ret = wasm.networknotestatusinfo_status(this.__wbg_ptr);
16475
+ deferred1_0 = ret[0];
16476
+ deferred1_1 = ret[1];
16477
+ return getStringFromWasm0(ret[0], ret[1]);
16478
+ } finally {
16479
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
16480
+ }
16481
+ }
16482
+ }
16483
+ if (Symbol.dispose) NetworkNoteStatusInfo.prototype[Symbol.dispose] = NetworkNoteStatusInfo.prototype.free;
16484
+
16351
16485
  /**
16352
16486
  * The type of a Miden network.
16353
16487
  * @enum {0 | 1 | 2 | 3}
@@ -16411,7 +16545,12 @@ class Note {
16411
16545
  return NoteAssets.__wrap(ret);
16412
16546
  }
16413
16547
  /**
16414
- * Returns the commitment to the note ID and metadata.
16548
+ * Returns the commitment to the note (its ID).
16549
+ *
16550
+ * Migration note (miden-client PR #2214): `Note::commitment()` was
16551
+ * removed on the 0.15 surface — the note ID is the commitment. Return
16552
+ * the underlying `NoteId` as a `Word` so the JS API contract is
16553
+ * unchanged.
16415
16554
  * @returns {Word}
16416
16555
  */
16417
16556
  commitment() {
@@ -16477,7 +16616,7 @@ class Note {
16477
16616
  * @returns {NoteId}
16478
16617
  */
16479
16618
  id() {
16480
- const ret = wasm.accountheader_storageCommitment(this.__wbg_ptr);
16619
+ const ret = wasm.note_commitment(this.__wbg_ptr);
16481
16620
  return NoteId.__wrap(ret);
16482
16621
  }
16483
16622
  /**
@@ -16485,11 +16624,15 @@ class Note {
16485
16624
  * @returns {NoteMetadata}
16486
16625
  */
16487
16626
  metadata() {
16488
- const ret = wasm.note_metadata(this.__wbg_ptr);
16627
+ const ret = wasm.committednote_metadata(this.__wbg_ptr);
16489
16628
  return NoteMetadata.__wrap(ret);
16490
16629
  }
16491
16630
  /**
16492
16631
  * Creates a new note from the provided assets, metadata, and recipient.
16632
+ *
16633
+ * Migration note (miden-client PR #2214): `Note::new` now takes a
16634
+ * `PartialNoteMetadata` (not `NoteMetadata`). Extract the partial
16635
+ * fields from the JS-side `NoteMetadata` and reconstruct.
16493
16636
  * @param {NoteAssets} note_assets
16494
16637
  * @param {NoteMetadata} note_metadata
16495
16638
  * @param {NoteRecipient} note_recipient
@@ -16638,18 +16781,13 @@ class NoteAndArgsArray {
16638
16781
  wasm.noteandargsarray_push(this.__wbg_ptr, element.__wbg_ptr);
16639
16782
  }
16640
16783
  /**
16641
- * Replace the element at `index`. Borrows + clones the input
16642
- * (mirrors `push`), so the caller's JS handle remains valid
16643
- * after the call. Without this borrow, passing `elem` by
16644
- * value would move the underlying Rust value out of the
16645
- * caller's JS handle and any subsequent method on it would
16646
- * panic with `"null pointer passed to rust"`.
16647
16784
  * @param {number} index
16648
16785
  * @param {NoteAndArgs} elem
16649
16786
  */
16650
16787
  replaceAt(index, elem) {
16651
16788
  _assertClass(elem, NoteAndArgs);
16652
- const ret = wasm.noteandargsarray_replaceAt(this.__wbg_ptr, index, elem.__wbg_ptr);
16789
+ var ptr0 = elem.__destroy_into_raw();
16790
+ const ret = wasm.noteandargsarray_replaceAt(this.__wbg_ptr, index, ptr0);
16653
16791
  if (ret[1]) {
16654
16792
  throw takeFromExternrefTable0(ret[0]);
16655
16793
  }
@@ -16713,18 +16851,13 @@ class NoteArray {
16713
16851
  wasm.notearray_push(this.__wbg_ptr, element.__wbg_ptr);
16714
16852
  }
16715
16853
  /**
16716
- * Replace the element at `index`. Borrows + clones the input
16717
- * (mirrors `push`), so the caller's JS handle remains valid
16718
- * after the call. Without this borrow, passing `elem` by
16719
- * value would move the underlying Rust value out of the
16720
- * caller's JS handle and any subsequent method on it would
16721
- * panic with `"null pointer passed to rust"`.
16722
16854
  * @param {number} index
16723
16855
  * @param {Note} elem
16724
16856
  */
16725
16857
  replaceAt(index, elem) {
16726
16858
  _assertClass(elem, Note);
16727
- const ret = wasm.notearray_replaceAt(this.__wbg_ptr, index, elem.__wbg_ptr);
16859
+ var ptr0 = elem.__destroy_into_raw();
16860
+ const ret = wasm.notearray_replaceAt(this.__wbg_ptr, index, ptr0);
16728
16861
  if (ret[1]) {
16729
16862
  throw takeFromExternrefTable0(ret[0]);
16730
16863
  }
@@ -16796,9 +16929,13 @@ if (Symbol.dispose) NoteAssets.prototype[Symbol.dispose] = NoteAssets.prototype.
16796
16929
  /**
16797
16930
  * An attachment to a note.
16798
16931
  *
16799
- * Note attachments provide additional context about how notes should be processed.
16800
- * For example, a network account target attachment indicates that the note should
16801
- * be consumed by a specific network account.
16932
+ * 0.15 protocol surface: an attachment is a `(scheme, content)` pair where
16933
+ * `content` is a flat `Vec<Word>` of 1..=256 words. The previous
16934
+ * `NoteAttachmentKind { Word, Array }` dispatch and the per-variant
16935
+ * `asWord` / `asArray` / `newWord` / `newArray` getters/constructors no
16936
+ * longer exist — content is always word-vector-shaped now. Use
16937
+ * `fromWord(scheme, word)` for the common single-word case or
16938
+ * `fromWords(scheme, words)` for multi-word content.
16802
16939
  */
16803
16940
  class NoteAttachment {
16804
16941
  static __wrap(ptr) {
@@ -16818,30 +16955,6 @@ class NoteAttachment {
16818
16955
  const ptr = this.__destroy_into_raw();
16819
16956
  wasm.__wbg_noteattachment_free(ptr, 0);
16820
16957
  }
16821
- /**
16822
- * Returns the content as an array of Felts if the attachment kind is Array, otherwise None.
16823
- * @returns {FeltArray | undefined}
16824
- */
16825
- asArray() {
16826
- const ret = wasm.noteattachment_asArray(this.__wbg_ptr);
16827
- return ret === 0 ? undefined : FeltArray.__wrap(ret);
16828
- }
16829
- /**
16830
- * Returns the content as a Word if the attachment kind is Word, otherwise None.
16831
- * @returns {Word | undefined}
16832
- */
16833
- asWord() {
16834
- const ret = wasm.noteattachment_asWord(this.__wbg_ptr);
16835
- return ret === 0 ? undefined : Word.__wrap(ret);
16836
- }
16837
- /**
16838
- * Returns the attachment kind.
16839
- * @returns {NoteAttachmentKind}
16840
- */
16841
- attachmentKind() {
16842
- const ret = wasm.noteattachment_attachmentKind(this.__wbg_ptr);
16843
- return ret;
16844
- }
16845
16958
  /**
16846
16959
  * Returns the attachment scheme.
16847
16960
  * @returns {NoteAttachmentScheme}
@@ -16851,80 +16964,90 @@ class NoteAttachment {
16851
16964
  return NoteAttachmentScheme.__wrap(ret);
16852
16965
  }
16853
16966
  /**
16854
- * Creates a default (empty) note attachment.
16855
- */
16856
- constructor() {
16857
- const ret = wasm.noteattachment_new();
16858
- this.__wbg_ptr = ret >>> 0;
16859
- NoteAttachmentFinalization.register(this, this.__wbg_ptr, this);
16860
- return this;
16861
- }
16862
- /**
16863
- * Creates a new note attachment with Array content from the provided elements.
16967
+ * Creates a new note attachment from a single word.
16864
16968
  * @param {NoteAttachmentScheme} scheme
16865
- * @param {FeltArray} elements
16969
+ * @param {Word} word
16866
16970
  * @returns {NoteAttachment}
16867
16971
  */
16868
- static newArray(scheme, elements) {
16972
+ static fromWord(scheme, word) {
16869
16973
  _assertClass(scheme, NoteAttachmentScheme);
16870
- _assertClass(elements, FeltArray);
16871
- const ret = wasm.noteattachment_newArray(scheme.__wbg_ptr, elements.__wbg_ptr);
16872
- if (ret[2]) {
16873
- throw takeFromExternrefTable0(ret[1]);
16974
+ _assertClass(word, Word);
16975
+ const ret = wasm.noteattachment_fromWord(scheme.__wbg_ptr, word.__wbg_ptr);
16976
+ return NoteAttachment.__wrap(ret);
16977
+ }
16978
+ /**
16979
+ * Creates a new note attachment from a vector of words.
16980
+ *
16981
+ * # Errors
16982
+ * Returns an error if `words` is empty or exceeds `NoteAttachment::MAX_NUM_WORDS`.
16983
+ * @param {NoteAttachmentScheme} scheme
16984
+ * @param {Word[]} words
16985
+ * @returns {NoteAttachment}
16986
+ */
16987
+ static fromWords(scheme, words) {
16988
+ _assertClass(scheme, NoteAttachmentScheme);
16989
+ const ptr0 = passArrayJsValueToWasm0(words, wasm.__wbindgen_malloc);
16990
+ const len0 = WASM_VECTOR_LEN;
16991
+ const ret = wasm.noteattachment_fromWords(scheme.__wbg_ptr, ptr0, len0);
16992
+ if (ret[2]) {
16993
+ throw takeFromExternrefTable0(ret[1]);
16874
16994
  }
16875
16995
  return NoteAttachment.__wrap(ret[0]);
16876
16996
  }
16877
16997
  /**
16878
- * Creates a new note attachment for a network account target.
16879
- *
16880
- * This attachment indicates that the note should be consumed by a specific network account.
16881
- * Network accounts are accounts whose storage mode is `Network`, meaning the network (nodes)
16882
- * can execute transactions on behalf of the account.
16998
+ * Creates a note attachment from an optional list of packed values.
16883
16999
  *
16884
- * # Arguments
16885
- * * `target_id` - The ID of the network account that should consume the note
16886
- * * `exec_hint` - A hint about when the note can be executed
17000
+ * Mirrors the encoding the JS-side `createNoteAttachment` helper performs
17001
+ * and preserves the `new NoteAttachment()` / `new NoteAttachment([...])`
17002
+ * ergonomics the package's own JS wrappers (`js/standalone.js`,
17003
+ * `js/resources/transactions.js`) rely on. The 0.15 surface has no truly
17004
+ * empty attachment (content is 1..=256 words), so the empty case is
17005
+ * represented as a single zero [`Word`] with the `none` scheme:
17006
+ * - no args / empty list → single zero-`Word`, `none` scheme.
17007
+ * - any number of values → padded to a whole number of `Word`s, `none` scheme.
16887
17008
  *
16888
17009
  * # Errors
16889
- * Returns an error if the target account is not a network account.
16890
- * @param {AccountId} target_id
16891
- * @param {NoteExecutionHint} exec_hint
16892
- * @returns {NoteAttachment}
17010
+ * Returns an error if a value is not a canonical field element, or if the
17011
+ * packed word count exceeds `NoteAttachment::MAX_NUM_WORDS`.
17012
+ * @param {BigUint64Array | null} [values]
16893
17013
  */
16894
- static newNetworkAccountTarget(target_id, exec_hint) {
16895
- _assertClass(target_id, AccountId);
16896
- _assertClass(exec_hint, NoteExecutionHint);
16897
- const ret = wasm.noteattachment_newNetworkAccountTarget(target_id.__wbg_ptr, exec_hint.__wbg_ptr);
17014
+ constructor(values) {
17015
+ var ptr0 = isLikeNone(values) ? 0 : passArray64ToWasm0(values, wasm.__wbindgen_malloc);
17016
+ var len0 = WASM_VECTOR_LEN;
17017
+ const ret = wasm.noteattachment_new(ptr0, len0);
16898
17018
  if (ret[2]) {
16899
17019
  throw takeFromExternrefTable0(ret[1]);
16900
17020
  }
16901
- return NoteAttachment.__wrap(ret[0]);
17021
+ this.__wbg_ptr = ret[0] >>> 0;
17022
+ NoteAttachmentFinalization.register(this, this.__wbg_ptr, this);
17023
+ return this;
16902
17024
  }
16903
17025
  /**
16904
- * Creates a new note attachment with Word content from the provided word.
16905
- * @param {NoteAttachmentScheme} scheme
16906
- * @param {Word} word
16907
- * @returns {NoteAttachment}
17026
+ * Returns the number of words in this attachment.
17027
+ * @returns {number}
16908
17028
  */
16909
- static newWord(scheme, word) {
16910
- _assertClass(scheme, NoteAttachmentScheme);
16911
- _assertClass(word, Word);
16912
- const ret = wasm.noteattachment_newWord(scheme.__wbg_ptr, word.__wbg_ptr);
16913
- return NoteAttachment.__wrap(ret);
17029
+ numWords() {
17030
+ const ret = wasm.noteattachment_numWords(this.__wbg_ptr);
17031
+ return ret;
17032
+ }
17033
+ /**
17034
+ * Returns the attachment content as its constituent words.
17035
+ *
17036
+ * The content is always word-vector-shaped on the 0.15 surface, so this is
17037
+ * the inverse of `fromWord` / `fromWords`: it yields the same `Word`s the
17038
+ * attachment was built from (in order), letting JS callers decode the
17039
+ * packed values back out.
17040
+ * @returns {Word[]}
17041
+ */
17042
+ toWords() {
17043
+ const ret = wasm.noteattachment_toWords(this.__wbg_ptr);
17044
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
17045
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
17046
+ return v1;
16914
17047
  }
16915
17048
  }
16916
17049
  if (Symbol.dispose) NoteAttachment.prototype[Symbol.dispose] = NoteAttachment.prototype.free;
16917
17050
 
16918
- /**
16919
- * Defines the payload shape of a note attachment.
16920
- * @enum {0 | 1 | 2}
16921
- */
16922
- const NoteAttachmentKind = Object.freeze({
16923
- None: 0, "0": "None",
16924
- Word: 1, "1": "Word",
16925
- Array: 2, "2": "Array",
16926
- });
16927
-
16928
17051
  /**
16929
17052
  * Describes the type of a note attachment.
16930
17053
  *
@@ -16949,14 +17072,6 @@ class NoteAttachmentScheme {
16949
17072
  const ptr = this.__destroy_into_raw();
16950
17073
  wasm.__wbg_noteattachmentscheme_free(ptr, 0);
16951
17074
  }
16952
- /**
16953
- * Returns the note attachment scheme as a u32.
16954
- * @returns {number}
16955
- */
16956
- asU32() {
16957
- const ret = wasm.noteattachmentscheme_asU32(this.__wbg_ptr);
16958
- return ret >>> 0;
16959
- }
16960
17075
  /**
16961
17076
  * Returns true if the attachment scheme is the reserved value that signals an absent scheme.
16962
17077
  * @returns {boolean}
@@ -16966,12 +17081,19 @@ class NoteAttachmentScheme {
16966
17081
  return ret !== 0;
16967
17082
  }
16968
17083
  /**
16969
- * Creates a new `NoteAttachmentScheme` from a u32.
17084
+ * Creates a new `NoteAttachmentScheme` from a u32 value.
17085
+ *
17086
+ * Errors if `scheme` is out of range (the 0.15 surface narrowed the
17087
+ * underlying type from u32 → u16, so values outside `0..=u16::MAX`
17088
+ * are rejected).
16970
17089
  * @param {number} scheme
16971
17090
  */
16972
17091
  constructor(scheme) {
16973
17092
  const ret = wasm.noteattachmentscheme_new(scheme);
16974
- this.__wbg_ptr = ret >>> 0;
17093
+ if (ret[2]) {
17094
+ throw takeFromExternrefTable0(ret[1]);
17095
+ }
17096
+ this.__wbg_ptr = ret[0] >>> 0;
16975
17097
  NoteAttachmentSchemeFinalization.register(this, this.__wbg_ptr, this);
16976
17098
  return this;
16977
17099
  }
@@ -17111,6 +17233,14 @@ if (Symbol.dispose) NoteConsumptionStatus.prototype[Symbol.dispose] = NoteConsum
17111
17233
  * Details of a note consisting of assets, script, inputs, and a serial number.
17112
17234
  *
17113
17235
  * See the {@link Note} type for more details.
17236
+ *
17237
+ * Migration note (miden-client PR #2214): `NoteDetails::id()` and
17238
+ * `NoteDetails::nullifier()` were removed on the 0.15 protocol surface —
17239
+ * the ID now requires a `NoteMetadata` to compute (see `NoteId::new`),
17240
+ * and the nullifier moved onto `InputNoteRecord` where it is optional.
17241
+ * Use `details_commitment()` on a containing record (e.g.
17242
+ * `InputNoteRecord::details_commitment`) for the metadata-independent
17243
+ * identifier.
17114
17244
  */
17115
17245
  class NoteDetails {
17116
17246
  static __wrap(ptr) {
@@ -17138,14 +17268,6 @@ class NoteDetails {
17138
17268
  const ret = wasm.notedetails_assets(this.__wbg_ptr);
17139
17269
  return NoteAssets.__wrap(ret);
17140
17270
  }
17141
- /**
17142
- * Returns the note identifier derived from these details.
17143
- * @returns {NoteId}
17144
- */
17145
- id() {
17146
- const ret = wasm.notedetails_id(this.__wbg_ptr);
17147
- return NoteId.__wrap(ret);
17148
- }
17149
17271
  /**
17150
17272
  * Creates a new set of note details from the given assets and recipient.
17151
17273
  * @param {NoteAssets} note_assets
@@ -17159,14 +17281,6 @@ class NoteDetails {
17159
17281
  NoteDetailsFinalization.register(this, this.__wbg_ptr, this);
17160
17282
  return this;
17161
17283
  }
17162
- /**
17163
- * Returns the note nullifier as a word.
17164
- * @returns {Word}
17165
- */
17166
- nullifier() {
17167
- const ret = wasm.notedetails_nullifier(this.__wbg_ptr);
17168
- return Word.__wrap(ret);
17169
- }
17170
17284
  /**
17171
17285
  * Returns the recipient which controls when the note can be consumed.
17172
17286
  * @returns {NoteRecipient}
@@ -17295,18 +17409,13 @@ class NoteDetailsAndTagArray {
17295
17409
  wasm.notedetailsandtagarray_push(this.__wbg_ptr, element.__wbg_ptr);
17296
17410
  }
17297
17411
  /**
17298
- * Replace the element at `index`. Borrows + clones the input
17299
- * (mirrors `push`), so the caller's JS handle remains valid
17300
- * after the call. Without this borrow, passing `elem` by
17301
- * value would move the underlying Rust value out of the
17302
- * caller's JS handle and any subsequent method on it would
17303
- * panic with `"null pointer passed to rust"`.
17304
17412
  * @param {number} index
17305
17413
  * @param {NoteDetailsAndTag} elem
17306
17414
  */
17307
17415
  replaceAt(index, elem) {
17308
17416
  _assertClass(elem, NoteDetailsAndTag);
17309
- const ret = wasm.notedetailsandtagarray_replaceAt(this.__wbg_ptr, index, elem.__wbg_ptr);
17417
+ var ptr0 = elem.__destroy_into_raw();
17418
+ const ret = wasm.notedetailsandtagarray_replaceAt(this.__wbg_ptr, index, ptr0);
17310
17419
  if (ret[1]) {
17311
17420
  throw takeFromExternrefTable0(ret[0]);
17312
17421
  }
@@ -17524,12 +17633,17 @@ class NoteFile {
17524
17633
  return ret === 0 ? undefined : NoteDetails.__wrap(ret);
17525
17634
  }
17526
17635
  /**
17527
- * Returns the note ID for any `NoteFile` variant.
17528
- * @returns {NoteId}
17636
+ * Returns the note ID when the file carries one.
17637
+ *
17638
+ * Migration note (miden-client PR #2214): `NoteDetails::id()` was
17639
+ * removed (computing the ID now requires `NoteMetadata`), so the
17640
+ * `NoteDetails`-only variant cannot synthesize one without extra
17641
+ * information. Returns `None` in that case.
17642
+ * @returns {NoteId | undefined}
17529
17643
  */
17530
17644
  noteId() {
17531
17645
  const ret = wasm.notefile_noteId(this.__wbg_ptr);
17532
- return NoteId.__wrap(ret);
17646
+ return ret === 0 ? undefined : NoteId.__wrap(ret);
17533
17647
  }
17534
17648
  /**
17535
17649
  * Returns the note tag hint when present.
@@ -17557,6 +17671,10 @@ class NoteFile {
17557
17671
  }
17558
17672
  /**
17559
17673
  * Returns the note nullifier when present.
17674
+ *
17675
+ * Migration note (miden-client PR #2214): `NoteDetails::nullifier()`
17676
+ * was removed (the nullifier moved onto `InputNoteRecord` and is
17677
+ * optional there), so the `NoteDetails`-only variant returns `None`.
17560
17678
  * @returns {string | undefined}
17561
17679
  */
17562
17680
  nullifier() {
@@ -17632,13 +17750,6 @@ const NoteFilterTypes = Object.freeze({
17632
17750
  * See `NoteId` and `NoteMetadata` for additional details.
17633
17751
  */
17634
17752
  class NoteHeader {
17635
- static __wrap(ptr) {
17636
- ptr = ptr >>> 0;
17637
- const obj = Object.create(NoteHeader.prototype);
17638
- obj.__wbg_ptr = ptr;
17639
- NoteHeaderFinalization.register(obj, obj.__wbg_ptr, obj);
17640
- return obj;
17641
- }
17642
17753
  __destroy_into_raw() {
17643
17754
  const ptr = this.__wbg_ptr;
17644
17755
  this.__wbg_ptr = 0;
@@ -17654,7 +17765,7 @@ class NoteHeader {
17654
17765
  * @returns {NoteId}
17655
17766
  */
17656
17767
  id() {
17657
- const ret = wasm.accountcode_commitment(this.__wbg_ptr);
17768
+ const ret = wasm.noteheader_id(this.__wbg_ptr);
17658
17769
  return NoteId.__wrap(ret);
17659
17770
  }
17660
17771
  /**
@@ -17665,14 +17776,6 @@ class NoteHeader {
17665
17776
  const ret = wasm.noteheader_metadata(this.__wbg_ptr);
17666
17777
  return NoteMetadata.__wrap(ret);
17667
17778
  }
17668
- /**
17669
- * Returns a commitment to the note ID and metadata.
17670
- * @returns {Word}
17671
- */
17672
- toCommitment() {
17673
- const ret = wasm.noteheader_toCommitment(this.__wbg_ptr);
17674
- return Word.__wrap(ret);
17675
- }
17676
17779
  }
17677
17780
  if (Symbol.dispose) NoteHeader.prototype[Symbol.dispose] = NoteHeader.prototype.free;
17678
17781
 
@@ -17681,16 +17784,14 @@ if (Symbol.dispose) NoteHeader.prototype[Symbol.dispose] = NoteHeader.prototype.
17681
17784
  *
17682
17785
  * Note ID is computed as:
17683
17786
  *
17684
- * > `hash(recipient, asset_commitment)`
17787
+ * > `hash(details_commitment, metadata_commitment)`
17685
17788
  *
17686
- * where `recipient` is defined as:
17687
- *
17688
- * > `hash(hash(hash(serial_num, ZERO), script_root), input_commitment)`
17689
- *
17690
- * This achieves the following properties:
17691
- * - Every note can be reduced to a single unique ID.
17692
- * - To compute a note ID, we do not need to know the note's `serial_num`. Knowing the hash of the
17693
- * `serial_num` (as well as script root, input commitment, and note assets) is sufficient.
17789
+ * On the 0.15 protocol surface the upstream `NoteId::new` signature
17790
+ * changed from `(recipient_digest, asset_commitment)` to
17791
+ * `(NoteDetailsCommitment, &NoteMetadata)`. The JS API exposes
17792
+ * `NoteId.fromRaw(word)` for constructing an ID from a pre-computed
17793
+ * 32-byte commitment word (the previous two-Word constructor has no
17794
+ * 0.15 equivalent).
17694
17795
  */
17695
17796
  class NoteId {
17696
17797
  static __wrap(ptr) {
@@ -17731,17 +17832,18 @@ class NoteId {
17731
17832
  return NoteId.__wrap(ret[0]);
17732
17833
  }
17733
17834
  /**
17734
- * Builds a note ID from the recipient and asset commitments.
17735
- * @param {Word} recipient_digest
17736
- * @param {Word} asset_commitment_digest
17835
+ * Builds a note ID from its raw commitment word.
17836
+ *
17837
+ * `word` must already encode the final note-ID commitment — the
17838
+ * metadata-mixing that the previous 2-Word constructor did is no
17839
+ * longer part of the protocol surface.
17840
+ * @param {Word} word
17841
+ * @returns {NoteId}
17737
17842
  */
17738
- constructor(recipient_digest, asset_commitment_digest) {
17739
- _assertClass(recipient_digest, Word);
17740
- _assertClass(asset_commitment_digest, Word);
17741
- const ret = wasm.noteid_new(recipient_digest.__wbg_ptr, asset_commitment_digest.__wbg_ptr);
17742
- this.__wbg_ptr = ret >>> 0;
17743
- NoteIdFinalization.register(this, this.__wbg_ptr, this);
17744
- return this;
17843
+ static fromRaw(word) {
17844
+ _assertClass(word, Word);
17845
+ const ret = wasm.accountcode_commitment(word.__wbg_ptr);
17846
+ return NoteId.__wrap(ret);
17745
17847
  }
17746
17848
  /**
17747
17849
  * Returns the canonical hex representation of the note ID.
@@ -17866,18 +17968,13 @@ class NoteIdAndArgsArray {
17866
17968
  wasm.noteidandargsarray_push(this.__wbg_ptr, element.__wbg_ptr);
17867
17969
  }
17868
17970
  /**
17869
- * Replace the element at `index`. Borrows + clones the input
17870
- * (mirrors `push`), so the caller's JS handle remains valid
17871
- * after the call. Without this borrow, passing `elem` by
17872
- * value would move the underlying Rust value out of the
17873
- * caller's JS handle and any subsequent method on it would
17874
- * panic with `"null pointer passed to rust"`.
17875
17971
  * @param {number} index
17876
17972
  * @param {NoteIdAndArgs} elem
17877
17973
  */
17878
17974
  replaceAt(index, elem) {
17879
17975
  _assertClass(elem, NoteIdAndArgs);
17880
- const ret = wasm.noteidandargsarray_replaceAt(this.__wbg_ptr, index, elem.__wbg_ptr);
17976
+ var ptr0 = elem.__destroy_into_raw();
17977
+ const ret = wasm.noteidandargsarray_replaceAt(this.__wbg_ptr, index, ptr0);
17881
17978
  if (ret[1]) {
17882
17979
  throw takeFromExternrefTable0(ret[0]);
17883
17980
  }
@@ -17959,7 +18056,7 @@ class NoteLocation {
17959
18056
  * @returns {number}
17960
18057
  */
17961
18058
  blockNum() {
17962
- const ret = wasm.noteattachmentscheme_asU32(this.__wbg_ptr);
18059
+ const ret = wasm.notelocation_blockNum(this.__wbg_ptr);
17963
18060
  return ret >>> 0;
17964
18061
  }
17965
18062
  }
@@ -17968,8 +18065,13 @@ if (Symbol.dispose) NoteLocation.prototype[Symbol.dispose] = NoteLocation.protot
17968
18065
  /**
17969
18066
  * Metadata associated with a note.
17970
18067
  *
17971
- * This metadata includes the sender, note type, tag, and an optional attachment.
17972
- * Attachments provide additional context about how notes should be processed.
18068
+ * 0.15 protocol surface: `NoteMetadata` is now constructed from a
18069
+ * [`PartialNoteMetadata`] (sender / `note_type` / tag) plus a `NoteAttachments`
18070
+ * collection — the previous `with_tag` / `with_attachment` / `attachment`
18071
+ * methods on `NoteMetadata` were moved (`with_tag` lives on
18072
+ * `PartialNoteMetadata`) or removed (`with_attachment` / `attachment`).
18073
+ * The JS constructor narrows back to the common case of an
18074
+ * attachment-less metadata.
17973
18075
  */
17974
18076
  class NoteMetadata {
17975
18077
  static __wrap(ptr) {
@@ -17990,15 +18092,7 @@ class NoteMetadata {
17990
18092
  wasm.__wbg_notemetadata_free(ptr, 0);
17991
18093
  }
17992
18094
  /**
17993
- * Returns the attachment of the note.
17994
- * @returns {NoteAttachment}
17995
- */
17996
- attachment() {
17997
- const ret = wasm.notemetadata_attachment(this.__wbg_ptr);
17998
- return NoteAttachment.__wrap(ret);
17999
- }
18000
- /**
18001
- * Creates metadata for a note.
18095
+ * Creates metadata for a note with no attachments.
18002
18096
  * @param {AccountId} sender
18003
18097
  * @param {NoteType} note_type
18004
18098
  * @param {NoteTag} note_tag
@@ -18024,7 +18118,7 @@ class NoteMetadata {
18024
18118
  * @returns {AccountId}
18025
18119
  */
18026
18120
  sender() {
18027
- const ret = wasm.accountdelta_id(this.__wbg_ptr);
18121
+ const ret = wasm.notemetadata_sender(this.__wbg_ptr);
18028
18122
  return AccountId.__wrap(ret);
18029
18123
  }
18030
18124
  /**
@@ -18035,30 +18129,6 @@ class NoteMetadata {
18035
18129
  const ret = wasm.notemetadata_tag(this.__wbg_ptr);
18036
18130
  return NoteTag.__wrap(ret);
18037
18131
  }
18038
- /**
18039
- * Adds an attachment to this metadata and returns the updated metadata.
18040
- *
18041
- * Attachments provide additional context about how notes should be processed.
18042
- * For example, a `NetworkAccountTarget` attachment indicates that the note
18043
- * should be consumed by a specific network account.
18044
- * @param {NoteAttachment} attachment
18045
- * @returns {NoteMetadata}
18046
- */
18047
- withAttachment(attachment) {
18048
- _assertClass(attachment, NoteAttachment);
18049
- const ret = wasm.notemetadata_withAttachment(this.__wbg_ptr, attachment.__wbg_ptr);
18050
- return NoteMetadata.__wrap(ret);
18051
- }
18052
- /**
18053
- * Sets the tag for this metadata and returns the updated metadata.
18054
- * @param {NoteTag} tag
18055
- * @returns {NoteMetadata}
18056
- */
18057
- withTag(tag) {
18058
- _assertClass(tag, NoteTag);
18059
- const ret = wasm.notemetadata_withTag(this.__wbg_ptr, tag.__wbg_ptr);
18060
- return NoteMetadata.__wrap(ret);
18061
- }
18062
18132
  }
18063
18133
  if (Symbol.dispose) NoteMetadata.prototype[Symbol.dispose] = NoteMetadata.prototype.free;
18064
18134
 
@@ -18203,18 +18273,13 @@ class NoteRecipientArray {
18203
18273
  wasm.noterecipientarray_push(this.__wbg_ptr, element.__wbg_ptr);
18204
18274
  }
18205
18275
  /**
18206
- * Replace the element at `index`. Borrows + clones the input
18207
- * (mirrors `push`), so the caller's JS handle remains valid
18208
- * after the call. Without this borrow, passing `elem` by
18209
- * value would move the underlying Rust value out of the
18210
- * caller's JS handle and any subsequent method on it would
18211
- * panic with `"null pointer passed to rust"`.
18212
18276
  * @param {number} index
18213
18277
  * @param {NoteRecipient} elem
18214
18278
  */
18215
18279
  replaceAt(index, elem) {
18216
18280
  _assertClass(elem, NoteRecipient);
18217
- const ret = wasm.noterecipientarray_replaceAt(this.__wbg_ptr, index, elem.__wbg_ptr);
18281
+ var ptr0 = elem.__destroy_into_raw();
18282
+ const ret = wasm.noterecipientarray_replaceAt(this.__wbg_ptr, index, ptr0);
18218
18283
  if (ret[1]) {
18219
18284
  throw takeFromExternrefTable0(ret[0]);
18220
18285
  }
@@ -18375,7 +18440,8 @@ class NoteStorage {
18375
18440
  */
18376
18441
  constructor(felt_array) {
18377
18442
  _assertClass(felt_array, FeltArray);
18378
- const ret = wasm.notestorage_new(felt_array.__wbg_ptr);
18443
+ var ptr0 = felt_array.__destroy_into_raw();
18444
+ const ret = wasm.notestorage_new(ptr0);
18379
18445
  if (ret[2]) {
18380
18446
  throw takeFromExternrefTable0(ret[1]);
18381
18447
  }
@@ -18387,7 +18453,7 @@ class NoteStorage {
18387
18453
  if (Symbol.dispose) NoteStorage.prototype[Symbol.dispose] = NoteStorage.prototype.free;
18388
18454
 
18389
18455
  /**
18390
- * Represents a single block's worth of note sync data.
18456
+ * Represents a single block's worth of note sync data returned by `syncNotes`.
18391
18457
  */
18392
18458
  class NoteSyncBlock {
18393
18459
  static __wrap(ptr) {
@@ -18437,7 +18503,12 @@ class NoteSyncBlock {
18437
18503
  if (Symbol.dispose) NoteSyncBlock.prototype[Symbol.dispose] = NoteSyncBlock.prototype.free;
18438
18504
 
18439
18505
  /**
18440
- * Represents the response data from `syncNotes`.
18506
+ * Aggregates the response data from `syncNotes`: the per-block updates plus
18507
+ * the upper bound of the requested range.
18508
+ *
18509
+ * The previous `chain_tip` accessor is gone — the upstream `sync_notes` RPC
18510
+ * no longer returns the current chain tip on this endpoint. Use the
18511
+ * regular state-sync flow (`syncState`) for the latest synced height.
18441
18512
  */
18442
18513
  class NoteSyncInfo {
18443
18514
  static __wrap(ptr) {
@@ -18458,7 +18529,9 @@ class NoteSyncInfo {
18458
18529
  wasm.__wbg_notesyncinfo_free(ptr, 0);
18459
18530
  }
18460
18531
  /**
18461
- * Returns the first block header associated with matching notes, if any.
18532
+ * Returns the first block header with matching notes, if any. Convenience
18533
+ * for callers that only requested a single tag and want the most recent
18534
+ * inclusion block.
18462
18535
  * @returns {BlockHeader | undefined}
18463
18536
  */
18464
18537
  blockHeader() {
@@ -18466,15 +18539,16 @@ class NoteSyncInfo {
18466
18539
  return ret === 0 ? undefined : BlockHeader.__wrap(ret);
18467
18540
  }
18468
18541
  /**
18469
- * Returns the last block checked by the node. Used as a cursor for pagination.
18542
+ * Returns the upper bound of the block range scanned in this call (the
18543
+ * `blockTo` argument passed to `syncNotes`).
18470
18544
  * @returns {number}
18471
18545
  */
18472
18546
  blockTo() {
18473
- const ret = wasm.notesyncinfo_blockTo(this.__wbg_ptr);
18547
+ const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
18474
18548
  return ret >>> 0;
18475
18549
  }
18476
18550
  /**
18477
- * Returns the blocks containing matching notes.
18551
+ * Returns the per-block breakdown.
18478
18552
  * @returns {NoteSyncBlock[]}
18479
18553
  */
18480
18554
  blocks() {
@@ -18484,15 +18558,7 @@ class NoteSyncInfo {
18484
18558
  return v1;
18485
18559
  }
18486
18560
  /**
18487
- * Returns the latest block number in the chain.
18488
- * @returns {number}
18489
- */
18490
- chainTip() {
18491
- const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
18492
- return ret >>> 0;
18493
- }
18494
- /**
18495
- * Returns the first block MMR path associated with matching notes, if any.
18561
+ * Returns the MMR path of the first block with matching notes, if any.
18496
18562
  * @returns {MerklePath | undefined}
18497
18563
  */
18498
18564
  mmrPath() {
@@ -18500,7 +18566,7 @@ class NoteSyncInfo {
18500
18566
  return ret === 0 ? undefined : MerklePath.__wrap(ret);
18501
18567
  }
18502
18568
  /**
18503
- * Returns the committed notes across all matching blocks.
18569
+ * Returns every committed note across all matching blocks (flattened).
18504
18570
  * @returns {CommittedNote[]}
18505
18571
  */
18506
18572
  notes() {
@@ -18547,7 +18613,7 @@ class NoteTag {
18547
18613
  * @returns {number}
18548
18614
  */
18549
18615
  asU32() {
18550
- const ret = wasm.noteattachmentscheme_asU32(this.__wbg_ptr);
18616
+ const ret = wasm.notelocation_blockNum(this.__wbg_ptr);
18551
18617
  return ret >>> 0;
18552
18618
  }
18553
18619
  /**
@@ -18555,7 +18621,7 @@ class NoteTag {
18555
18621
  * @param {number} tag
18556
18622
  */
18557
18623
  constructor(tag) {
18558
- const ret = wasm.noteattachmentscheme_new(tag);
18624
+ const ret = wasm.notetag_new(tag);
18559
18625
  this.__wbg_ptr = ret >>> 0;
18560
18626
  NoteTagFinalization.register(this, this.__wbg_ptr, this);
18561
18627
  return this;
@@ -18660,8 +18726,7 @@ class OutputNote {
18660
18726
  * @returns {Note | undefined}
18661
18727
  */
18662
18728
  intoFull() {
18663
- const ptr = this.__destroy_into_raw();
18664
- const ret = wasm.outputnote_intoFull(ptr);
18729
+ const ret = wasm.outputnote_intoFull(this.__wbg_ptr);
18665
18730
  return ret === 0 ? undefined : Note.__wrap(ret);
18666
18731
  }
18667
18732
  /**
@@ -18669,7 +18734,7 @@ class OutputNote {
18669
18734
  * @returns {NoteMetadata}
18670
18735
  */
18671
18736
  metadata() {
18672
- const ret = wasm.outputnote_metadata(this.__wbg_ptr);
18737
+ const ret = wasm.committednote_metadata(this.__wbg_ptr);
18673
18738
  return NoteMetadata.__wrap(ret);
18674
18739
  }
18675
18740
  /**
@@ -18749,18 +18814,13 @@ class OutputNoteArray {
18749
18814
  wasm.outputnotearray_push(this.__wbg_ptr, element.__wbg_ptr);
18750
18815
  }
18751
18816
  /**
18752
- * Replace the element at `index`. Borrows + clones the input
18753
- * (mirrors `push`), so the caller's JS handle remains valid
18754
- * after the call. Without this borrow, passing `elem` by
18755
- * value would move the underlying Rust value out of the
18756
- * caller's JS handle and any subsequent method on it would
18757
- * panic with `"null pointer passed to rust"`.
18758
18817
  * @param {number} index
18759
18818
  * @param {OutputNote} elem
18760
18819
  */
18761
18820
  replaceAt(index, elem) {
18762
18821
  _assertClass(elem, OutputNote);
18763
- const ret = wasm.outputnotearray_replaceAt(this.__wbg_ptr, index, elem.__wbg_ptr);
18822
+ var ptr0 = elem.__destroy_into_raw();
18823
+ const ret = wasm.outputnotearray_replaceAt(this.__wbg_ptr, index, ptr0);
18764
18824
  if (ret[1]) {
18765
18825
  throw takeFromExternrefTable0(ret[0]);
18766
18826
  }
@@ -18802,7 +18862,7 @@ class OutputNoteRecord {
18802
18862
  * @returns {number}
18803
18863
  */
18804
18864
  expectedHeight() {
18805
- const ret = wasm.blockheader_version(this.__wbg_ptr);
18865
+ const ret = wasm.outputnoterecord_expectedHeight(this.__wbg_ptr);
18806
18866
  return ret >>> 0;
18807
18867
  }
18808
18868
  /**
@@ -18842,7 +18902,7 @@ class OutputNoteRecord {
18842
18902
  * @returns {NoteMetadata}
18843
18903
  */
18844
18904
  metadata() {
18845
- const ret = wasm.outputnoterecord_metadata(this.__wbg_ptr);
18905
+ const ret = wasm.committednote_metadata(this.__wbg_ptr);
18846
18906
  return NoteMetadata.__wrap(ret);
18847
18907
  }
18848
18908
  /**
@@ -19073,7 +19133,7 @@ class PartialNote {
19073
19133
  * @returns {NoteMetadata}
19074
19134
  */
19075
19135
  metadata() {
19076
- const ret = wasm.partialnote_metadata(this.__wbg_ptr);
19136
+ const ret = wasm.committednote_metadata(this.__wbg_ptr);
19077
19137
  return NoteMetadata.__wrap(ret);
19078
19138
  }
19079
19139
  /**
@@ -19108,7 +19168,8 @@ class Poseidon2 {
19108
19168
  */
19109
19169
  static hashElements(felt_array) {
19110
19170
  _assertClass(felt_array, FeltArray);
19111
- const ret = wasm.poseidon2_hashElements(felt_array.__wbg_ptr);
19171
+ var ptr0 = felt_array.__destroy_into_raw();
19172
+ const ret = wasm.poseidon2_hashElements(ptr0);
19112
19173
  return Word.__wrap(ret);
19113
19174
  }
19114
19175
  }
@@ -19440,20 +19501,43 @@ class RpcClient {
19440
19501
  }
19441
19502
  /**
19442
19503
  * Fetches a block header by number. When `block_num` is undefined, returns the latest header.
19504
+ *
19505
+ * @param `block_num` - Optional block number. When `undefined`, returns the latest header.
19506
+ * @param `include_mmr_proof` - When `true`, includes the MMR proof in the response. Defaults
19507
+ * to `false` when `undefined`.
19443
19508
  * @param {number | null} [block_num]
19509
+ * @param {boolean | null} [include_mmr_proof]
19444
19510
  * @returns {Promise<BlockHeader>}
19445
19511
  */
19446
- getBlockHeaderByNumber(block_num) {
19447
- const ret = wasm.rpcclient_getBlockHeaderByNumber(this.__wbg_ptr, isLikeNone(block_num) ? 0x100000001 : (block_num) >>> 0);
19512
+ getBlockHeaderByNumber(block_num, include_mmr_proof) {
19513
+ 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);
19514
+ return ret;
19515
+ }
19516
+ /**
19517
+ * Fetches the processing status of a network note by its ID.
19518
+ *
19519
+ * Returns information about the note's current status in the network,
19520
+ * including whether it is pending, processed, discarded, or committed,
19521
+ * along with error details and attempt count.
19522
+ *
19523
+ * @param `note_id` - The ID of the note to query.
19524
+ * @returns Promise that resolves to a `NetworkNoteStatusInfo` object.
19525
+ * @param {NoteId} note_id
19526
+ * @returns {Promise<NetworkNoteStatusInfo>}
19527
+ */
19528
+ getNetworkNoteStatus(note_id) {
19529
+ _assertClass(note_id, NoteId);
19530
+ const ret = wasm.rpcclient_getNetworkNoteStatus(this.__wbg_ptr, note_id.__wbg_ptr);
19448
19531
  return ret;
19449
19532
  }
19450
19533
  /**
19451
19534
  * Fetches a note script by its root hash from the connected Miden node.
19452
19535
  *
19453
19536
  * @param script_root - The root hash of the note script to fetch.
19454
- * @returns Promise that resolves to the `NoteScript`.
19537
+ * @returns Promise that resolves to the `NoteScript`, or `undefined` if the node has no
19538
+ * script for that root.
19455
19539
  * @param {Word} script_root
19456
- * @returns {Promise<NoteScript>}
19540
+ * @returns {Promise<NoteScript | undefined>}
19457
19541
  */
19458
19542
  getNoteScriptByRoot(script_root) {
19459
19543
  _assertClass(script_root, Word);
@@ -19507,15 +19591,15 @@ class RpcClient {
19507
19591
  }
19508
19592
  /**
19509
19593
  * Fetches notes matching the provided tags from the node.
19510
- * @param {number} block_num
19511
- * @param {number | null | undefined} block_to
19594
+ * @param {number} block_from
19595
+ * @param {number} block_to
19512
19596
  * @param {NoteTag[]} note_tags
19513
19597
  * @returns {Promise<NoteSyncInfo>}
19514
19598
  */
19515
- syncNotes(block_num, block_to, note_tags) {
19599
+ syncNotes(block_from, block_to, note_tags) {
19516
19600
  const ptr0 = passArrayJsValueToWasm0(note_tags, wasm.__wbindgen_malloc);
19517
19601
  const len0 = WASM_VECTOR_LEN;
19518
- const ret = wasm.rpcclient_syncNotes(this.__wbg_ptr, block_num, isLikeNone(block_to) ? 0x100000001 : (block_to) >>> 0, ptr0, len0);
19602
+ const ret = wasm.rpcclient_syncNotes(this.__wbg_ptr, block_from, block_to, ptr0, len0);
19519
19603
  return ret;
19520
19604
  }
19521
19605
  /**
@@ -19562,7 +19646,8 @@ class Rpo256 {
19562
19646
  */
19563
19647
  static hashElements(felt_array) {
19564
19648
  _assertClass(felt_array, FeltArray);
19565
- const ret = wasm.rpo256_hashElements(felt_array.__wbg_ptr);
19649
+ var ptr0 = felt_array.__destroy_into_raw();
19650
+ const ret = wasm.rpo256_hashElements(ptr0);
19566
19651
  return Word.__wrap(ret);
19567
19652
  }
19568
19653
  }
@@ -19592,6 +19677,15 @@ class SerializedInputNoteData {
19592
19677
  const ptr = this.__destroy_into_raw();
19593
19678
  wasm.__wbg_serializedinputnotedata_free(ptr, 0);
19594
19679
  }
19680
+ /**
19681
+ * @returns {Uint8Array}
19682
+ */
19683
+ get attachments() {
19684
+ const ret = wasm.__wbg_get_serializedinputnotedata_attachments(this.__wbg_ptr);
19685
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
19686
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
19687
+ return v1;
19688
+ }
19595
19689
  /**
19596
19690
  * @returns {number | undefined}
19597
19691
  */
@@ -19633,6 +19727,21 @@ class SerializedInputNoteData {
19633
19727
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
19634
19728
  }
19635
19729
  }
19730
+ /**
19731
+ * @returns {string}
19732
+ */
19733
+ get detailsCommitment() {
19734
+ let deferred1_0;
19735
+ let deferred1_1;
19736
+ try {
19737
+ const ret = wasm.__wbg_get_serializedinputnotedata_detailsCommitment(this.__wbg_ptr);
19738
+ deferred1_0 = ret[0];
19739
+ deferred1_1 = ret[1];
19740
+ return getStringFromWasm0(ret[0], ret[1]);
19741
+ } finally {
19742
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
19743
+ }
19744
+ }
19636
19745
  /**
19637
19746
  * @returns {Uint8Array}
19638
19747
  */
@@ -19652,19 +19761,16 @@ class SerializedInputNoteData {
19652
19761
  return v1;
19653
19762
  }
19654
19763
  /**
19655
- * @returns {string}
19764
+ * @returns {string | undefined}
19656
19765
  */
19657
19766
  get noteId() {
19658
- let deferred1_0;
19659
- let deferred1_1;
19660
- try {
19661
- const ret = wasm.__wbg_get_serializedinputnotedata_noteId(this.__wbg_ptr);
19662
- deferred1_0 = ret[0];
19663
- deferred1_1 = ret[1];
19664
- return getStringFromWasm0(ret[0], ret[1]);
19665
- } finally {
19666
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
19767
+ const ret = wasm.__wbg_get_serializedinputnotedata_noteId(this.__wbg_ptr);
19768
+ let v1;
19769
+ if (ret[0] !== 0) {
19770
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
19771
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
19667
19772
  }
19773
+ return v1;
19668
19774
  }
19669
19775
  /**
19670
19776
  * @returns {string}
@@ -19730,6 +19836,14 @@ class SerializedInputNoteData {
19730
19836
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
19731
19837
  return v1;
19732
19838
  }
19839
+ /**
19840
+ * @param {Uint8Array} arg0
19841
+ */
19842
+ set attachments(arg0) {
19843
+ const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
19844
+ const len0 = WASM_VECTOR_LEN;
19845
+ wasm.__wbg_set_serializedinputnotedata_attachments(this.__wbg_ptr, ptr0, len0);
19846
+ }
19733
19847
  /**
19734
19848
  * @param {number | null} [arg0]
19735
19849
  */
@@ -19758,6 +19872,14 @@ class SerializedInputNoteData {
19758
19872
  const len0 = WASM_VECTOR_LEN;
19759
19873
  wasm.__wbg_set_serializedinputnotedata_createdAt(this.__wbg_ptr, ptr0, len0);
19760
19874
  }
19875
+ /**
19876
+ * @param {string} arg0
19877
+ */
19878
+ set detailsCommitment(arg0) {
19879
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
19880
+ const len0 = WASM_VECTOR_LEN;
19881
+ wasm.__wbg_set_serializedinputnotedata_detailsCommitment(this.__wbg_ptr, ptr0, len0);
19882
+ }
19761
19883
  /**
19762
19884
  * @param {Uint8Array} arg0
19763
19885
  */
@@ -19775,11 +19897,11 @@ class SerializedInputNoteData {
19775
19897
  wasm.__wbg_set_serializedinputnotedata_noteAssets(this.__wbg_ptr, ptr0, len0);
19776
19898
  }
19777
19899
  /**
19778
- * @param {string} arg0
19900
+ * @param {string | null} [arg0]
19779
19901
  */
19780
19902
  set noteId(arg0) {
19781
- const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
19782
- const len0 = WASM_VECTOR_LEN;
19903
+ var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
19904
+ var len0 = WASM_VECTOR_LEN;
19783
19905
  wasm.__wbg_set_serializedinputnotedata_noteId(this.__wbg_ptr, ptr0, len0);
19784
19906
  }
19785
19907
  /**
@@ -19855,6 +19977,15 @@ class SerializedOutputNoteData {
19855
19977
  const ptr = this.__destroy_into_raw();
19856
19978
  wasm.__wbg_serializedoutputnotedata_free(ptr, 0);
19857
19979
  }
19980
+ /**
19981
+ * @returns {Uint8Array}
19982
+ */
19983
+ get attachments() {
19984
+ const ret = wasm.__wbg_get_serializedoutputnotedata_attachments(this.__wbg_ptr);
19985
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
19986
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
19987
+ return v1;
19988
+ }
19858
19989
  /**
19859
19990
  * @returns {number}
19860
19991
  */
@@ -19938,6 +20069,14 @@ class SerializedOutputNoteData {
19938
20069
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
19939
20070
  return v1;
19940
20071
  }
20072
+ /**
20073
+ * @param {Uint8Array} arg0
20074
+ */
20075
+ set attachments(arg0) {
20076
+ const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
20077
+ const len0 = WASM_VECTOR_LEN;
20078
+ wasm.__wbg_set_serializedoutputnotedata_attachments(this.__wbg_ptr, ptr0, len0);
20079
+ }
19941
20080
  /**
19942
20081
  * @param {number} arg0
19943
20082
  */
@@ -19950,7 +20089,7 @@ class SerializedOutputNoteData {
19950
20089
  set metadata(arg0) {
19951
20090
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
19952
20091
  const len0 = WASM_VECTOR_LEN;
19953
- wasm.__wbg_set_serializedoutputnotedata_metadata(this.__wbg_ptr, ptr0, len0);
20092
+ wasm.__wbg_set_jsstatesyncupdate_blockHasRelevantNotes(this.__wbg_ptr, ptr0, len0);
19954
20093
  }
19955
20094
  /**
19956
20095
  * @param {Uint8Array} arg0
@@ -19982,7 +20121,7 @@ class SerializedOutputNoteData {
19982
20121
  set recipientDigest(arg0) {
19983
20122
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
19984
20123
  const len0 = WASM_VECTOR_LEN;
19985
- wasm.__wbg_set_jsstoragemapentry_value(this.__wbg_ptr, ptr0, len0);
20124
+ wasm.__wbg_set_jsaccountupdate_vaultRoot(this.__wbg_ptr, ptr0, len0);
19986
20125
  }
19987
20126
  /**
19988
20127
  * @param {number} arg0
@@ -20138,7 +20277,7 @@ class SerializedTransactionData {
20138
20277
  set status(arg0) {
20139
20278
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
20140
20279
  const len0 = WASM_VECTOR_LEN;
20141
- wasm.__wbg_set_serializedtransactiondata_status(this.__wbg_ptr, ptr0, len0);
20280
+ wasm.__wbg_set_serializedoutputnotedata_attachments(this.__wbg_ptr, ptr0, len0);
20142
20281
  }
20143
20282
  /**
20144
20283
  * @param {Uint8Array | null} [arg0]
@@ -20529,9 +20668,6 @@ class StorageMap {
20529
20668
  }
20530
20669
  if (Symbol.dispose) StorageMap.prototype[Symbol.dispose] = StorageMap.prototype.free;
20531
20670
 
20532
- /**
20533
- * A key-value entry from a storage map.
20534
- */
20535
20671
  class StorageMapEntry {
20536
20672
  static __wrap(ptr) {
20537
20673
  ptr = ptr >>> 0;
@@ -20540,6 +20676,16 @@ class StorageMapEntry {
20540
20676
  StorageMapEntryFinalization.register(obj, obj.__wbg_ptr, obj);
20541
20677
  return obj;
20542
20678
  }
20679
+ toJSON() {
20680
+ return {
20681
+ key: this.key,
20682
+ root: this.root,
20683
+ value: this.value,
20684
+ };
20685
+ }
20686
+ toString() {
20687
+ return JSON.stringify(this);
20688
+ }
20543
20689
  __destroy_into_raw() {
20544
20690
  const ptr = this.__wbg_ptr;
20545
20691
  this.__wbg_ptr = 0;
@@ -20550,6 +20696,99 @@ class StorageMapEntry {
20550
20696
  const ptr = this.__destroy_into_raw();
20551
20697
  wasm.__wbg_storagemapentry_free(ptr, 0);
20552
20698
  }
20699
+ /**
20700
+ * @returns {string}
20701
+ */
20702
+ get key() {
20703
+ let deferred1_0;
20704
+ let deferred1_1;
20705
+ try {
20706
+ const ret = wasm.__wbg_get_storagemapentry_key(this.__wbg_ptr);
20707
+ deferred1_0 = ret[0];
20708
+ deferred1_1 = ret[1];
20709
+ return getStringFromWasm0(ret[0], ret[1]);
20710
+ } finally {
20711
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
20712
+ }
20713
+ }
20714
+ /**
20715
+ * @returns {string}
20716
+ */
20717
+ get root() {
20718
+ let deferred1_0;
20719
+ let deferred1_1;
20720
+ try {
20721
+ const ret = wasm.__wbg_get_storagemapentry_root(this.__wbg_ptr);
20722
+ deferred1_0 = ret[0];
20723
+ deferred1_1 = ret[1];
20724
+ return getStringFromWasm0(ret[0], ret[1]);
20725
+ } finally {
20726
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
20727
+ }
20728
+ }
20729
+ /**
20730
+ * @returns {string}
20731
+ */
20732
+ get value() {
20733
+ let deferred1_0;
20734
+ let deferred1_1;
20735
+ try {
20736
+ const ret = wasm.__wbg_get_storagemapentry_value(this.__wbg_ptr);
20737
+ deferred1_0 = ret[0];
20738
+ deferred1_1 = ret[1];
20739
+ return getStringFromWasm0(ret[0], ret[1]);
20740
+ } finally {
20741
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
20742
+ }
20743
+ }
20744
+ /**
20745
+ * @param {string} arg0
20746
+ */
20747
+ set key(arg0) {
20748
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
20749
+ const len0 = WASM_VECTOR_LEN;
20750
+ wasm.__wbg_set_jsstoragemapentry_key(this.__wbg_ptr, ptr0, len0);
20751
+ }
20752
+ /**
20753
+ * @param {string} arg0
20754
+ */
20755
+ set root(arg0) {
20756
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
20757
+ const len0 = WASM_VECTOR_LEN;
20758
+ wasm.__wbg_set_jsaccountupdate_storageRoot(this.__wbg_ptr, ptr0, len0);
20759
+ }
20760
+ /**
20761
+ * @param {string} arg0
20762
+ */
20763
+ set value(arg0) {
20764
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
20765
+ const len0 = WASM_VECTOR_LEN;
20766
+ wasm.__wbg_set_jsstoragemapentry_value(this.__wbg_ptr, ptr0, len0);
20767
+ }
20768
+ }
20769
+ if (Symbol.dispose) StorageMapEntry.prototype[Symbol.dispose] = StorageMapEntry.prototype.free;
20770
+
20771
+ /**
20772
+ * A key-value entry from a storage map.
20773
+ */
20774
+ class StorageMapEntryJs {
20775
+ static __wrap(ptr) {
20776
+ ptr = ptr >>> 0;
20777
+ const obj = Object.create(StorageMapEntryJs.prototype);
20778
+ obj.__wbg_ptr = ptr;
20779
+ StorageMapEntryJsFinalization.register(obj, obj.__wbg_ptr, obj);
20780
+ return obj;
20781
+ }
20782
+ __destroy_into_raw() {
20783
+ const ptr = this.__wbg_ptr;
20784
+ this.__wbg_ptr = 0;
20785
+ StorageMapEntryJsFinalization.unregister(this);
20786
+ return ptr;
20787
+ }
20788
+ free() {
20789
+ const ptr = this.__destroy_into_raw();
20790
+ wasm.__wbg_storagemapentryjs_free(ptr, 0);
20791
+ }
20553
20792
  /**
20554
20793
  * Returns the storage map key.
20555
20794
  * @returns {Word}
@@ -20567,7 +20806,7 @@ class StorageMapEntry {
20567
20806
  return Word.__wrap(ret);
20568
20807
  }
20569
20808
  }
20570
- if (Symbol.dispose) StorageMapEntry.prototype[Symbol.dispose] = StorageMapEntry.prototype.free;
20809
+ if (Symbol.dispose) StorageMapEntryJs.prototype[Symbol.dispose] = StorageMapEntryJs.prototype.free;
20571
20810
 
20572
20811
  /**
20573
20812
  * Information about storage map updates for an account, as returned by the
@@ -20599,7 +20838,7 @@ class StorageMapInfo {
20599
20838
  * @returns {number}
20600
20839
  */
20601
20840
  blockNumber() {
20602
- const ret = wasm.notesyncinfo_blockTo(this.__wbg_ptr);
20841
+ const ret = wasm.storagemapinfo_blockNumber(this.__wbg_ptr);
20603
20842
  return ret >>> 0;
20604
20843
  }
20605
20844
  /**
@@ -20650,7 +20889,7 @@ class StorageMapUpdate {
20650
20889
  * @returns {number}
20651
20890
  */
20652
20891
  blockNum() {
20653
- const ret = wasm.storagemapupdate_blockNum(this.__wbg_ptr);
20892
+ const ret = wasm.committednote_tag(this.__wbg_ptr);
20654
20893
  return ret >>> 0;
20655
20894
  }
20656
20895
  /**
@@ -20820,18 +21059,13 @@ class StorageSlotArray {
20820
21059
  wasm.storageslotarray_push(this.__wbg_ptr, element.__wbg_ptr);
20821
21060
  }
20822
21061
  /**
20823
- * Replace the element at `index`. Borrows + clones the input
20824
- * (mirrors `push`), so the caller's JS handle remains valid
20825
- * after the call. Without this borrow, passing `elem` by
20826
- * value would move the underlying Rust value out of the
20827
- * caller's JS handle and any subsequent method on it would
20828
- * panic with `"null pointer passed to rust"`.
20829
21062
  * @param {number} index
20830
21063
  * @param {StorageSlot} elem
20831
21064
  */
20832
21065
  replaceAt(index, elem) {
20833
21066
  _assertClass(elem, StorageSlot);
20834
- const ret = wasm.storageslotarray_replaceAt(this.__wbg_ptr, index, elem.__wbg_ptr);
21067
+ var ptr0 = elem.__destroy_into_raw();
21068
+ const ret = wasm.storageslotarray_replaceAt(this.__wbg_ptr, index, ptr0);
20835
21069
  if (ret[1]) {
20836
21070
  throw takeFromExternrefTable0(ret[0]);
20837
21071
  }
@@ -21601,9 +21835,11 @@ class TransactionRequestBuilder {
21601
21835
  * @returns {TransactionRequest}
21602
21836
  */
21603
21837
  build() {
21604
- const ptr = this.__destroy_into_raw();
21605
- const ret = wasm.transactionrequestbuilder_build(ptr);
21606
- return TransactionRequest.__wrap(ret);
21838
+ const ret = wasm.transactionrequestbuilder_build(this.__wbg_ptr);
21839
+ if (ret[2]) {
21840
+ throw takeFromExternrefTable0(ret[1]);
21841
+ }
21842
+ return TransactionRequest.__wrap(ret[0]);
21607
21843
  }
21608
21844
  /**
21609
21845
  * Merges an advice map to be available during script execution.
@@ -21611,16 +21847,15 @@ class TransactionRequestBuilder {
21611
21847
  * @returns {TransactionRequestBuilder}
21612
21848
  */
21613
21849
  extendAdviceMap(advice_map) {
21614
- const ptr = this.__destroy_into_raw();
21615
21850
  _assertClass(advice_map, AdviceMap);
21616
- const ret = wasm.transactionrequestbuilder_extendAdviceMap(ptr, advice_map.__wbg_ptr);
21851
+ const ret = wasm.transactionrequestbuilder_extendAdviceMap(this.__wbg_ptr, advice_map.__wbg_ptr);
21617
21852
  return TransactionRequestBuilder.__wrap(ret);
21618
21853
  }
21619
21854
  /**
21620
21855
  * Creates a new empty transaction request builder.
21621
21856
  */
21622
21857
  constructor() {
21623
- const ret = wasm.transactionrequestbuilder_new();
21858
+ const ret = wasm.transactionrequestbuilder_js_new();
21624
21859
  this.__wbg_ptr = ret >>> 0;
21625
21860
  TransactionRequestBuilderFinalization.register(this, this.__wbg_ptr, this);
21626
21861
  return this;
@@ -21631,9 +21866,8 @@ class TransactionRequestBuilder {
21631
21866
  * @returns {TransactionRequestBuilder}
21632
21867
  */
21633
21868
  withAuthArg(auth_arg) {
21634
- const ptr = this.__destroy_into_raw();
21635
21869
  _assertClass(auth_arg, Word);
21636
- const ret = wasm.transactionrequestbuilder_withAuthArg(ptr, auth_arg.__wbg_ptr);
21870
+ const ret = wasm.transactionrequestbuilder_withAuthArg(this.__wbg_ptr, auth_arg.__wbg_ptr);
21637
21871
  return TransactionRequestBuilder.__wrap(ret);
21638
21872
  }
21639
21873
  /**
@@ -21642,9 +21876,8 @@ class TransactionRequestBuilder {
21642
21876
  * @returns {TransactionRequestBuilder}
21643
21877
  */
21644
21878
  withCustomScript(script) {
21645
- const ptr = this.__destroy_into_raw();
21646
21879
  _assertClass(script, TransactionScript);
21647
- const ret = wasm.transactionrequestbuilder_withCustomScript(ptr, script.__wbg_ptr);
21880
+ const ret = wasm.transactionrequestbuilder_withCustomScript(this.__wbg_ptr, script.__wbg_ptr);
21648
21881
  return TransactionRequestBuilder.__wrap(ret);
21649
21882
  }
21650
21883
  /**
@@ -21653,9 +21886,9 @@ class TransactionRequestBuilder {
21653
21886
  * @returns {TransactionRequestBuilder}
21654
21887
  */
21655
21888
  withExpectedFutureNotes(note_details_and_tag) {
21656
- const ptr = this.__destroy_into_raw();
21657
21889
  _assertClass(note_details_and_tag, NoteDetailsAndTagArray);
21658
- const ret = wasm.transactionrequestbuilder_withExpectedFutureNotes(ptr, note_details_and_tag.__wbg_ptr);
21890
+ var ptr0 = note_details_and_tag.__destroy_into_raw();
21891
+ const ret = wasm.transactionrequestbuilder_withExpectedFutureNotes(this.__wbg_ptr, ptr0);
21659
21892
  return TransactionRequestBuilder.__wrap(ret);
21660
21893
  }
21661
21894
  /**
@@ -21664,9 +21897,9 @@ class TransactionRequestBuilder {
21664
21897
  * @returns {TransactionRequestBuilder}
21665
21898
  */
21666
21899
  withExpectedOutputRecipients(recipients) {
21667
- const ptr = this.__destroy_into_raw();
21668
21900
  _assertClass(recipients, NoteRecipientArray);
21669
- const ret = wasm.transactionrequestbuilder_withExpectedOutputRecipients(ptr, recipients.__wbg_ptr);
21901
+ var ptr0 = recipients.__destroy_into_raw();
21902
+ const ret = wasm.transactionrequestbuilder_withExpectedOutputRecipients(this.__wbg_ptr, ptr0);
21670
21903
  return TransactionRequestBuilder.__wrap(ret);
21671
21904
  }
21672
21905
  /**
@@ -21675,8 +21908,7 @@ class TransactionRequestBuilder {
21675
21908
  * @returns {TransactionRequestBuilder}
21676
21909
  */
21677
21910
  withExpirationDelta(expiration_delta) {
21678
- const ptr = this.__destroy_into_raw();
21679
- const ret = wasm.transactionrequestbuilder_withExpirationDelta(ptr, expiration_delta);
21911
+ const ret = wasm.transactionrequestbuilder_withExpirationDelta(this.__wbg_ptr, expiration_delta);
21680
21912
  return TransactionRequestBuilder.__wrap(ret);
21681
21913
  }
21682
21914
  /**
@@ -21685,9 +21917,9 @@ class TransactionRequestBuilder {
21685
21917
  * @returns {TransactionRequestBuilder}
21686
21918
  */
21687
21919
  withForeignAccounts(foreign_accounts) {
21688
- const ptr = this.__destroy_into_raw();
21689
21920
  _assertClass(foreign_accounts, ForeignAccountArray);
21690
- const ret = wasm.transactionrequestbuilder_withForeignAccounts(ptr, foreign_accounts.__wbg_ptr);
21921
+ var ptr0 = foreign_accounts.__destroy_into_raw();
21922
+ const ret = wasm.transactionrequestbuilder_withForeignAccounts(this.__wbg_ptr, ptr0);
21691
21923
  return TransactionRequestBuilder.__wrap(ret);
21692
21924
  }
21693
21925
  /**
@@ -21696,9 +21928,9 @@ class TransactionRequestBuilder {
21696
21928
  * @returns {TransactionRequestBuilder}
21697
21929
  */
21698
21930
  withInputNotes(notes) {
21699
- const ptr = this.__destroy_into_raw();
21700
21931
  _assertClass(notes, NoteAndArgsArray);
21701
- const ret = wasm.transactionrequestbuilder_withInputNotes(ptr, notes.__wbg_ptr);
21932
+ var ptr0 = notes.__destroy_into_raw();
21933
+ const ret = wasm.transactionrequestbuilder_withInputNotes(this.__wbg_ptr, ptr0);
21702
21934
  return TransactionRequestBuilder.__wrap(ret);
21703
21935
  }
21704
21936
  /**
@@ -21707,9 +21939,9 @@ class TransactionRequestBuilder {
21707
21939
  * @returns {TransactionRequestBuilder}
21708
21940
  */
21709
21941
  withOwnOutputNotes(notes) {
21710
- const ptr = this.__destroy_into_raw();
21711
21942
  _assertClass(notes, NoteArray);
21712
- const ret = wasm.transactionrequestbuilder_withOwnOutputNotes(ptr, notes.__wbg_ptr);
21943
+ var ptr0 = notes.__destroy_into_raw();
21944
+ const ret = wasm.transactionrequestbuilder_withOwnOutputNotes(this.__wbg_ptr, ptr0);
21713
21945
  return TransactionRequestBuilder.__wrap(ret);
21714
21946
  }
21715
21947
  /**
@@ -21718,9 +21950,8 @@ class TransactionRequestBuilder {
21718
21950
  * @returns {TransactionRequestBuilder}
21719
21951
  */
21720
21952
  withScriptArg(script_arg) {
21721
- const ptr = this.__destroy_into_raw();
21722
21953
  _assertClass(script_arg, Word);
21723
- const ret = wasm.transactionrequestbuilder_withScriptArg(ptr, script_arg.__wbg_ptr);
21954
+ const ret = wasm.transactionrequestbuilder_withScriptArg(this.__wbg_ptr, script_arg.__wbg_ptr);
21724
21955
  return TransactionRequestBuilder.__wrap(ret);
21725
21956
  }
21726
21957
  }
@@ -21895,7 +22126,8 @@ class TransactionScriptInputPair {
21895
22126
  _assertClass(word, Word);
21896
22127
  var ptr0 = word.__destroy_into_raw();
21897
22128
  _assertClass(felts, FeltArray);
21898
- const ret = wasm.transactionscriptinputpair_new(ptr0, felts.__wbg_ptr);
22129
+ var ptr1 = felts.__destroy_into_raw();
22130
+ const ret = wasm.transactionscriptinputpair_new(ptr0, ptr1);
21899
22131
  this.__wbg_ptr = ret >>> 0;
21900
22132
  TransactionScriptInputPairFinalization.register(this, this.__wbg_ptr, this);
21901
22133
  return this;
@@ -21967,18 +22199,13 @@ class TransactionScriptInputPairArray {
21967
22199
  wasm.transactionscriptinputpairarray_push(this.__wbg_ptr, element.__wbg_ptr);
21968
22200
  }
21969
22201
  /**
21970
- * Replace the element at `index`. Borrows + clones the input
21971
- * (mirrors `push`), so the caller's JS handle remains valid
21972
- * after the call. Without this borrow, passing `elem` by
21973
- * value would move the underlying Rust value out of the
21974
- * caller's JS handle and any subsequent method on it would
21975
- * panic with `"null pointer passed to rust"`.
21976
22202
  * @param {number} index
21977
22203
  * @param {TransactionScriptInputPair} elem
21978
22204
  */
21979
22205
  replaceAt(index, elem) {
21980
22206
  _assertClass(elem, TransactionScriptInputPair);
21981
- const ret = wasm.transactionscriptinputpairarray_replaceAt(this.__wbg_ptr, index, elem.__wbg_ptr);
22207
+ var ptr0 = elem.__destroy_into_raw();
22208
+ const ret = wasm.transactionscriptinputpairarray_replaceAt(this.__wbg_ptr, index, ptr0);
21982
22209
  if (ret[1]) {
21983
22210
  throw takeFromExternrefTable0(ret[0]);
21984
22211
  }
@@ -22292,15 +22519,23 @@ class WebClient {
22292
22519
  * const balance = await reader.getBalance(faucetId);
22293
22520
  * ```
22294
22521
  * @param {AccountId} account_id
22295
- * @returns {AccountReader}
22522
+ * @returns {Promise<AccountReader>}
22296
22523
  */
22297
22524
  accountReader(account_id) {
22298
22525
  _assertClass(account_id, AccountId);
22299
22526
  const ret = wasm.webclient_accountReader(this.__wbg_ptr, account_id.__wbg_ptr);
22300
- if (ret[2]) {
22301
- throw takeFromExternrefTable0(ret[1]);
22302
- }
22303
- return AccountReader.__wrap(ret[0]);
22527
+ return ret;
22528
+ }
22529
+ /**
22530
+ * @param {AccountId} account_id
22531
+ * @param {AuthSecretKey} secret_key
22532
+ * @returns {Promise<void>}
22533
+ */
22534
+ addAccountSecretKeyToWebStore(account_id, secret_key) {
22535
+ _assertClass(account_id, AccountId);
22536
+ _assertClass(secret_key, AuthSecretKey);
22537
+ const ret = wasm.webclient_addAccountSecretKeyToWebStore(this.__wbg_ptr, account_id.__wbg_ptr, secret_key.__wbg_ptr);
22538
+ return ret;
22304
22539
  }
22305
22540
  /**
22306
22541
  * @param {string} tag
@@ -22349,6 +22584,9 @@ class WebClient {
22349
22584
  * * `store_name`: Optional name for the web store. If `None`, the store name defaults to
22350
22585
  * `MidenClientDB_{network_id}`, where `network_id` is derived from the `node_url`.
22351
22586
  * Explicitly setting this allows for creating multiple isolated clients.
22587
+ * * `debug_mode`: Optional flag to enable debug mode for transaction execution. When enabled,
22588
+ * the transaction executor records additional information useful for debugging. Defaults to
22589
+ * disabled.
22352
22590
  * @param {string | null} [node_url]
22353
22591
  * @param {string | null} [node_note_transport_url]
22354
22592
  * @param {Uint8Array | null} [seed]
@@ -22381,6 +22619,8 @@ class WebClient {
22381
22619
  * * `get_key_cb`: Callback to retrieve the secret key bytes for a given public key.
22382
22620
  * * `insert_key_cb`: Callback to persist a secret key.
22383
22621
  * * `sign_cb`: Callback to produce serialized signature bytes for the provided inputs.
22622
+ * * `debug_mode`: Optional flag to enable debug mode for transaction execution. Defaults to
22623
+ * disabled.
22384
22624
  * @param {string | null} [node_url]
22385
22625
  * @param {string | null} [node_note_transport_url]
22386
22626
  * @param {Uint8Array | null} [seed]
@@ -22404,14 +22644,11 @@ class WebClient {
22404
22644
  return ret;
22405
22645
  }
22406
22646
  /**
22407
- * @returns {CodeBuilder}
22647
+ * @returns {Promise<CodeBuilder>}
22408
22648
  */
22409
22649
  createCodeBuilder() {
22410
22650
  const ret = wasm.webclient_createCodeBuilder(this.__wbg_ptr);
22411
- if (ret[2]) {
22412
- throw takeFromExternrefTable0(ret[1]);
22413
- }
22414
- return CodeBuilder.__wrap(ret[0]);
22651
+ return ret;
22415
22652
  }
22416
22653
  /**
22417
22654
  * Creates a new client with a mock RPC API. Useful for testing purposes and proof-of-concept
@@ -22419,7 +22656,7 @@ class WebClient {
22419
22656
  * @param {Uint8Array | null} [seed]
22420
22657
  * @param {Uint8Array | null} [serialized_mock_chain]
22421
22658
  * @param {Uint8Array | null} [serialized_mock_note_transport_node]
22422
- * @returns {Promise<any>}
22659
+ * @returns {Promise<string>}
22423
22660
  */
22424
22661
  createMockClient(seed, serialized_mock_chain, serialized_mock_note_transport_node) {
22425
22662
  var ptr0 = isLikeNone(seed) ? 0 : passArray8ToWasm0(seed, wasm.__wbindgen_malloc);
@@ -22466,7 +22703,8 @@ class WebClient {
22466
22703
  _assertClass(tx_script, TransactionScript);
22467
22704
  _assertClass(advice_inputs, AdviceInputs);
22468
22705
  _assertClass(foreign_accounts, ForeignAccountArray);
22469
- const ret = wasm.webclient_executeProgram(this.__wbg_ptr, account_id.__wbg_ptr, tx_script.__wbg_ptr, advice_inputs.__wbg_ptr, foreign_accounts.__wbg_ptr);
22706
+ var ptr0 = foreign_accounts.__destroy_into_raw();
22707
+ const ret = wasm.webclient_executeProgram(this.__wbg_ptr, account_id.__wbg_ptr, tx_script.__wbg_ptr, advice_inputs.__wbg_ptr, ptr0);
22470
22708
  return ret;
22471
22709
  }
22472
22710
  /**
@@ -22493,7 +22731,8 @@ class WebClient {
22493
22731
  */
22494
22732
  exportAccountFile(account_id) {
22495
22733
  _assertClass(account_id, AccountId);
22496
- const ret = wasm.webclient_exportAccountFile(this.__wbg_ptr, account_id.__wbg_ptr);
22734
+ var ptr0 = account_id.__destroy_into_raw();
22735
+ const ret = wasm.webclient_exportAccountFile(this.__wbg_ptr, ptr0);
22497
22736
  return ret;
22498
22737
  }
22499
22738
  /**
@@ -22541,6 +22780,30 @@ class WebClient {
22541
22780
  const ret = wasm.webclient_getAccount(this.__wbg_ptr, account_id.__wbg_ptr);
22542
22781
  return ret;
22543
22782
  }
22783
+ /**
22784
+ * Retrieves an authentication secret key from the keystore given a public key commitment.
22785
+ *
22786
+ * The public key commitment should correspond to one of the keys tracked by the keystore.
22787
+ * Returns the associated [`AuthSecretKey`] if found, or an error if not found.
22788
+ * @param {Word} pub_key_commitment
22789
+ * @returns {Promise<AuthSecretKey>}
22790
+ */
22791
+ getAccountAuthByPubKeyCommitment(pub_key_commitment) {
22792
+ _assertClass(pub_key_commitment, Word);
22793
+ const ret = wasm.webclient_getAccountAuthByPubKeyCommitment(this.__wbg_ptr, pub_key_commitment.__wbg_ptr);
22794
+ return ret;
22795
+ }
22796
+ /**
22797
+ * Retrieves the full account data for the account associated with the given public key
22798
+ * commitment, returning `null` if no account is found.
22799
+ * @param {Word} pub_key_commitment
22800
+ * @returns {Promise<Account | undefined>}
22801
+ */
22802
+ getAccountByKeyCommitment(pub_key_commitment) {
22803
+ _assertClass(pub_key_commitment, Word);
22804
+ const ret = wasm.webclient_getAccountByKeyCommitment(this.__wbg_ptr, pub_key_commitment.__wbg_ptr);
22805
+ return ret;
22806
+ }
22544
22807
  /**
22545
22808
  * Retrieves the account code for a specific account.
22546
22809
  *
@@ -22638,7 +22901,20 @@ class WebClient {
22638
22901
  return ret;
22639
22902
  }
22640
22903
  /**
22641
- * Retrieves the setting value for `key`, or `None` if it hasn’t been set.
22904
+ * Returns all public key commitments associated with the given account ID.
22905
+ *
22906
+ * These commitments can be used with [`getAccountAuthByPubKeyCommitment`]
22907
+ * to retrieve the corresponding secret keys from the keystore.
22908
+ * @param {AccountId} account_id
22909
+ * @returns {Promise<Word[]>}
22910
+ */
22911
+ getPublicKeyCommitmentsOfAccount(account_id) {
22912
+ _assertClass(account_id, AccountId);
22913
+ const ret = wasm.webclient_getPublicKeyCommitmentsOfAccount(this.__wbg_ptr, account_id.__wbg_ptr);
22914
+ return ret;
22915
+ }
22916
+ /**
22917
+ * Retrieves the setting value for `key`, or `None` if it hasn't been set.
22642
22918
  * @param {string} key
22643
22919
  * @returns {Promise<any | undefined>}
22644
22920
  */
@@ -22667,7 +22943,7 @@ class WebClient {
22667
22943
  }
22668
22944
  /**
22669
22945
  * @param {AccountId} account_id
22670
- * @returns {Promise<any>}
22946
+ * @returns {Promise<void>}
22671
22947
  */
22672
22948
  importAccountById(account_id) {
22673
22949
  _assertClass(account_id, AccountId);
@@ -22676,7 +22952,7 @@ class WebClient {
22676
22952
  }
22677
22953
  /**
22678
22954
  * @param {AccountFile} account_file
22679
- * @returns {Promise<any>}
22955
+ * @returns {Promise<string>}
22680
22956
  */
22681
22957
  importAccountFile(account_file) {
22682
22958
  _assertClass(account_file, AccountFile);
@@ -22685,8 +22961,20 @@ class WebClient {
22685
22961
  return ret;
22686
22962
  }
22687
22963
  /**
22964
+ * Imports a note file and returns the imported note's identifier.
22965
+ *
22966
+ * A note file that carries metadata — an explicit `NoteId` or a full note
22967
+ * with proof — resolves to a concrete `NoteId`, which is returned so the
22968
+ * caller can look the note up with [`get_input_note`]. A details-only file
22969
+ * (`NoteDetails`) has no metadata and therefore no `NoteId` yet, so its
22970
+ * metadata-independent details commitment is returned instead.
22971
+ *
22972
+ * Migration note (miden-client PR #2214): `Client::import_notes` now
22973
+ * returns `Vec<NoteDetailsCommitment>` rather than `Vec<NoteId>`, since
22974
+ * metadata-less imports have no note ID; this method recovers the `NoteId`
22975
+ * from the note file when one is available.
22688
22976
  * @param {NoteFile} note_file
22689
- * @returns {Promise<NoteId>}
22977
+ * @returns {Promise<string>}
22690
22978
  */
22691
22979
  importNoteFile(note_file) {
22692
22980
  _assertClass(note_file, NoteFile);
@@ -22768,7 +23056,7 @@ class WebClient {
22768
23056
  return ret;
22769
23057
  }
22770
23058
  /**
22771
- * @returns {Promise<any>}
23059
+ * @returns {Promise<string[]>}
22772
23060
  */
22773
23061
  listTags() {
22774
23062
  const ret = wasm.webclient_listTags(this.__wbg_ptr);
@@ -22819,19 +23107,27 @@ class WebClient {
22819
23107
  return TransactionRequest.__wrap(ret[0]);
22820
23108
  }
22821
23109
  /**
23110
+ * Creates, persists, and returns a new fungible faucet account.
23111
+ *
23112
+ * Only fungible faucets are supported, so passing `non_fungible = true` fails fast with a
23113
+ * clear message. The faucet is registered with mint and burn policies (both `AllowAll`); its
23114
+ * secret key is added to the keystore.
22822
23115
  * @param {AccountStorageMode} storage_mode
22823
23116
  * @param {boolean} non_fungible
23117
+ * @param {string} token_name
22824
23118
  * @param {string} token_symbol
22825
23119
  * @param {number} decimals
22826
23120
  * @param {bigint} max_supply
22827
23121
  * @param {AuthScheme} auth_scheme
22828
23122
  * @returns {Promise<Account>}
22829
23123
  */
22830
- newFaucet(storage_mode, non_fungible, token_symbol, decimals, max_supply, auth_scheme) {
23124
+ newFaucet(storage_mode, non_fungible, token_name, token_symbol, decimals, max_supply, auth_scheme) {
22831
23125
  _assertClass(storage_mode, AccountStorageMode);
22832
- const ptr0 = passStringToWasm0(token_symbol, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
23126
+ const ptr0 = passStringToWasm0(token_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
22833
23127
  const len0 = WASM_VECTOR_LEN;
22834
- const ret = wasm.webclient_newFaucet(this.__wbg_ptr, storage_mode.__wbg_ptr, non_fungible, ptr0, len0, decimals, max_supply, auth_scheme);
23128
+ const ptr1 = passStringToWasm0(token_symbol, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
23129
+ const len1 = WASM_VECTOR_LEN;
23130
+ const ret = wasm.webclient_newFaucet(this.__wbg_ptr, storage_mode.__wbg_ptr, non_fungible, ptr0, len0, ptr1, len1, decimals, max_supply, auth_scheme);
22835
23131
  return ret;
22836
23132
  }
22837
23133
  /**
@@ -22839,17 +23135,61 @@ class WebClient {
22839
23135
  * @param {AccountId} faucet_id
22840
23136
  * @param {NoteType} note_type
22841
23137
  * @param {bigint} amount
22842
- * @returns {TransactionRequest}
23138
+ * @returns {Promise<TransactionRequest>}
22843
23139
  */
22844
23140
  newMintTransactionRequest(target_account_id, faucet_id, note_type, amount) {
22845
23141
  _assertClass(target_account_id, AccountId);
22846
23142
  _assertClass(faucet_id, AccountId);
22847
23143
  const ret = wasm.webclient_newMintTransactionRequest(this.__wbg_ptr, target_account_id.__wbg_ptr, faucet_id.__wbg_ptr, note_type, amount);
23144
+ return ret;
23145
+ }
23146
+ /**
23147
+ * @param {Note} pswap_note
23148
+ * @param {AccountId} creator_account_id
23149
+ * @returns {TransactionRequest}
23150
+ */
23151
+ newPswapCancelTransactionRequest(pswap_note, creator_account_id) {
23152
+ _assertClass(pswap_note, Note);
23153
+ _assertClass(creator_account_id, AccountId);
23154
+ const ret = wasm.webclient_newPswapCancelTransactionRequest(this.__wbg_ptr, pswap_note.__wbg_ptr, creator_account_id.__wbg_ptr);
23155
+ if (ret[2]) {
23156
+ throw takeFromExternrefTable0(ret[1]);
23157
+ }
23158
+ return TransactionRequest.__wrap(ret[0]);
23159
+ }
23160
+ /**
23161
+ * @param {Note} pswap_note
23162
+ * @param {AccountId} consumer_account_id
23163
+ * @param {bigint} account_fill_amount
23164
+ * @param {bigint} note_fill_amount
23165
+ * @returns {TransactionRequest}
23166
+ */
23167
+ newPswapConsumeTransactionRequest(pswap_note, consumer_account_id, account_fill_amount, note_fill_amount) {
23168
+ _assertClass(pswap_note, Note);
23169
+ _assertClass(consumer_account_id, AccountId);
23170
+ const ret = wasm.webclient_newPswapConsumeTransactionRequest(this.__wbg_ptr, pswap_note.__wbg_ptr, consumer_account_id.__wbg_ptr, account_fill_amount, note_fill_amount);
22848
23171
  if (ret[2]) {
22849
23172
  throw takeFromExternrefTable0(ret[1]);
22850
23173
  }
22851
23174
  return TransactionRequest.__wrap(ret[0]);
22852
23175
  }
23176
+ /**
23177
+ * @param {AccountId} creator_account_id
23178
+ * @param {AccountId} offered_asset_faucet_id
23179
+ * @param {bigint} offered_asset_amount
23180
+ * @param {AccountId} requested_asset_faucet_id
23181
+ * @param {bigint} requested_asset_amount
23182
+ * @param {NoteType} note_type
23183
+ * @param {NoteType} payback_note_type
23184
+ * @returns {Promise<TransactionRequest>}
23185
+ */
23186
+ newPswapCreateTransactionRequest(creator_account_id, offered_asset_faucet_id, offered_asset_amount, requested_asset_faucet_id, requested_asset_amount, note_type, payback_note_type) {
23187
+ _assertClass(creator_account_id, AccountId);
23188
+ _assertClass(offered_asset_faucet_id, AccountId);
23189
+ _assertClass(requested_asset_faucet_id, AccountId);
23190
+ const ret = wasm.webclient_newPswapCreateTransactionRequest(this.__wbg_ptr, creator_account_id.__wbg_ptr, offered_asset_faucet_id.__wbg_ptr, offered_asset_amount, requested_asset_faucet_id.__wbg_ptr, requested_asset_amount, note_type, payback_note_type);
23191
+ return ret;
23192
+ }
22853
23193
  /**
22854
23194
  * @param {AccountId} sender_account_id
22855
23195
  * @param {AccountId} target_account_id
@@ -22858,17 +23198,14 @@ class WebClient {
22858
23198
  * @param {bigint} amount
22859
23199
  * @param {number | null} [recall_height]
22860
23200
  * @param {number | null} [timelock_height]
22861
- * @returns {TransactionRequest}
23201
+ * @returns {Promise<TransactionRequest>}
22862
23202
  */
22863
23203
  newSendTransactionRequest(sender_account_id, target_account_id, faucet_id, note_type, amount, recall_height, timelock_height) {
22864
23204
  _assertClass(sender_account_id, AccountId);
22865
23205
  _assertClass(target_account_id, AccountId);
22866
23206
  _assertClass(faucet_id, AccountId);
22867
23207
  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);
22868
- if (ret[2]) {
22869
- throw takeFromExternrefTable0(ret[1]);
22870
- }
22871
- return TransactionRequest.__wrap(ret[0]);
23208
+ return ret;
22872
23209
  }
22873
23210
  /**
22874
23211
  * @param {AccountId} sender_account_id
@@ -22878,17 +23215,14 @@ class WebClient {
22878
23215
  * @param {bigint} requested_asset_amount
22879
23216
  * @param {NoteType} note_type
22880
23217
  * @param {NoteType} payback_note_type
22881
- * @returns {TransactionRequest}
23218
+ * @returns {Promise<TransactionRequest>}
22882
23219
  */
22883
23220
  newSwapTransactionRequest(sender_account_id, offered_asset_faucet_id, offered_asset_amount, requested_asset_faucet_id, requested_asset_amount, note_type, payback_note_type) {
22884
23221
  _assertClass(sender_account_id, AccountId);
22885
23222
  _assertClass(offered_asset_faucet_id, AccountId);
22886
23223
  _assertClass(requested_asset_faucet_id, AccountId);
22887
23224
  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);
22888
- if (ret[2]) {
22889
- throw takeFromExternrefTable0(ret[1]);
22890
- }
22891
- return TransactionRequest.__wrap(ret[0]);
23225
+ return ret;
22892
23226
  }
22893
23227
  /**
22894
23228
  * @param {AccountStorageMode} storage_mode
@@ -22904,39 +23238,28 @@ class WebClient {
22904
23238
  const ret = wasm.webclient_newWallet(this.__wbg_ptr, storage_mode.__wbg_ptr, mutable, auth_scheme, ptr0, len0);
22905
23239
  return ret;
22906
23240
  }
22907
- proveBlock() {
22908
- const ret = wasm.webclient_proveBlock(this.__wbg_ptr);
22909
- if (ret[1]) {
22910
- throw takeFromExternrefTable0(ret[0]);
22911
- }
22912
- }
22913
23241
  /**
22914
- * Generates a transaction proof using the client's default (local) prover.
22915
- * @param {TransactionResult} transaction_result
22916
- * @returns {Promise<ProvenTransaction>}
23242
+ * @returns {Promise<void>}
22917
23243
  */
22918
- proveTransaction(transaction_result) {
22919
- _assertClass(transaction_result, TransactionResult);
22920
- const ret = wasm.webclient_proveTransaction(this.__wbg_ptr, transaction_result.__wbg_ptr);
23244
+ proveBlock() {
23245
+ const ret = wasm.webclient_proveBlock(this.__wbg_ptr);
22921
23246
  return ret;
22922
23247
  }
22923
23248
  /**
22924
- * Generates a transaction proof using the provided prover.
22925
- *
22926
- * Takes the prover by reference so the JS-side handle is NOT consumed
22927
- * by wasm-bindgen. Taking `TransactionProver` by value would transfer
22928
- * ownership on each call, invalidating the JS object's internal WASM
22929
- * handle; after one use, subsequent calls from JS would pass a dangling
22930
- * handle that wasm-bindgen interprets as `None`, silently falling back
22931
- * to the local prover.
23249
+ * Generates a transaction proof using either the provided prover or the client's default
23250
+ * prover if none is supplied.
22932
23251
  * @param {TransactionResult} transaction_result
22933
- * @param {TransactionProver} prover
23252
+ * @param {TransactionProver | null} [prover]
22934
23253
  * @returns {Promise<ProvenTransaction>}
22935
23254
  */
22936
- proveTransactionWithProver(transaction_result, prover) {
23255
+ proveTransaction(transaction_result, prover) {
22937
23256
  _assertClass(transaction_result, TransactionResult);
22938
- _assertClass(prover, TransactionProver);
22939
- const ret = wasm.webclient_proveTransactionWithProver(this.__wbg_ptr, transaction_result.__wbg_ptr, prover.__wbg_ptr);
23257
+ let ptr0 = 0;
23258
+ if (!isLikeNone(prover)) {
23259
+ _assertClass(prover, TransactionProver);
23260
+ ptr0 = prover.__destroy_into_raw();
23261
+ }
23262
+ const ret = wasm.webclient_proveTransaction(this.__wbg_ptr, transaction_result.__wbg_ptr, ptr0);
22940
23263
  return ret;
22941
23264
  }
22942
23265
  /**
@@ -23005,29 +23328,19 @@ class WebClient {
23005
23328
  }
23006
23329
  /**
23007
23330
  * Returns the inner serialized mock chain if it exists.
23008
- * @returns {Uint8Array}
23331
+ * @returns {Promise<Uint8Array>}
23009
23332
  */
23010
23333
  serializeMockChain() {
23011
23334
  const ret = wasm.webclient_serializeMockChain(this.__wbg_ptr);
23012
- if (ret[3]) {
23013
- throw takeFromExternrefTable0(ret[2]);
23014
- }
23015
- var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
23016
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
23017
- return v1;
23335
+ return ret;
23018
23336
  }
23019
23337
  /**
23020
23338
  * Returns the inner serialized mock note transport node if it exists.
23021
- * @returns {Uint8Array}
23339
+ * @returns {Promise<Uint8Array>}
23022
23340
  */
23023
23341
  serializeMockNoteTransportNode() {
23024
23342
  const ret = wasm.webclient_serializeMockNoteTransportNode(this.__wbg_ptr);
23025
- if (ret[3]) {
23026
- throw takeFromExternrefTable0(ret[2]);
23027
- }
23028
- var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
23029
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
23030
- return v1;
23343
+ return ret;
23031
23344
  }
23032
23345
  /**
23033
23346
  * Sets a setting key-value in the store. It can then be retrieved using `get_setting`.
@@ -23043,25 +23356,11 @@ class WebClient {
23043
23356
  }
23044
23357
  /**
23045
23358
  * Returns the identifier of the underlying store (e.g. `IndexedDB` database name, file path).
23046
- * @returns {string}
23359
+ * @returns {Promise<string>}
23047
23360
  */
23048
23361
  storeIdentifier() {
23049
- let deferred2_0;
23050
- let deferred2_1;
23051
- try {
23052
- const ret = wasm.webclient_storeIdentifier(this.__wbg_ptr);
23053
- var ptr1 = ret[0];
23054
- var len1 = ret[1];
23055
- if (ret[3]) {
23056
- ptr1 = 0; len1 = 0;
23057
- throw takeFromExternrefTable0(ret[2]);
23058
- }
23059
- deferred2_0 = ptr1;
23060
- deferred2_1 = len1;
23061
- return getStringFromWasm0(ptr1, len1);
23062
- } finally {
23063
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
23064
- }
23362
+ const ret = wasm.webclient_storeIdentifier(this.__wbg_ptr);
23363
+ return ret;
23065
23364
  }
23066
23365
  /**
23067
23366
  * Executes a transaction specified by the request against the specified account,
@@ -23127,11 +23426,11 @@ class WebClient {
23127
23426
  return ret;
23128
23427
  }
23129
23428
  /**
23130
- * @returns {boolean}
23429
+ * @returns {Promise<boolean>}
23131
23430
  */
23132
23431
  usesMockChain() {
23133
23432
  const ret = wasm.webclient_usesMockChain(this.__wbg_ptr);
23134
- return ret !== 0;
23433
+ return ret;
23135
23434
  }
23136
23435
  }
23137
23436
  if (Symbol.dispose) WebClient.prototype[Symbol.dispose] = WebClient.prototype.free;
@@ -23256,7 +23555,6 @@ class Word {
23256
23555
  }
23257
23556
  /**
23258
23557
  * Creates a Word from a hex string.
23259
- * Fails if the provided string is not a valid hex representation of a Word.
23260
23558
  * @param {string} hex
23261
23559
  * @returns {Word}
23262
23560
  */
@@ -23270,14 +23568,21 @@ class Word {
23270
23568
  return Word.__wrap(ret[0]);
23271
23569
  }
23272
23570
  /**
23273
- * Creates a word from four u64 values.
23571
+ * Creates a word from four numeric values.
23572
+ *
23573
+ * Each input must be a canonical field element, i.e. strictly less than the field modulus.
23574
+ * `Felt::new` (now fallible on the 0.15 surface) errors out on inputs at or beyond the
23575
+ * modulus; the error is surfaced to JS.
23274
23576
  * @param {BigUint64Array} u64_vec
23275
23577
  */
23276
23578
  constructor(u64_vec) {
23277
23579
  const ptr0 = passArray64ToWasm0(u64_vec, wasm.__wbindgen_malloc);
23278
23580
  const len0 = WASM_VECTOR_LEN;
23279
23581
  const ret = wasm.word_new(ptr0, len0);
23280
- this.__wbg_ptr = ret >>> 0;
23582
+ if (ret[2]) {
23583
+ throw takeFromExternrefTable0(ret[1]);
23584
+ }
23585
+ this.__wbg_ptr = ret[0] >>> 0;
23281
23586
  WordFinalization.register(this, this.__wbg_ptr, this);
23282
23587
  return this;
23283
23588
  }
@@ -23327,7 +23632,7 @@ class Word {
23327
23632
  }
23328
23633
  }
23329
23634
  /**
23330
- * Returns the word as an array of u64 values.
23635
+ * Returns the word as an array of numeric values.
23331
23636
  * @returns {BigUint64Array}
23332
23637
  */
23333
23638
  toU64s() {
@@ -23545,6 +23850,10 @@ function __wbg_get_imports() {
23545
23850
  const ret = AccountProof.__wrap(arg0);
23546
23851
  return ret;
23547
23852
  },
23853
+ __wbg_accountreader_new: function(arg0) {
23854
+ const ret = AccountReader.__wrap(arg0);
23855
+ return ret;
23856
+ },
23548
23857
  __wbg_accountstatus_new: function(arg0) {
23549
23858
  const ret = AccountStatus.__wrap(arg0);
23550
23859
  return ret;
@@ -23553,7 +23862,7 @@ function __wbg_get_imports() {
23553
23862
  const ret = AccountStorage.__wrap(arg0);
23554
23863
  return ret;
23555
23864
  },
23556
- __wbg_addNoteTag_71f455acb2c33097: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
23865
+ __wbg_addNoteTag_40dad1e41d8a6415: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
23557
23866
  var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
23558
23867
  wasm.__wbindgen_free(arg2, arg3 * 1, 1);
23559
23868
  let v1;
@@ -23576,15 +23885,15 @@ function __wbg_get_imports() {
23576
23885
  __wbg_append_a992ccc37aa62dc4: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
23577
23886
  arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
23578
23887
  }, arguments); },
23579
- __wbg_applyFullAccountState_c2b7ca372af269ca: function(arg0, arg1, arg2) {
23888
+ __wbg_applyFullAccountState_0f46ca4819ec19a2: function(arg0, arg1, arg2) {
23580
23889
  const ret = applyFullAccountState(getStringFromWasm0(arg0, arg1), JsAccountUpdate.__wrap(arg2));
23581
23890
  return ret;
23582
23891
  },
23583
- __wbg_applyStateSync_91fddc562c8bef62: function(arg0, arg1, arg2) {
23892
+ __wbg_applyStateSync_4577b4125b70be6e: function(arg0, arg1, arg2) {
23584
23893
  const ret = applyStateSync(getStringFromWasm0(arg0, arg1), JsStateSyncUpdate.__wrap(arg2));
23585
23894
  return ret;
23586
23895
  },
23587
- __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) {
23896
+ __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) {
23588
23897
  let deferred0_0;
23589
23898
  let deferred0_1;
23590
23899
  let deferred1_0;
@@ -23693,6 +24002,10 @@ function __wbg_get_imports() {
23693
24002
  __wbg_close_a79afee31de55b36: function() { return handleError(function (arg0) {
23694
24003
  arg0.close();
23695
24004
  }, arguments); },
24005
+ __wbg_codebuilder_new: function(arg0) {
24006
+ const ret = CodeBuilder.__wrap(arg0);
24007
+ return ret;
24008
+ },
23696
24009
  __wbg_committednote_new: function(arg0) {
23697
24010
  const ret = CommittedNote.__wrap(arg0);
23698
24011
  return ret;
@@ -23719,7 +24032,7 @@ function __wbg_get_imports() {
23719
24032
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23720
24033
  }
23721
24034
  },
23722
- __wbg_exportStore_7414a54978b6564b: function(arg0, arg1) {
24035
+ __wbg_exportStore_6122bc835ba1335e: function(arg0, arg1) {
23723
24036
  const ret = exportStore(getStringFromWasm0(arg0, arg1));
23724
24037
  return ret;
23725
24038
  },
@@ -23751,7 +24064,7 @@ function __wbg_get_imports() {
23751
24064
  const ret = FetchedNote.__wrap(arg0);
23752
24065
  return ret;
23753
24066
  },
23754
- __wbg_forceImportStore_ec328e296b0a4bff: function(arg0, arg1, arg2) {
24067
+ __wbg_forceImportStore_fee039594a1dd764: function(arg0, arg1, arg2) {
23755
24068
  const ret = forceImportStore(getStringFromWasm0(arg0, arg1), arg2);
23756
24069
  return ret;
23757
24070
  },
@@ -23771,7 +24084,7 @@ function __wbg_get_imports() {
23771
24084
  const ret = FungibleAssetDeltaItem.__wrap(arg0);
23772
24085
  return ret;
23773
24086
  },
23774
- __wbg_getAccountAddresses_e92f560e33b96c28: function(arg0, arg1, arg2, arg3) {
24087
+ __wbg_getAccountAddresses_c2905210853e4c1d: function(arg0, arg1, arg2, arg3) {
23775
24088
  let deferred0_0;
23776
24089
  let deferred0_1;
23777
24090
  try {
@@ -23783,7 +24096,7 @@ function __wbg_get_imports() {
23783
24096
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23784
24097
  }
23785
24098
  },
23786
- __wbg_getAccountAuthByPubKeyCommitment_28efb17c33476b84: function(arg0, arg1, arg2, arg3) {
24099
+ __wbg_getAccountAuthByPubKeyCommitment_aa1c1ea910be8702: function(arg0, arg1, arg2, arg3) {
23787
24100
  let deferred0_0;
23788
24101
  let deferred0_1;
23789
24102
  try {
@@ -23795,7 +24108,7 @@ function __wbg_get_imports() {
23795
24108
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23796
24109
  }
23797
24110
  },
23798
- __wbg_getAccountCode_188958db8c438bab: function(arg0, arg1, arg2, arg3) {
24111
+ __wbg_getAccountCode_624d99224830e698: function(arg0, arg1, arg2, arg3) {
23799
24112
  let deferred0_0;
23800
24113
  let deferred0_1;
23801
24114
  try {
@@ -23807,7 +24120,7 @@ function __wbg_get_imports() {
23807
24120
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23808
24121
  }
23809
24122
  },
23810
- __wbg_getAccountHeaderByCommitment_4e6fa83d25c41363: function(arg0, arg1, arg2, arg3) {
24123
+ __wbg_getAccountHeaderByCommitment_87400f84a64deb6f: function(arg0, arg1, arg2, arg3) {
23811
24124
  let deferred0_0;
23812
24125
  let deferred0_1;
23813
24126
  try {
@@ -23819,7 +24132,7 @@ function __wbg_get_imports() {
23819
24132
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23820
24133
  }
23821
24134
  },
23822
- __wbg_getAccountHeader_aabe60772170d684: function(arg0, arg1, arg2, arg3) {
24135
+ __wbg_getAccountHeader_1bfe2e4c80c39a5a: function(arg0, arg1, arg2, arg3) {
23823
24136
  let deferred0_0;
23824
24137
  let deferred0_1;
23825
24138
  try {
@@ -23831,7 +24144,7 @@ function __wbg_get_imports() {
23831
24144
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23832
24145
  }
23833
24146
  },
23834
- __wbg_getAccountIdByKeyCommitment_3802e17bf8d3c9b9: function(arg0, arg1, arg2, arg3) {
24147
+ __wbg_getAccountIdByKeyCommitment_119e889c02d0a383: function(arg0, arg1, arg2, arg3) {
23835
24148
  let deferred0_0;
23836
24149
  let deferred0_1;
23837
24150
  try {
@@ -23843,11 +24156,11 @@ function __wbg_get_imports() {
23843
24156
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23844
24157
  }
23845
24158
  },
23846
- __wbg_getAccountIds_8d429d26691ebece: function(arg0, arg1) {
24159
+ __wbg_getAccountIds_b7c51b913d5bf21d: function(arg0, arg1) {
23847
24160
  const ret = getAccountIds(getStringFromWasm0(arg0, arg1));
23848
24161
  return ret;
23849
24162
  },
23850
- __wbg_getAccountStorageMaps_60eba620d7ef3115: function(arg0, arg1, arg2, arg3) {
24163
+ __wbg_getAccountStorageMaps_ea32cd8cf6fc6297: function(arg0, arg1, arg2, arg3) {
23851
24164
  let deferred0_0;
23852
24165
  let deferred0_1;
23853
24166
  try {
@@ -23859,7 +24172,7 @@ function __wbg_get_imports() {
23859
24172
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23860
24173
  }
23861
24174
  },
23862
- __wbg_getAccountStorage_2e39fb9ee52b36ab: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24175
+ __wbg_getAccountStorage_277a00af1ae659dd: function(arg0, arg1, arg2, arg3, arg4, arg5) {
23863
24176
  let deferred0_0;
23864
24177
  let deferred0_1;
23865
24178
  try {
@@ -23873,7 +24186,7 @@ function __wbg_get_imports() {
23873
24186
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23874
24187
  }
23875
24188
  },
23876
- __wbg_getAccountVaultAssets_f4af786007a4cd8a: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24189
+ __wbg_getAccountVaultAssets_e588f7c19992bf5a: function(arg0, arg1, arg2, arg3, arg4, arg5) {
23877
24190
  let deferred0_0;
23878
24191
  let deferred0_1;
23879
24192
  try {
@@ -23887,23 +24200,27 @@ function __wbg_get_imports() {
23887
24200
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23888
24201
  }
23889
24202
  },
23890
- __wbg_getAllAccountHeaders_41bc150e0b8348ab: function(arg0, arg1) {
24203
+ __wbg_getAllAccountHeaders_cc5df55ad899e5ca: function(arg0, arg1) {
23891
24204
  const ret = getAllAccountHeaders(getStringFromWasm0(arg0, arg1));
23892
24205
  return ret;
23893
24206
  },
23894
- __wbg_getBlockHeaders_d37fd9c6e0f0fc3c: function(arg0, arg1, arg2, arg3) {
24207
+ __wbg_getBlockHeaders_08a8804e4b3ff442: function(arg0, arg1, arg2, arg3) {
23895
24208
  var v0 = getArrayU32FromWasm0(arg2, arg3).slice();
23896
24209
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
23897
24210
  const ret = getBlockHeaders(getStringFromWasm0(arg0, arg1), v0);
23898
24211
  return ret;
23899
24212
  },
23900
- __wbg_getForeignAccountCode_07c810d364cd77ae: function(arg0, arg1, arg2, arg3) {
24213
+ __wbg_getCurrentBlockchainPeaks_f0d990ec54236a85: function(arg0, arg1) {
24214
+ const ret = getCurrentBlockchainPeaks(getStringFromWasm0(arg0, arg1));
24215
+ return ret;
24216
+ },
24217
+ __wbg_getForeignAccountCode_d4d803c5248469e8: function(arg0, arg1, arg2, arg3) {
23901
24218
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
23902
24219
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
23903
24220
  const ret = getForeignAccountCode(getStringFromWasm0(arg0, arg1), v0);
23904
24221
  return ret;
23905
24222
  },
23906
- __wbg_getInputNoteByOffset_677e9a33e6340b5d: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
24223
+ __wbg_getInputNoteByOffset_a1163c6c190c7bc0: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
23907
24224
  let deferred1_0;
23908
24225
  let deferred1_1;
23909
24226
  try {
@@ -23917,25 +24234,25 @@ function __wbg_get_imports() {
23917
24234
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
23918
24235
  }
23919
24236
  },
23920
- __wbg_getInputNotesFromIds_44862afd379bbbb6: function(arg0, arg1, arg2, arg3) {
24237
+ __wbg_getInputNotesFromIds_c19092f0da179fdf: function(arg0, arg1, arg2, arg3) {
23921
24238
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
23922
24239
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
23923
24240
  const ret = getInputNotesFromIds(getStringFromWasm0(arg0, arg1), v0);
23924
24241
  return ret;
23925
24242
  },
23926
- __wbg_getInputNotesFromNullifiers_2ec2c4e148b8f834: function(arg0, arg1, arg2, arg3) {
24243
+ __wbg_getInputNotesFromNullifiers_ef5e3e241e8f14b9: function(arg0, arg1, arg2, arg3) {
23927
24244
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
23928
24245
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
23929
24246
  const ret = getInputNotesFromNullifiers(getStringFromWasm0(arg0, arg1), v0);
23930
24247
  return ret;
23931
24248
  },
23932
- __wbg_getInputNotes_8e59018ef0fd9758: function(arg0, arg1, arg2, arg3) {
24249
+ __wbg_getInputNotes_9a2890b2c05db53e: function(arg0, arg1, arg2, arg3) {
23933
24250
  var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
23934
24251
  wasm.__wbindgen_free(arg2, arg3 * 1, 1);
23935
24252
  const ret = getInputNotes(getStringFromWasm0(arg0, arg1), v0);
23936
24253
  return ret;
23937
24254
  },
23938
- __wbg_getKeyCommitmentsByAccountId_8d83fa814d1cc718: function(arg0, arg1, arg2, arg3) {
24255
+ __wbg_getKeyCommitmentsByAccountId_98d1052aa93e54d1: function(arg0, arg1, arg2, arg3) {
23939
24256
  let deferred0_0;
23940
24257
  let deferred0_1;
23941
24258
  try {
@@ -23947,7 +24264,7 @@ function __wbg_get_imports() {
23947
24264
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23948
24265
  }
23949
24266
  },
23950
- __wbg_getNoteScript_fe7c88df1db18389: function(arg0, arg1, arg2, arg3) {
24267
+ __wbg_getNoteScript_f33c8718fc90d2c4: function(arg0, arg1, arg2, arg3) {
23951
24268
  let deferred0_0;
23952
24269
  let deferred0_1;
23953
24270
  try {
@@ -23959,33 +24276,33 @@ function __wbg_get_imports() {
23959
24276
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23960
24277
  }
23961
24278
  },
23962
- __wbg_getNoteTags_75edb9d48492a785: function(arg0, arg1) {
24279
+ __wbg_getNoteTags_e2ed88e636d0ad2a: function(arg0, arg1) {
23963
24280
  const ret = getNoteTags(getStringFromWasm0(arg0, arg1));
23964
24281
  return ret;
23965
24282
  },
23966
- __wbg_getOutputNotesFromIds_6db6231c439f3c87: function(arg0, arg1, arg2, arg3) {
24283
+ __wbg_getOutputNotesFromIds_1cfcb787c56927d6: function(arg0, arg1, arg2, arg3) {
23967
24284
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
23968
24285
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
23969
24286
  const ret = getOutputNotesFromIds(getStringFromWasm0(arg0, arg1), v0);
23970
24287
  return ret;
23971
24288
  },
23972
- __wbg_getOutputNotesFromNullifiers_30c2ca006c9640f8: function(arg0, arg1, arg2, arg3) {
24289
+ __wbg_getOutputNotesFromNullifiers_ab2d0529c918ceb6: function(arg0, arg1, arg2, arg3) {
23973
24290
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
23974
24291
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
23975
24292
  const ret = getOutputNotesFromNullifiers(getStringFromWasm0(arg0, arg1), v0);
23976
24293
  return ret;
23977
24294
  },
23978
- __wbg_getOutputNotes_7a0d64dede8d64be: function(arg0, arg1, arg2, arg3) {
24295
+ __wbg_getOutputNotes_3ce2621bbaa0b67a: function(arg0, arg1, arg2, arg3) {
23979
24296
  var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
23980
24297
  wasm.__wbindgen_free(arg2, arg3 * 1, 1);
23981
24298
  const ret = getOutputNotes(getStringFromWasm0(arg0, arg1), v0);
23982
24299
  return ret;
23983
24300
  },
23984
- __wbg_getPartialBlockchainNodesAll_15a5f0a63644f546: function(arg0, arg1) {
24301
+ __wbg_getPartialBlockchainNodesAll_97b2296b6f446165: function(arg0, arg1) {
23985
24302
  const ret = getPartialBlockchainNodesAll(getStringFromWasm0(arg0, arg1));
23986
24303
  return ret;
23987
24304
  },
23988
- __wbg_getPartialBlockchainNodesUpToInOrderIndex_6742a36d7d26c921: function(arg0, arg1, arg2, arg3) {
24305
+ __wbg_getPartialBlockchainNodesUpToInOrderIndex_a00a947793bcac3c: function(arg0, arg1, arg2, arg3) {
23989
24306
  let deferred0_0;
23990
24307
  let deferred0_1;
23991
24308
  try {
@@ -23997,16 +24314,12 @@ function __wbg_get_imports() {
23997
24314
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
23998
24315
  }
23999
24316
  },
24000
- __wbg_getPartialBlockchainNodes_35c67e8f4bfd8da6: function(arg0, arg1, arg2, arg3) {
24317
+ __wbg_getPartialBlockchainNodes_ed95c0aed168e0bd: function(arg0, arg1, arg2, arg3) {
24001
24318
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
24002
24319
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
24003
24320
  const ret = getPartialBlockchainNodes(getStringFromWasm0(arg0, arg1), v0);
24004
24321
  return ret;
24005
24322
  },
24006
- __wbg_getPartialBlockchainPeaksByBlockNum_5a9240ed1087ee15: function(arg0, arg1, arg2) {
24007
- const ret = getPartialBlockchainPeaksByBlockNum(getStringFromWasm0(arg0, arg1), arg2 >>> 0);
24008
- return ret;
24009
- },
24010
24323
  __wbg_getRandomValues_1c61fac11405ffdc: function() { return handleError(function (arg0, arg1) {
24011
24324
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
24012
24325
  }, arguments); },
@@ -24014,7 +24327,7 @@ function __wbg_get_imports() {
24014
24327
  const ret = arg0.getReader();
24015
24328
  return ret;
24016
24329
  }, arguments); },
24017
- __wbg_getSetting_25ab76d54f719ecd: function(arg0, arg1, arg2, arg3) {
24330
+ __wbg_getSetting_ae10044e2d623298: function(arg0, arg1, arg2, arg3) {
24018
24331
  let deferred0_0;
24019
24332
  let deferred0_1;
24020
24333
  try {
@@ -24026,7 +24339,7 @@ function __wbg_get_imports() {
24026
24339
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24027
24340
  }
24028
24341
  },
24029
- __wbg_getSyncHeight_d852979e2c8c1c32: function(arg0, arg1) {
24342
+ __wbg_getSyncHeight_58fc6088ffc73f66: function(arg0, arg1) {
24030
24343
  const ret = getSyncHeight(getStringFromWasm0(arg0, arg1));
24031
24344
  return ret;
24032
24345
  },
@@ -24034,15 +24347,15 @@ function __wbg_get_imports() {
24034
24347
  const ret = arg0.getTime();
24035
24348
  return ret;
24036
24349
  },
24037
- __wbg_getTrackedBlockHeaderNumbers_7a6dd9bd482b7c1f: function(arg0, arg1) {
24350
+ __wbg_getTrackedBlockHeaderNumbers_5ff16c5dbe739bda: function(arg0, arg1) {
24038
24351
  const ret = getTrackedBlockHeaderNumbers(getStringFromWasm0(arg0, arg1));
24039
24352
  return ret;
24040
24353
  },
24041
- __wbg_getTrackedBlockHeaders_921ecf4c4bdc8c6f: function(arg0, arg1) {
24354
+ __wbg_getTrackedBlockHeaders_b20d19487c2d6df9: function(arg0, arg1) {
24042
24355
  const ret = getTrackedBlockHeaders(getStringFromWasm0(arg0, arg1));
24043
24356
  return ret;
24044
24357
  },
24045
- __wbg_getTransactions_cb4af339938ce981: function(arg0, arg1, arg2, arg3) {
24358
+ __wbg_getTransactions_162de0ea1d0f2668: function(arg0, arg1, arg2, arg3) {
24046
24359
  let deferred0_0;
24047
24360
  let deferred0_1;
24048
24361
  try {
@@ -24054,7 +24367,7 @@ function __wbg_get_imports() {
24054
24367
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24055
24368
  }
24056
24369
  },
24057
- __wbg_getUnspentInputNoteNullifiers_1d2344145aa0e85d: function(arg0, arg1) {
24370
+ __wbg_getUnspentInputNoteNullifiers_252553121097b242: function(arg0, arg1) {
24058
24371
  const ret = getUnspentInputNoteNullifiers(getStringFromWasm0(arg0, arg1));
24059
24372
  return ret;
24060
24373
  },
@@ -24098,7 +24411,7 @@ function __wbg_get_imports() {
24098
24411
  const ret = InputNoteRecord.__wrap(arg0);
24099
24412
  return ret;
24100
24413
  },
24101
- __wbg_insertAccountAddress_e0c46f8e053193e9: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24414
+ __wbg_insertAccountAddress_a6b2f038c55aee0a: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24102
24415
  let deferred0_0;
24103
24416
  let deferred0_1;
24104
24417
  try {
@@ -24112,7 +24425,7 @@ function __wbg_get_imports() {
24112
24425
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24113
24426
  }
24114
24427
  },
24115
- __wbg_insertAccountAuth_07cdbb9f21acbbe0: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24428
+ __wbg_insertAccountAuth_adb2bbf98e1c34d4: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24116
24429
  let deferred0_0;
24117
24430
  let deferred0_1;
24118
24431
  let deferred1_0;
@@ -24129,7 +24442,7 @@ function __wbg_get_imports() {
24129
24442
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
24130
24443
  }
24131
24444
  },
24132
- __wbg_insertAccountKeyMapping_73ff296a94f45b01: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24445
+ __wbg_insertAccountKeyMapping_47e616ac5977fb9c: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24133
24446
  let deferred0_0;
24134
24447
  let deferred0_1;
24135
24448
  let deferred1_0;
@@ -24146,15 +24459,13 @@ function __wbg_get_imports() {
24146
24459
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
24147
24460
  }
24148
24461
  },
24149
- __wbg_insertBlockHeader_cd3837e26c067658: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
24462
+ __wbg_insertBlockHeader_23b7b30d0614926f: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24150
24463
  var v0 = getArrayU8FromWasm0(arg3, arg4).slice();
24151
24464
  wasm.__wbindgen_free(arg3, arg4 * 1, 1);
24152
- var v1 = getArrayU8FromWasm0(arg5, arg6).slice();
24153
- wasm.__wbindgen_free(arg5, arg6 * 1, 1);
24154
- const ret = insertBlockHeader(getStringFromWasm0(arg0, arg1), arg2 >>> 0, v0, v1, arg7 !== 0);
24465
+ const ret = insertBlockHeader(getStringFromWasm0(arg0, arg1), arg2 >>> 0, v0, arg5 !== 0);
24155
24466
  return ret;
24156
24467
  },
24157
- __wbg_insertPartialBlockchainNodes_dc6809b37ef4b562: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24468
+ __wbg_insertPartialBlockchainNodes_403400ec217229f2: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24158
24469
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
24159
24470
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
24160
24471
  var v1 = getArrayJsValueFromWasm0(arg4, arg5).slice();
@@ -24162,7 +24473,7 @@ function __wbg_get_imports() {
24162
24473
  const ret = insertPartialBlockchainNodes(getStringFromWasm0(arg0, arg1), v0, v1);
24163
24474
  return ret;
24164
24475
  },
24165
- __wbg_insertSetting_11f6d3c419315d2a: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24476
+ __wbg_insertSetting_fcdab04463e418b0: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24166
24477
  let deferred0_0;
24167
24478
  let deferred0_1;
24168
24479
  try {
@@ -24176,7 +24487,7 @@ function __wbg_get_imports() {
24176
24487
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24177
24488
  }
24178
24489
  },
24179
- __wbg_insertTransactionScript_54c2f4f1423a8889: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24490
+ __wbg_insertTransactionScript_a97df45bc8841578: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24180
24491
  var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
24181
24492
  wasm.__wbindgen_free(arg2, arg3 * 1, 1);
24182
24493
  let v1;
@@ -24269,11 +24580,11 @@ function __wbg_get_imports() {
24269
24580
  const ret = arg0.length;
24270
24581
  return ret;
24271
24582
  },
24272
- __wbg_listSettingKeys_7a01958cfea9e4ce: function(arg0, arg1) {
24583
+ __wbg_listSettingKeys_aa9e036a0e93602e: function(arg0, arg1) {
24273
24584
  const ret = listSettingKeys(getStringFromWasm0(arg0, arg1));
24274
24585
  return ret;
24275
24586
  },
24276
- __wbg_lockAccount_4f46ad492483b226: function(arg0, arg1, arg2, arg3) {
24587
+ __wbg_lockAccount_00786cae6f7ea636: function(arg0, arg1, arg2, arg3) {
24277
24588
  let deferred0_0;
24278
24589
  let deferred0_1;
24279
24590
  try {
@@ -24326,6 +24637,10 @@ function __wbg_get_imports() {
24326
24637
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
24327
24638
  }
24328
24639
  }, arguments); },
24640
+ __wbg_networknotestatusinfo_new: function(arg0) {
24641
+ const ret = NetworkNoteStatusInfo.__wrap(arg0);
24642
+ return ret;
24643
+ },
24329
24644
  __wbg_new_0_73afc35eb544e539: function() {
24330
24645
  const ret = new Date();
24331
24646
  return ret;
@@ -24357,7 +24672,7 @@ function __wbg_get_imports() {
24357
24672
  const a = state0.a;
24358
24673
  state0.a = 0;
24359
24674
  try {
24360
- return wasm_bindgen__convert__closures_____invoke__h22101db9f01e45e1(a, state0.b, arg0, arg1);
24675
+ return wasm_bindgen__convert__closures_____invoke__h7a3c25b2fe6d77ec(a, state0.b, arg0, arg1);
24361
24676
  } finally {
24362
24677
  state0.a = a;
24363
24678
  }
@@ -24412,6 +24727,10 @@ function __wbg_get_imports() {
24412
24727
  const ret = NoteAndArgs.__unwrap(arg0);
24413
24728
  return ret;
24414
24729
  },
24730
+ __wbg_noteattachment_new: function(arg0) {
24731
+ const ret = NoteAttachment.__wrap(arg0);
24732
+ return ret;
24733
+ },
24415
24734
  __wbg_noteconsumability_new: function(arg0) {
24416
24735
  const ret = NoteConsumability.__wrap(arg0);
24417
24736
  return ret;
@@ -24464,7 +24783,7 @@ function __wbg_get_imports() {
24464
24783
  const ret = NoteTag.__unwrap(arg0);
24465
24784
  return ret;
24466
24785
  },
24467
- __wbg_openDatabase_1e6c970bd99986cc: function(arg0, arg1, arg2, arg3) {
24786
+ __wbg_openDatabase_8cdde169e05fa396: function(arg0, arg1, arg2, arg3) {
24468
24787
  const ret = openDatabase(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
24469
24788
  return ret;
24470
24789
  },
@@ -24495,7 +24814,7 @@ function __wbg_get_imports() {
24495
24814
  const ret = ProvenTransaction.__wrap(arg0);
24496
24815
  return ret;
24497
24816
  },
24498
- __wbg_pruneAccountHistory_b9f8ae9cc42b0264: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24817
+ __wbg_pruneAccountHistory_77197f52f4287754: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24499
24818
  let deferred0_0;
24500
24819
  let deferred0_1;
24501
24820
  let deferred1_0;
@@ -24512,8 +24831,12 @@ function __wbg_get_imports() {
24512
24831
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
24513
24832
  }
24514
24833
  },
24515
- __wbg_pruneIrrelevantBlocks_fd53c6ee9a1529de: function(arg0, arg1) {
24516
- const ret = pruneIrrelevantBlocks(getStringFromWasm0(arg0, arg1));
24834
+ __wbg_pruneIrrelevantBlocks_649b0446c426cb86: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24835
+ var v0 = getArrayU32FromWasm0(arg2, arg3).slice();
24836
+ wasm.__wbindgen_free(arg2, arg3 * 4, 4);
24837
+ var v1 = getArrayJsValueFromWasm0(arg4, arg5).slice();
24838
+ wasm.__wbindgen_free(arg4, arg5 * 4, 4);
24839
+ const ret = pruneIrrelevantBlocks(getStringFromWasm0(arg0, arg1), v0, v1);
24517
24840
  return ret;
24518
24841
  },
24519
24842
  __wbg_queueMicrotask_0aa0a927f78f5d98: function(arg0) {
@@ -24530,13 +24853,13 @@ function __wbg_get_imports() {
24530
24853
  __wbg_releaseLock_aa5846c2494b3032: function(arg0) {
24531
24854
  arg0.releaseLock();
24532
24855
  },
24533
- __wbg_removeAccountAddress_d84a263da31a63b1: function(arg0, arg1, arg2, arg3) {
24856
+ __wbg_removeAccountAddress_fc888f883a71bd4f: function(arg0, arg1, arg2, arg3) {
24534
24857
  var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
24535
24858
  wasm.__wbindgen_free(arg2, arg3 * 1, 1);
24536
24859
  const ret = removeAccountAddress(getStringFromWasm0(arg0, arg1), v0);
24537
24860
  return ret;
24538
24861
  },
24539
- __wbg_removeAccountAuth_15fe803d63fd684f: function(arg0, arg1, arg2, arg3) {
24862
+ __wbg_removeAccountAuth_8f11e01dd6099b42: function(arg0, arg1, arg2, arg3) {
24540
24863
  let deferred0_0;
24541
24864
  let deferred0_1;
24542
24865
  try {
@@ -24548,7 +24871,7 @@ function __wbg_get_imports() {
24548
24871
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24549
24872
  }
24550
24873
  },
24551
- __wbg_removeAllMappingsForKey_2a75a1ee44704b87: function(arg0, arg1, arg2, arg3) {
24874
+ __wbg_removeAllMappingsForKey_1fd0c55cb2cd0b61: function(arg0, arg1, arg2, arg3) {
24552
24875
  let deferred0_0;
24553
24876
  let deferred0_1;
24554
24877
  try {
@@ -24560,7 +24883,7 @@ function __wbg_get_imports() {
24560
24883
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24561
24884
  }
24562
24885
  },
24563
- __wbg_removeNoteTag_3ffdd59c60d02d5d: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
24886
+ __wbg_removeNoteTag_77e6e3497d921600: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
24564
24887
  var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
24565
24888
  wasm.__wbindgen_free(arg2, arg3 * 1, 1);
24566
24889
  let v1;
@@ -24576,7 +24899,7 @@ function __wbg_get_imports() {
24576
24899
  const ret = removeNoteTag(getStringFromWasm0(arg0, arg1), v0, v1, v2);
24577
24900
  return ret;
24578
24901
  },
24579
- __wbg_removeSetting_ee0741372caba813: function(arg0, arg1, arg2, arg3) {
24902
+ __wbg_removeSetting_39da4a2d256af0e2: function(arg0, arg1, arg2, arg3) {
24580
24903
  let deferred0_0;
24581
24904
  let deferred0_1;
24582
24905
  try {
@@ -24712,6 +25035,10 @@ function __wbg_get_imports() {
24712
25035
  const ret = StorageMapEntry.__wrap(arg0);
24713
25036
  return ret;
24714
25037
  },
25038
+ __wbg_storagemapentryjs_new: function(arg0) {
25039
+ const ret = StorageMapEntryJs.__wrap(arg0);
25040
+ return ret;
25041
+ },
24715
25042
  __wbg_storagemapinfo_new: function(arg0) {
24716
25043
  const ret = StorageMapInfo.__wrap(arg0);
24717
25044
  return ret;
@@ -24752,6 +25079,10 @@ function __wbg_get_imports() {
24752
25079
  const ret = TransactionRecord.__wrap(arg0);
24753
25080
  return ret;
24754
25081
  },
25082
+ __wbg_transactionrequest_new: function(arg0) {
25083
+ const ret = TransactionRequest.__wrap(arg0);
25084
+ return ret;
25085
+ },
24755
25086
  __wbg_transactionresult_new: function(arg0) {
24756
25087
  const ret = TransactionResult.__wrap(arg0);
24757
25088
  return ret;
@@ -24768,13 +25099,13 @@ function __wbg_get_imports() {
24768
25099
  const ret = TransactionSummary.__wrap(arg0);
24769
25100
  return ret;
24770
25101
  },
24771
- __wbg_undoAccountStates_3bb81f0b4777af78: function(arg0, arg1, arg2, arg3) {
25102
+ __wbg_undoAccountStates_e36a3027b0d94828: function(arg0, arg1, arg2, arg3) {
24772
25103
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
24773
25104
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
24774
25105
  const ret = undoAccountStates(getStringFromWasm0(arg0, arg1), v0);
24775
25106
  return ret;
24776
25107
  },
24777
- __wbg_upsertAccountCode_f54a1c88bec60044: function(arg0, arg1, arg2, arg3, arg4, arg5) {
25108
+ __wbg_upsertAccountCode_a57f0b2098ba7190: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24778
25109
  let deferred0_0;
24779
25110
  let deferred0_1;
24780
25111
  try {
@@ -24788,7 +25119,7 @@ function __wbg_get_imports() {
24788
25119
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24789
25120
  }
24790
25121
  },
24791
- __wbg_upsertAccountRecord_d32c88004f7a361f: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16) {
25122
+ __wbg_upsertAccountRecord_3fb1a14436632f21: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16) {
24792
25123
  let deferred0_0;
24793
25124
  let deferred0_1;
24794
25125
  let deferred1_0;
@@ -24830,7 +25161,7 @@ function __wbg_get_imports() {
24830
25161
  wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
24831
25162
  }
24832
25163
  },
24833
- __wbg_upsertAccountStorage_dc9b3f362de53588: function(arg0, arg1, arg2, arg3, arg4, arg5) {
25164
+ __wbg_upsertAccountStorage_cd428602fca677b1: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24834
25165
  let deferred0_0;
24835
25166
  let deferred0_1;
24836
25167
  try {
@@ -24844,7 +25175,7 @@ function __wbg_get_imports() {
24844
25175
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24845
25176
  }
24846
25177
  },
24847
- __wbg_upsertForeignAccountCode_bc9c9b983d44be62: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
25178
+ __wbg_upsertForeignAccountCode_ea1c872f50b83cf7: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
24848
25179
  let deferred0_0;
24849
25180
  let deferred0_1;
24850
25181
  let deferred2_0;
@@ -24863,49 +25194,56 @@ function __wbg_get_imports() {
24863
25194
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
24864
25195
  }
24865
25196
  },
24866
- __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) {
25197
+ __wbg_upsertInputNote_54c9d28ec61fd731: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22, arg23, arg24, arg25, arg26, arg27, arg28) {
24867
25198
  let deferred0_0;
24868
25199
  let deferred0_1;
24869
- let deferred4_0;
24870
- let deferred4_1;
24871
25200
  let deferred6_0;
24872
25201
  let deferred6_1;
24873
- let deferred7_0;
24874
- let deferred7_1;
25202
+ let deferred8_0;
25203
+ let deferred8_1;
25204
+ let deferred9_0;
25205
+ let deferred9_1;
24875
25206
  try {
24876
25207
  deferred0_0 = arg2;
24877
25208
  deferred0_1 = arg3;
24878
- var v1 = getArrayU8FromWasm0(arg4, arg5).slice();
24879
- wasm.__wbindgen_free(arg4, arg5 * 1, 1);
25209
+ let v1;
25210
+ if (arg4 !== 0) {
25211
+ v1 = getStringFromWasm0(arg4, arg5).slice();
25212
+ wasm.__wbindgen_free(arg4, arg5 * 1, 1);
25213
+ }
24880
25214
  var v2 = getArrayU8FromWasm0(arg6, arg7).slice();
24881
25215
  wasm.__wbindgen_free(arg6, arg7 * 1, 1);
24882
25216
  var v3 = getArrayU8FromWasm0(arg8, arg9).slice();
24883
25217
  wasm.__wbindgen_free(arg8, arg9 * 1, 1);
24884
- deferred4_0 = arg10;
24885
- deferred4_1 = arg11;
25218
+ var v4 = getArrayU8FromWasm0(arg10, arg11).slice();
25219
+ wasm.__wbindgen_free(arg10, arg11 * 1, 1);
24886
25220
  var v5 = getArrayU8FromWasm0(arg12, arg13).slice();
24887
25221
  wasm.__wbindgen_free(arg12, arg13 * 1, 1);
24888
25222
  deferred6_0 = arg14;
24889
25223
  deferred6_1 = arg15;
24890
- deferred7_0 = arg16;
24891
- deferred7_1 = arg17;
24892
- var v8 = getArrayU8FromWasm0(arg19, arg20).slice();
24893
- wasm.__wbindgen_free(arg19, arg20 * 1, 1);
24894
- let v9;
24895
- if (arg23 !== 0) {
24896
- v9 = getStringFromWasm0(arg23, arg24).slice();
24897
- wasm.__wbindgen_free(arg23, arg24 * 1, 1);
25224
+ var v7 = getArrayU8FromWasm0(arg16, arg17).slice();
25225
+ wasm.__wbindgen_free(arg16, arg17 * 1, 1);
25226
+ deferred8_0 = arg18;
25227
+ deferred8_1 = arg19;
25228
+ deferred9_0 = arg20;
25229
+ deferred9_1 = arg21;
25230
+ var v10 = getArrayU8FromWasm0(arg23, arg24).slice();
25231
+ wasm.__wbindgen_free(arg23, arg24 * 1, 1);
25232
+ let v11;
25233
+ if (arg27 !== 0) {
25234
+ v11 = getStringFromWasm0(arg27, arg28).slice();
25235
+ wasm.__wbindgen_free(arg27, arg28 * 1, 1);
24898
25236
  }
24899
- const ret = upsertInputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), v1, v2, v3, getStringFromWasm0(arg10, arg11), v5, getStringFromWasm0(arg14, arg15), getStringFromWasm0(arg16, arg17), arg18, v8, arg21 === 0x100000001 ? undefined : arg21, arg22 === 0x100000001 ? undefined : arg22, v9);
25237
+ const ret = upsertInputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), v1, v2, v3, v4, v5, getStringFromWasm0(arg14, arg15), v7, getStringFromWasm0(arg18, arg19), getStringFromWasm0(arg20, arg21), arg22, v10, arg25 === 0x100000001 ? undefined : arg25, arg26 === 0x100000001 ? undefined : arg26, v11);
24900
25238
  return ret;
24901
25239
  } finally {
24902
25240
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24903
- wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
24904
25241
  wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
24905
- wasm.__wbindgen_free(deferred7_0, deferred7_1, 1);
25242
+ wasm.__wbindgen_free(deferred8_0, deferred8_1, 1);
25243
+ wasm.__wbindgen_free(deferred9_0, deferred9_1, 1);
24906
25244
  }
24907
25245
  },
24908
- __wbg_upsertNoteScript_e5262374e58464a5: function(arg0, arg1, arg2, arg3, arg4, arg5) {
25246
+ __wbg_upsertNoteScript_77ad6333fd8d09bd: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24909
25247
  let deferred0_0;
24910
25248
  let deferred0_1;
24911
25249
  try {
@@ -24919,35 +25257,37 @@ function __wbg_get_imports() {
24919
25257
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24920
25258
  }
24921
25259
  },
24922
- __wbg_upsertOutputNote_fb601f7b4e18f75d: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) {
25260
+ __wbg_upsertOutputNote_086a8c1c81f11d3c: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17) {
24923
25261
  let deferred0_0;
24924
25262
  let deferred0_1;
24925
- let deferred2_0;
24926
- let deferred2_1;
25263
+ let deferred3_0;
25264
+ let deferred3_1;
24927
25265
  try {
24928
25266
  deferred0_0 = arg2;
24929
25267
  deferred0_1 = arg3;
24930
25268
  var v1 = getArrayU8FromWasm0(arg4, arg5).slice();
24931
25269
  wasm.__wbindgen_free(arg4, arg5 * 1, 1);
24932
- deferred2_0 = arg6;
24933
- deferred2_1 = arg7;
24934
- var v3 = getArrayU8FromWasm0(arg8, arg9).slice();
24935
- wasm.__wbindgen_free(arg8, arg9 * 1, 1);
24936
- let v4;
24937
- if (arg10 !== 0) {
24938
- v4 = getStringFromWasm0(arg10, arg11).slice();
24939
- wasm.__wbindgen_free(arg10, arg11 * 1, 1);
25270
+ var v2 = getArrayU8FromWasm0(arg6, arg7).slice();
25271
+ wasm.__wbindgen_free(arg6, arg7 * 1, 1);
25272
+ deferred3_0 = arg8;
25273
+ deferred3_1 = arg9;
25274
+ var v4 = getArrayU8FromWasm0(arg10, arg11).slice();
25275
+ wasm.__wbindgen_free(arg10, arg11 * 1, 1);
25276
+ let v5;
25277
+ if (arg12 !== 0) {
25278
+ v5 = getStringFromWasm0(arg12, arg13).slice();
25279
+ wasm.__wbindgen_free(arg12, arg13 * 1, 1);
24940
25280
  }
24941
- var v5 = getArrayU8FromWasm0(arg14, arg15).slice();
24942
- wasm.__wbindgen_free(arg14, arg15 * 1, 1);
24943
- const ret = upsertOutputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), v1, getStringFromWasm0(arg6, arg7), v3, v4, arg12 >>> 0, arg13, v5);
25281
+ var v6 = getArrayU8FromWasm0(arg16, arg17).slice();
25282
+ wasm.__wbindgen_free(arg16, arg17 * 1, 1);
25283
+ const ret = upsertOutputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), v1, v2, getStringFromWasm0(arg8, arg9), v4, v5, arg14 >>> 0, arg15, v6);
24944
25284
  return ret;
24945
25285
  } finally {
24946
25286
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24947
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
25287
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
24948
25288
  }
24949
25289
  },
24950
- __wbg_upsertStorageMapEntries_875ece6c792aece8: function(arg0, arg1, arg2, arg3, arg4, arg5) {
25290
+ __wbg_upsertStorageMapEntries_068d8303824fff58: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24951
25291
  let deferred0_0;
24952
25292
  let deferred0_1;
24953
25293
  try {
@@ -24961,7 +25301,7 @@ function __wbg_get_imports() {
24961
25301
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24962
25302
  }
24963
25303
  },
24964
- __wbg_upsertTransactionRecord_5f9c83704ca38dc5: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) {
25304
+ __wbg_upsertTransactionRecord_a285bd5d3fd5a278: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) {
24965
25305
  let deferred0_0;
24966
25306
  let deferred0_1;
24967
25307
  try {
@@ -24982,7 +25322,7 @@ function __wbg_get_imports() {
24982
25322
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
24983
25323
  }
24984
25324
  },
24985
- __wbg_upsertVaultAssets_acbcc6d51cb80ac5: function(arg0, arg1, arg2, arg3, arg4, arg5) {
25325
+ __wbg_upsertVaultAssets_53ecfc329186db4e: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24986
25326
  let deferred0_0;
24987
25327
  let deferred0_1;
24988
25328
  try {
@@ -25013,13 +25353,13 @@ function __wbg_get_imports() {
25013
25353
  return ret;
25014
25354
  },
25015
25355
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
25016
- // Cast intrinsic for `Closure(Closure { dtor_idx: 360, function: Function { arguments: [Externref], shim_idx: 698, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
25017
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h10c3fe8f433ba3dd, wasm_bindgen__convert__closures_____invoke__h69bc00ec8b9a6549);
25356
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 441, function: Function { arguments: [Externref], shim_idx: 793, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
25357
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3f095fc116138c37, wasm_bindgen__convert__closures_____invoke__h5b85ca27a15b53fc);
25018
25358
  return ret;
25019
25359
  },
25020
25360
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
25021
- // Cast intrinsic for `Closure(Closure { dtor_idx: 360, function: Function { arguments: [], shim_idx: 361, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
25022
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h10c3fe8f433ba3dd, wasm_bindgen__convert__closures_____invoke__h5c73a4a324493889);
25361
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 441, function: Function { arguments: [], shim_idx: 442, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
25362
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3f095fc116138c37, wasm_bindgen__convert__closures_____invoke__h8c482c344300c6d3);
25023
25363
  return ret;
25024
25364
  },
25025
25365
  __wbindgen_cast_0000000000000003: function(arg0) {
@@ -25123,16 +25463,16 @@ function __wbg_get_imports() {
25123
25463
  };
25124
25464
  }
25125
25465
 
25126
- function wasm_bindgen__convert__closures_____invoke__h5c73a4a324493889(arg0, arg1) {
25127
- wasm.wasm_bindgen__convert__closures_____invoke__h5c73a4a324493889(arg0, arg1);
25466
+ function wasm_bindgen__convert__closures_____invoke__h8c482c344300c6d3(arg0, arg1) {
25467
+ wasm.wasm_bindgen__convert__closures_____invoke__h8c482c344300c6d3(arg0, arg1);
25128
25468
  }
25129
25469
 
25130
- function wasm_bindgen__convert__closures_____invoke__h69bc00ec8b9a6549(arg0, arg1, arg2) {
25131
- wasm.wasm_bindgen__convert__closures_____invoke__h69bc00ec8b9a6549(arg0, arg1, arg2);
25470
+ function wasm_bindgen__convert__closures_____invoke__h5b85ca27a15b53fc(arg0, arg1, arg2) {
25471
+ wasm.wasm_bindgen__convert__closures_____invoke__h5b85ca27a15b53fc(arg0, arg1, arg2);
25132
25472
  }
25133
25473
 
25134
- function wasm_bindgen__convert__closures_____invoke__h22101db9f01e45e1(arg0, arg1, arg2, arg3) {
25135
- wasm.wasm_bindgen__convert__closures_____invoke__h22101db9f01e45e1(arg0, arg1, arg2, arg3);
25474
+ function wasm_bindgen__convert__closures_____invoke__h7a3c25b2fe6d77ec(arg0, arg1, arg2, arg3) {
25475
+ wasm.wasm_bindgen__convert__closures_____invoke__h7a3c25b2fe6d77ec(arg0, arg1, arg2, arg3);
25136
25476
  }
25137
25477
 
25138
25478
 
@@ -25329,6 +25669,9 @@ const MerklePathFinalization = (typeof FinalizationRegistry === 'undefined')
25329
25669
  const NetworkIdFinalization = (typeof FinalizationRegistry === 'undefined')
25330
25670
  ? { register: () => {}, unregister: () => {} }
25331
25671
  : new FinalizationRegistry(ptr => wasm.__wbg_networkid_free(ptr >>> 0, 1));
25672
+ const NetworkNoteStatusInfoFinalization = (typeof FinalizationRegistry === 'undefined')
25673
+ ? { register: () => {}, unregister: () => {} }
25674
+ : new FinalizationRegistry(ptr => wasm.__wbg_networknotestatusinfo_free(ptr >>> 0, 1));
25332
25675
  const NoteFinalization = (typeof FinalizationRegistry === 'undefined')
25333
25676
  ? { register: () => {}, unregister: () => {} }
25334
25677
  : new FinalizationRegistry(ptr => wasm.__wbg_note_free(ptr >>> 0, 1));
@@ -25482,6 +25825,9 @@ const StorageMapFinalization = (typeof FinalizationRegistry === 'undefined')
25482
25825
  const StorageMapEntryFinalization = (typeof FinalizationRegistry === 'undefined')
25483
25826
  ? { register: () => {}, unregister: () => {} }
25484
25827
  : new FinalizationRegistry(ptr => wasm.__wbg_storagemapentry_free(ptr >>> 0, 1));
25828
+ const StorageMapEntryJsFinalization = (typeof FinalizationRegistry === 'undefined')
25829
+ ? { register: () => {}, unregister: () => {} }
25830
+ : new FinalizationRegistry(ptr => wasm.__wbg_storagemapentryjs_free(ptr >>> 0, 1));
25485
25831
  const StorageMapInfoFinalization = (typeof FinalizationRegistry === 'undefined')
25486
25832
  ? { register: () => {}, unregister: () => {} }
25487
25833
  : new FinalizationRegistry(ptr => wasm.__wbg_storagemapinfo_free(ptr >>> 0, 1));
@@ -25935,7 +26281,7 @@ async function __wbg_init(module_or_path) {
25935
26281
 
25936
26282
  const module$1 = new URL("assets/miden_client_web.wasm", self.location.href);
25937
26283
 
25938
- var CargoDC6jSekr = /*#__PURE__*/Object.freeze({
26284
+ var CargoCG4XszZo = /*#__PURE__*/Object.freeze({
25939
26285
  __proto__: null,
25940
26286
  Account: Account,
25941
26287
  AccountArray: AccountArray,
@@ -25999,6 +26345,7 @@ var CargoDC6jSekr = /*#__PURE__*/Object.freeze({
25999
26345
  Library: Library,
26000
26346
  MerklePath: MerklePath,
26001
26347
  NetworkId: NetworkId,
26348
+ NetworkNoteStatusInfo: NetworkNoteStatusInfo,
26002
26349
  NetworkType: NetworkType,
26003
26350
  Note: Note,
26004
26351
  NoteAndArgs: NoteAndArgs,
@@ -26006,7 +26353,6 @@ var CargoDC6jSekr = /*#__PURE__*/Object.freeze({
26006
26353
  NoteArray: NoteArray,
26007
26354
  NoteAssets: NoteAssets,
26008
26355
  NoteAttachment: NoteAttachment,
26009
- NoteAttachmentKind: NoteAttachmentKind,
26010
26356
  NoteAttachmentScheme: NoteAttachmentScheme,
26011
26357
  NoteConsumability: NoteConsumability,
26012
26358
  NoteConsumptionStatus: NoteConsumptionStatus,
@@ -26057,6 +26403,7 @@ var CargoDC6jSekr = /*#__PURE__*/Object.freeze({
26057
26403
  SparseMerklePath: SparseMerklePath,
26058
26404
  StorageMap: StorageMap,
26059
26405
  StorageMapEntry: StorageMapEntry,
26406
+ StorageMapEntryJs: StorageMapEntryJs,
26060
26407
  StorageMapInfo: StorageMapInfo,
26061
26408
  StorageMapUpdate: StorageMapUpdate,
26062
26409
  StorageSlot: StorageSlot,