@miden-sdk/miden-sdk 0.15.7 → 0.16.0-alpha.1

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 (52) hide show
  1. package/README.md +0 -152
  2. package/dist/mt/{Cargo-CnGom-_z.js → Cargo-DKsyWYgG.js} +700 -1245
  3. package/dist/mt/Cargo-DKsyWYgG.js.map +1 -0
  4. package/dist/mt/api-types.d.ts +38 -370
  5. package/dist/mt/assets/miden_client_web.wasm +0 -0
  6. package/dist/mt/crates/miden_client_web.d.ts +179 -402
  7. package/dist/mt/docs-entry.d.ts +3 -9
  8. package/dist/mt/eager.js +1 -1
  9. package/dist/mt/index.d.ts +0 -3
  10. package/dist/mt/index.js +53 -701
  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-CnGom-_z-X_3VwTbo.js → Cargo-DKsyWYgG-DfOhgt23.js} +700 -1245
  15. package/dist/mt/workers/Cargo-DKsyWYgG-DfOhgt23.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 +703 -1251
  18. package/dist/mt/workers/web-client-methods-worker.js.map +1 -1
  19. package/dist/mt/workers/web-client-methods-worker.module.js +1 -1
  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-DR9fiMbE.js → Cargo-LwITdlzJ.js} +695 -1237
  23. package/dist/st/Cargo-LwITdlzJ.js.map +1 -0
  24. package/dist/st/api-types.d.ts +38 -370
  25. package/dist/st/assets/miden_client_web.wasm +0 -0
  26. package/dist/st/crates/miden_client_web.d.ts +179 -402
  27. package/dist/st/docs-entry.d.ts +3 -9
  28. package/dist/st/eager.js +1 -1
  29. package/dist/st/index.d.ts +0 -3
  30. package/dist/st/index.js +53 -701
  31. package/dist/st/index.js.map +1 -1
  32. package/dist/st/wasm.js +1 -1
  33. package/dist/st/workers/{Cargo-DR9fiMbE-C0G0clA_.js → Cargo-LwITdlzJ-Dyl2bCwN.js} +695 -1237
  34. package/dist/st/workers/Cargo-LwITdlzJ-Dyl2bCwN.js.map +1 -0
  35. package/dist/st/workers/assets/miden_client_web.wasm +0 -0
  36. package/dist/st/workers/web-client-methods-worker.js +698 -1243
  37. package/dist/st/workers/web-client-methods-worker.js.map +1 -1
  38. package/dist/st/workers/web-client-methods-worker.module.js +1 -1
  39. package/dist/st/workers/web-client-methods-worker.module.js.map +1 -1
  40. package/js/client.js +2 -4
  41. package/js/node/client-factory.js +4 -11
  42. package/js/node/napi-compat.js +1 -0
  43. package/js/node-index.js +11 -11
  44. package/js/resources/compiler.js +23 -12
  45. package/js/resources/transactions.js +24 -540
  46. package/js/standalone.js +3 -61
  47. package/package.json +4 -4
  48. package/dist/mt/Cargo-CnGom-_z.js.map +0 -1
  49. package/dist/mt/workers/Cargo-CnGom-_z-X_3VwTbo.js.map +0 -1
  50. package/dist/st/Cargo-DR9fiMbE.js.map +0 -1
  51. package/dist/st/workers/Cargo-DR9fiMbE-C0G0clA_.js.map +0 -1
  52. package/js/resources/pswap.js +0 -132
@@ -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 CargoCnGom_z; });
8
+ wasmModule = await Promise.resolve().then(function () { return CargoDKsyWYgG; });
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
@@ -8826,6 +8826,42 @@ const logWebStoreError = (error, errorContext) => {
8826
8826
  }
8827
8827
  throw error;
8828
8828
  };
8829
+ // Partial blockchain (MMR) authentication nodes are part of the local
8830
+ // `PartialMmr` state. Once a node index is known its value is fixed, so a
8831
+ // later write with the same index but a different value indicates a buggy or
8832
+ // malicious sync path. Insert nodes that are missing, accept writes that match
8833
+ // the stored value, and reject conflicting writes so the known-good value is
8834
+ // never silently overwritten.
8835
+ const putPartialBlockchainNodesNoOverwrite = async (table, data) => {
8836
+ // Collapse duplicate indexes within the same batch up front: identical
8837
+ // copies are deduplicated (a repeated index would otherwise make `bulkAdd`
8838
+ // throw a key-collision error), and copies that disagree are rejected.
8839
+ const unique = new Map();
8840
+ for (const entry of data) {
8841
+ const seen = unique.get(entry.id);
8842
+ if (seen !== undefined && seen.node !== entry.node) {
8843
+ throw new Error(`Conflicting partial blockchain node ${entry.id} within the same write`);
8844
+ }
8845
+ unique.set(entry.id, entry);
8846
+ }
8847
+ const records = [...unique.values()];
8848
+ const existing = await table.bulkGet(records.map((entry) => entry.id));
8849
+ const toAdd = [];
8850
+ for (let i = 0; i < records.length; i++) {
8851
+ const current = existing[i];
8852
+ if (current === undefined) {
8853
+ toAdd.push(records[i]);
8854
+ }
8855
+ else if (current.node !== records[i].node) {
8856
+ throw new Error(`Refusing to overwrite partial blockchain node ${records[i].id}: ` +
8857
+ `stored value differs from the new value`);
8858
+ }
8859
+ // current.node === records[i].node: already stored, nothing to do.
8860
+ }
8861
+ if (toAdd.length > 0) {
8862
+ await table.bulkAdd(toAdd);
8863
+ }
8864
+ };
8829
8865
  const uint8ArrayToBase64 = (bytes) => {
8830
8866
  const binary = bytes.reduce((acc, byte) => acc + String.fromCharCode(byte), "");
8831
8867
  return btoa(binary);
@@ -8882,7 +8918,7 @@ var Table;
8882
8918
  Table["InputNotes"] = "inputNotes";
8883
8919
  Table["OutputNotes"] = "outputNotes";
8884
8920
  Table["NotesScripts"] = "notesScripts";
8885
- Table["StateSync"] = "stateSync";
8921
+ Table["BlockchainCheckpoint"] = "blockchainCheckpoint";
8886
8922
  Table["BlockHeaders"] = "blockHeaders";
8887
8923
  Table["PartialBlockchainNodes"] = "partialBlockchainNodes";
8888
8924
  Table["Tags"] = "tags";
@@ -8893,9 +8929,7 @@ function indexes(...items) {
8893
8929
  return items.join(",");
8894
8930
  }
8895
8931
  /** V1 baseline schema. Extracted as a constant because once migrations are enabled, this must
8896
- * never be modified — all schema changes should go through new version blocks instead.
8897
- * Exported for migration tests, which seed a physical v1 database before opening it with the
8898
- * current version chain. */
8932
+ * never be modified — all schema changes should go through new version blocks instead. */
8899
8933
  const V1_STORES = {
8900
8934
  [Table.AccountCode]: indexes("root"),
8901
8935
  [Table.LatestAccountStorage]: indexes("[accountId+slotName]", "accountId"),
@@ -8914,7 +8948,7 @@ const V1_STORES = {
8914
8948
  [Table.InputNotes]: indexes("detailsCommitment", "noteId", "nullifier", "stateDiscriminant", "[consumedBlockHeight+consumedTxOrder+noteId]"),
8915
8949
  [Table.OutputNotes]: indexes("detailsCommitment", "noteId", "recipientDigest", "stateDiscriminant", "nullifier"),
8916
8950
  [Table.NotesScripts]: indexes("scriptRoot"),
8917
- [Table.StateSync]: indexes("id"),
8951
+ [Table.BlockchainCheckpoint]: indexes("id"),
8918
8952
  [Table.BlockHeaders]: indexes("blockNum", "hasClientNotes"),
8919
8953
  [Table.PartialBlockchainNodes]: indexes("id"),
8920
8954
  [Table.Tags]: indexes("id++", "tag", "sourceNoteId", "sourceAccountId"),
@@ -8940,7 +8974,7 @@ class MidenDatabase {
8940
8974
  inputNotes;
8941
8975
  outputNotes;
8942
8976
  notesScripts;
8943
- stateSync;
8977
+ blockchainCheckpoint;
8944
8978
  blockHeaders;
8945
8979
  partialBlockchainNodes;
8946
8980
  tags;
@@ -8950,12 +8984,11 @@ class MidenDatabase {
8950
8984
  this.dexie = new Dexie(network);
8951
8985
  // --- Schema versioning ---
8952
8986
  //
8953
- // NOTE: Migrations coexist with the client-version nuke: the database is
8954
- // still nuked on major/minor client-version changes (network resets see
8955
- // ensureClientVersion), while Dexie version blocks below handle schema and
8956
- // data fixes for stores that survive patch upgrades. Once the network
8957
- // stabilizes and data can be preserved across all upgrades, the
8958
- // version-change nuke will be removed and migrations alone will take over.
8987
+ // NOTE: The migration system is not currently in use. The Miden network
8988
+ // resets on every upgrade, so the database is nuked whenever the client
8989
+ // version changes (see ensureClientVersion). Once the network stabilizes
8990
+ // and data can be preserved across upgrades, the version-change nuke will
8991
+ // be removed and migrations will take over.
8959
8992
  //
8960
8993
  // v1 is the baseline schema. To add a migration:
8961
8994
  // 1. Add a .version(N+1).stores({...}).upgrade(tx => {...}) block below.
@@ -8987,43 +9020,12 @@ class MidenDatabase {
8987
9020
  // Note: The `populate` hook (below the version blocks) only fires on
8988
9021
  // first database creation, NOT during upgrades.
8989
9022
  //
8990
- // Version blocks exist below, so V1_STORES is frozen never modify it;
8991
- // add a new version block instead. To retire the nuke entirely (once data
8992
- // must survive major/minor upgrades), remove the close/delete/open logic
8993
- // in ensureClientVersion and just persist the new version there.
9023
+ // To enable migrations (stop nuking the DB on version change):
9024
+ // 1. Remove the nuke logic in ensureClientVersion (close/delete/open).
9025
+ // Just persist the new version instead.
9026
+ // 2. Freeze V1_STORES never modify it again.
9027
+ // 3. Add version(2+) blocks below for all schema changes going forward.
8994
9028
  this.dexie.version(1).stores(V1_STORES);
8995
- // v2 (miden-client 0.15.4): prune note tags leaked by output-note
8996
- // registration. Mirrors sqlite-store migration
8997
- // `0002_prune_output_note_tags.sql`. Clients built against miden-client
8998
- // < 0.15.4 registered a `Note`-sourced tag for every output note a
8999
- // transaction created, but sync cleanup only removes tags of committed
9000
- // *input* notes — leaking one `tags` row per created note. The client no
9001
- // longer registers those tags; this upgrade deletes the rows already
9002
- // leaked. A tag is kept while an inclusion-pending input note
9003
- // (Expected = 0, Unverified = 1 — the mirror of
9004
- // `InputNoteRecord::is_inclusion_pending`) still needs it.
9005
- //
9006
- // This data-only fix coexists with the version-change nuke above: the
9007
- // nuke covers major/minor client upgrades (network resets), while this
9008
- // upgrade runs for stores preserved across patch upgrades.
9009
- this.dexie
9010
- .version(2)
9011
- .stores({})
9012
- .upgrade(async (tx) => {
9013
- const outputNoteCommitments = new Set(await tx.outputNotes.toCollection().primaryKeys());
9014
- if (outputNoteCommitments.size === 0) {
9015
- return;
9016
- }
9017
- const pendingInputNoteCommitments = new Set(await tx.inputNotes
9018
- .where("stateDiscriminant")
9019
- .anyOf([0, 1])
9020
- .primaryKeys());
9021
- await tx.tags
9022
- .filter((tag) => !!tag.sourceNoteId &&
9023
- outputNoteCommitments.has(tag.sourceNoteId) &&
9024
- !pendingInputNoteCommitments.has(tag.sourceNoteId))
9025
- .delete();
9026
- });
9027
9029
  this.accountCodes = this.dexie.table(Table.AccountCode);
9028
9030
  this.latestAccountStorages = this.dexie.table(Table.LatestAccountStorage);
9029
9031
  this.historicalAccountStorages = this.dexie.table(Table.HistoricalAccountStorage);
@@ -9041,16 +9043,20 @@ class MidenDatabase {
9041
9043
  this.inputNotes = this.dexie.table(Table.InputNotes);
9042
9044
  this.outputNotes = this.dexie.table(Table.OutputNotes);
9043
9045
  this.notesScripts = this.dexie.table(Table.NotesScripts);
9044
- this.stateSync = this.dexie.table(Table.StateSync);
9046
+ this.blockchainCheckpoint = this.dexie.table(Table.BlockchainCheckpoint);
9045
9047
  this.blockHeaders = this.dexie.table(Table.BlockHeaders);
9046
9048
  this.partialBlockchainNodes = this.dexie.table(Table.PartialBlockchainNodes);
9047
9049
  this.tags = this.dexie.table(Table.Tags);
9048
9050
  this.foreignAccountCode = this.dexie.table(Table.ForeignAccountCode);
9049
9051
  this.settings = this.dexie.table(Table.Settings);
9050
9052
  this.dexie.on("populate", () => {
9051
- this.stateSync
9052
- .put({ id: 1, blockNum: 0 })
9053
- /* v8 ignore next 2 — populate stateSync failure requires fake-indexeddb to simulate a write error, not modelable in unit tests */
9053
+ this.blockchainCheckpoint
9054
+ .put({
9055
+ id: 1,
9056
+ blockNum: 0,
9057
+ partialBlockchainPeaks: new Uint8Array(),
9058
+ })
9059
+ /* v8 ignore next 2 — populate blockchainCheckpoint failure requires fake-indexeddb to simulate a write error, not modelable in unit tests */
9054
9060
  .catch((err) => logWebStoreError(err, "Failed to populate DB"));
9055
9061
  });
9056
9062
  }
@@ -9376,7 +9382,7 @@ async function upsertVaultAssets(dbId, accountId, assets) {
9376
9382
  logWebStoreError(error, `Error inserting assets`);
9377
9383
  }
9378
9384
  }
9379
- async function applyTransactionDelta(dbId, accountId, nonce, updatedSlots, changedMapEntries, changedAssets, codeRoot, storageRoot, vaultRoot, committed, commitment) {
9385
+ async function applyAccountPatch(dbId, accountId, nonce, updatedSlots, changedMapEntries, changedAssets, codeRoot, storageRoot, vaultRoot, committed, commitment) {
9380
9386
  try {
9381
9387
  const db = getDatabase(dbId);
9382
9388
  await db.dexie.transaction("rw", [
@@ -9389,7 +9395,8 @@ async function applyTransactionDelta(dbId, accountId, nonce, updatedSlots, chang
9389
9395
  db.latestAccountHeaders,
9390
9396
  db.historicalAccountHeaders,
9391
9397
  ], async () => {
9392
- // Apply storage delta: read old → archive → write new
9398
+ const resetMapSlots = new Set();
9399
+ // Apply storage patch: read old → archive → write/delete final state.
9393
9400
  for (const slot of updatedSlots) {
9394
9401
  const oldSlot = await db.latestAccountStorages
9395
9402
  .where("[accountId+slotName]")
@@ -9402,12 +9409,44 @@ async function applyTransactionDelta(dbId, accountId, nonce, updatedSlots, chang
9402
9409
  oldSlotValue: oldSlot?.slotValue ?? null,
9403
9410
  slotType: slot.slotType,
9404
9411
  });
9405
- await db.latestAccountStorages.put({
9406
- accountId,
9407
- slotName: slot.slotName,
9408
- slotValue: slot.slotValue,
9409
- slotType: slot.slotType,
9410
- });
9412
+ // A created map is a replacement (a remove followed by create can merge to Create),
9413
+ // while a removed map must drop every persisted entry. Archive those entries so account
9414
+ // rollback can restore them.
9415
+ if (slot.slotType === 1 &&
9416
+ (slot.patchOperation === 0 || slot.patchOperation === 2)) {
9417
+ resetMapSlots.add(slot.slotName);
9418
+ const oldMapEntries = await db.latestStorageMapEntries
9419
+ .where("[accountId+slotName]")
9420
+ .equals([accountId, slot.slotName])
9421
+ .toArray();
9422
+ for (const entry of oldMapEntries) {
9423
+ await db.historicalStorageMapEntries.put({
9424
+ accountId,
9425
+ replacedAtNonce: nonce,
9426
+ slotName: entry.slotName,
9427
+ key: entry.key,
9428
+ oldValue: entry.value,
9429
+ });
9430
+ }
9431
+ await db.latestStorageMapEntries
9432
+ .where("[accountId+slotName]")
9433
+ .equals([accountId, slot.slotName])
9434
+ .delete();
9435
+ }
9436
+ if (slot.patchOperation === 2) {
9437
+ await db.latestAccountStorages
9438
+ .where("[accountId+slotName]")
9439
+ .equals([accountId, slot.slotName])
9440
+ .delete();
9441
+ }
9442
+ else {
9443
+ await db.latestAccountStorages.put({
9444
+ accountId,
9445
+ slotName: slot.slotName,
9446
+ slotValue: slot.slotValue,
9447
+ slotType: slot.slotType,
9448
+ });
9449
+ }
9411
9450
  }
9412
9451
  // Process map entries: read old → archive → update latest
9413
9452
  for (const entry of changedMapEntries) {
@@ -9415,13 +9454,30 @@ async function applyTransactionDelta(dbId, accountId, nonce, updatedSlots, chang
9415
9454
  .where("[accountId+slotName+key]")
9416
9455
  .equals([accountId, entry.slotName, entry.key])
9417
9456
  .first();
9418
- await db.historicalStorageMapEntries.put({
9419
- accountId,
9420
- replacedAtNonce: nonce,
9421
- slotName: entry.slotName,
9422
- key: entry.key,
9423
- oldValue: oldEntry?.value ?? null,
9424
- });
9457
+ if (resetMapSlots.has(entry.slotName)) {
9458
+ const archivedEntry = await db.historicalStorageMapEntries
9459
+ .where("[accountId+replacedAtNonce+slotName+key]")
9460
+ .equals([accountId, nonce, entry.slotName, entry.key])
9461
+ .first();
9462
+ if (archivedEntry === undefined) {
9463
+ await db.historicalStorageMapEntries.put({
9464
+ accountId,
9465
+ replacedAtNonce: nonce,
9466
+ slotName: entry.slotName,
9467
+ key: entry.key,
9468
+ oldValue: null,
9469
+ });
9470
+ }
9471
+ }
9472
+ else {
9473
+ await db.historicalStorageMapEntries.put({
9474
+ accountId,
9475
+ replacedAtNonce: nonce,
9476
+ slotName: entry.slotName,
9477
+ key: entry.key,
9478
+ oldValue: oldEntry?.value ?? null,
9479
+ });
9480
+ }
9425
9481
  // "" means removal
9426
9482
  if (entry.value === "") {
9427
9483
  await db.latestStorageMapEntries
@@ -9501,7 +9557,6 @@ async function applyTransactionDelta(dbId, accountId, nonce, updatedSlots, chang
9501
9557
  }
9502
9558
  catch (error) {
9503
9559
  logWebStoreError(error, `Error applying transaction delta`);
9504
- throw error;
9505
9560
  }
9506
9561
  }
9507
9562
  async function archiveAndReplaceStorageSlots(db, accountId, nonce, newSlots) {
@@ -9740,7 +9795,6 @@ async function applyFullAccountState(dbId, accountState) {
9740
9795
  }
9741
9796
  catch (error) {
9742
9797
  logWebStoreError(error, `Error applying full account state`);
9743
- throw error;
9744
9798
  }
9745
9799
  }
9746
9800
  async function upsertAccountRecord(dbId, accountId, codeRoot, storageRoot, vaultRoot, nonce, committed, commitment, accountSeed, watched) {
@@ -10145,33 +10199,36 @@ async function getAccountIdByKeyCommitment(dbId, pubKeyCommitmentHex) {
10145
10199
  }
10146
10200
  }
10147
10201
 
10148
- async function insertBlockHeader(dbId, blockNum, header, hasClientNotes) {
10202
+ async function insertBlockHeader(dbId, blockNum, header, hasClientNotes, nodeIds, nodes) {
10149
10203
  try {
10150
10204
  const db = getDatabase(dbId);
10151
- const data = {
10205
+ if (nodeIds.length !== nodes.length) {
10206
+ throw new Error("nodeIds and nodes arrays must be of the same length");
10207
+ }
10208
+ const headerData = {
10152
10209
  blockNum: blockNum,
10153
10210
  header,
10154
10211
  hasClientNotes: hasClientNotes.toString(),
10155
10212
  };
10156
- // Mirror SQLite's `insert_block_header_tx`: do an INSERT OR IGNORE on the
10157
- // row, then explicitly upgrade `has_client_notes` to true if the caller
10158
- // says so. Two callers hit this:
10159
- // - Genesis flow — no existing row; the add succeeds.
10160
- // - `get_and_store_authenticated_block` for a past block a row
10161
- // written by `applyStateSync` typically already exists. We keep that
10162
- // row untouched.
10163
- //
10164
- // The `has_client_notes` upgrade is load-bearing: `get_tracked_block_
10165
- // header_numbers` filters by this flag to seed `tracked_leaves`, which
10166
- // `get_partial_blockchain_nodes(Forest)` relies on. A private-note
10167
- // import at a block previously synced as irrelevant must flip the flag
10168
- // to true or the auth paths won't be tracked.
10169
- await db.blockHeaders.add(data).catch(async (err) => {
10170
- if (!isConstraintError(err))
10171
- throw err;
10172
- if (hasClientNotes) {
10173
- await db.blockHeaders.update(blockNum, { hasClientNotes: "true" });
10174
- }
10213
+ const nodeData = nodes.map((node, index) => ({
10214
+ id: Number(nodeIds[index]),
10215
+ node: node,
10216
+ }));
10217
+ // Persist the header and its MMR nodes in one transaction so a header is never stored
10218
+ // without the nodes that rebuild its `PartialMmr` (mirrors miden-client's atomic insert).
10219
+ await db.dexie.transaction("rw", db.blockHeaders, db.partialBlockchainNodes, async () => {
10220
+ // Header: INSERT OR IGNORE, then one-way upgrade `has_client_notes` to true (load-bearing:
10221
+ // `get_tracked_block_header_numbers` filters on it to seed forest-node tracking).
10222
+ await db.blockHeaders.add(headerData).catch(async (err) => {
10223
+ if (!isConstraintError(err))
10224
+ throw err;
10225
+ if (hasClientNotes) {
10226
+ await db.blockHeaders.update(blockNum, { hasClientNotes: "true" });
10227
+ }
10228
+ });
10229
+ // Nodes: insert-if-missing with overwrite protection; a conflicting value throws and
10230
+ // aborts the transaction, rolling back the header write too.
10231
+ await putPartialBlockchainNodesNoOverwrite(db.partialBlockchainNodes, nodeData);
10175
10232
  });
10176
10233
  }
10177
10234
  catch (err) {
@@ -10183,25 +10240,6 @@ function isConstraintError(err) {
10183
10240
  const e = err;
10184
10241
  return e?.name === "ConstraintError" || e?.inner?.name === "ConstraintError";
10185
10242
  }
10186
- async function insertPartialBlockchainNodes(dbId, ids, nodes) {
10187
- try {
10188
- const db = getDatabase(dbId);
10189
- if (ids.length !== nodes.length) {
10190
- throw new Error("ids and nodes arrays must be of the same length");
10191
- }
10192
- if (ids.length === 0) {
10193
- return;
10194
- }
10195
- const data = nodes.map((node, index) => ({
10196
- id: Number(ids[index]),
10197
- node: node,
10198
- }));
10199
- await db.partialBlockchainNodes.bulkPut(data);
10200
- }
10201
- catch (err) {
10202
- logWebStoreError(err, "Failed to insert partial blockchain nodes");
10203
- }
10204
- }
10205
10243
  async function getBlockHeaders(dbId, blockNumbers) {
10206
10244
  try {
10207
10245
  const db = getDatabase(dbId);
@@ -10259,33 +10297,6 @@ async function getTrackedBlockHeaderNumbers(dbId) {
10259
10297
  logWebStoreError(err, "Failed to get tracked block header numbers");
10260
10298
  }
10261
10299
  }
10262
- /**
10263
- * Returns the blockchain peaks at the current sync height. Peaks live on the
10264
- * `blockHeaders` row at `stateSync.blockNum` — the block that was the chain
10265
- * tip when its sync ran. Returns `{ blockNum, peaks: undefined }` if the
10266
- * stateSync row is missing or if that block was inserted via backfill
10267
- * (which leaves `partialBlockchainPeaks` unset).
10268
- */
10269
- async function getCurrentBlockchainPeaks(dbId) {
10270
- try {
10271
- const db = getDatabase(dbId);
10272
- const stateSyncRow = await db.stateSync.get(1);
10273
- if (stateSyncRow == undefined) {
10274
- return { blockNum: 0, peaks: undefined };
10275
- }
10276
- const header = await db.blockHeaders.get(stateSyncRow.blockNum);
10277
- if (header == undefined || header.partialBlockchainPeaks == undefined) {
10278
- return { blockNum: stateSyncRow.blockNum, peaks: undefined };
10279
- }
10280
- return {
10281
- blockNum: stateSyncRow.blockNum,
10282
- peaks: uint8ArrayToBase64(header.partialBlockchainPeaks),
10283
- };
10284
- }
10285
- catch (err) {
10286
- logWebStoreError(err, "Failed to get current blockchain peaks");
10287
- }
10288
- }
10289
10300
  async function getPartialBlockchainNodesAll(dbId) {
10290
10301
  try {
10291
10302
  const db = getDatabase(dbId);
@@ -10327,9 +10338,9 @@ async function pruneIrrelevantBlocks(dbId, blocksToUntrack, nodeIdsToRemove) {
10327
10338
  try {
10328
10339
  const db = getDatabase(dbId);
10329
10340
  const numericNodeIds = nodeIdsToRemove.map(Number);
10330
- const syncHeight = await db.stateSync.get(1);
10341
+ const syncHeight = await db.blockchainCheckpoint.get(1);
10331
10342
  if (syncHeight == undefined) {
10332
- throw Error("SyncHeight is undefined -- is the state sync table empty?");
10343
+ throw Error("SyncHeight is undefined -- is the blockchain_checkpoint table empty?");
10333
10344
  }
10334
10345
  await db.dexie.transaction("rw", db.blockHeaders, db.partialBlockchainNodes, async () => {
10335
10346
  // 1. Delete stale MMR authentication nodes.
@@ -10662,7 +10673,6 @@ async function upsertInputNote(dbId, detailsCommitment, noteId, assets, attachme
10662
10673
  }
10663
10674
  catch (error) {
10664
10675
  logWebStoreError(error, `Error inserting note: ${detailsCommitment}`);
10665
- throw error;
10666
10676
  }
10667
10677
  };
10668
10678
  return db.dexie.transaction("rw", db.inputNotes, db.notesScripts, doWork);
@@ -10746,7 +10756,6 @@ async function upsertOutputNote(dbId, detailsCommitment, noteId, assets, attachm
10746
10756
  }
10747
10757
  catch (error) {
10748
10758
  logWebStoreError(error, `Error inserting note: ${detailsCommitment}`);
10749
- throw error;
10750
10759
  }
10751
10760
  };
10752
10761
  return db.dexie.transaction("rw", db.outputNotes, db.notesScripts, doWork);
@@ -10989,7 +10998,6 @@ async function insertTransactionScript(dbId, scriptRoot, txScript, tx) {
10989
10998
  }
10990
10999
  catch (error) {
10991
11000
  logWebStoreError(error, "Failed to insert transaction script");
10992
- throw error;
10993
11001
  }
10994
11002
  }
10995
11003
  async function upsertTransactionRecord(dbId, transactionId, details, blockNum, statusVariant, status, scriptRoot, tx) {
@@ -11007,82 +11015,8 @@ async function upsertTransactionRecord(dbId, transactionId, details, blockNum, s
11007
11015
  }
11008
11016
  catch (err) {
11009
11017
  logWebStoreError(err, "Failed to insert proven transaction data");
11010
- throw err;
11011
11018
  }
11012
11019
  }
11013
- /**
11014
- * Applies a batch of transaction updates atomically inside a single Dexie transaction.
11015
- *
11016
- * All sub-operations that internally call `db.dexie.transaction()` are auto-joined by Dexie
11017
- * as nested sub-transactions when run inside this parent transaction, provided the parent
11018
- * scope is a superset of every sub-transaction scope.
11019
- */
11020
- async function applyTransactionBatch(dbId, payloads) {
11021
- const db = getDatabase(dbId);
11022
- await db.dexie.transaction("rw", [
11023
- db.transactions,
11024
- db.transactionScripts,
11025
- db.latestAccountStorages,
11026
- db.historicalAccountStorages,
11027
- db.latestStorageMapEntries,
11028
- db.historicalStorageMapEntries,
11029
- db.latestAccountAssets,
11030
- db.historicalAccountAssets,
11031
- db.latestAccountHeaders,
11032
- db.historicalAccountHeaders,
11033
- db.inputNotes,
11034
- db.outputNotes,
11035
- db.notesScripts,
11036
- db.tags,
11037
- ], async () => {
11038
- for (const payload of payloads) {
11039
- // 1. Insert the transaction record (script first, then record)
11040
- const rec = payload.transactionRecord;
11041
- if (rec.scriptRoot && rec.txScript) {
11042
- await insertTransactionScript(dbId, rec.scriptRoot, rec.txScript);
11043
- }
11044
- await upsertTransactionRecord(dbId, rec.id, rec.details, rec.blockNum, rec.statusVariant, rec.status, rec.scriptRoot);
11045
- // 2. Apply account state (full or delta)
11046
- const acct = payload.accountState;
11047
- if (acct.kind === "full") {
11048
- await applyFullAccountState(dbId, acct.account);
11049
- }
11050
- else {
11051
- await applyTransactionDelta(dbId, acct.accountId, acct.nonce, acct.updatedSlots, acct.changedMapEntries, acct.changedAssets, acct.codeRoot, acct.storageRoot, acct.vaultRoot, acct.committed, acct.commitment);
11052
- }
11053
- // 3. Upsert input and output notes
11054
- for (const note of payload.inputNotes) {
11055
- await 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 ?? null, note.consumedTxOrder ?? null, note.consumerAccountId ?? null);
11056
- }
11057
- for (const note of payload.outputNotes) {
11058
- await upsertOutputNote(dbId, note.detailsCommitment, note.noteId, note.noteAssets, note.attachments, note.recipientDigest, note.metadata, note.nullifier, note.expectedHeight, note.stateDiscriminant, note.state);
11059
- }
11060
- // 4. Add note tags (deduplicated within the transaction)
11061
- for (const tagEntry of payload.tags) {
11062
- const tagArray = new Uint8Array(tagEntry.tag);
11063
- const tagBase64 = uint8ArrayToBase64(tagArray);
11064
- const sourceNoteId = tagEntry.sourceNoteId ?? "";
11065
- const sourceAccountId = tagEntry.sourceAccountId ?? "";
11066
- const sourceSubscriptionKey = tagEntry.sourceSubscriptionKey ?? "";
11067
- // Check for existing tag to avoid duplicates (mirrors the Rust add_note_tag logic).
11068
- // sourceSubscriptionKey is unindexed, so filter on it in memory — distinct
11069
- // subscriptions may share a tag and must remain separate rows.
11070
- const existing = await db.tags
11071
- .where({ tag: tagBase64, sourceNoteId, sourceAccountId })
11072
- .filter((t) => (t.sourceSubscriptionKey ?? "") === sourceSubscriptionKey)
11073
- .first();
11074
- if (!existing) {
11075
- await db.tags.add({
11076
- tag: tagBase64,
11077
- sourceNoteId,
11078
- sourceAccountId,
11079
- sourceSubscriptionKey,
11080
- });
11081
- }
11082
- }
11083
- }
11084
- });
11085
- }
11086
11020
 
11087
11021
  async function getNoteTags(dbId) {
11088
11022
  try {
@@ -11108,7 +11042,7 @@ async function getNoteTags(dbId) {
11108
11042
  async function getSyncHeight(dbId) {
11109
11043
  try {
11110
11044
  const db = getDatabase(dbId);
11111
- const record = await db.stateSync.get(1);
11045
+ const record = await db.blockchainCheckpoint.get(1);
11112
11046
  if (record) {
11113
11047
  let data = {
11114
11048
  blockNum: record.blockNum,
@@ -11123,6 +11057,25 @@ async function getSyncHeight(dbId) {
11123
11057
  logWebStoreError(error, "Error fetching sync height");
11124
11058
  }
11125
11059
  }
11060
+ async function getCurrentBlockchainPeaks(dbId) {
11061
+ try {
11062
+ const db = getDatabase(dbId);
11063
+ const record = await db.blockchainCheckpoint.get(1);
11064
+ if (!record || record.partialBlockchainPeaks.length === 0) {
11065
+ return {
11066
+ blockNum: record?.blockNum ?? 0,
11067
+ peaks: uint8ArrayToBase64(new Uint8Array()),
11068
+ };
11069
+ }
11070
+ return {
11071
+ blockNum: record.blockNum,
11072
+ peaks: uint8ArrayToBase64(record.partialBlockchainPeaks),
11073
+ };
11074
+ }
11075
+ catch (error) {
11076
+ logWebStoreError(error, "Error fetching current blockchain peaks");
11077
+ }
11078
+ }
11126
11079
  async function addNoteTag(dbId, tag, sourceNoteId, sourceAccountId, sourceSubscriptionKey) {
11127
11080
  try {
11128
11081
  const db = getDatabase(dbId);
@@ -11163,10 +11116,10 @@ async function removeNoteTag(dbId, tag, sourceNoteId, sourceAccountId, sourceSub
11163
11116
  }
11164
11117
  async function applyStateSync(dbId, stateUpdate) {
11165
11118
  const db = getDatabase(dbId);
11166
- const { blockNum, flattenedNewBlockHeaders, partialBlockchainPeaks, newBlockNums, blockHasRelevantNotes, serializedNodeIds, serializedNodes, committedNoteTagSources, serializedInputNotes, serializedOutputNotes, accountUpdates, transactionUpdates, } = stateUpdate;
11119
+ const { blockNum, flattenedNewBlockHeaders, newPeaks, newBlockNums, blockHasRelevantNotes, serializedNodeIds, serializedNodes, committedNoteTagSources, serializedInputNotes, serializedOutputNotes, accountUpdates, transactionUpdates, } = stateUpdate;
11167
11120
  const newBlockHeaders = reconstructFlattenedVec(flattenedNewBlockHeaders);
11168
11121
  const tablesToAccess = [
11169
- db.stateSync,
11122
+ db.blockchainCheckpoint,
11170
11123
  db.inputNotes,
11171
11124
  db.outputNotes,
11172
11125
  db.notesScripts,
@@ -11214,46 +11167,41 @@ async function applyStateSync(dbId, stateUpdate) {
11214
11167
  accountCommitment: accountUpdate.accountCommitment,
11215
11168
  accountSeed: accountUpdate.accountSeed,
11216
11169
  }))),
11217
- updateSyncHeight(tx, blockNum),
11170
+ updateSyncHeight(tx, blockNum, newPeaks),
11218
11171
  updatePartialBlockchainNodes(tx, serializedNodeIds, serializedNodes),
11219
11172
  updateCommittedNoteTags(tx, committedNoteTagSources),
11220
11173
  Promise.all(newBlockHeaders.map((newBlockHeader, i) => {
11221
- // Peaks are attached only to the chain-tip block (the one whose
11222
- // blockNum matches the new sync height). That row is always
11223
- // present in this iteration because `partial_blockchain_updates`
11224
- // includes the chain tip header by construction.
11225
- // TODO: potentially move this to be under the sync state info table
11226
- // as currently done in SQLite
11227
- const peaks = newBlockNums[i] === blockNum ? partialBlockchainPeaks : undefined;
11228
- return updateBlockHeader(tx, newBlockNums[i], newBlockHeader, blockHasRelevantNotes[i] == 1, peaks);
11174
+ return updateBlockHeader(tx, newBlockNums[i], newBlockHeader, blockHasRelevantNotes[i] == 1);
11229
11175
  })),
11230
11176
  ]);
11231
11177
  });
11232
11178
  }
11233
- /**
11234
- * Advances `stateSync.blockNum` only when moving forward. Mirrors SQLite's
11235
- * `UPDATE blockchain_checkpoint ... WHERE block_num < ?`.
11236
- */
11237
- async function updateSyncHeight(tx, blockNum) {
11179
+ async function updateSyncHeight(tx, blockNum, newPeaks) {
11238
11180
  try {
11239
- const current = await tx.stateSync.get(1);
11181
+ // Only update if moving forward to prevent race conditions.
11182
+ // Peaks travel with blockNum: skipping the height update also skips the
11183
+ // peaks update, by design — a backward-going sync must not overwrite the
11184
+ // newer peaks with older ones.
11185
+ const current = await tx.blockchainCheckpoint.get(1);
11240
11186
  if (!current || current.blockNum < blockNum) {
11241
- await tx.stateSync.update(1, {
11187
+ await tx.blockchainCheckpoint.update(1, {
11242
11188
  blockNum: blockNum,
11189
+ partialBlockchainPeaks: newPeaks,
11243
11190
  });
11244
11191
  }
11245
11192
  }
11246
11193
  catch (error) {
11194
+ // logWebStoreError always re-throws, so a failure here aborts the whole
11195
+ // Dexie rw transaction rather than silently committing a partial update.
11247
11196
  logWebStoreError(error, "Failed to update sync height");
11248
11197
  }
11249
11198
  }
11250
- async function updateBlockHeader(tx, blockNum, blockHeader, hasClientNotes, partialBlockchainPeaks) {
11199
+ async function updateBlockHeader(tx, blockNum, blockHeader, hasClientNotes) {
11251
11200
  try {
11252
11201
  const data = {
11253
11202
  blockNum: blockNum,
11254
11203
  header: blockHeader,
11255
11204
  hasClientNotes: hasClientNotes.toString(),
11256
- ...(partialBlockchainPeaks !== undefined && { partialBlockchainPeaks }),
11257
11205
  };
11258
11206
  const existingBlockHeader = await tx.blockHeaders.get(blockNum);
11259
11207
  if (!existingBlockHeader) {
@@ -11277,8 +11225,9 @@ async function updatePartialBlockchainNodes(tx, nodeIndexes, nodes) {
11277
11225
  id: Number(nodeIndexes[index]),
11278
11226
  node: node,
11279
11227
  }));
11280
- // Use bulkPut to add/overwrite the entries
11281
- await tx.partialBlockchainNodes.bulkPut(data);
11228
+ // Insert missing nodes and reject conflicting writes
11229
+ await putPartialBlockchainNodesNoOverwrite(tx
11230
+ .partialBlockchainNodes, data);
11282
11231
  }
11283
11232
  catch (err) {
11284
11233
  logWebStoreError(err, "Failed to update partial blockchain nodes");
@@ -11502,17 +11451,6 @@ class Account {
11502
11451
  const ret = wasm.account_isFaucet(this.__wbg_ptr);
11503
11452
  return ret !== 0;
11504
11453
  }
11505
- /**
11506
- * Returns true if this is a network account.
11507
- *
11508
- * A network account is a public account whose storage
11509
- * carries the standardized network-account note-script allowlist slot.
11510
- * @returns {boolean}
11511
- */
11512
- isNetworkAccount() {
11513
- const ret = wasm.account_isNetworkAccount(this.__wbg_ptr);
11514
- return ret !== 0;
11515
- }
11516
11454
  /**
11517
11455
  * Returns true if the account has not yet been committed to the chain.
11518
11456
  * @returns {boolean}
@@ -11545,20 +11483,6 @@ class Account {
11545
11483
  const ret = wasm.account_isRegularAccount(this.__wbg_ptr);
11546
11484
  return ret !== 0;
11547
11485
  }
11548
- /**
11549
- * Returns the note-script roots this network account is allowed to
11550
- * consume, or `undefined` if this is not a network account.
11551
- * @returns {Word[] | undefined}
11552
- */
11553
- networkNoteAllowlist() {
11554
- const ret = wasm.account_networkNoteAllowlist(this.__wbg_ptr);
11555
- let v1;
11556
- if (ret[0] !== 0) {
11557
- v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
11558
- wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
11559
- }
11560
- return v1;
11561
- }
11562
11486
  /**
11563
11487
  * Returns the account nonce, which is incremented on every state update.
11564
11488
  * @returns {Felt}
@@ -11912,6 +11836,18 @@ class AccountComponent {
11912
11836
  }
11913
11837
  return AccountComponent.__wrap(ret[0]);
11914
11838
  }
11839
+ /**
11840
+ * Returns the exact compiled code used by this component.
11841
+ *
11842
+ * Link this code when compiling scripts that invoke the component. Rebuilding a library from
11843
+ * the original source can produce different procedure identities than the code installed on
11844
+ * the account.
11845
+ * @returns {AccountComponentCode}
11846
+ */
11847
+ componentCode() {
11848
+ const ret = wasm.accountcomponent_componentCode(this.__wbg_ptr);
11849
+ return AccountComponentCode.__wrap(ret);
11850
+ }
11915
11851
  /**
11916
11852
  * @param {Word} commitment
11917
11853
  * @param {AuthScheme} auth_scheme
@@ -11938,42 +11874,6 @@ class AccountComponent {
11938
11874
  }
11939
11875
  return AccountComponent.__wrap(ret[0]);
11940
11876
  }
11941
- /**
11942
- * Builds the auth component for a network account.
11943
- *
11944
- * A network account is a public account carrying this component: its
11945
- * note-script allowlist is the standardized storage slot the node's
11946
- * network-transaction builder inspects to identify the account as a network
11947
- * account and route matching notes to it for auto-consumption. The account
11948
- * may only consume notes whose script root is in `allowedNoteScriptRoots`
11949
- * (obtain a root via `NoteScript.root()`).
11950
- *
11951
- * `allowedTxScriptRoots` optionally allowlists transaction script roots
11952
- * (from `TransactionScript.root()`) the account will execute. When omitted
11953
- * or empty, the account permits no transaction scripts and deploys and
11954
- * advances via scriptless transactions only. Allowlist a script root only
11955
- * if the script's effect is safe for *every* possible input: a root pins
11956
- * the script's code but not its arguments or advice inputs, which the
11957
- * (arbitrary) transaction submitter controls.
11958
- *
11959
- * # Errors
11960
- * Errors if `allowedNoteScriptRoots` is empty: a network account with no
11961
- * allowlisted note scripts could never consume a note.
11962
- * @param {Word[]} allowed_note_script_roots
11963
- * @param {Word[] | null} [allowed_tx_script_roots]
11964
- * @returns {AccountComponent}
11965
- */
11966
- static createNetworkAuth(allowed_note_script_roots, allowed_tx_script_roots) {
11967
- const ptr0 = passArrayJsValueToWasm0(allowed_note_script_roots, wasm.__wbindgen_malloc);
11968
- const len0 = WASM_VECTOR_LEN;
11969
- var ptr1 = isLikeNone(allowed_tx_script_roots) ? 0 : passArrayJsValueToWasm0(allowed_tx_script_roots, wasm.__wbindgen_malloc);
11970
- var len1 = WASM_VECTOR_LEN;
11971
- const ret = wasm.accountcomponent_createNetworkAuth(ptr0, len0, ptr1, len1);
11972
- if (ret[2]) {
11973
- throw takeFromExternrefTable0(ret[1]);
11974
- }
11975
- return AccountComponent.__wrap(ret[0]);
11976
- }
11977
11877
  /**
11978
11878
  * Creates an account component from a compiled library and storage slots.
11979
11879
  * @param {Library} library
@@ -12100,8 +12000,10 @@ if (Symbol.dispose) AccountComponentCode.prototype[Symbol.dispose] = AccountComp
12100
12000
  * `AccountDelta` stores the differences between two account states.
12101
12001
  *
12102
12002
  * The differences are represented as follows:
12103
- * - `storage`: an `AccountStorageDelta` that contains the changes to the account storage.
12104
- * - `vault`: an `AccountVaultDelta` object that contains the changes to the account vault.
12003
+ * - `storage`: an `AccountStoragePatch` with the absolute final values of changed storage slots
12004
+ * (storage changes have identical semantics in the delta and patch models).
12005
+ * - `vault`: an `AccountVaultDelta` object that contains the relative changes to the account
12006
+ * vault.
12105
12007
  * - `nonce`: if the nonce of the account has changed, the new nonce is stored here.
12106
12008
  */
12107
12009
  class AccountDelta {
@@ -12167,12 +12069,12 @@ class AccountDelta {
12167
12069
  return ret;
12168
12070
  }
12169
12071
  /**
12170
- * Returns the storage delta.
12171
- * @returns {AccountStorageDelta}
12072
+ * Returns the storage patch (storage changes are absolute in both models).
12073
+ * @returns {AccountStoragePatch}
12172
12074
  */
12173
12075
  storage() {
12174
12076
  const ret = wasm.accountdelta_storage(this.__wbg_ptr);
12175
- return AccountStorageDelta.__wrap(ret);
12077
+ return AccountStoragePatch.__wrap(ret);
12176
12078
  }
12177
12079
  /**
12178
12080
  * Returns the vault delta.
@@ -12567,6 +12469,90 @@ const AccountInterface = Object.freeze({
12567
12469
  BasicWallet: 0, "0": "BasicWallet",
12568
12470
  });
12569
12471
 
12472
+ /**
12473
+ * Describes the new absolute account state produced by a transaction.
12474
+ */
12475
+ class AccountPatch {
12476
+ static __wrap(ptr) {
12477
+ ptr = ptr >>> 0;
12478
+ const obj = Object.create(AccountPatch.prototype);
12479
+ obj.__wbg_ptr = ptr;
12480
+ AccountPatchFinalization.register(obj, obj.__wbg_ptr, obj);
12481
+ return obj;
12482
+ }
12483
+ __destroy_into_raw() {
12484
+ const ptr = this.__wbg_ptr;
12485
+ this.__wbg_ptr = 0;
12486
+ AccountPatchFinalization.unregister(this);
12487
+ return ptr;
12488
+ }
12489
+ free() {
12490
+ const ptr = this.__destroy_into_raw();
12491
+ wasm.__wbg_accountpatch_free(ptr, 0);
12492
+ }
12493
+ /**
12494
+ * Deserializes an account patch from bytes.
12495
+ * @param {Uint8Array} bytes
12496
+ * @returns {AccountPatch}
12497
+ */
12498
+ static deserialize(bytes) {
12499
+ const ret = wasm.accountpatch_deserialize(bytes);
12500
+ if (ret[2]) {
12501
+ throw takeFromExternrefTable0(ret[1]);
12502
+ }
12503
+ return AccountPatch.__wrap(ret[0]);
12504
+ }
12505
+ /**
12506
+ * Returns the final nonce, or `None` if it was unchanged.
12507
+ * @returns {Felt | undefined}
12508
+ */
12509
+ finalNonce() {
12510
+ const ret = wasm.accountpatch_finalNonce(this.__wbg_ptr);
12511
+ return ret === 0 ? undefined : Felt.__wrap(ret);
12512
+ }
12513
+ /**
12514
+ * Returns the affected account ID.
12515
+ * @returns {AccountId}
12516
+ */
12517
+ id() {
12518
+ const ret = wasm.accountpatch_id(this.__wbg_ptr);
12519
+ return AccountId.__wrap(ret);
12520
+ }
12521
+ /**
12522
+ * Returns true if this patch contains no state changes.
12523
+ * @returns {boolean}
12524
+ */
12525
+ isEmpty() {
12526
+ const ret = wasm.accountpatch_isEmpty(this.__wbg_ptr);
12527
+ return ret !== 0;
12528
+ }
12529
+ /**
12530
+ * Serializes the account patch into bytes.
12531
+ * @returns {Uint8Array}
12532
+ */
12533
+ serialize() {
12534
+ const ret = wasm.accountpatch_serialize(this.__wbg_ptr);
12535
+ return ret;
12536
+ }
12537
+ /**
12538
+ * Returns the account storage patch.
12539
+ * @returns {AccountStoragePatch}
12540
+ */
12541
+ storage() {
12542
+ const ret = wasm.accountpatch_storage(this.__wbg_ptr);
12543
+ return AccountStoragePatch.__wrap(ret);
12544
+ }
12545
+ /**
12546
+ * Returns the account vault patch.
12547
+ * @returns {AccountVaultPatch}
12548
+ */
12549
+ vault() {
12550
+ const ret = wasm.accountpatch_vault(this.__wbg_ptr);
12551
+ return AccountVaultPatch.__wrap(ret);
12552
+ }
12553
+ }
12554
+ if (Symbol.dispose) AccountPatch.prototype[Symbol.dispose] = AccountPatch.prototype.free;
12555
+
12570
12556
  /**
12571
12557
  * Proof of existence of an account's state at a specific block number, as returned by the node.
12572
12558
  *
@@ -13040,74 +13026,6 @@ class AccountStorage {
13040
13026
  }
13041
13027
  if (Symbol.dispose) AccountStorage.prototype[Symbol.dispose] = AccountStorage.prototype.free;
13042
13028
 
13043
- /**
13044
- * `AccountStorageDelta` stores the differences between two states of account storage.
13045
- *
13046
- * The delta consists of two maps:
13047
- * - A map containing the updates to value storage slots. The keys in this map are indexes of the
13048
- * updated storage slots and the values are the new values for these slots.
13049
- * - A map containing updates to storage maps. The keys in this map are indexes of the updated
13050
- * storage slots and the values are corresponding storage map delta objects.
13051
- */
13052
- class AccountStorageDelta {
13053
- static __wrap(ptr) {
13054
- ptr = ptr >>> 0;
13055
- const obj = Object.create(AccountStorageDelta.prototype);
13056
- obj.__wbg_ptr = ptr;
13057
- AccountStorageDeltaFinalization.register(obj, obj.__wbg_ptr, obj);
13058
- return obj;
13059
- }
13060
- __destroy_into_raw() {
13061
- const ptr = this.__wbg_ptr;
13062
- this.__wbg_ptr = 0;
13063
- AccountStorageDeltaFinalization.unregister(this);
13064
- return ptr;
13065
- }
13066
- free() {
13067
- const ptr = this.__destroy_into_raw();
13068
- wasm.__wbg_accountstoragedelta_free(ptr, 0);
13069
- }
13070
- /**
13071
- * Deserializes a storage delta from bytes.
13072
- * @param {Uint8Array} bytes
13073
- * @returns {AccountStorageDelta}
13074
- */
13075
- static deserialize(bytes) {
13076
- const ret = wasm.accountstoragedelta_deserialize(bytes);
13077
- if (ret[2]) {
13078
- throw takeFromExternrefTable0(ret[1]);
13079
- }
13080
- return AccountStorageDelta.__wrap(ret[0]);
13081
- }
13082
- /**
13083
- * Returns true if no storage slots are changed.
13084
- * @returns {boolean}
13085
- */
13086
- isEmpty() {
13087
- const ret = wasm.accountstoragedelta_isEmpty(this.__wbg_ptr);
13088
- return ret !== 0;
13089
- }
13090
- /**
13091
- * Serializes the storage delta into bytes.
13092
- * @returns {Uint8Array}
13093
- */
13094
- serialize() {
13095
- const ret = wasm.accountstoragedelta_serialize(this.__wbg_ptr);
13096
- return ret;
13097
- }
13098
- /**
13099
- * Returns the new values for modified storage slots.
13100
- * @returns {Word[]}
13101
- */
13102
- values() {
13103
- const ret = wasm.accountstoragedelta_values(this.__wbg_ptr);
13104
- var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
13105
- wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
13106
- return v1;
13107
- }
13108
- }
13109
- if (Symbol.dispose) AccountStorageDelta.prototype[Symbol.dispose] = AccountStorageDelta.prototype.free;
13110
-
13111
13029
  /**
13112
13030
  * Storage visibility mode for an account.
13113
13031
  *
@@ -13190,8 +13108,70 @@ class AccountStorageMode {
13190
13108
  }
13191
13109
  if (Symbol.dispose) AccountStorageMode.prototype[Symbol.dispose] = AccountStorageMode.prototype.free;
13192
13110
 
13193
- class AccountStorageRequirements {
13194
- static __wrap(ptr) {
13111
+ /**
13112
+ * Absolute updates to named account storage slots.
13113
+ */
13114
+ class AccountStoragePatch {
13115
+ static __wrap(ptr) {
13116
+ ptr = ptr >>> 0;
13117
+ const obj = Object.create(AccountStoragePatch.prototype);
13118
+ obj.__wbg_ptr = ptr;
13119
+ AccountStoragePatchFinalization.register(obj, obj.__wbg_ptr, obj);
13120
+ return obj;
13121
+ }
13122
+ __destroy_into_raw() {
13123
+ const ptr = this.__wbg_ptr;
13124
+ this.__wbg_ptr = 0;
13125
+ AccountStoragePatchFinalization.unregister(this);
13126
+ return ptr;
13127
+ }
13128
+ free() {
13129
+ const ptr = this.__destroy_into_raw();
13130
+ wasm.__wbg_accountstoragepatch_free(ptr, 0);
13131
+ }
13132
+ /**
13133
+ * Deserializes a storage patch from bytes.
13134
+ * @param {Uint8Array} bytes
13135
+ * @returns {AccountStoragePatch}
13136
+ */
13137
+ static deserialize(bytes) {
13138
+ const ret = wasm.accountstoragepatch_deserialize(bytes);
13139
+ if (ret[2]) {
13140
+ throw takeFromExternrefTable0(ret[1]);
13141
+ }
13142
+ return AccountStoragePatch.__wrap(ret[0]);
13143
+ }
13144
+ /**
13145
+ * Returns true if no storage slots are changed.
13146
+ * @returns {boolean}
13147
+ */
13148
+ isEmpty() {
13149
+ const ret = wasm.accountstoragepatch_isEmpty(this.__wbg_ptr);
13150
+ return ret !== 0;
13151
+ }
13152
+ /**
13153
+ * Serializes the storage patch into bytes.
13154
+ * @returns {Uint8Array}
13155
+ */
13156
+ serialize() {
13157
+ const ret = wasm.accountstoragepatch_serialize(this.__wbg_ptr);
13158
+ return ret;
13159
+ }
13160
+ /**
13161
+ * Returns the final values for created or updated value slots.
13162
+ * @returns {Word[]}
13163
+ */
13164
+ values() {
13165
+ const ret = wasm.accountstoragepatch_values(this.__wbg_ptr);
13166
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
13167
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
13168
+ return v1;
13169
+ }
13170
+ }
13171
+ if (Symbol.dispose) AccountStoragePatch.prototype[Symbol.dispose] = AccountStoragePatch.prototype.free;
13172
+
13173
+ class AccountStorageRequirements {
13174
+ static __wrap(ptr) {
13195
13175
  ptr = ptr >>> 0;
13196
13176
  const obj = Object.create(AccountStorageRequirements.prototype);
13197
13177
  obj.__wbg_ptr = ptr;
@@ -13333,6 +13313,86 @@ class AccountVaultDelta {
13333
13313
  }
13334
13314
  if (Symbol.dispose) AccountVaultDelta.prototype[Symbol.dispose] = AccountVaultDelta.prototype.free;
13335
13315
 
13316
+ /**
13317
+ * Absolute updates to account vault entries.
13318
+ */
13319
+ class AccountVaultPatch {
13320
+ static __wrap(ptr) {
13321
+ ptr = ptr >>> 0;
13322
+ const obj = Object.create(AccountVaultPatch.prototype);
13323
+ obj.__wbg_ptr = ptr;
13324
+ AccountVaultPatchFinalization.register(obj, obj.__wbg_ptr, obj);
13325
+ return obj;
13326
+ }
13327
+ __destroy_into_raw() {
13328
+ const ptr = this.__wbg_ptr;
13329
+ this.__wbg_ptr = 0;
13330
+ AccountVaultPatchFinalization.unregister(this);
13331
+ return ptr;
13332
+ }
13333
+ free() {
13334
+ const ptr = this.__destroy_into_raw();
13335
+ wasm.__wbg_accountvaultpatch_free(ptr, 0);
13336
+ }
13337
+ /**
13338
+ * Deserializes a vault patch from bytes.
13339
+ * @param {Uint8Array} bytes
13340
+ * @returns {AccountVaultPatch}
13341
+ */
13342
+ static deserialize(bytes) {
13343
+ const ret = wasm.accountvaultpatch_deserialize(bytes);
13344
+ if (ret[2]) {
13345
+ throw takeFromExternrefTable0(ret[1]);
13346
+ }
13347
+ return AccountVaultPatch.__wrap(ret[0]);
13348
+ }
13349
+ /**
13350
+ * Returns true if no vault entries are changed.
13351
+ * @returns {boolean}
13352
+ */
13353
+ isEmpty() {
13354
+ const ret = wasm.accountstoragepatch_isEmpty(this.__wbg_ptr);
13355
+ return ret !== 0;
13356
+ }
13357
+ /**
13358
+ * Returns the number of changed vault entries.
13359
+ * @returns {number}
13360
+ */
13361
+ numAssets() {
13362
+ const ret = wasm.accountvaultpatch_numAssets(this.__wbg_ptr);
13363
+ return ret >>> 0;
13364
+ }
13365
+ /**
13366
+ * Returns the IDs of removed assets as their canonical words.
13367
+ * @returns {Word[]}
13368
+ */
13369
+ removedAssetIds() {
13370
+ const ret = wasm.accountvaultpatch_removedAssetIds(this.__wbg_ptr);
13371
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
13372
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
13373
+ return v1;
13374
+ }
13375
+ /**
13376
+ * Serializes the vault patch into bytes.
13377
+ * @returns {Uint8Array}
13378
+ */
13379
+ serialize() {
13380
+ const ret = wasm.accountvaultpatch_serialize(this.__wbg_ptr);
13381
+ return ret;
13382
+ }
13383
+ /**
13384
+ * Returns fungible assets whose final balance was added or updated.
13385
+ * @returns {FungibleAsset[]}
13386
+ */
13387
+ updatedFungibleAssets() {
13388
+ const ret = wasm.accountvaultpatch_updatedFungibleAssets(this.__wbg_ptr);
13389
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
13390
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
13391
+ return v1;
13392
+ }
13393
+ }
13394
+ if (Symbol.dispose) AccountVaultPatch.prototype[Symbol.dispose] = AccountVaultPatch.prototype.free;
13395
+
13336
13396
  /**
13337
13397
  * Representation of a Miden address (account ID plus routing parameters).
13338
13398
  */
@@ -13524,13 +13584,6 @@ if (Symbol.dispose) AdviceInputs.prototype[Symbol.dispose] = AdviceInputs.protot
13524
13584
  * Map of advice values keyed by words for script execution.
13525
13585
  */
13526
13586
  class AdviceMap {
13527
- static __wrap(ptr) {
13528
- ptr = ptr >>> 0;
13529
- const obj = Object.create(AdviceMap.prototype);
13530
- obj.__wbg_ptr = ptr;
13531
- AdviceMapFinalization.register(obj, obj.__wbg_ptr, obj);
13532
- return obj;
13533
- }
13534
13587
  __destroy_into_raw() {
13535
13588
  const ptr = this.__wbg_ptr;
13536
13589
  this.__wbg_ptr = 0;
@@ -13571,26 +13624,6 @@ class AdviceMap {
13571
13624
  }
13572
13625
  if (Symbol.dispose) AdviceMap.prototype[Symbol.dispose] = AdviceMap.prototype.free;
13573
13626
 
13574
- /**
13575
- * Whether a faucet's asset callbacks run when an asset is added to an account or a note.
13576
- *
13577
- * The flag is part of an asset's vault key, so two assets from the same faucet with different
13578
- * flags occupy different vault slots and do not merge. Assets minted by a faucet that registers
13579
- * transfer policies carry `Enabled`; everything else carries `Disabled`.
13580
- * @enum {0 | 1}
13581
- */
13582
- const AssetCallbackFlag = Object.freeze({
13583
- /**
13584
- * The faucet's callbacks are not invoked for this asset. This is the default for an asset
13585
- * built via the `FungibleAsset` constructor.
13586
- */
13587
- Disabled: 0, "0": "Disabled",
13588
- /**
13589
- * The faucet's callbacks are invoked before this asset is added to an account or a note.
13590
- */
13591
- Enabled: 1, "1": "Enabled",
13592
- });
13593
-
13594
13627
  /**
13595
13628
  * A container for an unlimited number of assets.
13596
13629
  *
@@ -13872,13 +13905,10 @@ class AuthSecretKey {
13872
13905
  if (Symbol.dispose) AuthSecretKey.prototype[Symbol.dispose] = AuthSecretKey.prototype.free;
13873
13906
 
13874
13907
  /**
13875
- * Provides metadata for a fungible faucet account component.
13908
+ * Provides metadata for a basic fungible faucet account component.
13876
13909
  *
13877
- * Reads the on-chain `FungibleFaucet` component for the account, which holds the per-token
13878
- * info (symbol, decimals, supply, and the descriptive metadata). The same component backs both
13879
- * "basic" public faucets and network-style faucets — in the current protocol the distinction is
13880
- * a function of the surrounding account configuration (account type, auth, access control), not
13881
- * of the faucet component itself — so this reads metadata from either kind of faucet account.
13910
+ * Reads the on-chain [`FungibleFaucet`] component for the account, which holds the
13911
+ * per-token info (symbol/decimals/maxSupply).
13882
13912
  */
13883
13913
  class BasicFungibleFaucetComponent {
13884
13914
  static __wrap(ptr) {
@@ -13906,32 +13936,6 @@ class BasicFungibleFaucetComponent {
13906
13936
  const ret = wasm.basicfungiblefaucetcomponent_decimals(this.__wbg_ptr);
13907
13937
  return ret;
13908
13938
  }
13909
- /**
13910
- * Returns the optional free-form token description, or `undefined` when unset.
13911
- * @returns {string | undefined}
13912
- */
13913
- description() {
13914
- const ret = wasm.basicfungiblefaucetcomponent_description(this.__wbg_ptr);
13915
- let v1;
13916
- if (ret[0] !== 0) {
13917
- v1 = getStringFromWasm0(ret[0], ret[1]).slice();
13918
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
13919
- }
13920
- return v1;
13921
- }
13922
- /**
13923
- * Returns the optional external link (e.g. project website), or `undefined` when unset.
13924
- * @returns {string | undefined}
13925
- */
13926
- externalLink() {
13927
- const ret = wasm.basicfungiblefaucetcomponent_externalLink(this.__wbg_ptr);
13928
- let v1;
13929
- if (ret[0] !== 0) {
13930
- v1 = getStringFromWasm0(ret[0], ret[1]).slice();
13931
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
13932
- }
13933
- return v1;
13934
- }
13935
13939
  /**
13936
13940
  * Extracts faucet metadata from an account.
13937
13941
  * @param {Account} account
@@ -13946,19 +13950,6 @@ class BasicFungibleFaucetComponent {
13946
13950
  }
13947
13951
  return BasicFungibleFaucetComponent.__wrap(ret[0]);
13948
13952
  }
13949
- /**
13950
- * Returns the optional token logo URI, or `undefined` when unset.
13951
- * @returns {string | undefined}
13952
- */
13953
- logoUri() {
13954
- const ret = wasm.basicfungiblefaucetcomponent_logoUri(this.__wbg_ptr);
13955
- let v1;
13956
- if (ret[0] !== 0) {
13957
- v1 = getStringFromWasm0(ret[0], ret[1]).slice();
13958
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
13959
- }
13960
- return v1;
13961
- }
13962
13953
  /**
13963
13954
  * Returns the maximum token supply.
13964
13955
  * @returns {Felt}
@@ -13975,30 +13966,6 @@ class BasicFungibleFaucetComponent {
13975
13966
  const ret = wasm.basicfungiblefaucetcomponent_symbol(this.__wbg_ptr);
13976
13967
  return TokenSymbol.__wrap(ret);
13977
13968
  }
13978
- /**
13979
- * Returns the human-readable token name.
13980
- * @returns {string}
13981
- */
13982
- tokenName() {
13983
- let deferred1_0;
13984
- let deferred1_1;
13985
- try {
13986
- const ret = wasm.basicfungiblefaucetcomponent_tokenName(this.__wbg_ptr);
13987
- deferred1_0 = ret[0];
13988
- deferred1_1 = ret[1];
13989
- return getStringFromWasm0(ret[0], ret[1]);
13990
- } finally {
13991
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
13992
- }
13993
- }
13994
- /**
13995
- * Returns the current token supply (the amount minted so far).
13996
- * @returns {Felt}
13997
- */
13998
- tokenSupply() {
13999
- const ret = wasm.basicfungiblefaucetcomponent_tokenSupply(this.__wbg_ptr);
14000
- return Felt.__wrap(ret);
14001
- }
14002
13969
  }
14003
13970
  if (Symbol.dispose) BasicFungibleFaucetComponent.prototype[Symbol.dispose] = BasicFungibleFaucetComponent.prototype.free;
14004
13971
 
@@ -14059,7 +14026,7 @@ class BlockHeader {
14059
14026
  * @returns {Word}
14060
14027
  */
14061
14028
  commitment() {
14062
- const ret = wasm.blockheader_commitment(this.__wbg_ptr);
14029
+ const ret = wasm.accountbuilderresult_seed(this.__wbg_ptr);
14063
14030
  return Word.__wrap(ret);
14064
14031
  }
14065
14032
  /**
@@ -14104,7 +14071,7 @@ class BlockHeader {
14104
14071
  * @returns {Word}
14105
14072
  */
14106
14073
  proofCommitment() {
14107
- const ret = wasm.blockheader_commitment(this.__wbg_ptr);
14074
+ const ret = wasm.accountbuilderresult_seed(this.__wbg_ptr);
14108
14075
  return Word.__wrap(ret);
14109
14076
  }
14110
14077
  /**
@@ -14213,6 +14180,26 @@ class CodeBuilder {
14213
14180
  }
14214
14181
  return AccountComponentCode.__wrap(ret[0]);
14215
14182
  }
14183
+ /**
14184
+ * Compiles account component code under an explicit module path.
14185
+ *
14186
+ * The module path is part of procedure identity in Miden Assembly 0.25. Callers that also
14187
+ * link this component into a transaction script must use the same path for both operations.
14188
+ * @param {string} component_path
14189
+ * @param {string} account_code
14190
+ * @returns {AccountComponentCode}
14191
+ */
14192
+ compileAccountComponentCodeWithPath(component_path, account_code) {
14193
+ const ptr0 = passStringToWasm0(component_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
14194
+ const len0 = WASM_VECTOR_LEN;
14195
+ const ptr1 = passStringToWasm0(account_code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
14196
+ const len1 = WASM_VECTOR_LEN;
14197
+ const ret = wasm.codebuilder_compileAccountComponentCodeWithPath(this.__wbg_ptr, ptr0, len0, ptr1, len1);
14198
+ if (ret[2]) {
14199
+ throw takeFromExternrefTable0(ret[1]);
14200
+ }
14201
+ return AccountComponentCode.__wrap(ret[0]);
14202
+ }
14216
14203
  /**
14217
14204
  * Given a Note Script's source code, compiles it with the available
14218
14205
  * modules under this builder. Returns the compiled script.
@@ -14243,6 +14230,20 @@ class CodeBuilder {
14243
14230
  }
14244
14231
  return TransactionScript.__wrap(ret[0]);
14245
14232
  }
14233
+ /**
14234
+ * Dynamically links the exact library installed by an account component.
14235
+ *
14236
+ * Use this for component procedures that are available on-chain and invoked with dynamic
14237
+ * calls, including foreign procedure invocation.
14238
+ * @param {AccountComponentCode} account_component_code
14239
+ */
14240
+ linkDynamicAccountComponentCode(account_component_code) {
14241
+ _assertClass(account_component_code, AccountComponentCode);
14242
+ const ret = wasm.codebuilder_linkDynamicAccountComponentCode(this.__wbg_ptr, account_component_code.__wbg_ptr);
14243
+ if (ret[1]) {
14244
+ throw takeFromExternrefTable0(ret[0]);
14245
+ }
14246
+ }
14246
14247
  /**
14247
14248
  * This is useful to dynamically link the {@link Library} of a foreign account
14248
14249
  * that is invoked using foreign procedure invocation (FPI). Its code is available
@@ -14275,6 +14276,20 @@ class CodeBuilder {
14275
14276
  throw takeFromExternrefTable0(ret[0]);
14276
14277
  }
14277
14278
  }
14279
+ /**
14280
+ * Statically links the exact library installed by an account component.
14281
+ *
14282
+ * This should be preferred over rebuilding the component source with `buildLibrary`, because
14283
+ * the installed component code is the source of truth for its procedure identities.
14284
+ * @param {AccountComponentCode} account_component_code
14285
+ */
14286
+ linkStaticAccountComponentCode(account_component_code) {
14287
+ _assertClass(account_component_code, AccountComponentCode);
14288
+ const ret = wasm.codebuilder_linkStaticAccountComponentCode(this.__wbg_ptr, account_component_code.__wbg_ptr);
14289
+ if (ret[1]) {
14290
+ throw takeFromExternrefTable0(ret[0]);
14291
+ }
14292
+ }
14278
14293
  /**
14279
14294
  * Statically links the given library.
14280
14295
  *
@@ -14566,111 +14581,13 @@ class Endpoint {
14566
14581
  }
14567
14582
  if (Symbol.dispose) Endpoint.prototype[Symbol.dispose] = Endpoint.prototype.free;
14568
14583
 
14569
- /**
14570
- * A 20-byte Ethereum address, used as the destination of an `AggLayer` bridge-out (B2AGG) note.
14571
- *
14572
- * Construct one from a hex string with [`EthAddress::from_hex`] (the `0x` prefix is optional) or
14573
- * from raw bytes with [`EthAddress::from_bytes`]. The canonical lowercase, `0x`-prefixed hex form
14574
- * is available via [`EthAddress::to_hex`] (also exposed as `toString`).
14575
- */
14576
- class EthAddress {
14577
- static __wrap(ptr) {
14578
- ptr = ptr >>> 0;
14579
- const obj = Object.create(EthAddress.prototype);
14580
- obj.__wbg_ptr = ptr;
14581
- EthAddressFinalization.register(obj, obj.__wbg_ptr, obj);
14582
- return obj;
14583
- }
14584
- __destroy_into_raw() {
14585
- const ptr = this.__wbg_ptr;
14586
- this.__wbg_ptr = 0;
14587
- EthAddressFinalization.unregister(this);
14588
- return ptr;
14589
- }
14590
- free() {
14591
- const ptr = this.__destroy_into_raw();
14592
- wasm.__wbg_ethaddress_free(ptr, 0);
14593
- }
14594
- /**
14595
- * Builds an Ethereum address from its raw 20-byte big-endian representation.
14596
- *
14597
- * Returns an error if the input is not exactly 20 bytes long.
14598
- * @param {Uint8Array} bytes
14599
- * @returns {EthAddress}
14600
- */
14601
- static fromBytes(bytes) {
14602
- const ret = wasm.ethaddress_fromBytes(bytes);
14603
- if (ret[2]) {
14604
- throw takeFromExternrefTable0(ret[1]);
14605
- }
14606
- return EthAddress.__wrap(ret[0]);
14607
- }
14608
- /**
14609
- * Builds an Ethereum address from a hex string (with or without the `0x` prefix).
14610
- *
14611
- * Returns an error if the string is not valid hex or does not encode exactly 20 bytes.
14612
- * @param {string} hex
14613
- * @returns {EthAddress}
14614
- */
14615
- static fromHex(hex) {
14616
- const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
14617
- const len0 = WASM_VECTOR_LEN;
14618
- const ret = wasm.ethaddress_fromHex(ptr0, len0);
14619
- if (ret[2]) {
14620
- throw takeFromExternrefTable0(ret[1]);
14621
- }
14622
- return EthAddress.__wrap(ret[0]);
14623
- }
14624
- /**
14625
- * Returns the raw 20-byte big-endian representation of the address.
14626
- * @returns {Uint8Array}
14627
- */
14628
- toBytes() {
14629
- const ret = wasm.ethaddress_toBytes(this.__wbg_ptr);
14630
- return ret;
14631
- }
14632
- /**
14633
- * Returns the canonical lowercase, `0x`-prefixed hex representation of the address.
14634
- * @returns {string}
14635
- */
14636
- toHex() {
14637
- let deferred1_0;
14638
- let deferred1_1;
14639
- try {
14640
- const ret = wasm.ethaddress_toHex(this.__wbg_ptr);
14641
- deferred1_0 = ret[0];
14642
- deferred1_1 = ret[1];
14643
- return getStringFromWasm0(ret[0], ret[1]);
14644
- } finally {
14645
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
14646
- }
14647
- }
14648
- /**
14649
- * Returns the canonical lowercase, `0x`-prefixed hex representation of the address.
14650
- * @returns {string}
14651
- */
14652
- toString() {
14653
- let deferred1_0;
14654
- let deferred1_1;
14655
- try {
14656
- const ret = wasm.ethaddress_toString(this.__wbg_ptr);
14657
- deferred1_0 = ret[0];
14658
- deferred1_1 = ret[1];
14659
- return getStringFromWasm0(ret[0], ret[1]);
14660
- } finally {
14661
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
14662
- }
14663
- }
14664
- }
14665
- if (Symbol.dispose) EthAddress.prototype[Symbol.dispose] = EthAddress.prototype.free;
14666
-
14667
14584
  /**
14668
14585
  * Describes the result of executing a transaction program for the Miden protocol.
14669
14586
  *
14670
14587
  * Executed transaction serves two primary purposes:
14671
14588
  * - It contains a complete description of the effects of the transaction. Specifically, it
14672
- * contains all output notes created as the result of the transaction and describes all the
14673
- * changes made to the involved account (i.e., the account delta).
14589
+ * contains all output notes created as the result of the transaction and the absolute-valued
14590
+ * account patch produced by execution.
14674
14591
  * - It contains all the information required to re-execute and prove the transaction in a
14675
14592
  * stateless manner. This includes all public transaction inputs, but also all nondeterministic
14676
14593
  * inputs that the host provided to Miden VM while executing the transaction (i.e., advice
@@ -14694,14 +14611,6 @@ class ExecutedTransaction {
14694
14611
  const ptr = this.__destroy_into_raw();
14695
14612
  wasm.__wbg_executedtransaction_free(ptr, 0);
14696
14613
  }
14697
- /**
14698
- * Returns the account delta resulting from execution.
14699
- * @returns {AccountDelta}
14700
- */
14701
- accountDelta() {
14702
- const ret = wasm.executedtransaction_accountDelta(this.__wbg_ptr);
14703
- return AccountDelta.__wrap(ret);
14704
- }
14705
14614
  /**
14706
14615
  * Returns the account the transaction was executed against.
14707
14616
  * @returns {AccountId}
@@ -14710,6 +14619,14 @@ class ExecutedTransaction {
14710
14619
  const ret = wasm.executedtransaction_accountId(this.__wbg_ptr);
14711
14620
  return AccountId.__wrap(ret);
14712
14621
  }
14622
+ /**
14623
+ * Returns the absolute account patch resulting from execution.
14624
+ * @returns {AccountPatch}
14625
+ */
14626
+ accountPatch() {
14627
+ const ret = wasm.executedtransaction_accountPatch(this.__wbg_ptr);
14628
+ return AccountPatch.__wrap(ret);
14629
+ }
14713
14630
  /**
14714
14631
  * Returns the block header that included the transaction.
14715
14632
  * @returns {BlockHeader}
@@ -14982,7 +14899,7 @@ class FetchedAccount {
14982
14899
  * @returns {number}
14983
14900
  */
14984
14901
  lastBlockNum() {
14985
- const ret = wasm.accountproof_blockNum(this.__wbg_ptr);
14902
+ const ret = wasm.fetchedaccount_lastBlockNum(this.__wbg_ptr);
14986
14903
  return ret >>> 0;
14987
14904
  }
14988
14905
  }
@@ -15333,14 +15250,6 @@ class FungibleAsset {
15333
15250
  const ret = wasm.fungibleasset_amount(this.__wbg_ptr);
15334
15251
  return BigInt.asUintN(64, ret);
15335
15252
  }
15336
- /**
15337
- * Returns whether this asset invokes its faucet's callbacks.
15338
- * @returns {AssetCallbackFlag}
15339
- */
15340
- callbacks() {
15341
- const ret = wasm.fungibleasset_callbacks(this.__wbg_ptr);
15342
- return ret;
15343
- }
15344
15253
  /**
15345
15254
  * Returns the faucet account that minted this asset.
15346
15255
  * @returns {AccountId}
@@ -15372,20 +15281,6 @@ class FungibleAsset {
15372
15281
  FungibleAssetFinalization.register(this, this.__wbg_ptr, this);
15373
15282
  return this;
15374
15283
  }
15375
- /**
15376
- * Returns a copy of this asset carrying the given callback flag.
15377
- *
15378
- * The flag is part of the asset's vault key, so it must match the flag the issuing faucet
15379
- * applies — an asset built with the wrong flag addresses a different vault slot than the one
15380
- * holding the balance. The constructor always produces `Disabled`; pass `Enabled` only for
15381
- * assets from a faucet that registers transfer policies.
15382
- * @param {AssetCallbackFlag} callbacks
15383
- * @returns {FungibleAsset}
15384
- */
15385
- withCallbacks(callbacks) {
15386
- const ret = wasm.fungibleasset_withCallbacks(this.__wbg_ptr, callbacks);
15387
- return FungibleAsset.__wrap(ret);
15388
- }
15389
15284
  }
15390
15285
  if (Symbol.dispose) FungibleAsset.prototype[Symbol.dispose] = FungibleAsset.prototype.free;
15391
15286
 
@@ -15450,7 +15345,7 @@ class FungibleAssetDelta {
15450
15345
  * @returns {boolean}
15451
15346
  */
15452
15347
  isEmpty() {
15453
- const ret = wasm.accountstoragedelta_isEmpty(this.__wbg_ptr);
15348
+ const ret = wasm.accountstoragepatch_isEmpty(this.__wbg_ptr);
15454
15349
  return ret !== 0;
15455
15350
  }
15456
15351
  /**
@@ -15458,7 +15353,7 @@ class FungibleAssetDelta {
15458
15353
  * @returns {number}
15459
15354
  */
15460
15355
  numAssets() {
15461
- const ret = wasm.fungibleassetdelta_numAssets(this.__wbg_ptr);
15356
+ const ret = wasm.accountvaultpatch_numAssets(this.__wbg_ptr);
15462
15357
  return ret >>> 0;
15463
15358
  }
15464
15359
  /**
@@ -15761,16 +15656,6 @@ class InputNoteRecord {
15761
15656
  const ret = wasm.inputnoterecord_isConsumed(this.__wbg_ptr);
15762
15657
  return ret !== 0;
15763
15658
  }
15764
- /**
15765
- * Returns true while the note's on-chain inclusion is still unsettled
15766
- * (`Expected` or `Unverified`), i.e. while sync is the mechanism that can
15767
- * advance this record.
15768
- * @returns {boolean}
15769
- */
15770
- isInclusionPending() {
15771
- const ret = wasm.inputnoterecord_isInclusionPending(this.__wbg_ptr);
15772
- return ret !== 0;
15773
- }
15774
15659
  /**
15775
15660
  * Returns true if the note is currently being processed.
15776
15661
  * @returns {boolean}
@@ -16501,13 +16386,12 @@ class JsStateSyncUpdate {
16501
16386
  return v1;
16502
16387
  }
16503
16388
  /**
16504
- * Serialized MMR peaks at the new sync height (single set for the whole update).
16505
- * Written onto the chain-tip block's `blockHeaders` row (the one whose
16506
- * `blockNum` matches `block_num`) and read back by `getCurrentBlockchainPeaks`.
16389
+ * Serialized MMR peaks at the new sync height. The only peaks persisted by the
16390
+ * client (peaks for intermediate note blocks are never read, so they are not stored).
16507
16391
  * @returns {Uint8Array}
16508
16392
  */
16509
- get partialBlockchainPeaks() {
16510
- const ret = wasm.__wbg_get_jsstatesyncupdate_partialBlockchainPeaks(this.__wbg_ptr);
16393
+ get newPeaks() {
16394
+ const ret = wasm.__wbg_get_jsstatesyncupdate_newPeaks(this.__wbg_ptr);
16511
16395
  var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
16512
16396
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
16513
16397
  return v1;
@@ -16620,15 +16504,14 @@ class JsStateSyncUpdate {
16620
16504
  wasm.__wbg_set_jsstatesyncupdate_newBlockNums(this.__wbg_ptr, ptr0, len0);
16621
16505
  }
16622
16506
  /**
16623
- * Serialized MMR peaks at the new sync height (single set for the whole update).
16624
- * Written onto the chain-tip block's `blockHeaders` row (the one whose
16625
- * `blockNum` matches `block_num`) and read back by `getCurrentBlockchainPeaks`.
16507
+ * Serialized MMR peaks at the new sync height. The only peaks persisted by the
16508
+ * client (peaks for intermediate note blocks are never read, so they are not stored).
16626
16509
  * @param {Uint8Array} arg0
16627
16510
  */
16628
- set partialBlockchainPeaks(arg0) {
16511
+ set newPeaks(arg0) {
16629
16512
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
16630
16513
  const len0 = WASM_VECTOR_LEN;
16631
- wasm.__wbg_set_jsstatesyncupdate_partialBlockchainPeaks(this.__wbg_ptr, ptr0, len0);
16514
+ wasm.__wbg_set_jsstatesyncupdate_newPeaks(this.__wbg_ptr, ptr0, len0);
16632
16515
  }
16633
16516
  /**
16634
16517
  * Input notes for this state update in serialized form.
@@ -16816,6 +16699,17 @@ class JsStorageSlot {
16816
16699
  const ptr = this.__destroy_into_raw();
16817
16700
  wasm.__wbg_jsstorageslot_free(ptr, 0);
16818
16701
  }
16702
+ /**
16703
+ * The storage patch operation (create, update, or remove).
16704
+ *
16705
+ * Full-state writes do not inspect this field, but incremental writes use it to distinguish
16706
+ * map replacement/removal from an entry-wise update.
16707
+ * @returns {number}
16708
+ */
16709
+ get patchOperation() {
16710
+ const ret = wasm.__wbg_get_jsstorageslot_patchOperation(this.__wbg_ptr);
16711
+ return ret;
16712
+ }
16819
16713
  /**
16820
16714
  * The name of the storage slot.
16821
16715
  * @returns {string}
@@ -16856,6 +16750,16 @@ class JsStorageSlot {
16856
16750
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
16857
16751
  }
16858
16752
  }
16753
+ /**
16754
+ * The storage patch operation (create, update, or remove).
16755
+ *
16756
+ * Full-state writes do not inspect this field, but incremental writes use it to distinguish
16757
+ * map replacement/removal from an entry-wise update.
16758
+ * @param {number} arg0
16759
+ */
16760
+ set patchOperation(arg0) {
16761
+ wasm.__wbg_set_jsstorageslot_patchOperation(this.__wbg_ptr, arg0);
16762
+ }
16859
16763
  /**
16860
16764
  * The name of the storage slot.
16861
16765
  * @param {string} arg0
@@ -17057,97 +16961,6 @@ class MerklePath {
17057
16961
  }
17058
16962
  if (Symbol.dispose) MerklePath.prototype[Symbol.dispose] = MerklePath.prototype.free;
17059
16963
 
17060
- /**
17061
- * Targets a note at a public network account so the operator auto-consumes it.
17062
- *
17063
- * A note is a network note when it is `Public` and carries a valid
17064
- * `NetworkAccountTarget` attachment (see `Note.isNetworkNote`).
17065
- */
17066
- class NetworkAccountTarget {
17067
- static __wrap(ptr) {
17068
- ptr = ptr >>> 0;
17069
- const obj = Object.create(NetworkAccountTarget.prototype);
17070
- obj.__wbg_ptr = ptr;
17071
- NetworkAccountTargetFinalization.register(obj, obj.__wbg_ptr, obj);
17072
- return obj;
17073
- }
17074
- __destroy_into_raw() {
17075
- const ptr = this.__wbg_ptr;
17076
- this.__wbg_ptr = 0;
17077
- NetworkAccountTargetFinalization.unregister(this);
17078
- return ptr;
17079
- }
17080
- free() {
17081
- const ptr = this.__destroy_into_raw();
17082
- wasm.__wbg_networkaccounttarget_free(ptr, 0);
17083
- }
17084
- /**
17085
- * Returns the note execution hint.
17086
- * @returns {NoteExecutionHint}
17087
- */
17088
- executionHint() {
17089
- const ret = wasm.networkaccounttarget_executionHint(this.__wbg_ptr);
17090
- return NoteExecutionHint.__wrap(ret);
17091
- }
17092
- /**
17093
- * Decodes a `NoteAttachment` back into a `NetworkAccountTarget`.
17094
- *
17095
- * # Errors
17096
- * Errors if the attachment is not a valid network-account-target attachment.
17097
- * @param {NoteAttachment} attachment
17098
- * @returns {NetworkAccountTarget}
17099
- */
17100
- static fromAttachment(attachment) {
17101
- _assertClass(attachment, NoteAttachment);
17102
- const ret = wasm.networkaccounttarget_fromAttachment(attachment.__wbg_ptr);
17103
- if (ret[2]) {
17104
- throw takeFromExternrefTable0(ret[1]);
17105
- }
17106
- return NetworkAccountTarget.__wrap(ret[0]);
17107
- }
17108
- /**
17109
- * Creates a target for the given network account. `executionHint` defaults
17110
- * to `NoteExecutionHint.always()`.
17111
- *
17112
- * # Errors
17113
- * Errors if `account_id` is not a public account.
17114
- * @param {AccountId} account_id
17115
- * @param {NoteExecutionHint | null} [execution_hint]
17116
- */
17117
- constructor(account_id, execution_hint) {
17118
- _assertClass(account_id, AccountId);
17119
- let ptr0 = 0;
17120
- if (!isLikeNone(execution_hint)) {
17121
- _assertClass(execution_hint, NoteExecutionHint);
17122
- ptr0 = execution_hint.__destroy_into_raw();
17123
- }
17124
- const ret = wasm.networkaccounttarget_new(account_id.__wbg_ptr, ptr0);
17125
- if (ret[2]) {
17126
- throw takeFromExternrefTable0(ret[1]);
17127
- }
17128
- this.__wbg_ptr = ret[0] >>> 0;
17129
- NetworkAccountTargetFinalization.register(this, this.__wbg_ptr, this);
17130
- return this;
17131
- }
17132
- /**
17133
- * Returns the targeted network account id.
17134
- * @returns {AccountId}
17135
- */
17136
- targetId() {
17137
- const ret = wasm.accountreader_accountId(this.__wbg_ptr);
17138
- return AccountId.__wrap(ret);
17139
- }
17140
- /**
17141
- * Encodes this target as a `NoteAttachment`.
17142
- * @returns {NoteAttachment}
17143
- */
17144
- toAttachment() {
17145
- const ret = wasm.networkaccounttarget_toAttachment(this.__wbg_ptr);
17146
- return NoteAttachment.__wrap(ret);
17147
- }
17148
- }
17149
- if (Symbol.dispose) NetworkAccountTarget.prototype[Symbol.dispose] = NetworkAccountTarget.prototype.free;
17150
-
17151
16964
  /**
17152
16965
  * The identifier of a Miden network.
17153
16966
  */
@@ -17341,16 +17154,6 @@ class Note {
17341
17154
  const ret = wasm.note_assets(this.__wbg_ptr);
17342
17155
  return NoteAssets.__wrap(ret);
17343
17156
  }
17344
- /**
17345
- * Returns the note's attachments.
17346
- * @returns {NoteAttachment[]}
17347
- */
17348
- attachments() {
17349
- const ret = wasm.note_attachments(this.__wbg_ptr);
17350
- var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
17351
- wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
17352
- return v1;
17353
- }
17354
17157
  /**
17355
17158
  * Returns the commitment to the note (its ID).
17356
17159
  *
@@ -17360,35 +17163,9 @@ class Note {
17360
17163
  * unchanged.
17361
17164
  * @returns {Word}
17362
17165
  */
17363
- commitment() {
17364
- const ret = wasm.note_commitment(this.__wbg_ptr);
17365
- return Word.__wrap(ret);
17366
- }
17367
- /**
17368
- * Builds a B2AGG (Bridge-to-AggLayer) note that bridges the given assets out to another
17369
- * network via the `AggLayer`.
17370
- *
17371
- * The note is always public and is consumed by `bridge_account`, which burns the assets so
17372
- * they can be claimed on the destination network at `destination_address` (an Ethereum
17373
- * address on the AggLayer-assigned `destination_network`). The assets must be fungible assets
17374
- * issued by a network faucet.
17375
- * @param {AccountId} sender
17376
- * @param {AccountId} bridge_account
17377
- * @param {NoteAssets} assets
17378
- * @param {number} destination_network
17379
- * @param {EthAddress} destination_address
17380
- * @returns {Note}
17381
- */
17382
- static createB2AggNote(sender, bridge_account, assets, destination_network, destination_address) {
17383
- _assertClass(sender, AccountId);
17384
- _assertClass(bridge_account, AccountId);
17385
- _assertClass(assets, NoteAssets);
17386
- _assertClass(destination_address, EthAddress);
17387
- const ret = wasm.note_createB2AggNote(sender.__wbg_ptr, bridge_account.__wbg_ptr, assets.__wbg_ptr, destination_network, destination_address.__wbg_ptr);
17388
- if (ret[2]) {
17389
- throw takeFromExternrefTable0(ret[1]);
17390
- }
17391
- return Note.__wrap(ret[0]);
17166
+ commitment() {
17167
+ const ret = wasm.note_commitment(this.__wbg_ptr);
17168
+ return Word.__wrap(ret);
17392
17169
  }
17393
17170
  /**
17394
17171
  * Builds a P2IDE note that can be reclaimed or timelocked based on block heights.
@@ -17452,15 +17229,6 @@ class Note {
17452
17229
  const ret = wasm.note_commitment(this.__wbg_ptr);
17453
17230
  return NoteId.__wrap(ret);
17454
17231
  }
17455
- /**
17456
- * Returns true if the note is a network note (public + a valid
17457
- * `NetworkAccountTarget` attachment).
17458
- * @returns {boolean}
17459
- */
17460
- isNetworkNote() {
17461
- const ret = wasm.note_isNetworkNote(this.__wbg_ptr);
17462
- return ret !== 0;
17463
- }
17464
17232
  /**
17465
17233
  * Returns the public metadata associated with the note.
17466
17234
  * @returns {NoteMetadata}
@@ -17520,30 +17288,6 @@ class Note {
17520
17288
  const ret = wasm.note_serialize(this.__wbg_ptr);
17521
17289
  return ret;
17522
17290
  }
17523
- /**
17524
- * Creates a note carrying the provided attachments, using the metadata's
17525
- * sender / note type / tag (attachments on the metadata itself are ignored).
17526
- *
17527
- * # Errors
17528
- * Errors if the attachment set is invalid (too many attachments or words).
17529
- * @param {NoteAssets} note_assets
17530
- * @param {NoteMetadata} note_metadata
17531
- * @param {NoteRecipient} note_recipient
17532
- * @param {NoteAttachment[]} attachments
17533
- * @returns {Note}
17534
- */
17535
- static withAttachments(note_assets, note_metadata, note_recipient, attachments) {
17536
- _assertClass(note_assets, NoteAssets);
17537
- _assertClass(note_metadata, NoteMetadata);
17538
- _assertClass(note_recipient, NoteRecipient);
17539
- const ptr0 = passArrayJsValueToWasm0(attachments, wasm.__wbindgen_malloc);
17540
- const len0 = WASM_VECTOR_LEN;
17541
- const ret = wasm.note_withAttachments(note_assets.__wbg_ptr, note_metadata.__wbg_ptr, note_recipient.__wbg_ptr, ptr0, len0);
17542
- if (ret[2]) {
17543
- throw takeFromExternrefTable0(ret[1]);
17544
- }
17545
- return Note.__wrap(ret[0]);
17546
- }
17547
17291
  }
17548
17292
  if (Symbol.dispose) Note.prototype[Symbol.dispose] = Note.prototype.free;
17549
17293
 
@@ -17811,12 +17555,6 @@ class NoteAttachment {
17811
17555
  NoteAttachmentFinalization.register(obj, obj.__wbg_ptr, obj);
17812
17556
  return obj;
17813
17557
  }
17814
- static __unwrap(jsValue) {
17815
- if (!(jsValue instanceof NoteAttachment)) {
17816
- return 0;
17817
- }
17818
- return jsValue.__destroy_into_raw();
17819
- }
17820
17558
  __destroy_into_raw() {
17821
17559
  const ptr = this.__wbg_ptr;
17822
17560
  this.__wbg_ptr = 0;
@@ -18440,6 +18178,19 @@ class NoteFile {
18440
18178
  }
18441
18179
  return NoteFile.__wrap(ret[0]);
18442
18180
  }
18181
+ /**
18182
+ * Creates an expected-note file with the sync hint required by miden-client 0.16.
18183
+ * @param {NoteDetails} note_details
18184
+ * @param {NoteTag} note_tag
18185
+ * @param {number} after_block_num
18186
+ * @returns {NoteFile}
18187
+ */
18188
+ static fromExpectedNote(note_details, note_tag, after_block_num) {
18189
+ _assertClass(note_details, NoteDetails);
18190
+ _assertClass(note_tag, NoteTag);
18191
+ const ret = wasm.notefile_fromExpectedNote(note_details.__wbg_ptr, note_tag.__wbg_ptr, after_block_num);
18192
+ return NoteFile.__wrap(ret);
18193
+ }
18443
18194
  /**
18444
18195
  * Creates a `NoteFile` from an input note, preserving proof when available.
18445
18196
  * @param {InputNote} note
@@ -18451,7 +18202,11 @@ class NoteFile {
18451
18202
  return NoteFile.__wrap(ret);
18452
18203
  }
18453
18204
  /**
18454
- * Creates a `NoteFile` from note details.
18205
+ * Creates a `NoteFile` from note details using a zero-valued sync hint.
18206
+ *
18207
+ * miden-client 0.16 requires every expected note to include a tag and an after-block hint.
18208
+ * This retains the old one-argument JS API by using block zero and the default tag. Prefer
18209
+ * [`from_expected_note`](Self::from_expected_note) when the real sync hint is available.
18455
18210
  * @param {NoteDetails} note_details
18456
18211
  * @returns {NoteFile}
18457
18212
  */
@@ -19047,19 +18802,6 @@ class NoteRecipient {
19047
18802
  const ret = wasm.accountheader_storageCommitment(this.__wbg_ptr);
19048
18803
  return Word.__wrap(ret);
19049
18804
  }
19050
- /**
19051
- * Creates a recipient from a script and storage, generating a fresh random
19052
- * serial number (the secret that prevents double-spends).
19053
- * @param {NoteScript} note_script
19054
- * @param {NoteStorage} storage
19055
- * @returns {NoteRecipient}
19056
- */
19057
- static fromScript(note_script, storage) {
19058
- _assertClass(note_script, NoteScript);
19059
- _assertClass(storage, NoteStorage);
19060
- const ret = wasm.noterecipient_fromScript(note_script.__wbg_ptr, storage.__wbg_ptr);
19061
- return NoteRecipient.__wrap(ret);
19062
- }
19063
18805
  /**
19064
18806
  * Creates a note recipient from its serial number, script, and storage.
19065
18807
  * @param {Word} serial_num
@@ -19747,7 +19489,7 @@ class OutputNoteRecord {
19747
19489
  * @returns {number}
19748
19490
  */
19749
19491
  expectedHeight() {
19750
- const ret = wasm.outputnoterecord_expectedHeight(this.__wbg_ptr);
19492
+ const ret = wasm.blockheader_version(this.__wbg_ptr);
19751
19493
  return ret >>> 0;
19752
19494
  }
19753
19495
  /**
@@ -19782,22 +19524,12 @@ class OutputNoteRecord {
19782
19524
  const ret = wasm.outputnoterecord_isConsumed(this.__wbg_ptr);
19783
19525
  return ret !== 0;
19784
19526
  }
19785
- /**
19786
- * Returns true while the note's on-chain inclusion is still unsettled
19787
- * (`ExpectedFull` or `ExpectedPartial`), i.e. while sync is the mechanism
19788
- * that can advance this record.
19789
- * @returns {boolean}
19790
- */
19791
- isInclusionPending() {
19792
- const ret = wasm.outputnoterecord_isInclusionPending(this.__wbg_ptr);
19793
- return ret !== 0;
19794
- }
19795
19527
  /**
19796
19528
  * Returns the note metadata.
19797
19529
  * @returns {NoteMetadata}
19798
19530
  */
19799
19531
  metadata() {
19800
- const ret = wasm.committednote_metadata(this.__wbg_ptr);
19532
+ const ret = wasm.outputnoterecord_metadata(this.__wbg_ptr);
19801
19533
  return NoteMetadata.__wrap(ret);
19802
19534
  }
19803
19535
  /**
@@ -20170,7 +19902,7 @@ class ProvenTransaction {
20170
19902
  * @returns {AccountId}
20171
19903
  */
20172
19904
  accountId() {
20173
- const ret = wasm.account_id(this.__wbg_ptr);
19905
+ const ret = wasm.proventransaction_accountId(this.__wbg_ptr);
20174
19906
  return AccountId.__wrap(ret);
20175
19907
  }
20176
19908
  /**
@@ -20198,7 +19930,7 @@ class ProvenTransaction {
20198
19930
  * @returns {TransactionId}
20199
19931
  */
20200
19932
  id() {
20201
- const ret = wasm.accountcode_commitment(this.__wbg_ptr);
19933
+ const ret = wasm.proventransaction_id(this.__wbg_ptr);
20202
19934
  return TransactionId.__wrap(ret);
20203
19935
  }
20204
19936
  /**
@@ -20216,7 +19948,7 @@ class ProvenTransaction {
20216
19948
  * @returns {Word}
20217
19949
  */
20218
19950
  refBlockCommitment() {
20219
- const ret = wasm.accountheader_storageCommitment(this.__wbg_ptr);
19951
+ const ret = wasm.proventransaction_refBlockCommitment(this.__wbg_ptr);
20220
19952
  return Word.__wrap(ret);
20221
19953
  }
20222
19954
  /**
@@ -20238,119 +19970,6 @@ class ProvenTransaction {
20238
19970
  }
20239
19971
  if (Symbol.dispose) ProvenTransaction.prototype[Symbol.dispose] = ProvenTransaction.prototype.free;
20240
19972
 
20241
- /**
20242
- * Read-only view of one PSWAP order's chain state, exposed to JavaScript.
20243
- * The mutable fields (remaining amounts, depth, tip, state) advance
20244
- * round-by-round as fills are discovered during sync.
20245
- */
20246
- class PswapLineageRecord {
20247
- static __wrap(ptr) {
20248
- ptr = ptr >>> 0;
20249
- const obj = Object.create(PswapLineageRecord.prototype);
20250
- obj.__wbg_ptr = ptr;
20251
- PswapLineageRecordFinalization.register(obj, obj.__wbg_ptr, obj);
20252
- return obj;
20253
- }
20254
- __destroy_into_raw() {
20255
- const ptr = this.__wbg_ptr;
20256
- this.__wbg_ptr = 0;
20257
- PswapLineageRecordFinalization.unregister(this);
20258
- return ptr;
20259
- }
20260
- free() {
20261
- const ptr = this.__destroy_into_raw();
20262
- wasm.__wbg_pswaplineagerecord_free(ptr, 0);
20263
- }
20264
- /**
20265
- * Account that created the order and receives every payback.
20266
- * @returns {AccountId}
20267
- */
20268
- creatorAccountId() {
20269
- const ret = wasm.pswaplineagerecord_creatorAccountId(this.__wbg_ptr);
20270
- return AccountId.__wrap(ret);
20271
- }
20272
- /**
20273
- * Depth of the current tip: 0 for the original PSWAP, +1 per fill round.
20274
- * @returns {number}
20275
- */
20276
- currentDepth() {
20277
- const ret = wasm.pswaplineagerecord_currentDepth(this.__wbg_ptr);
20278
- return ret >>> 0;
20279
- }
20280
- /**
20281
- * Note id of the current tip in the chain.
20282
- * @returns {NoteId}
20283
- */
20284
- currentTipNoteId() {
20285
- const ret = wasm.pswaplineagerecord_currentTipNoteId(this.__wbg_ptr);
20286
- return NoteId.__wrap(ret);
20287
- }
20288
- /**
20289
- * Stable identifier shared by every note in the chain, as a decimal string.
20290
- * @returns {string}
20291
- */
20292
- orderId() {
20293
- let deferred1_0;
20294
- let deferred1_1;
20295
- try {
20296
- const ret = wasm.pswaplineagerecord_orderId(this.__wbg_ptr);
20297
- deferred1_0 = ret[0];
20298
- deferred1_1 = ret[1];
20299
- return getStringFromWasm0(ret[0], ret[1]);
20300
- } finally {
20301
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
20302
- }
20303
- }
20304
- /**
20305
- * Offered amount still unfilled on the current tip. The offered faucet is
20306
- * chain-invariant and recovered from the original PSWAP note when needed.
20307
- * @returns {bigint}
20308
- */
20309
- remainingOffered() {
20310
- const ret = wasm.pswaplineagerecord_remainingOffered(this.__wbg_ptr);
20311
- return BigInt.asUintN(64, ret);
20312
- }
20313
- /**
20314
- * Requested amount still outstanding on the current tip. The requested
20315
- * faucet is recovered from the original PSWAP note when needed.
20316
- * @returns {bigint}
20317
- */
20318
- remainingRequested() {
20319
- const ret = wasm.pswaplineagerecord_remainingRequested(this.__wbg_ptr);
20320
- return BigInt.asUintN(64, ret);
20321
- }
20322
- /**
20323
- * Lifecycle state of the order.
20324
- * @returns {PswapLineageState}
20325
- */
20326
- state() {
20327
- const ret = wasm.pswaplineagerecord_state(this.__wbg_ptr);
20328
- return ret;
20329
- }
20330
- }
20331
- if (Symbol.dispose) PswapLineageRecord.prototype[Symbol.dispose] = PswapLineageRecord.prototype.free;
20332
-
20333
- /**
20334
- * Lifecycle state of a PSWAP order.
20335
- *
20336
- * Discriminants match the on-disk encoding in the store.
20337
- * @enum {0 | 1 | 2}
20338
- */
20339
- const PswapLineageState = Object.freeze({
20340
- /**
20341
- * Still fillable and reclaimable.
20342
- */
20343
- Active: 0, "0": "Active",
20344
- /**
20345
- * Fully filled. Terminal.
20346
- */
20347
- FullyFilled: 1, "1": "FullyFilled",
20348
- /**
20349
- * Reclaimed by the creator. Terminal.
20350
- */
20351
- Reclaimed: 2, "2": "Reclaimed",
20352
- });
20353
-
20354
19973
  class PublicKey {
20355
19974
  static __wrap(ptr) {
20356
19975
  ptr = ptr >>> 0;
@@ -21097,7 +20716,7 @@ class SerializedOutputNoteData {
21097
20716
  set attachments(arg0) {
21098
20717
  const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
21099
20718
  const len0 = WASM_VECTOR_LEN;
21100
- wasm.__wbg_set_jsstatesyncupdate_partialBlockchainPeaks(this.__wbg_ptr, ptr0, len0);
20719
+ wasm.__wbg_set_jsstatesyncupdate_newPeaks(this.__wbg_ptr, ptr0, len0);
21101
20720
  }
21102
20721
  /**
21103
20722
  * @param {string} arg0
@@ -21842,7 +21461,7 @@ if (Symbol.dispose) StorageMapEntryJs.prototype[Symbol.dispose] = StorageMapEntr
21842
21461
  * Information about storage map updates for an account, as returned by the
21843
21462
  * `syncStorageMaps` RPC endpoint.
21844
21463
  *
21845
- * Contains the list of storage map updates within the requested block range,
21464
+ * Contains the storage map entries merged over the requested block range,
21846
21465
  * along with the chain tip and last processed block number.
21847
21466
  */
21848
21467
  class StorageMapInfo {
@@ -21893,8 +21512,8 @@ class StorageMapInfo {
21893
21512
  if (Symbol.dispose) StorageMapInfo.prototype[Symbol.dispose] = StorageMapInfo.prototype.free;
21894
21513
 
21895
21514
  /**
21896
- * A single storage map update entry, containing the block number, slot name,
21897
- * key, and new value.
21515
+ * A merged storage map entry containing the last processed block number, slot name, key, and
21516
+ * final value. The node no longer exposes the individual block number for each update.
21898
21517
  */
21899
21518
  class StorageMapUpdate {
21900
21519
  static __wrap(ptr) {
@@ -21915,7 +21534,7 @@ class StorageMapUpdate {
21915
21534
  wasm.__wbg_storagemapupdate_free(ptr, 0);
21916
21535
  }
21917
21536
  /**
21918
- * Returns the block number in which this update occurred.
21537
+ * Returns the last processed block number for the merged response.
21919
21538
  * @returns {number}
21920
21539
  */
21921
21540
  blockNum() {
@@ -22658,7 +22277,7 @@ class TransactionRecord {
22658
22277
  * @returns {AccountId}
22659
22278
  */
22660
22279
  accountId() {
22661
- const ret = wasm.transactionrecord_accountId(this.__wbg_ptr);
22280
+ const ret = wasm.proventransaction_accountId(this.__wbg_ptr);
22662
22281
  return AccountId.__wrap(ret);
22663
22282
  }
22664
22283
  /**
@@ -22706,7 +22325,7 @@ class TransactionRecord {
22706
22325
  * @returns {Word}
22707
22326
  */
22708
22327
  initAccountState() {
22709
- const ret = wasm.pswaplineagerecord_currentTipNoteId(this.__wbg_ptr);
22328
+ const ret = wasm.transactionrecord_initAccountState(this.__wbg_ptr);
22710
22329
  return Word.__wrap(ret);
22711
22330
  }
22712
22331
  /**
@@ -22771,14 +22390,6 @@ class TransactionRequest {
22771
22390
  const ptr = this.__destroy_into_raw();
22772
22391
  wasm.__wbg_transactionrequest_free(ptr, 0);
22773
22392
  }
22774
- /**
22775
- * Returns a copy of the advice map carried by this request.
22776
- * @returns {AdviceMap}
22777
- */
22778
- adviceMap() {
22779
- const ret = wasm.transactionrequest_adviceMap(this.__wbg_ptr);
22780
- return AdviceMap.__wrap(ret);
22781
- }
22782
22393
  /**
22783
22394
  * Returns the authentication argument if present.
22784
22395
  * @returns {Word | undefined}
@@ -22825,20 +22436,6 @@ class TransactionRequest {
22825
22436
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
22826
22437
  return v1;
22827
22438
  }
22828
- /**
22829
- * Returns a copy of this request with `advice_map` merged into its advice map.
22830
- *
22831
- * Entries are merged with last-write-wins semantics: a key already present in the request is
22832
- * overwritten by the value from `advice_map`. Use this to inject advice (e.g. a signature
22833
- * produced by an external signer) after the request has already been built.
22834
- * @param {AdviceMap} advice_map
22835
- * @returns {TransactionRequest}
22836
- */
22837
- extendAdviceMap(advice_map) {
22838
- _assertClass(advice_map, AdviceMap);
22839
- const ret = wasm.transactionrequest_extendAdviceMap(this.__wbg_ptr, advice_map.__wbg_ptr);
22840
- return TransactionRequest.__wrap(ret);
22841
- }
22842
22439
  /**
22843
22440
  * Returns the transaction script argument if present.
22844
22441
  * @returns {Word | undefined}
@@ -23384,12 +22981,12 @@ class TransactionStoreUpdate {
23384
22981
  wasm.__wbg_transactionstoreupdate_free(ptr, 0);
23385
22982
  }
23386
22983
  /**
23387
- * Returns the account delta applied by the transaction.
23388
- * @returns {AccountDelta}
22984
+ * Returns the absolute account patch applied by the transaction.
22985
+ * @returns {AccountPatch}
23389
22986
  */
23390
- accountDelta() {
23391
- const ret = wasm.transactionstoreupdate_accountDelta(this.__wbg_ptr);
23392
- return AccountDelta.__wrap(ret);
22987
+ accountPatch() {
22988
+ const ret = wasm.transactionstoreupdate_accountPatch(this.__wbg_ptr);
22989
+ return AccountPatch.__wrap(ret);
23393
22990
  }
23394
22991
  /**
23395
22992
  * Returns the output notes created by the transaction.
@@ -23600,10 +23197,6 @@ class WebClient {
23600
23197
  return ret;
23601
23198
  }
23602
23199
  /**
23603
- * Persists a submitted transaction and returns its pre-apply
23604
- * [`TransactionStoreUpdate`]. Routes through the high-level
23605
- * `Client::apply_transaction` so registered observers (e.g. PSWAP
23606
- * tracking) fire.
23607
23200
  * @param {TransactionResult} transaction_result
23608
23201
  * @param {number} submission_height
23609
23202
  * @returns {Promise<TransactionStoreUpdate>}
@@ -23613,22 +23206,6 @@ class WebClient {
23613
23206
  const ret = wasm.webclient_applyTransaction(this.__wbg_ptr, transaction_result.__wbg_ptr, submission_height);
23614
23207
  return ret;
23615
23208
  }
23616
- /**
23617
- * Builds a transaction reclaiming the unfilled offered asset on the current
23618
- * tip of an Active lineage.
23619
- *
23620
- * `order_id` is the order's stable identifier as a decimal string. The
23621
- * returned request flows into the same submit path as the other PSWAP
23622
- * cancel transactions.
23623
- * @param {string} order_id
23624
- * @returns {Promise<TransactionRequest>}
23625
- */
23626
- buildPswapCancelByOrder(order_id) {
23627
- const ptr0 = passStringToWasm0(order_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
23628
- const len0 = WASM_VECTOR_LEN;
23629
- const ret = wasm.webclient_buildPswapCancelByOrder(this.__wbg_ptr, ptr0, len0);
23630
- return ret;
23631
- }
23632
23209
  /**
23633
23210
  * @param {NoteType} note_type
23634
23211
  * @param {AccountId} offered_asset_faucet_id
@@ -23656,17 +23233,13 @@ class WebClient {
23656
23233
  * * `store_name`: Optional name for the web store. If `None`, the store name defaults to
23657
23234
  * `MidenClientDB_{network_id}`, where `network_id` is derived from the `node_url`.
23658
23235
  * Explicitly setting this allows for creating multiple isolated clients.
23659
- * * `debug_mode`: Optional flag to enable debug mode for transaction execution. When enabled,
23660
- * the transaction executor records additional information useful for debugging. Defaults to
23661
- * disabled.
23662
23236
  * @param {string | null} [node_url]
23663
23237
  * @param {string | null} [node_note_transport_url]
23664
23238
  * @param {Uint8Array | null} [seed]
23665
23239
  * @param {string | null} [store_name]
23666
- * @param {boolean | null} [debug_mode]
23667
23240
  * @returns {Promise<any>}
23668
23241
  */
23669
- createClient(node_url, node_note_transport_url, seed, store_name, debug_mode) {
23242
+ createClient(node_url, node_note_transport_url, seed, store_name) {
23670
23243
  var ptr0 = isLikeNone(node_url) ? 0 : passStringToWasm0(node_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
23671
23244
  var len0 = WASM_VECTOR_LEN;
23672
23245
  var ptr1 = isLikeNone(node_note_transport_url) ? 0 : passStringToWasm0(node_note_transport_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -23675,7 +23248,7 @@ class WebClient {
23675
23248
  var len2 = WASM_VECTOR_LEN;
23676
23249
  var ptr3 = isLikeNone(store_name) ? 0 : passStringToWasm0(store_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
23677
23250
  var len3 = WASM_VECTOR_LEN;
23678
- const ret = wasm.webclient_createClient(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(debug_mode) ? 0xFFFFFF : debug_mode ? 1 : 0);
23251
+ const ret = wasm.webclient_createClient(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
23679
23252
  return ret;
23680
23253
  }
23681
23254
  /**
@@ -23691,8 +23264,6 @@ class WebClient {
23691
23264
  * * `get_key_cb`: Callback to retrieve the secret key bytes for a given public key.
23692
23265
  * * `insert_key_cb`: Callback to persist a secret key.
23693
23266
  * * `sign_cb`: Callback to produce serialized signature bytes for the provided inputs.
23694
- * * `debug_mode`: Optional flag to enable debug mode for transaction execution. Defaults to
23695
- * disabled.
23696
23267
  * @param {string | null} [node_url]
23697
23268
  * @param {string | null} [node_note_transport_url]
23698
23269
  * @param {Uint8Array | null} [seed]
@@ -23700,10 +23271,9 @@ class WebClient {
23700
23271
  * @param {Function | null} [get_key_cb]
23701
23272
  * @param {Function | null} [insert_key_cb]
23702
23273
  * @param {Function | null} [sign_cb]
23703
- * @param {boolean | null} [debug_mode]
23704
23274
  * @returns {Promise<any>}
23705
23275
  */
23706
- createClientWithExternalKeystore(node_url, node_note_transport_url, seed, store_name, get_key_cb, insert_key_cb, sign_cb, debug_mode) {
23276
+ createClientWithExternalKeystore(node_url, node_note_transport_url, seed, store_name, get_key_cb, insert_key_cb, sign_cb) {
23707
23277
  var ptr0 = isLikeNone(node_url) ? 0 : passStringToWasm0(node_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
23708
23278
  var len0 = WASM_VECTOR_LEN;
23709
23279
  var ptr1 = isLikeNone(node_note_transport_url) ? 0 : passStringToWasm0(node_note_transport_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -23712,7 +23282,7 @@ class WebClient {
23712
23282
  var len2 = WASM_VECTOR_LEN;
23713
23283
  var ptr3 = isLikeNone(store_name) ? 0 : passStringToWasm0(store_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
23714
23284
  var len3 = WASM_VECTOR_LEN;
23715
- const ret = wasm.webclient_createClientWithExternalKeystore(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(get_key_cb) ? 0 : addToExternrefTable0(get_key_cb), isLikeNone(insert_key_cb) ? 0 : addToExternrefTable0(insert_key_cb), isLikeNone(sign_cb) ? 0 : addToExternrefTable0(sign_cb), isLikeNone(debug_mode) ? 0xFFFFFF : debug_mode ? 1 : 0);
23285
+ const ret = wasm.webclient_createClientWithExternalKeystore(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(get_key_cb) ? 0 : addToExternrefTable0(get_key_cb), isLikeNone(insert_key_cb) ? 0 : addToExternrefTable0(insert_key_cb), isLikeNone(sign_cb) ? 0 : addToExternrefTable0(sign_cb));
23716
23286
  return ret;
23717
23287
  }
23718
23288
  /**
@@ -23741,14 +23311,18 @@ class WebClient {
23741
23311
  return ret;
23742
23312
  }
23743
23313
  /**
23744
- * Executes a transaction and returns the `TransactionSummary`.
23314
+ * Executes a transaction and returns the `TransactionSummary` the account is being asked
23315
+ * to authorize.
23745
23316
  *
23746
- * If the transaction is unauthorized (auth script emits the unauthorized event),
23747
- * returns the summary from the error. If the transaction succeeds, constructs
23748
- * a summary from the executed transaction using the `auth_arg` from the transaction
23749
- * request as the salt (or a zero salt if not provided).
23317
+ * The summary only exists while authorization is pending: when the auth procedure aborts
23318
+ * with the unauthorized event (e.g. a multisig below its signing threshold), the summary
23319
+ * built during execution is returned so it can be signed out-of-band. If the transaction
23320
+ * executes successfully it was already fully authorized, no summary is produced, and this
23321
+ * method returns an error with code `TRANSACTION_ALREADY_AUTHORIZED` — submit the
23322
+ * transaction with `execute` instead.
23750
23323
  *
23751
23324
  * # Errors
23325
+ * - If the transaction executes successfully (error code `TRANSACTION_ALREADY_AUTHORIZED`).
23752
23326
  * - If there is an internal failure during execution.
23753
23327
  * @param {AccountId} account_id
23754
23328
  * @param {TransactionRequest} transaction_request
@@ -23972,37 +23546,6 @@ class WebClient {
23972
23546
  const ret = wasm.webclient_getOutputNotes(this.__wbg_ptr, ptr0);
23973
23547
  return ret;
23974
23548
  }
23975
- /**
23976
- * Returns the lineage for one order, or `null` if not tracked.
23977
- *
23978
- * `order_id` is the order's stable identifier as a decimal string.
23979
- * @param {string} order_id
23980
- * @returns {Promise<PswapLineageRecord | undefined>}
23981
- */
23982
- getPswapLineage(order_id) {
23983
- const ptr0 = passStringToWasm0(order_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
23984
- const len0 = WASM_VECTOR_LEN;
23985
- const ret = wasm.webclient_getPswapLineage(this.__wbg_ptr, ptr0, len0);
23986
- return ret;
23987
- }
23988
- /**
23989
- * Returns every PSWAP lineage tracked by this client.
23990
- * @returns {Promise<PswapLineageRecord[]>}
23991
- */
23992
- getPswapLineages() {
23993
- const ret = wasm.webclient_getPswapLineages(this.__wbg_ptr);
23994
- return ret;
23995
- }
23996
- /**
23997
- * Returns lineages created by a specific local account.
23998
- * @param {AccountId} creator
23999
- * @returns {Promise<PswapLineageRecord[]>}
24000
- */
24001
- getPswapLineagesFor(creator) {
24002
- _assertClass(creator, AccountId);
24003
- const ret = wasm.webclient_getPswapLineagesFor(this.__wbg_ptr, creator.__wbg_ptr);
24004
- return ret;
24005
- }
24006
23549
  /**
24007
23550
  * Returns all public key commitments associated with the given account ID.
24008
23551
  *
@@ -24066,10 +23609,10 @@ class WebClient {
24066
23609
  /**
24067
23610
  * Imports a note file and returns the imported note's identifier.
24068
23611
  *
24069
- * A note file that carries metadata — an explicit `NoteId` or a full note
24070
- * with proof — resolves to a concrete `NoteId`, which is returned so the
24071
- * caller can look the note up with [`get_input_note`]. A details-only file
24072
- * (`NoteDetails`) has no metadata and therefore no `NoteId` yet, so its
23612
+ * A note file that carries metadata — an explicit `NoteId` or a committed
23613
+ * note with proof — resolves to a concrete `NoteId`, which is returned so
23614
+ * the caller can look the note up with [`get_input_note`]. An expected-note
23615
+ * file has no metadata and therefore no `NoteId` yet, so its
24073
23616
  * metadata-independent details commitment is returned instead.
24074
23617
  *
24075
23618
  * Migration note (miden-client PR #2214): `Client::import_notes` now
@@ -24195,30 +23738,6 @@ class WebClient {
24195
23738
  const ret = wasm.webclient_newAccountWithSecretKey(this.__wbg_ptr, account.__wbg_ptr, secret_key.__wbg_ptr);
24196
23739
  return ret;
24197
23740
  }
24198
- /**
24199
- * Builds a transaction request that bridges a fungible asset out to another network via the
24200
- * `AggLayer`.
24201
- *
24202
- * The request emits a single public B2AGG (Bridge-to-AggLayer) note holding `amount` units of
24203
- * the `faucet_id` asset. The note is consumed by `bridge_account_id`, which burns the asset so
24204
- * it can be claimed at `destination_address` (an Ethereum address) on the AggLayer-assigned
24205
- * `destination_network`.
24206
- * @param {AccountId} sender_account_id
24207
- * @param {AccountId} bridge_account_id
24208
- * @param {AccountId} faucet_id
24209
- * @param {bigint} amount
24210
- * @param {number} destination_network
24211
- * @param {EthAddress} destination_address
24212
- * @returns {Promise<TransactionRequest>}
24213
- */
24214
- newB2AggTransactionRequest(sender_account_id, bridge_account_id, faucet_id, amount, destination_network, destination_address) {
24215
- _assertClass(sender_account_id, AccountId);
24216
- _assertClass(bridge_account_id, AccountId);
24217
- _assertClass(faucet_id, AccountId);
24218
- _assertClass(destination_address, EthAddress);
24219
- const ret = wasm.webclient_newB2AggTransactionRequest(this.__wbg_ptr, sender_account_id.__wbg_ptr, bridge_account_id.__wbg_ptr, faucet_id.__wbg_ptr, amount, destination_network, destination_address.__wbg_ptr);
24220
- return ret;
24221
- }
24222
23741
  /**
24223
23742
  * @param {Note[]} list_of_notes
24224
23743
  * @returns {TransactionRequest}
@@ -24512,25 +24031,6 @@ class WebClient {
24512
24031
  const ret = wasm.webclient_submitNewTransaction(this.__wbg_ptr, account_id.__wbg_ptr, transaction_request.__wbg_ptr);
24513
24032
  return ret;
24514
24033
  }
24515
- /**
24516
- * Executes a batch of transactions against the specified account, proves them individually
24517
- * and as a batch, submits the batch to the network, and atomically applies the per-tx
24518
- * updates to the local store. Returns the block number the batch was accepted into.
24519
- *
24520
- * All transactions must target the same local account — the `account_id` argument.
24521
- * Each element of `transaction_requests` is the serialized-bytes form of a
24522
- * `TransactionRequest` (obtained via `tx_request.serialize()`)
24523
- * @param {AccountId} account_id
24524
- * @param {Uint8Array[]} transaction_requests
24525
- * @returns {Promise<number>}
24526
- */
24527
- submitNewTransactionBatch(account_id, transaction_requests) {
24528
- _assertClass(account_id, AccountId);
24529
- const ptr0 = passArrayJsValueToWasm0(transaction_requests, wasm.__wbindgen_malloc);
24530
- const len0 = WASM_VECTOR_LEN;
24531
- const ret = wasm.webclient_submitNewTransactionBatch(this.__wbg_ptr, account_id.__wbg_ptr, ptr0, len0);
24532
- return ret;
24533
- }
24534
24034
  /**
24535
24035
  * Executes a transaction specified by the request against the specified account, proves it
24536
24036
  * with the user provided prover, submits it to the network, and updates the local database.
@@ -25150,7 +24650,7 @@ function __wbg_get_imports(memory) {
25150
24650
  const ret = AccountStorage.__wrap(arg0);
25151
24651
  return ret;
25152
24652
  },
25153
- __wbg_addNoteTag_94ee2f838ec544dc: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
24653
+ __wbg_addNoteTag_1500aff2fa0d151c: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
25154
24654
  var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
25155
24655
  wasm.__wbindgen_free(arg2, arg3 * 1, 1);
25156
24656
  let v1;
@@ -25178,25 +24678,7 @@ function __wbg_get_imports(memory) {
25178
24678
  __wbg_append_a992ccc37aa62dc4: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
25179
24679
  arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
25180
24680
  }, arguments); },
25181
- __wbg_applyFullAccountState_43caa7474baffc0b: function(arg0, arg1, arg2) {
25182
- const ret = applyFullAccountState(getStringFromWasm0(arg0, arg1), JsAccountUpdate.__wrap(arg2));
25183
- return ret;
25184
- },
25185
- __wbg_applySettingsMutations_5de1d94023be9157: function(arg0, arg1, arg2, arg3) {
25186
- var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
25187
- wasm.__wbindgen_free(arg2, arg3 * 4, 4);
25188
- const ret = applySettingsMutations(getStringFromWasm0(arg0, arg1), v0);
25189
- return ret;
25190
- },
25191
- __wbg_applyStateSync_189438332d96496e: function(arg0, arg1, arg2) {
25192
- const ret = applyStateSync(getStringFromWasm0(arg0, arg1), JsStateSyncUpdate.__wrap(arg2));
25193
- return ret;
25194
- },
25195
- __wbg_applyTransactionBatch_c300ed1fee34127a: function(arg0, arg1, arg2) {
25196
- const ret = applyTransactionBatch(getStringFromWasm0(arg0, arg1), arg2);
25197
- return ret;
25198
- },
25199
- __wbg_applyTransactionDelta_88c7fcff9175e58e: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20) {
24681
+ __wbg_applyAccountPatch_ade374c1e2049a8e: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20) {
25200
24682
  let deferred0_0;
25201
24683
  let deferred0_1;
25202
24684
  let deferred1_0;
@@ -25228,7 +24710,7 @@ function __wbg_get_imports(memory) {
25228
24710
  deferred7_1 = arg17;
25229
24711
  deferred8_0 = arg19;
25230
24712
  deferred8_1 = arg20;
25231
- const ret = applyTransactionDelta(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), v2, v3, v4, getStringFromWasm0(arg12, arg13), getStringFromWasm0(arg14, arg15), getStringFromWasm0(arg16, arg17), arg18 !== 0, getStringFromWasm0(arg19, arg20));
24713
+ const ret = applyAccountPatch(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), v2, v3, v4, getStringFromWasm0(arg12, arg13), getStringFromWasm0(arg14, arg15), getStringFromWasm0(arg16, arg17), arg18 !== 0, getStringFromWasm0(arg19, arg20));
25232
24714
  return ret;
25233
24715
  } finally {
25234
24716
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
@@ -25239,6 +24721,20 @@ function __wbg_get_imports(memory) {
25239
24721
  wasm.__wbindgen_free(deferred8_0, deferred8_1, 1);
25240
24722
  }
25241
24723
  },
24724
+ __wbg_applyFullAccountState_f9562e4091c2eaf6: function(arg0, arg1, arg2) {
24725
+ const ret = applyFullAccountState(getStringFromWasm0(arg0, arg1), JsAccountUpdate.__wrap(arg2));
24726
+ return ret;
24727
+ },
24728
+ __wbg_applySettingsMutations_722d272d653902a1: function(arg0, arg1, arg2, arg3) {
24729
+ var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
24730
+ wasm.__wbindgen_free(arg2, arg3 * 4, 4);
24731
+ const ret = applySettingsMutations(getStringFromWasm0(arg0, arg1), v0);
24732
+ return ret;
24733
+ },
24734
+ __wbg_applyStateSync_4c25ec00de2f60bb: function(arg0, arg1, arg2) {
24735
+ const ret = applyStateSync(getStringFromWasm0(arg0, arg1), JsStateSyncUpdate.__wrap(arg2));
24736
+ return ret;
24737
+ },
25242
24738
  __wbg_assetvault_new: function(arg0) {
25243
24739
  const ret = AssetVault.__wrap(arg0);
25244
24740
  return ret;
@@ -25347,7 +24843,7 @@ function __wbg_get_imports(memory) {
25347
24843
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25348
24844
  }
25349
24845
  },
25350
- __wbg_exportStore_cf4d695fbf6de143: function(arg0, arg1) {
24846
+ __wbg_exportStore_3b84792dca9a9ef1: function(arg0, arg1) {
25351
24847
  const ret = exportStore(getStringFromWasm0(arg0, arg1));
25352
24848
  return ret;
25353
24849
  },
@@ -25379,7 +24875,7 @@ function __wbg_get_imports(memory) {
25379
24875
  const ret = FetchedNote.__wrap(arg0);
25380
24876
  return ret;
25381
24877
  },
25382
- __wbg_forceImportStore_c50115d19ee606c7: function(arg0, arg1, arg2) {
24878
+ __wbg_forceImportStore_6a4fb8bc450bbf4a: function(arg0, arg1, arg2) {
25383
24879
  const ret = forceImportStore(getStringFromWasm0(arg0, arg1), arg2);
25384
24880
  return ret;
25385
24881
  },
@@ -25387,10 +24883,6 @@ function __wbg_get_imports(memory) {
25387
24883
  const ret = ForeignAccount.__unwrap(arg0);
25388
24884
  return ret;
25389
24885
  },
25390
- __wbg_from_bddd64e7d5ff6941: function(arg0) {
25391
- const ret = Array.from(arg0);
25392
- return ret;
25393
- },
25394
24886
  __wbg_fungibleasset_new: function(arg0) {
25395
24887
  const ret = FungibleAsset.__wrap(arg0);
25396
24888
  return ret;
@@ -25403,7 +24895,7 @@ function __wbg_get_imports(memory) {
25403
24895
  const ret = FungibleAssetDeltaItem.__wrap(arg0);
25404
24896
  return ret;
25405
24897
  },
25406
- __wbg_getAccountAddresses_cbd727101b08a9f6: function(arg0, arg1, arg2, arg3) {
24898
+ __wbg_getAccountAddresses_68ba5f3f8a9c7e15: function(arg0, arg1, arg2, arg3) {
25407
24899
  let deferred0_0;
25408
24900
  let deferred0_1;
25409
24901
  try {
@@ -25415,7 +24907,7 @@ function __wbg_get_imports(memory) {
25415
24907
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25416
24908
  }
25417
24909
  },
25418
- __wbg_getAccountAuthByPubKeyCommitment_bb937a852fc252bc: function(arg0, arg1, arg2, arg3) {
24910
+ __wbg_getAccountAuthByPubKeyCommitment_568661071566f307: function(arg0, arg1, arg2, arg3) {
25419
24911
  let deferred0_0;
25420
24912
  let deferred0_1;
25421
24913
  try {
@@ -25427,7 +24919,7 @@ function __wbg_get_imports(memory) {
25427
24919
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25428
24920
  }
25429
24921
  },
25430
- __wbg_getAccountCode_3cc0ae7a622f54fc: function(arg0, arg1, arg2, arg3) {
24922
+ __wbg_getAccountCode_14e446cd1a3f814f: function(arg0, arg1, arg2, arg3) {
25431
24923
  let deferred0_0;
25432
24924
  let deferred0_1;
25433
24925
  try {
@@ -25439,7 +24931,7 @@ function __wbg_get_imports(memory) {
25439
24931
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25440
24932
  }
25441
24933
  },
25442
- __wbg_getAccountHeaderByCommitment_9944282b839bf9b6: function(arg0, arg1, arg2, arg3) {
24934
+ __wbg_getAccountHeaderByCommitment_0e10e9ac733f359b: function(arg0, arg1, arg2, arg3) {
25443
24935
  let deferred0_0;
25444
24936
  let deferred0_1;
25445
24937
  try {
@@ -25451,7 +24943,7 @@ function __wbg_get_imports(memory) {
25451
24943
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25452
24944
  }
25453
24945
  },
25454
- __wbg_getAccountHeader_84fb6f83a11e9cea: function(arg0, arg1, arg2, arg3) {
24946
+ __wbg_getAccountHeader_ef6ad25115d9bd02: function(arg0, arg1, arg2, arg3) {
25455
24947
  let deferred0_0;
25456
24948
  let deferred0_1;
25457
24949
  try {
@@ -25463,7 +24955,7 @@ function __wbg_get_imports(memory) {
25463
24955
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25464
24956
  }
25465
24957
  },
25466
- __wbg_getAccountIdByKeyCommitment_f993328b4b855b21: function(arg0, arg1, arg2, arg3) {
24958
+ __wbg_getAccountIdByKeyCommitment_c0c17f1af8b92023: function(arg0, arg1, arg2, arg3) {
25467
24959
  let deferred0_0;
25468
24960
  let deferred0_1;
25469
24961
  try {
@@ -25475,11 +24967,11 @@ function __wbg_get_imports(memory) {
25475
24967
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25476
24968
  }
25477
24969
  },
25478
- __wbg_getAccountIds_e80dceb4cc97875f: function(arg0, arg1) {
24970
+ __wbg_getAccountIds_07de8c6f4a5ee883: function(arg0, arg1) {
25479
24971
  const ret = getAccountIds(getStringFromWasm0(arg0, arg1));
25480
24972
  return ret;
25481
24973
  },
25482
- __wbg_getAccountStorageMaps_e36e581a33dc958a: function(arg0, arg1, arg2, arg3) {
24974
+ __wbg_getAccountStorageMaps_b16de6210ce82188: function(arg0, arg1, arg2, arg3) {
25483
24975
  let deferred0_0;
25484
24976
  let deferred0_1;
25485
24977
  try {
@@ -25491,7 +24983,7 @@ function __wbg_get_imports(memory) {
25491
24983
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25492
24984
  }
25493
24985
  },
25494
- __wbg_getAccountStorage_50de137ac49bdf17: function(arg0, arg1, arg2, arg3, arg4, arg5) {
24986
+ __wbg_getAccountStorage_c876ec60dbfa6cee: function(arg0, arg1, arg2, arg3, arg4, arg5) {
25495
24987
  let deferred0_0;
25496
24988
  let deferred0_1;
25497
24989
  try {
@@ -25505,7 +24997,7 @@ function __wbg_get_imports(memory) {
25505
24997
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25506
24998
  }
25507
24999
  },
25508
- __wbg_getAccountVaultAssets_30c74124867dbf56: function(arg0, arg1, arg2, arg3, arg4, arg5) {
25000
+ __wbg_getAccountVaultAssets_479ef945dd51412a: function(arg0, arg1, arg2, arg3, arg4, arg5) {
25509
25001
  let deferred0_0;
25510
25002
  let deferred0_1;
25511
25003
  try {
@@ -25519,27 +25011,27 @@ function __wbg_get_imports(memory) {
25519
25011
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25520
25012
  }
25521
25013
  },
25522
- __wbg_getAllAccountHeaders_b3e3ae880833a8cc: function(arg0, arg1) {
25014
+ __wbg_getAllAccountHeaders_f78e678ad24296de: function(arg0, arg1) {
25523
25015
  const ret = getAllAccountHeaders(getStringFromWasm0(arg0, arg1));
25524
25016
  return ret;
25525
25017
  },
25526
- __wbg_getBlockHeaders_8fa268d7fb3d3c28: function(arg0, arg1, arg2, arg3) {
25018
+ __wbg_getBlockHeaders_a55990d3957c0d9d: function(arg0, arg1, arg2, arg3) {
25527
25019
  var v0 = getArrayU32FromWasm0(arg2, arg3).slice();
25528
25020
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
25529
25021
  const ret = getBlockHeaders(getStringFromWasm0(arg0, arg1), v0);
25530
25022
  return ret;
25531
25023
  },
25532
- __wbg_getCurrentBlockchainPeaks_ea97e8dd83a3db2f: function(arg0, arg1) {
25024
+ __wbg_getCurrentBlockchainPeaks_b276a676a0f16d93: function(arg0, arg1) {
25533
25025
  const ret = getCurrentBlockchainPeaks(getStringFromWasm0(arg0, arg1));
25534
25026
  return ret;
25535
25027
  },
25536
- __wbg_getForeignAccountCode_7de2117da915f4be: function(arg0, arg1, arg2, arg3) {
25028
+ __wbg_getForeignAccountCode_9f88c11936e9c43d: function(arg0, arg1, arg2, arg3) {
25537
25029
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
25538
25030
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
25539
25031
  const ret = getForeignAccountCode(getStringFromWasm0(arg0, arg1), v0);
25540
25032
  return ret;
25541
25033
  },
25542
- __wbg_getInputNoteByOffset_1cd4bd9db2e38694: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
25034
+ __wbg_getInputNoteByOffset_d8ec28ef8b63a88f: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
25543
25035
  let deferred1_0;
25544
25036
  let deferred1_1;
25545
25037
  try {
@@ -25553,31 +25045,31 @@ function __wbg_get_imports(memory) {
25553
25045
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
25554
25046
  }
25555
25047
  },
25556
- __wbg_getInputNotesFromDetailsCommitments_334d006c0e228205: function(arg0, arg1, arg2, arg3) {
25048
+ __wbg_getInputNotesFromDetailsCommitments_9590f42d9e96e86c: function(arg0, arg1, arg2, arg3) {
25557
25049
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
25558
25050
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
25559
25051
  const ret = getInputNotesFromDetailsCommitments(getStringFromWasm0(arg0, arg1), v0);
25560
25052
  return ret;
25561
25053
  },
25562
- __wbg_getInputNotesFromIds_bbaec98ba444d49e: function(arg0, arg1, arg2, arg3) {
25054
+ __wbg_getInputNotesFromIds_d290a8e093978eae: function(arg0, arg1, arg2, arg3) {
25563
25055
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
25564
25056
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
25565
25057
  const ret = getInputNotesFromIds(getStringFromWasm0(arg0, arg1), v0);
25566
25058
  return ret;
25567
25059
  },
25568
- __wbg_getInputNotesFromNullifiers_dde5b06918045f75: function(arg0, arg1, arg2, arg3) {
25060
+ __wbg_getInputNotesFromNullifiers_2b5fa39ec52ecab6: function(arg0, arg1, arg2, arg3) {
25569
25061
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
25570
25062
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
25571
25063
  const ret = getInputNotesFromNullifiers(getStringFromWasm0(arg0, arg1), v0);
25572
25064
  return ret;
25573
25065
  },
25574
- __wbg_getInputNotes_02d3daccecb4c763: function(arg0, arg1, arg2, arg3) {
25066
+ __wbg_getInputNotes_1c76764676f21be5: function(arg0, arg1, arg2, arg3) {
25575
25067
  var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
25576
25068
  wasm.__wbindgen_free(arg2, arg3 * 1, 1);
25577
25069
  const ret = getInputNotes(getStringFromWasm0(arg0, arg1), v0);
25578
25070
  return ret;
25579
25071
  },
25580
- __wbg_getKeyCommitmentsByAccountId_de5d140392884430: function(arg0, arg1, arg2, arg3) {
25072
+ __wbg_getKeyCommitmentsByAccountId_7962a39c985c54e5: function(arg0, arg1, arg2, arg3) {
25581
25073
  let deferred0_0;
25582
25074
  let deferred0_1;
25583
25075
  try {
@@ -25589,7 +25081,7 @@ function __wbg_get_imports(memory) {
25589
25081
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25590
25082
  }
25591
25083
  },
25592
- __wbg_getNoteScript_bc2ab9b3b789361a: function(arg0, arg1, arg2, arg3) {
25084
+ __wbg_getNoteScript_b2cf59d7cf9d19e7: function(arg0, arg1, arg2, arg3) {
25593
25085
  let deferred0_0;
25594
25086
  let deferred0_1;
25595
25087
  try {
@@ -25601,39 +25093,39 @@ function __wbg_get_imports(memory) {
25601
25093
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25602
25094
  }
25603
25095
  },
25604
- __wbg_getNoteTags_34a8fb7ffdde9e33: function(arg0, arg1) {
25096
+ __wbg_getNoteTags_a45689c54d964e46: function(arg0, arg1) {
25605
25097
  const ret = getNoteTags(getStringFromWasm0(arg0, arg1));
25606
25098
  return ret;
25607
25099
  },
25608
- __wbg_getOutputNotesFromDetailsCommitments_6e202d70d207d37f: function(arg0, arg1, arg2, arg3) {
25100
+ __wbg_getOutputNotesFromDetailsCommitments_b15793905bc47309: function(arg0, arg1, arg2, arg3) {
25609
25101
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
25610
25102
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
25611
25103
  const ret = getOutputNotesFromDetailsCommitments(getStringFromWasm0(arg0, arg1), v0);
25612
25104
  return ret;
25613
25105
  },
25614
- __wbg_getOutputNotesFromIds_2b07a4ef2fa3fdd9: function(arg0, arg1, arg2, arg3) {
25106
+ __wbg_getOutputNotesFromIds_d340ff4a6d4c5c8e: function(arg0, arg1, arg2, arg3) {
25615
25107
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
25616
25108
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
25617
25109
  const ret = getOutputNotesFromIds(getStringFromWasm0(arg0, arg1), v0);
25618
25110
  return ret;
25619
25111
  },
25620
- __wbg_getOutputNotesFromNullifiers_f59492590ecad477: function(arg0, arg1, arg2, arg3) {
25112
+ __wbg_getOutputNotesFromNullifiers_48b112e53ca4eea7: function(arg0, arg1, arg2, arg3) {
25621
25113
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
25622
25114
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
25623
25115
  const ret = getOutputNotesFromNullifiers(getStringFromWasm0(arg0, arg1), v0);
25624
25116
  return ret;
25625
25117
  },
25626
- __wbg_getOutputNotes_7ddd237b643a22e2: function(arg0, arg1, arg2, arg3) {
25118
+ __wbg_getOutputNotes_2679465821c837b7: function(arg0, arg1, arg2, arg3) {
25627
25119
  var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
25628
25120
  wasm.__wbindgen_free(arg2, arg3 * 1, 1);
25629
25121
  const ret = getOutputNotes(getStringFromWasm0(arg0, arg1), v0);
25630
25122
  return ret;
25631
25123
  },
25632
- __wbg_getPartialBlockchainNodesAll_e2e8c0d62a978ef1: function(arg0, arg1) {
25124
+ __wbg_getPartialBlockchainNodesAll_9496498a665775d9: function(arg0, arg1) {
25633
25125
  const ret = getPartialBlockchainNodesAll(getStringFromWasm0(arg0, arg1));
25634
25126
  return ret;
25635
25127
  },
25636
- __wbg_getPartialBlockchainNodesUpToInOrderIndex_2f8e8d802df6ede2: function(arg0, arg1, arg2, arg3) {
25128
+ __wbg_getPartialBlockchainNodesUpToInOrderIndex_2196a0e786754bd1: function(arg0, arg1, arg2, arg3) {
25637
25129
  let deferred0_0;
25638
25130
  let deferred0_1;
25639
25131
  try {
@@ -25645,20 +25137,20 @@ function __wbg_get_imports(memory) {
25645
25137
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25646
25138
  }
25647
25139
  },
25648
- __wbg_getPartialBlockchainNodes_4505db840ba96409: function(arg0, arg1, arg2, arg3) {
25140
+ __wbg_getPartialBlockchainNodes_0a6c2a323b1f4caa: function(arg0, arg1, arg2, arg3) {
25649
25141
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
25650
25142
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
25651
25143
  const ret = getPartialBlockchainNodes(getStringFromWasm0(arg0, arg1), v0);
25652
25144
  return ret;
25653
25145
  },
25654
- __wbg_getRandomValues_ea728b1d79dae146: function() { return handleError(function (arg0) {
25146
+ __wbg_getRandomValues_90e56bff4f3b89fb: function() { return handleError(function (arg0) {
25655
25147
  globalThis.crypto.getRandomValues(arg0);
25656
25148
  }, arguments); },
25657
25149
  __wbg_getReader_f47519d698a4505e: function() { return handleError(function (arg0) {
25658
25150
  const ret = arg0.getReader();
25659
25151
  return ret;
25660
25152
  }, arguments); },
25661
- __wbg_getSetting_62039934dd52148a: function(arg0, arg1, arg2, arg3) {
25153
+ __wbg_getSetting_319d65b5a2e111a2: function(arg0, arg1, arg2, arg3) {
25662
25154
  let deferred0_0;
25663
25155
  let deferred0_1;
25664
25156
  try {
@@ -25670,7 +25162,7 @@ function __wbg_get_imports(memory) {
25670
25162
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25671
25163
  }
25672
25164
  },
25673
- __wbg_getSyncHeight_1c355e9af8a6c5c1: function(arg0, arg1) {
25165
+ __wbg_getSyncHeight_94e6d0d761426ec9: function(arg0, arg1) {
25674
25166
  const ret = getSyncHeight(getStringFromWasm0(arg0, arg1));
25675
25167
  return ret;
25676
25168
  },
@@ -25678,15 +25170,15 @@ function __wbg_get_imports(memory) {
25678
25170
  const ret = arg0.getTime();
25679
25171
  return ret;
25680
25172
  },
25681
- __wbg_getTrackedBlockHeaderNumbers_1127c2c0de9e8f2d: function(arg0, arg1) {
25173
+ __wbg_getTrackedBlockHeaderNumbers_5a8edd94c7b7613c: function(arg0, arg1) {
25682
25174
  const ret = getTrackedBlockHeaderNumbers(getStringFromWasm0(arg0, arg1));
25683
25175
  return ret;
25684
25176
  },
25685
- __wbg_getTrackedBlockHeaders_0c9acbd5575e41f1: function(arg0, arg1) {
25177
+ __wbg_getTrackedBlockHeaders_3292740bff6c9b4c: function(arg0, arg1) {
25686
25178
  const ret = getTrackedBlockHeaders(getStringFromWasm0(arg0, arg1));
25687
25179
  return ret;
25688
25180
  },
25689
- __wbg_getTransactions_71b6f120136d4406: function(arg0, arg1, arg2, arg3) {
25181
+ __wbg_getTransactions_0c5674a652c44917: function(arg0, arg1, arg2, arg3) {
25690
25182
  let deferred0_0;
25691
25183
  let deferred0_1;
25692
25184
  try {
@@ -25698,7 +25190,7 @@ function __wbg_get_imports(memory) {
25698
25190
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25699
25191
  }
25700
25192
  },
25701
- __wbg_getUnspentInputNoteNullifiers_ac153627e18848ab: function(arg0, arg1) {
25193
+ __wbg_getUnspentInputNoteNullifiers_6c9d5852b42b8c73: function(arg0, arg1) {
25702
25194
  const ret = getUnspentInputNoteNullifiers(getStringFromWasm0(arg0, arg1));
25703
25195
  return ret;
25704
25196
  },
@@ -25742,7 +25234,7 @@ function __wbg_get_imports(memory) {
25742
25234
  const ret = InputNoteRecord.__wrap(arg0);
25743
25235
  return ret;
25744
25236
  },
25745
- __wbg_insertAccountAddress_15069fe099e1619e: function(arg0, arg1, arg2, arg3, arg4, arg5) {
25237
+ __wbg_insertAccountAddress_36db2bb32e10fd9b: function(arg0, arg1, arg2, arg3, arg4, arg5) {
25746
25238
  let deferred0_0;
25747
25239
  let deferred0_1;
25748
25240
  try {
@@ -25756,7 +25248,7 @@ function __wbg_get_imports(memory) {
25756
25248
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25757
25249
  }
25758
25250
  },
25759
- __wbg_insertAccountAuth_d0cb9c2601ea7324: function(arg0, arg1, arg2, arg3, arg4, arg5) {
25251
+ __wbg_insertAccountAuth_2763614f9c61eb99: function(arg0, arg1, arg2, arg3, arg4, arg5) {
25760
25252
  let deferred0_0;
25761
25253
  let deferred0_1;
25762
25254
  let deferred1_0;
@@ -25773,7 +25265,7 @@ function __wbg_get_imports(memory) {
25773
25265
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
25774
25266
  }
25775
25267
  },
25776
- __wbg_insertAccountKeyMapping_995e470bad5ead0b: function(arg0, arg1, arg2, arg3, arg4, arg5) {
25268
+ __wbg_insertAccountKeyMapping_5440caed0fe18250: function(arg0, arg1, arg2, arg3, arg4, arg5) {
25777
25269
  let deferred0_0;
25778
25270
  let deferred0_1;
25779
25271
  let deferred1_0;
@@ -25790,21 +25282,17 @@ function __wbg_get_imports(memory) {
25790
25282
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
25791
25283
  }
25792
25284
  },
25793
- __wbg_insertBlockHeader_e5a6e2ded97f2403: function(arg0, arg1, arg2, arg3, arg4, arg5) {
25285
+ __wbg_insertBlockHeader_ca254bedd530d7a3: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
25794
25286
  var v0 = getArrayU8FromWasm0(arg3, arg4).slice();
25795
25287
  wasm.__wbindgen_free(arg3, arg4 * 1, 1);
25796
- const ret = insertBlockHeader(getStringFromWasm0(arg0, arg1), arg2 >>> 0, v0, arg5 !== 0);
25797
- return ret;
25798
- },
25799
- __wbg_insertPartialBlockchainNodes_d6d5d926855e4d21: function(arg0, arg1, arg2, arg3, arg4, arg5) {
25800
- var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
25801
- wasm.__wbindgen_free(arg2, arg3 * 4, 4);
25802
- var v1 = getArrayJsValueFromWasm0(arg4, arg5).slice();
25803
- wasm.__wbindgen_free(arg4, arg5 * 4, 4);
25804
- const ret = insertPartialBlockchainNodes(getStringFromWasm0(arg0, arg1), v0, v1);
25288
+ var v1 = getArrayJsValueFromWasm0(arg6, arg7).slice();
25289
+ wasm.__wbindgen_free(arg6, arg7 * 4, 4);
25290
+ var v2 = getArrayJsValueFromWasm0(arg8, arg9).slice();
25291
+ wasm.__wbindgen_free(arg8, arg9 * 4, 4);
25292
+ const ret = insertBlockHeader(getStringFromWasm0(arg0, arg1), arg2 >>> 0, v0, arg5 !== 0, v1, v2);
25805
25293
  return ret;
25806
25294
  },
25807
- __wbg_insertSetting_0b89216c93defa8f: function(arg0, arg1, arg2, arg3, arg4, arg5) {
25295
+ __wbg_insertSetting_2b672c0bf3a3668d: function(arg0, arg1, arg2, arg3, arg4, arg5) {
25808
25296
  let deferred0_0;
25809
25297
  let deferred0_1;
25810
25298
  try {
@@ -25818,7 +25306,7 @@ function __wbg_get_imports(memory) {
25818
25306
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
25819
25307
  }
25820
25308
  },
25821
- __wbg_insertTransactionScript_25a8761c16b219bb: function(arg0, arg1, arg2, arg3, arg4, arg5) {
25309
+ __wbg_insertTransactionScript_f052607e004c23aa: function(arg0, arg1, arg2, arg3, arg4, arg5) {
25822
25310
  var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
25823
25311
  wasm.__wbindgen_free(arg2, arg3 * 1, 1);
25824
25312
  let v1;
@@ -25925,11 +25413,11 @@ function __wbg_get_imports(memory) {
25925
25413
  const ret = arg0.length;
25926
25414
  return ret;
25927
25415
  },
25928
- __wbg_listSettingKeys_2b136b1269935560: function(arg0, arg1) {
25416
+ __wbg_listSettingKeys_73b3c34ff51ee657: function(arg0, arg1) {
25929
25417
  const ret = listSettingKeys(getStringFromWasm0(arg0, arg1));
25930
25418
  return ret;
25931
25419
  },
25932
- __wbg_lockAccount_77845432e7766df6: function(arg0, arg1, arg2, arg3) {
25420
+ __wbg_lockAccount_a59ff3c777c9188c: function(arg0, arg1, arg2, arg3) {
25933
25421
  let deferred0_0;
25934
25422
  let deferred0_1;
25935
25423
  try {
@@ -26088,10 +25576,6 @@ function __wbg_get_imports(memory) {
26088
25576
  const ret = NoteAttachment.__wrap(arg0);
26089
25577
  return ret;
26090
25578
  },
26091
- __wbg_noteattachment_unwrap: function(arg0) {
26092
- const ret = NoteAttachment.__unwrap(arg0);
26093
- return ret;
26094
- },
26095
25579
  __wbg_noteconsumability_new: function(arg0) {
26096
25580
  const ret = NoteConsumability.__wrap(arg0);
26097
25581
  return ret;
@@ -26148,7 +25632,7 @@ function __wbg_get_imports(memory) {
26148
25632
  const ret = Array.of(arg0, arg1, arg2);
26149
25633
  return ret;
26150
25634
  },
26151
- __wbg_openDatabase_2f30006b5f901ff6: function(arg0, arg1, arg2, arg3) {
25635
+ __wbg_openDatabase_8ac110fce86d145e: function(arg0, arg1, arg2, arg3) {
26152
25636
  const ret = openDatabase(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
26153
25637
  return ret;
26154
25638
  },
@@ -26182,7 +25666,7 @@ function __wbg_get_imports(memory) {
26182
25666
  const ret = ProvenTransaction.__wrap(arg0);
26183
25667
  return ret;
26184
25668
  },
26185
- __wbg_pruneAccountHistory_f92187e012bea002: function(arg0, arg1, arg2, arg3, arg4, arg5) {
25669
+ __wbg_pruneAccountHistory_c2e9f7b1d4846bc6: function(arg0, arg1, arg2, arg3, arg4, arg5) {
26186
25670
  let deferred0_0;
26187
25671
  let deferred0_1;
26188
25672
  let deferred1_0;
@@ -26199,7 +25683,7 @@ function __wbg_get_imports(memory) {
26199
25683
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
26200
25684
  }
26201
25685
  },
26202
- __wbg_pruneIrrelevantBlocks_802f17c51c071490: function(arg0, arg1, arg2, arg3, arg4, arg5) {
25686
+ __wbg_pruneIrrelevantBlocks_33e6cf62a24f1f38: function(arg0, arg1, arg2, arg3, arg4, arg5) {
26203
25687
  var v0 = getArrayU32FromWasm0(arg2, arg3).slice();
26204
25688
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
26205
25689
  var v1 = getArrayJsValueFromWasm0(arg4, arg5).slice();
@@ -26207,14 +25691,6 @@ function __wbg_get_imports(memory) {
26207
25691
  const ret = pruneIrrelevantBlocks(getStringFromWasm0(arg0, arg1), v0, v1);
26208
25692
  return ret;
26209
25693
  },
26210
- __wbg_pswaplineagerecord_new: function(arg0) {
26211
- const ret = PswapLineageRecord.__wrap(arg0);
26212
- return ret;
26213
- },
26214
- __wbg_push_8ffdcb2063340ba5: function(arg0, arg1) {
26215
- const ret = arg0.push(arg1);
26216
- return ret;
26217
- },
26218
25694
  __wbg_queueMicrotask_0aa0a927f78f5d98: function(arg0) {
26219
25695
  const ret = arg0.queueMicrotask;
26220
25696
  return ret;
@@ -26229,13 +25705,13 @@ function __wbg_get_imports(memory) {
26229
25705
  __wbg_releaseLock_aa5846c2494b3032: function(arg0) {
26230
25706
  arg0.releaseLock();
26231
25707
  },
26232
- __wbg_removeAccountAddress_26bf46414ef4d36b: function(arg0, arg1, arg2, arg3) {
25708
+ __wbg_removeAccountAddress_5cbeda1f06e27b96: function(arg0, arg1, arg2, arg3) {
26233
25709
  var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
26234
25710
  wasm.__wbindgen_free(arg2, arg3 * 1, 1);
26235
25711
  const ret = removeAccountAddress(getStringFromWasm0(arg0, arg1), v0);
26236
25712
  return ret;
26237
25713
  },
26238
- __wbg_removeAccountAuth_eee531cc8fc556ab: function(arg0, arg1, arg2, arg3) {
25714
+ __wbg_removeAccountAuth_825600c45bdd5aa3: function(arg0, arg1, arg2, arg3) {
26239
25715
  let deferred0_0;
26240
25716
  let deferred0_1;
26241
25717
  try {
@@ -26247,7 +25723,7 @@ function __wbg_get_imports(memory) {
26247
25723
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
26248
25724
  }
26249
25725
  },
26250
- __wbg_removeAllMappingsForKey_bb2ce4d992b13353: function(arg0, arg1, arg2, arg3) {
25726
+ __wbg_removeAllMappingsForKey_3f439269152ce6e0: function(arg0, arg1, arg2, arg3) {
26251
25727
  let deferred0_0;
26252
25728
  let deferred0_1;
26253
25729
  try {
@@ -26259,7 +25735,7 @@ function __wbg_get_imports(memory) {
26259
25735
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
26260
25736
  }
26261
25737
  },
26262
- __wbg_removeNoteTag_ce18a2071a471486: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
25738
+ __wbg_removeNoteTag_e2ea5486d35929ca: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
26263
25739
  var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
26264
25740
  wasm.__wbindgen_free(arg2, arg3 * 1, 1);
26265
25741
  let v1;
@@ -26280,7 +25756,7 @@ function __wbg_get_imports(memory) {
26280
25756
  const ret = removeNoteTag(getStringFromWasm0(arg0, arg1), v0, v1, v2, v3);
26281
25757
  return ret;
26282
25758
  },
26283
- __wbg_removeSetting_a6764e1ec62f8c0f: function(arg0, arg1, arg2, arg3) {
25759
+ __wbg_removeSetting_5fac6592df936024: function(arg0, arg1, arg2, arg3) {
26284
25760
  let deferred0_0;
26285
25761
  let deferred0_1;
26286
25762
  try {
@@ -26331,9 +25807,6 @@ function __wbg_get_imports(memory) {
26331
25807
  const ret = setTimeout(arg0, arg1);
26332
25808
  return ret;
26333
25809
  }, arguments); },
26334
- __wbg_set_3f1d0b984ed272ed: function(arg0, arg1, arg2) {
26335
- arg0[arg1] = arg2;
26336
- },
26337
25810
  __wbg_set_6cb8631f80447a67: function() { return handleError(function (arg0, arg1, arg2) {
26338
25811
  const ret = Reflect.set(arg0, arg1, arg2);
26339
25812
  return ret;
@@ -26490,13 +25963,13 @@ function __wbg_get_imports(memory) {
26490
25963
  const ret = TransactionSummary.__wrap(arg0);
26491
25964
  return ret;
26492
25965
  },
26493
- __wbg_undoAccountStates_829a6daf4a392818: function(arg0, arg1, arg2, arg3) {
25966
+ __wbg_undoAccountStates_884490500595e8c1: function(arg0, arg1, arg2, arg3) {
26494
25967
  var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
26495
25968
  wasm.__wbindgen_free(arg2, arg3 * 4, 4);
26496
25969
  const ret = undoAccountStates(getStringFromWasm0(arg0, arg1), v0);
26497
25970
  return ret;
26498
25971
  },
26499
- __wbg_upsertAccountCode_f24cee98a5bbbfe5: function(arg0, arg1, arg2, arg3, arg4, arg5) {
25972
+ __wbg_upsertAccountCode_ce71ea974ae52d20: function(arg0, arg1, arg2, arg3, arg4, arg5) {
26500
25973
  let deferred0_0;
26501
25974
  let deferred0_1;
26502
25975
  try {
@@ -26510,7 +25983,7 @@ function __wbg_get_imports(memory) {
26510
25983
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
26511
25984
  }
26512
25985
  },
26513
- __wbg_upsertAccountRecord_f616812a7dd3d5a1: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17) {
25986
+ __wbg_upsertAccountRecord_793d7ddc0ba72c6d: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17) {
26514
25987
  let deferred0_0;
26515
25988
  let deferred0_1;
26516
25989
  let deferred1_0;
@@ -26552,7 +26025,7 @@ function __wbg_get_imports(memory) {
26552
26025
  wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
26553
26026
  }
26554
26027
  },
26555
- __wbg_upsertAccountStorage_4f3a4494f26975fb: function(arg0, arg1, arg2, arg3, arg4, arg5) {
26028
+ __wbg_upsertAccountStorage_5e3e18f2388a4516: function(arg0, arg1, arg2, arg3, arg4, arg5) {
26556
26029
  let deferred0_0;
26557
26030
  let deferred0_1;
26558
26031
  try {
@@ -26566,7 +26039,7 @@ function __wbg_get_imports(memory) {
26566
26039
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
26567
26040
  }
26568
26041
  },
26569
- __wbg_upsertForeignAccountCode_6595b4d97e610669: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
26042
+ __wbg_upsertForeignAccountCode_dc483b928e37841a: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
26570
26043
  let deferred0_0;
26571
26044
  let deferred0_1;
26572
26045
  let deferred2_0;
@@ -26585,7 +26058,7 @@ function __wbg_get_imports(memory) {
26585
26058
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
26586
26059
  }
26587
26060
  },
26588
- __wbg_upsertInputNote_850c7540f297f4d4: 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) {
26061
+ __wbg_upsertInputNote_570ff0eb47e436a6: 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) {
26589
26062
  let deferred0_0;
26590
26063
  let deferred0_1;
26591
26064
  let deferred6_0;
@@ -26634,7 +26107,7 @@ function __wbg_get_imports(memory) {
26634
26107
  wasm.__wbindgen_free(deferred9_0, deferred9_1, 1);
26635
26108
  }
26636
26109
  },
26637
- __wbg_upsertNoteScript_d946217575ba5025: function(arg0, arg1, arg2, arg3, arg4, arg5) {
26110
+ __wbg_upsertNoteScript_478f10dbd569c41c: function(arg0, arg1, arg2, arg3, arg4, arg5) {
26638
26111
  let deferred0_0;
26639
26112
  let deferred0_1;
26640
26113
  try {
@@ -26648,7 +26121,7 @@ function __wbg_get_imports(memory) {
26648
26121
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
26649
26122
  }
26650
26123
  },
26651
- __wbg_upsertOutputNote_907da49377d56a48: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19) {
26124
+ __wbg_upsertOutputNote_81d633e2913e530c: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19) {
26652
26125
  let deferred0_0;
26653
26126
  let deferred0_1;
26654
26127
  let deferred1_0;
@@ -26683,7 +26156,7 @@ function __wbg_get_imports(memory) {
26683
26156
  wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
26684
26157
  }
26685
26158
  },
26686
- __wbg_upsertStorageMapEntries_6bf2d15ad885daf0: function(arg0, arg1, arg2, arg3, arg4, arg5) {
26159
+ __wbg_upsertStorageMapEntries_6458946c680ec0cc: function(arg0, arg1, arg2, arg3, arg4, arg5) {
26687
26160
  let deferred0_0;
26688
26161
  let deferred0_1;
26689
26162
  try {
@@ -26697,7 +26170,7 @@ function __wbg_get_imports(memory) {
26697
26170
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
26698
26171
  }
26699
26172
  },
26700
- __wbg_upsertTransactionRecord_0b4dbeb561124c59: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) {
26173
+ __wbg_upsertTransactionRecord_5f48cbfd35e412bc: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) {
26701
26174
  let deferred0_0;
26702
26175
  let deferred0_1;
26703
26176
  try {
@@ -26718,7 +26191,7 @@ function __wbg_get_imports(memory) {
26718
26191
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
26719
26192
  }
26720
26193
  },
26721
- __wbg_upsertVaultAssets_55f07579c9e0113e: function(arg0, arg1, arg2, arg3, arg4, arg5) {
26194
+ __wbg_upsertVaultAssets_3d383338bd7746b0: function(arg0, arg1, arg2, arg3, arg4, arg5) {
26722
26195
  let deferred0_0;
26723
26196
  let deferred0_1;
26724
26197
  try {
@@ -26761,17 +26234,17 @@ function __wbg_get_imports(memory) {
26761
26234
  return ret;
26762
26235
  },
26763
26236
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
26764
- // Cast intrinsic for `Closure(Closure { dtor_idx: 129, function: Function { arguments: [Externref], shim_idx: 130, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
26237
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 116, function: Function { arguments: [Externref], shim_idx: 117, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
26765
26238
  const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_8294944b14acb139___closure__destroy___dyn_core_91ed24bc3d45dfd0___ops__function__FnMut__wasm_bindgen_8294944b14acb139___JsValue____Output_______, wasm_bindgen_8294944b14acb139___convert__closures_____invoke___wasm_bindgen_8294944b14acb139___JsValue_____);
26766
26239
  return ret;
26767
26240
  },
26768
26241
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
26769
- // Cast intrinsic for `Closure(Closure { dtor_idx: 129, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 130, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
26242
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 116, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 117, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
26770
26243
  const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_8294944b14acb139___closure__destroy___dyn_core_91ed24bc3d45dfd0___ops__function__FnMut__wasm_bindgen_8294944b14acb139___JsValue____Output_______, wasm_bindgen_8294944b14acb139___convert__closures_____invoke___wasm_bindgen_8294944b14acb139___JsValue_____);
26771
26244
  return ret;
26772
26245
  },
26773
26246
  __wbindgen_cast_0000000000000003: function(arg0, arg1) {
26774
- // Cast intrinsic for `Closure(Closure { dtor_idx: 129, function: Function { arguments: [], shim_idx: 454, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
26247
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 116, function: Function { arguments: [], shim_idx: 415, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
26775
26248
  const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_8294944b14acb139___closure__destroy___dyn_core_91ed24bc3d45dfd0___ops__function__FnMut__wasm_bindgen_8294944b14acb139___JsValue____Output_______, wasm_bindgen_8294944b14acb139___convert__closures_____invoke______);
26776
26249
  return ret;
26777
26250
  },
@@ -26781,91 +26254,79 @@ function __wbg_get_imports(memory) {
26781
26254
  return ret;
26782
26255
  },
26783
26256
  __wbindgen_cast_0000000000000005: function(arg0, arg1) {
26784
- // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
26785
- const ret = getArrayU8FromWasm0(arg0, arg1);
26786
- return ret;
26787
- },
26788
- __wbindgen_cast_0000000000000006: function(arg0, arg1) {
26789
26257
  // Cast intrinsic for `Ref(String) -> Externref`.
26790
26258
  const ret = getStringFromWasm0(arg0, arg1);
26791
26259
  return ret;
26792
26260
  },
26793
- __wbindgen_cast_0000000000000007: function(arg0) {
26261
+ __wbindgen_cast_0000000000000006: function(arg0) {
26794
26262
  // Cast intrinsic for `U64 -> Externref`.
26795
26263
  const ret = BigInt.asUintN(64, arg0);
26796
26264
  return ret;
26797
26265
  },
26798
- __wbindgen_cast_0000000000000008: function(arg0, arg1) {
26266
+ __wbindgen_cast_0000000000000007: function(arg0, arg1) {
26799
26267
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
26800
26268
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
26801
26269
  // Cast intrinsic for `Vector(NamedExternref("AccountHeader")) -> Externref`.
26802
26270
  const ret = v0;
26803
26271
  return ret;
26804
26272
  },
26805
- __wbindgen_cast_0000000000000009: function(arg0, arg1) {
26273
+ __wbindgen_cast_0000000000000008: function(arg0, arg1) {
26806
26274
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
26807
26275
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
26808
26276
  // Cast intrinsic for `Vector(NamedExternref("Address")) -> Externref`.
26809
26277
  const ret = v0;
26810
26278
  return ret;
26811
26279
  },
26812
- __wbindgen_cast_000000000000000a: function(arg0, arg1) {
26280
+ __wbindgen_cast_0000000000000009: function(arg0, arg1) {
26813
26281
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
26814
26282
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
26815
26283
  // Cast intrinsic for `Vector(NamedExternref("ConsumableNoteRecord")) -> Externref`.
26816
26284
  const ret = v0;
26817
26285
  return ret;
26818
26286
  },
26819
- __wbindgen_cast_000000000000000b: function(arg0, arg1) {
26287
+ __wbindgen_cast_000000000000000a: function(arg0, arg1) {
26820
26288
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
26821
26289
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
26822
26290
  // Cast intrinsic for `Vector(NamedExternref("FetchedNote")) -> Externref`.
26823
26291
  const ret = v0;
26824
26292
  return ret;
26825
26293
  },
26826
- __wbindgen_cast_000000000000000c: function(arg0, arg1) {
26294
+ __wbindgen_cast_000000000000000b: function(arg0, arg1) {
26827
26295
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
26828
26296
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
26829
26297
  // Cast intrinsic for `Vector(NamedExternref("InputNoteRecord")) -> Externref`.
26830
26298
  const ret = v0;
26831
26299
  return ret;
26832
26300
  },
26833
- __wbindgen_cast_000000000000000d: function(arg0, arg1) {
26301
+ __wbindgen_cast_000000000000000c: function(arg0, arg1) {
26834
26302
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
26835
26303
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
26836
26304
  // Cast intrinsic for `Vector(NamedExternref("OutputNoteRecord")) -> Externref`.
26837
26305
  const ret = v0;
26838
26306
  return ret;
26839
26307
  },
26840
- __wbindgen_cast_000000000000000e: function(arg0, arg1) {
26841
- var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
26842
- wasm.__wbindgen_free(arg0, arg1 * 4, 4);
26843
- // Cast intrinsic for `Vector(NamedExternref("PswapLineageRecord")) -> Externref`.
26844
- const ret = v0;
26845
- return ret;
26846
- },
26847
- __wbindgen_cast_000000000000000f: function(arg0, arg1) {
26308
+ __wbindgen_cast_000000000000000d: function(arg0, arg1) {
26848
26309
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
26849
26310
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
26850
26311
  // Cast intrinsic for `Vector(NamedExternref("TransactionRecord")) -> Externref`.
26851
26312
  const ret = v0;
26852
26313
  return ret;
26853
26314
  },
26854
- __wbindgen_cast_0000000000000010: function(arg0, arg1) {
26315
+ __wbindgen_cast_000000000000000e: function(arg0, arg1) {
26855
26316
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
26856
26317
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
26857
26318
  // Cast intrinsic for `Vector(NamedExternref("Word")) -> Externref`.
26858
26319
  const ret = v0;
26859
26320
  return ret;
26860
26321
  },
26861
- __wbindgen_cast_0000000000000011: function(arg0, arg1) {
26322
+ __wbindgen_cast_000000000000000f: function(arg0, arg1) {
26862
26323
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
26863
26324
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
26864
26325
  // Cast intrinsic for `Vector(NamedExternref("string")) -> Externref`.
26865
26326
  const ret = v0;
26866
26327
  return ret;
26867
26328
  },
26868
- __wbindgen_cast_0000000000000012: function(arg0, arg1) {
26329
+ __wbindgen_cast_0000000000000010: function(arg0, arg1) {
26869
26330
  var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
26870
26331
  wasm.__wbindgen_free(arg0, arg1 * 1, 1);
26871
26332
  // Cast intrinsic for `Vector(U8) -> Externref`.
@@ -26895,7 +26356,7 @@ function __wbg_get_imports(memory) {
26895
26356
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
26896
26357
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
26897
26358
  },
26898
- memory: memory || new WebAssembly.Memory({initial:59,maximum:65536,shared:true}),
26359
+ memory: memory || new WebAssembly.Memory({initial:129,maximum:65536,shared:true}),
26899
26360
  };
26900
26361
  return {
26901
26362
  __proto__: null,
@@ -26971,6 +26432,9 @@ const AccountIdFinalization = (typeof FinalizationRegistry === 'undefined')
26971
26432
  const AccountIdArrayFinalization = (typeof FinalizationRegistry === 'undefined')
26972
26433
  ? { register: () => {}, unregister: () => {} }
26973
26434
  : new FinalizationRegistry(ptr => wasm.__wbg_accountidarray_free(ptr >>> 0, 1));
26435
+ const AccountPatchFinalization = (typeof FinalizationRegistry === 'undefined')
26436
+ ? { register: () => {}, unregister: () => {} }
26437
+ : new FinalizationRegistry(ptr => wasm.__wbg_accountpatch_free(ptr >>> 0, 1));
26974
26438
  const AccountProofFinalization = (typeof FinalizationRegistry === 'undefined')
26975
26439
  ? { register: () => {}, unregister: () => {} }
26976
26440
  : new FinalizationRegistry(ptr => wasm.__wbg_accountproof_free(ptr >>> 0, 1));
@@ -26983,18 +26447,21 @@ const AccountStatusFinalization = (typeof FinalizationRegistry === 'undefined')
26983
26447
  const AccountStorageFinalization = (typeof FinalizationRegistry === 'undefined')
26984
26448
  ? { register: () => {}, unregister: () => {} }
26985
26449
  : new FinalizationRegistry(ptr => wasm.__wbg_accountstorage_free(ptr >>> 0, 1));
26986
- const AccountStorageDeltaFinalization = (typeof FinalizationRegistry === 'undefined')
26987
- ? { register: () => {}, unregister: () => {} }
26988
- : new FinalizationRegistry(ptr => wasm.__wbg_accountstoragedelta_free(ptr >>> 0, 1));
26989
26450
  const AccountStorageModeFinalization = (typeof FinalizationRegistry === 'undefined')
26990
26451
  ? { register: () => {}, unregister: () => {} }
26991
26452
  : new FinalizationRegistry(ptr => wasm.__wbg_accountstoragemode_free(ptr >>> 0, 1));
26453
+ const AccountStoragePatchFinalization = (typeof FinalizationRegistry === 'undefined')
26454
+ ? { register: () => {}, unregister: () => {} }
26455
+ : new FinalizationRegistry(ptr => wasm.__wbg_accountstoragepatch_free(ptr >>> 0, 1));
26992
26456
  const AccountStorageRequirementsFinalization = (typeof FinalizationRegistry === 'undefined')
26993
26457
  ? { register: () => {}, unregister: () => {} }
26994
26458
  : new FinalizationRegistry(ptr => wasm.__wbg_accountstoragerequirements_free(ptr >>> 0, 1));
26995
26459
  const AccountVaultDeltaFinalization = (typeof FinalizationRegistry === 'undefined')
26996
26460
  ? { register: () => {}, unregister: () => {} }
26997
26461
  : new FinalizationRegistry(ptr => wasm.__wbg_accountvaultdelta_free(ptr >>> 0, 1));
26462
+ const AccountVaultPatchFinalization = (typeof FinalizationRegistry === 'undefined')
26463
+ ? { register: () => {}, unregister: () => {} }
26464
+ : new FinalizationRegistry(ptr => wasm.__wbg_accountvaultpatch_free(ptr >>> 0, 1));
26998
26465
  const AddressFinalization = (typeof FinalizationRegistry === 'undefined')
26999
26466
  ? { register: () => {}, unregister: () => {} }
27000
26467
  : new FinalizationRegistry(ptr => wasm.__wbg_address_free(ptr >>> 0, 1));
@@ -27031,9 +26498,6 @@ const ConsumableNoteRecordFinalization = (typeof FinalizationRegistry === 'undef
27031
26498
  const EndpointFinalization = (typeof FinalizationRegistry === 'undefined')
27032
26499
  ? { register: () => {}, unregister: () => {} }
27033
26500
  : new FinalizationRegistry(ptr => wasm.__wbg_endpoint_free(ptr >>> 0, 1));
27034
- const EthAddressFinalization = (typeof FinalizationRegistry === 'undefined')
27035
- ? { register: () => {}, unregister: () => {} }
27036
- : new FinalizationRegistry(ptr => wasm.__wbg_ethaddress_free(ptr >>> 0, 1));
27037
26501
  const ExecutedTransactionFinalization = (typeof FinalizationRegistry === 'undefined')
27038
26502
  ? { register: () => {}, unregister: () => {} }
27039
26503
  : new FinalizationRegistry(ptr => wasm.__wbg_executedtransaction_free(ptr >>> 0, 1));
@@ -27112,9 +26576,6 @@ const LibraryFinalization = (typeof FinalizationRegistry === 'undefined')
27112
26576
  const MerklePathFinalization = (typeof FinalizationRegistry === 'undefined')
27113
26577
  ? { register: () => {}, unregister: () => {} }
27114
26578
  : new FinalizationRegistry(ptr => wasm.__wbg_merklepath_free(ptr >>> 0, 1));
27115
- const NetworkAccountTargetFinalization = (typeof FinalizationRegistry === 'undefined')
27116
- ? { register: () => {}, unregister: () => {} }
27117
- : new FinalizationRegistry(ptr => wasm.__wbg_networkaccounttarget_free(ptr >>> 0, 1));
27118
26579
  const NetworkIdFinalization = (typeof FinalizationRegistry === 'undefined')
27119
26580
  ? { register: () => {}, unregister: () => {} }
27120
26581
  : new FinalizationRegistry(ptr => wasm.__wbg_networkid_free(ptr >>> 0, 1));
@@ -27238,9 +26699,6 @@ const ProgramFinalization = (typeof FinalizationRegistry === 'undefined')
27238
26699
  const ProvenTransactionFinalization = (typeof FinalizationRegistry === 'undefined')
27239
26700
  ? { register: () => {}, unregister: () => {} }
27240
26701
  : new FinalizationRegistry(ptr => wasm.__wbg_proventransaction_free(ptr >>> 0, 1));
27241
- const PswapLineageRecordFinalization = (typeof FinalizationRegistry === 'undefined')
27242
- ? { register: () => {}, unregister: () => {} }
27243
- : new FinalizationRegistry(ptr => wasm.__wbg_pswaplineagerecord_free(ptr >>> 0, 1));
27244
26702
  const PublicKeyFinalization = (typeof FinalizationRegistry === 'undefined')
27245
26703
  ? { register: () => {}, unregister: () => {} }
27246
26704
  : new FinalizationRegistry(ptr => wasm.__wbg_publickey_free(ptr >>> 0, 1));
@@ -27754,19 +27212,20 @@ var index = /*#__PURE__*/Object.freeze({
27754
27212
  AccountId: AccountId,
27755
27213
  AccountIdArray: AccountIdArray,
27756
27214
  AccountInterface: AccountInterface,
27215
+ AccountPatch: AccountPatch,
27757
27216
  AccountProof: AccountProof,
27758
27217
  AccountReader: AccountReader,
27759
27218
  AccountStatus: AccountStatus,
27760
27219
  AccountStorage: AccountStorage,
27761
- AccountStorageDelta: AccountStorageDelta,
27762
27220
  AccountStorageMode: AccountStorageMode,
27221
+ AccountStoragePatch: AccountStoragePatch,
27763
27222
  AccountStorageRequirements: AccountStorageRequirements,
27764
27223
  AccountType: AccountType,
27765
27224
  AccountVaultDelta: AccountVaultDelta,
27225
+ AccountVaultPatch: AccountVaultPatch,
27766
27226
  Address: Address,
27767
27227
  AdviceInputs: AdviceInputs,
27768
27228
  AdviceMap: AdviceMap,
27769
- AssetCallbackFlag: AssetCallbackFlag,
27770
27229
  AssetVault: AssetVault,
27771
27230
  AuthFalcon512RpoMultisigConfig: AuthFalcon512RpoMultisigConfig,
27772
27231
  AuthScheme: AuthScheme,
@@ -27777,7 +27236,6 @@ var index = /*#__PURE__*/Object.freeze({
27777
27236
  CommittedNote: CommittedNote,
27778
27237
  ConsumableNoteRecord: ConsumableNoteRecord,
27779
27238
  Endpoint: Endpoint,
27780
- EthAddress: EthAddress,
27781
27239
  ExecutedTransaction: ExecutedTransaction,
27782
27240
  Felt: Felt,
27783
27241
  FeltArray: FeltArray,
@@ -27805,7 +27263,6 @@ var index = /*#__PURE__*/Object.freeze({
27805
27263
  JsVaultAsset: JsVaultAsset,
27806
27264
  Library: Library,
27807
27265
  MerklePath: MerklePath,
27808
- NetworkAccountTarget: NetworkAccountTarget,
27809
27266
  NetworkId: NetworkId,
27810
27267
  NetworkNoteStatusInfo: NetworkNoteStatusInfo,
27811
27268
  NetworkType: NetworkType,
@@ -27852,8 +27309,6 @@ var index = /*#__PURE__*/Object.freeze({
27852
27309
  ProcedureThreshold: ProcedureThreshold,
27853
27310
  Program: Program,
27854
27311
  ProvenTransaction: ProvenTransaction,
27855
- PswapLineageRecord: PswapLineageRecord,
27856
- PswapLineageState: PswapLineageState,
27857
27312
  PublicKey: PublicKey,
27858
27313
  RpcClient: RpcClient,
27859
27314
  Rpo256: Rpo256,
@@ -27910,7 +27365,7 @@ var index = /*#__PURE__*/Object.freeze({
27910
27365
 
27911
27366
  const module$1 = new URL("assets/miden_client_web.wasm", self.location.href);
27912
27367
 
27913
- var CargoCnGom_z = /*#__PURE__*/Object.freeze({
27368
+ var CargoDKsyWYgG = /*#__PURE__*/Object.freeze({
27914
27369
  __proto__: null,
27915
27370
  Account: Account,
27916
27371
  AccountArray: AccountArray,
@@ -27925,19 +27380,20 @@ var CargoCnGom_z = /*#__PURE__*/Object.freeze({
27925
27380
  AccountId: AccountId,
27926
27381
  AccountIdArray: AccountIdArray,
27927
27382
  AccountInterface: AccountInterface,
27383
+ AccountPatch: AccountPatch,
27928
27384
  AccountProof: AccountProof,
27929
27385
  AccountReader: AccountReader,
27930
27386
  AccountStatus: AccountStatus,
27931
27387
  AccountStorage: AccountStorage,
27932
- AccountStorageDelta: AccountStorageDelta,
27933
27388
  AccountStorageMode: AccountStorageMode,
27389
+ AccountStoragePatch: AccountStoragePatch,
27934
27390
  AccountStorageRequirements: AccountStorageRequirements,
27935
27391
  AccountType: AccountType,
27936
27392
  AccountVaultDelta: AccountVaultDelta,
27393
+ AccountVaultPatch: AccountVaultPatch,
27937
27394
  Address: Address,
27938
27395
  AdviceInputs: AdviceInputs,
27939
27396
  AdviceMap: AdviceMap,
27940
- AssetCallbackFlag: AssetCallbackFlag,
27941
27397
  AssetVault: AssetVault,
27942
27398
  AuthFalcon512RpoMultisigConfig: AuthFalcon512RpoMultisigConfig,
27943
27399
  AuthScheme: AuthScheme,
@@ -27948,7 +27404,6 @@ var CargoCnGom_z = /*#__PURE__*/Object.freeze({
27948
27404
  CommittedNote: CommittedNote,
27949
27405
  ConsumableNoteRecord: ConsumableNoteRecord,
27950
27406
  Endpoint: Endpoint,
27951
- EthAddress: EthAddress,
27952
27407
  ExecutedTransaction: ExecutedTransaction,
27953
27408
  Felt: Felt,
27954
27409
  FeltArray: FeltArray,
@@ -27976,7 +27431,6 @@ var CargoCnGom_z = /*#__PURE__*/Object.freeze({
27976
27431
  JsVaultAsset: JsVaultAsset,
27977
27432
  Library: Library,
27978
27433
  MerklePath: MerklePath,
27979
- NetworkAccountTarget: NetworkAccountTarget,
27980
27434
  NetworkId: NetworkId,
27981
27435
  NetworkNoteStatusInfo: NetworkNoteStatusInfo,
27982
27436
  NetworkType: NetworkType,
@@ -28023,8 +27477,6 @@ var CargoCnGom_z = /*#__PURE__*/Object.freeze({
28023
27477
  ProcedureThreshold: ProcedureThreshold,
28024
27478
  Program: Program,
28025
27479
  ProvenTransaction: ProvenTransaction,
28026
- PswapLineageRecord: PswapLineageRecord,
28027
- PswapLineageState: PswapLineageState,
28028
27480
  PublicKey: PublicKey,
28029
27481
  RpcClient: RpcClient,
28030
27482
  Rpo256: Rpo256,