@miden-sdk/miden-sdk 0.15.6 → 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.
- package/README.md +0 -137
- package/dist/mt/{workers/Cargo-mvyTli7g-BwMMSyoq.js → Cargo-DKsyWYgG.js} +699 -1202
- package/dist/mt/Cargo-DKsyWYgG.js.map +1 -0
- package/dist/mt/api-types.d.ts +38 -250
- package/dist/mt/assets/miden_client_web.wasm +0 -0
- package/dist/mt/crates/miden_client_web.d.ts +179 -370
- package/dist/mt/docs-entry.d.ts +3 -6
- package/dist/mt/eager.js +1 -1
- package/dist/mt/index.d.ts +0 -3
- package/dist/mt/index.js +49 -450
- package/dist/mt/index.js.map +1 -1
- package/dist/mt/wasm.js +1 -1
- package/dist/mt/workerHelpers.js +1 -1
- package/dist/mt/{Cargo-mvyTli7g.js → workers/Cargo-DKsyWYgG-DfOhgt23.js} +700 -1201
- package/dist/mt/workers/Cargo-DKsyWYgG-DfOhgt23.js.map +1 -0
- package/dist/mt/workers/assets/miden_client_web.wasm +0 -0
- package/dist/mt/workers/web-client-methods-worker.js +703 -1207
- package/dist/mt/workers/web-client-methods-worker.js.map +1 -1
- package/dist/mt/workers/web-client-methods-worker.module.js +1 -1
- package/dist/mt/workers/web-client-methods-worker.module.js.map +1 -1
- package/dist/mt/workers/workerHelpers.js +1 -1
- package/dist/st/{workers/Cargo-Cysp4vto-BIw-TeJn.js → Cargo-LwITdlzJ.js} +694 -1195
- package/dist/st/Cargo-LwITdlzJ.js.map +1 -0
- package/dist/st/api-types.d.ts +38 -250
- package/dist/st/assets/miden_client_web.wasm +0 -0
- package/dist/st/crates/miden_client_web.d.ts +179 -370
- package/dist/st/docs-entry.d.ts +3 -6
- package/dist/st/eager.js +1 -1
- package/dist/st/index.d.ts +0 -3
- package/dist/st/index.js +49 -450
- package/dist/st/index.js.map +1 -1
- package/dist/st/wasm.js +1 -1
- package/dist/st/{Cargo-Cysp4vto.js → workers/Cargo-LwITdlzJ-Dyl2bCwN.js} +695 -1194
- package/dist/st/workers/Cargo-LwITdlzJ-Dyl2bCwN.js.map +1 -0
- package/dist/st/workers/assets/miden_client_web.wasm +0 -0
- package/dist/st/workers/web-client-methods-worker.js +698 -1200
- package/dist/st/workers/web-client-methods-worker.js.map +1 -1
- package/dist/st/workers/web-client-methods-worker.module.js +1 -1
- package/dist/st/workers/web-client-methods-worker.module.js.map +1 -1
- package/js/client.js +2 -4
- package/js/node/client-factory.js +4 -11
- package/js/node/napi-compat.js +1 -0
- package/js/node-index.js +11 -10
- package/js/resources/compiler.js +23 -12
- package/js/resources/transactions.js +20 -289
- package/js/standalone.js +3 -61
- package/package.json +4 -4
- package/dist/mt/Cargo-mvyTli7g.js.map +0 -1
- package/dist/mt/workers/Cargo-mvyTli7g-BwMMSyoq.js.map +0 -1
- package/dist/st/Cargo-Cysp4vto.js.map +0 -1
- package/dist/st/workers/Cargo-Cysp4vto-BIw-TeJn.js.map +0 -1
- package/js/resources/pswap.js +0 -132
|
@@ -8197,6 +8197,42 @@ const logWebStoreError = (error, errorContext) => {
|
|
|
8197
8197
|
}
|
|
8198
8198
|
throw error;
|
|
8199
8199
|
};
|
|
8200
|
+
// Partial blockchain (MMR) authentication nodes are part of the local
|
|
8201
|
+
// `PartialMmr` state. Once a node index is known its value is fixed, so a
|
|
8202
|
+
// later write with the same index but a different value indicates a buggy or
|
|
8203
|
+
// malicious sync path. Insert nodes that are missing, accept writes that match
|
|
8204
|
+
// the stored value, and reject conflicting writes so the known-good value is
|
|
8205
|
+
// never silently overwritten.
|
|
8206
|
+
const putPartialBlockchainNodesNoOverwrite = async (table, data) => {
|
|
8207
|
+
// Collapse duplicate indexes within the same batch up front: identical
|
|
8208
|
+
// copies are deduplicated (a repeated index would otherwise make `bulkAdd`
|
|
8209
|
+
// throw a key-collision error), and copies that disagree are rejected.
|
|
8210
|
+
const unique = new Map();
|
|
8211
|
+
for (const entry of data) {
|
|
8212
|
+
const seen = unique.get(entry.id);
|
|
8213
|
+
if (seen !== undefined && seen.node !== entry.node) {
|
|
8214
|
+
throw new Error(`Conflicting partial blockchain node ${entry.id} within the same write`);
|
|
8215
|
+
}
|
|
8216
|
+
unique.set(entry.id, entry);
|
|
8217
|
+
}
|
|
8218
|
+
const records = [...unique.values()];
|
|
8219
|
+
const existing = await table.bulkGet(records.map((entry) => entry.id));
|
|
8220
|
+
const toAdd = [];
|
|
8221
|
+
for (let i = 0; i < records.length; i++) {
|
|
8222
|
+
const current = existing[i];
|
|
8223
|
+
if (current === undefined) {
|
|
8224
|
+
toAdd.push(records[i]);
|
|
8225
|
+
}
|
|
8226
|
+
else if (current.node !== records[i].node) {
|
|
8227
|
+
throw new Error(`Refusing to overwrite partial blockchain node ${records[i].id}: ` +
|
|
8228
|
+
`stored value differs from the new value`);
|
|
8229
|
+
}
|
|
8230
|
+
// current.node === records[i].node: already stored, nothing to do.
|
|
8231
|
+
}
|
|
8232
|
+
if (toAdd.length > 0) {
|
|
8233
|
+
await table.bulkAdd(toAdd);
|
|
8234
|
+
}
|
|
8235
|
+
};
|
|
8200
8236
|
const uint8ArrayToBase64 = (bytes) => {
|
|
8201
8237
|
const binary = bytes.reduce((acc, byte) => acc + String.fromCharCode(byte), "");
|
|
8202
8238
|
return btoa(binary);
|
|
@@ -8253,7 +8289,7 @@ var Table;
|
|
|
8253
8289
|
Table["InputNotes"] = "inputNotes";
|
|
8254
8290
|
Table["OutputNotes"] = "outputNotes";
|
|
8255
8291
|
Table["NotesScripts"] = "notesScripts";
|
|
8256
|
-
Table["
|
|
8292
|
+
Table["BlockchainCheckpoint"] = "blockchainCheckpoint";
|
|
8257
8293
|
Table["BlockHeaders"] = "blockHeaders";
|
|
8258
8294
|
Table["PartialBlockchainNodes"] = "partialBlockchainNodes";
|
|
8259
8295
|
Table["Tags"] = "tags";
|
|
@@ -8264,9 +8300,7 @@ function indexes(...items) {
|
|
|
8264
8300
|
return items.join(",");
|
|
8265
8301
|
}
|
|
8266
8302
|
/** V1 baseline schema. Extracted as a constant because once migrations are enabled, this must
|
|
8267
|
-
* never be modified — all schema changes should go through new version blocks instead.
|
|
8268
|
-
* Exported for migration tests, which seed a physical v1 database before opening it with the
|
|
8269
|
-
* current version chain. */
|
|
8303
|
+
* never be modified — all schema changes should go through new version blocks instead. */
|
|
8270
8304
|
const V1_STORES = {
|
|
8271
8305
|
[Table.AccountCode]: indexes("root"),
|
|
8272
8306
|
[Table.LatestAccountStorage]: indexes("[accountId+slotName]", "accountId"),
|
|
@@ -8285,7 +8319,7 @@ const V1_STORES = {
|
|
|
8285
8319
|
[Table.InputNotes]: indexes("detailsCommitment", "noteId", "nullifier", "stateDiscriminant", "[consumedBlockHeight+consumedTxOrder+noteId]"),
|
|
8286
8320
|
[Table.OutputNotes]: indexes("detailsCommitment", "noteId", "recipientDigest", "stateDiscriminant", "nullifier"),
|
|
8287
8321
|
[Table.NotesScripts]: indexes("scriptRoot"),
|
|
8288
|
-
[Table.
|
|
8322
|
+
[Table.BlockchainCheckpoint]: indexes("id"),
|
|
8289
8323
|
[Table.BlockHeaders]: indexes("blockNum", "hasClientNotes"),
|
|
8290
8324
|
[Table.PartialBlockchainNodes]: indexes("id"),
|
|
8291
8325
|
[Table.Tags]: indexes("id++", "tag", "sourceNoteId", "sourceAccountId"),
|
|
@@ -8311,7 +8345,7 @@ class MidenDatabase {
|
|
|
8311
8345
|
inputNotes;
|
|
8312
8346
|
outputNotes;
|
|
8313
8347
|
notesScripts;
|
|
8314
|
-
|
|
8348
|
+
blockchainCheckpoint;
|
|
8315
8349
|
blockHeaders;
|
|
8316
8350
|
partialBlockchainNodes;
|
|
8317
8351
|
tags;
|
|
@@ -8321,12 +8355,11 @@ class MidenDatabase {
|
|
|
8321
8355
|
this.dexie = new Dexie(network);
|
|
8322
8356
|
// --- Schema versioning ---
|
|
8323
8357
|
//
|
|
8324
|
-
// NOTE:
|
|
8325
|
-
//
|
|
8326
|
-
//
|
|
8327
|
-
// data
|
|
8328
|
-
//
|
|
8329
|
-
// version-change nuke will be removed and migrations alone will take over.
|
|
8358
|
+
// NOTE: The migration system is not currently in use. The Miden network
|
|
8359
|
+
// resets on every upgrade, so the database is nuked whenever the client
|
|
8360
|
+
// version changes (see ensureClientVersion). Once the network stabilizes
|
|
8361
|
+
// and data can be preserved across upgrades, the version-change nuke will
|
|
8362
|
+
// be removed and migrations will take over.
|
|
8330
8363
|
//
|
|
8331
8364
|
// v1 is the baseline schema. To add a migration:
|
|
8332
8365
|
// 1. Add a .version(N+1).stores({...}).upgrade(tx => {...}) block below.
|
|
@@ -8358,43 +8391,12 @@ class MidenDatabase {
|
|
|
8358
8391
|
// Note: The `populate` hook (below the version blocks) only fires on
|
|
8359
8392
|
// first database creation, NOT during upgrades.
|
|
8360
8393
|
//
|
|
8361
|
-
//
|
|
8362
|
-
//
|
|
8363
|
-
//
|
|
8364
|
-
//
|
|
8394
|
+
// To enable migrations (stop nuking the DB on version change):
|
|
8395
|
+
// 1. Remove the nuke logic in ensureClientVersion (close/delete/open).
|
|
8396
|
+
// Just persist the new version instead.
|
|
8397
|
+
// 2. Freeze V1_STORES — never modify it again.
|
|
8398
|
+
// 3. Add version(2+) blocks below for all schema changes going forward.
|
|
8365
8399
|
this.dexie.version(1).stores(V1_STORES);
|
|
8366
|
-
// v2 (miden-client 0.15.4): prune note tags leaked by output-note
|
|
8367
|
-
// registration. Mirrors sqlite-store migration
|
|
8368
|
-
// `0002_prune_output_note_tags.sql`. Clients built against miden-client
|
|
8369
|
-
// < 0.15.4 registered a `Note`-sourced tag for every output note a
|
|
8370
|
-
// transaction created, but sync cleanup only removes tags of committed
|
|
8371
|
-
// *input* notes — leaking one `tags` row per created note. The client no
|
|
8372
|
-
// longer registers those tags; this upgrade deletes the rows already
|
|
8373
|
-
// leaked. A tag is kept while an inclusion-pending input note
|
|
8374
|
-
// (Expected = 0, Unverified = 1 — the mirror of
|
|
8375
|
-
// `InputNoteRecord::is_inclusion_pending`) still needs it.
|
|
8376
|
-
//
|
|
8377
|
-
// This data-only fix coexists with the version-change nuke above: the
|
|
8378
|
-
// nuke covers major/minor client upgrades (network resets), while this
|
|
8379
|
-
// upgrade runs for stores preserved across patch upgrades.
|
|
8380
|
-
this.dexie
|
|
8381
|
-
.version(2)
|
|
8382
|
-
.stores({})
|
|
8383
|
-
.upgrade(async (tx) => {
|
|
8384
|
-
const outputNoteCommitments = new Set(await tx.outputNotes.toCollection().primaryKeys());
|
|
8385
|
-
if (outputNoteCommitments.size === 0) {
|
|
8386
|
-
return;
|
|
8387
|
-
}
|
|
8388
|
-
const pendingInputNoteCommitments = new Set(await tx.inputNotes
|
|
8389
|
-
.where("stateDiscriminant")
|
|
8390
|
-
.anyOf([0, 1])
|
|
8391
|
-
.primaryKeys());
|
|
8392
|
-
await tx.tags
|
|
8393
|
-
.filter((tag) => !!tag.sourceNoteId &&
|
|
8394
|
-
outputNoteCommitments.has(tag.sourceNoteId) &&
|
|
8395
|
-
!pendingInputNoteCommitments.has(tag.sourceNoteId))
|
|
8396
|
-
.delete();
|
|
8397
|
-
});
|
|
8398
8400
|
this.accountCodes = this.dexie.table(Table.AccountCode);
|
|
8399
8401
|
this.latestAccountStorages = this.dexie.table(Table.LatestAccountStorage);
|
|
8400
8402
|
this.historicalAccountStorages = this.dexie.table(Table.HistoricalAccountStorage);
|
|
@@ -8412,16 +8414,20 @@ class MidenDatabase {
|
|
|
8412
8414
|
this.inputNotes = this.dexie.table(Table.InputNotes);
|
|
8413
8415
|
this.outputNotes = this.dexie.table(Table.OutputNotes);
|
|
8414
8416
|
this.notesScripts = this.dexie.table(Table.NotesScripts);
|
|
8415
|
-
this.
|
|
8417
|
+
this.blockchainCheckpoint = this.dexie.table(Table.BlockchainCheckpoint);
|
|
8416
8418
|
this.blockHeaders = this.dexie.table(Table.BlockHeaders);
|
|
8417
8419
|
this.partialBlockchainNodes = this.dexie.table(Table.PartialBlockchainNodes);
|
|
8418
8420
|
this.tags = this.dexie.table(Table.Tags);
|
|
8419
8421
|
this.foreignAccountCode = this.dexie.table(Table.ForeignAccountCode);
|
|
8420
8422
|
this.settings = this.dexie.table(Table.Settings);
|
|
8421
8423
|
this.dexie.on("populate", () => {
|
|
8422
|
-
this.
|
|
8423
|
-
.put({
|
|
8424
|
-
|
|
8424
|
+
this.blockchainCheckpoint
|
|
8425
|
+
.put({
|
|
8426
|
+
id: 1,
|
|
8427
|
+
blockNum: 0,
|
|
8428
|
+
partialBlockchainPeaks: new Uint8Array(),
|
|
8429
|
+
})
|
|
8430
|
+
/* v8 ignore next 2 — populate blockchainCheckpoint failure requires fake-indexeddb to simulate a write error, not modelable in unit tests */
|
|
8425
8431
|
.catch((err) => logWebStoreError(err, "Failed to populate DB"));
|
|
8426
8432
|
});
|
|
8427
8433
|
}
|
|
@@ -8747,7 +8753,7 @@ async function upsertVaultAssets(dbId, accountId, assets) {
|
|
|
8747
8753
|
logWebStoreError(error, `Error inserting assets`);
|
|
8748
8754
|
}
|
|
8749
8755
|
}
|
|
8750
|
-
async function
|
|
8756
|
+
async function applyAccountPatch(dbId, accountId, nonce, updatedSlots, changedMapEntries, changedAssets, codeRoot, storageRoot, vaultRoot, committed, commitment) {
|
|
8751
8757
|
try {
|
|
8752
8758
|
const db = getDatabase(dbId);
|
|
8753
8759
|
await db.dexie.transaction("rw", [
|
|
@@ -8760,7 +8766,8 @@ async function applyTransactionDelta(dbId, accountId, nonce, updatedSlots, chang
|
|
|
8760
8766
|
db.latestAccountHeaders,
|
|
8761
8767
|
db.historicalAccountHeaders,
|
|
8762
8768
|
], async () => {
|
|
8763
|
-
|
|
8769
|
+
const resetMapSlots = new Set();
|
|
8770
|
+
// Apply storage patch: read old → archive → write/delete final state.
|
|
8764
8771
|
for (const slot of updatedSlots) {
|
|
8765
8772
|
const oldSlot = await db.latestAccountStorages
|
|
8766
8773
|
.where("[accountId+slotName]")
|
|
@@ -8773,12 +8780,44 @@ async function applyTransactionDelta(dbId, accountId, nonce, updatedSlots, chang
|
|
|
8773
8780
|
oldSlotValue: oldSlot?.slotValue ?? null,
|
|
8774
8781
|
slotType: slot.slotType,
|
|
8775
8782
|
});
|
|
8776
|
-
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
|
|
8780
|
-
|
|
8781
|
-
|
|
8783
|
+
// A created map is a replacement (a remove followed by create can merge to Create),
|
|
8784
|
+
// while a removed map must drop every persisted entry. Archive those entries so account
|
|
8785
|
+
// rollback can restore them.
|
|
8786
|
+
if (slot.slotType === 1 &&
|
|
8787
|
+
(slot.patchOperation === 0 || slot.patchOperation === 2)) {
|
|
8788
|
+
resetMapSlots.add(slot.slotName);
|
|
8789
|
+
const oldMapEntries = await db.latestStorageMapEntries
|
|
8790
|
+
.where("[accountId+slotName]")
|
|
8791
|
+
.equals([accountId, slot.slotName])
|
|
8792
|
+
.toArray();
|
|
8793
|
+
for (const entry of oldMapEntries) {
|
|
8794
|
+
await db.historicalStorageMapEntries.put({
|
|
8795
|
+
accountId,
|
|
8796
|
+
replacedAtNonce: nonce,
|
|
8797
|
+
slotName: entry.slotName,
|
|
8798
|
+
key: entry.key,
|
|
8799
|
+
oldValue: entry.value,
|
|
8800
|
+
});
|
|
8801
|
+
}
|
|
8802
|
+
await db.latestStorageMapEntries
|
|
8803
|
+
.where("[accountId+slotName]")
|
|
8804
|
+
.equals([accountId, slot.slotName])
|
|
8805
|
+
.delete();
|
|
8806
|
+
}
|
|
8807
|
+
if (slot.patchOperation === 2) {
|
|
8808
|
+
await db.latestAccountStorages
|
|
8809
|
+
.where("[accountId+slotName]")
|
|
8810
|
+
.equals([accountId, slot.slotName])
|
|
8811
|
+
.delete();
|
|
8812
|
+
}
|
|
8813
|
+
else {
|
|
8814
|
+
await db.latestAccountStorages.put({
|
|
8815
|
+
accountId,
|
|
8816
|
+
slotName: slot.slotName,
|
|
8817
|
+
slotValue: slot.slotValue,
|
|
8818
|
+
slotType: slot.slotType,
|
|
8819
|
+
});
|
|
8820
|
+
}
|
|
8782
8821
|
}
|
|
8783
8822
|
// Process map entries: read old → archive → update latest
|
|
8784
8823
|
for (const entry of changedMapEntries) {
|
|
@@ -8786,13 +8825,30 @@ async function applyTransactionDelta(dbId, accountId, nonce, updatedSlots, chang
|
|
|
8786
8825
|
.where("[accountId+slotName+key]")
|
|
8787
8826
|
.equals([accountId, entry.slotName, entry.key])
|
|
8788
8827
|
.first();
|
|
8789
|
-
|
|
8790
|
-
|
|
8791
|
-
|
|
8792
|
-
|
|
8793
|
-
|
|
8794
|
-
|
|
8795
|
-
|
|
8828
|
+
if (resetMapSlots.has(entry.slotName)) {
|
|
8829
|
+
const archivedEntry = await db.historicalStorageMapEntries
|
|
8830
|
+
.where("[accountId+replacedAtNonce+slotName+key]")
|
|
8831
|
+
.equals([accountId, nonce, entry.slotName, entry.key])
|
|
8832
|
+
.first();
|
|
8833
|
+
if (archivedEntry === undefined) {
|
|
8834
|
+
await db.historicalStorageMapEntries.put({
|
|
8835
|
+
accountId,
|
|
8836
|
+
replacedAtNonce: nonce,
|
|
8837
|
+
slotName: entry.slotName,
|
|
8838
|
+
key: entry.key,
|
|
8839
|
+
oldValue: null,
|
|
8840
|
+
});
|
|
8841
|
+
}
|
|
8842
|
+
}
|
|
8843
|
+
else {
|
|
8844
|
+
await db.historicalStorageMapEntries.put({
|
|
8845
|
+
accountId,
|
|
8846
|
+
replacedAtNonce: nonce,
|
|
8847
|
+
slotName: entry.slotName,
|
|
8848
|
+
key: entry.key,
|
|
8849
|
+
oldValue: oldEntry?.value ?? null,
|
|
8850
|
+
});
|
|
8851
|
+
}
|
|
8796
8852
|
// "" means removal
|
|
8797
8853
|
if (entry.value === "") {
|
|
8798
8854
|
await db.latestStorageMapEntries
|
|
@@ -8872,7 +8928,6 @@ async function applyTransactionDelta(dbId, accountId, nonce, updatedSlots, chang
|
|
|
8872
8928
|
}
|
|
8873
8929
|
catch (error) {
|
|
8874
8930
|
logWebStoreError(error, `Error applying transaction delta`);
|
|
8875
|
-
throw error;
|
|
8876
8931
|
}
|
|
8877
8932
|
}
|
|
8878
8933
|
async function archiveAndReplaceStorageSlots(db, accountId, nonce, newSlots) {
|
|
@@ -9111,7 +9166,6 @@ async function applyFullAccountState(dbId, accountState) {
|
|
|
9111
9166
|
}
|
|
9112
9167
|
catch (error) {
|
|
9113
9168
|
logWebStoreError(error, `Error applying full account state`);
|
|
9114
|
-
throw error;
|
|
9115
9169
|
}
|
|
9116
9170
|
}
|
|
9117
9171
|
async function upsertAccountRecord(dbId, accountId, codeRoot, storageRoot, vaultRoot, nonce, committed, commitment, accountSeed, watched) {
|
|
@@ -9516,33 +9570,36 @@ async function getAccountIdByKeyCommitment(dbId, pubKeyCommitmentHex) {
|
|
|
9516
9570
|
}
|
|
9517
9571
|
}
|
|
9518
9572
|
|
|
9519
|
-
async function insertBlockHeader(dbId, blockNum, header, hasClientNotes) {
|
|
9573
|
+
async function insertBlockHeader(dbId, blockNum, header, hasClientNotes, nodeIds, nodes) {
|
|
9520
9574
|
try {
|
|
9521
9575
|
const db = getDatabase(dbId);
|
|
9522
|
-
|
|
9576
|
+
if (nodeIds.length !== nodes.length) {
|
|
9577
|
+
throw new Error("nodeIds and nodes arrays must be of the same length");
|
|
9578
|
+
}
|
|
9579
|
+
const headerData = {
|
|
9523
9580
|
blockNum: blockNum,
|
|
9524
9581
|
header,
|
|
9525
9582
|
hasClientNotes: hasClientNotes.toString(),
|
|
9526
9583
|
};
|
|
9527
|
-
|
|
9528
|
-
|
|
9529
|
-
|
|
9530
|
-
|
|
9531
|
-
//
|
|
9532
|
-
//
|
|
9533
|
-
|
|
9534
|
-
|
|
9535
|
-
|
|
9536
|
-
|
|
9537
|
-
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
if
|
|
9544
|
-
|
|
9545
|
-
|
|
9584
|
+
const nodeData = nodes.map((node, index) => ({
|
|
9585
|
+
id: Number(nodeIds[index]),
|
|
9586
|
+
node: node,
|
|
9587
|
+
}));
|
|
9588
|
+
// Persist the header and its MMR nodes in one transaction so a header is never stored
|
|
9589
|
+
// without the nodes that rebuild its `PartialMmr` (mirrors miden-client's atomic insert).
|
|
9590
|
+
await db.dexie.transaction("rw", db.blockHeaders, db.partialBlockchainNodes, async () => {
|
|
9591
|
+
// Header: INSERT OR IGNORE, then one-way upgrade `has_client_notes` to true (load-bearing:
|
|
9592
|
+
// `get_tracked_block_header_numbers` filters on it to seed forest-node tracking).
|
|
9593
|
+
await db.blockHeaders.add(headerData).catch(async (err) => {
|
|
9594
|
+
if (!isConstraintError(err))
|
|
9595
|
+
throw err;
|
|
9596
|
+
if (hasClientNotes) {
|
|
9597
|
+
await db.blockHeaders.update(blockNum, { hasClientNotes: "true" });
|
|
9598
|
+
}
|
|
9599
|
+
});
|
|
9600
|
+
// Nodes: insert-if-missing with overwrite protection; a conflicting value throws and
|
|
9601
|
+
// aborts the transaction, rolling back the header write too.
|
|
9602
|
+
await putPartialBlockchainNodesNoOverwrite(db.partialBlockchainNodes, nodeData);
|
|
9546
9603
|
});
|
|
9547
9604
|
}
|
|
9548
9605
|
catch (err) {
|
|
@@ -9554,25 +9611,6 @@ function isConstraintError(err) {
|
|
|
9554
9611
|
const e = err;
|
|
9555
9612
|
return e?.name === "ConstraintError" || e?.inner?.name === "ConstraintError";
|
|
9556
9613
|
}
|
|
9557
|
-
async function insertPartialBlockchainNodes(dbId, ids, nodes) {
|
|
9558
|
-
try {
|
|
9559
|
-
const db = getDatabase(dbId);
|
|
9560
|
-
if (ids.length !== nodes.length) {
|
|
9561
|
-
throw new Error("ids and nodes arrays must be of the same length");
|
|
9562
|
-
}
|
|
9563
|
-
if (ids.length === 0) {
|
|
9564
|
-
return;
|
|
9565
|
-
}
|
|
9566
|
-
const data = nodes.map((node, index) => ({
|
|
9567
|
-
id: Number(ids[index]),
|
|
9568
|
-
node: node,
|
|
9569
|
-
}));
|
|
9570
|
-
await db.partialBlockchainNodes.bulkPut(data);
|
|
9571
|
-
}
|
|
9572
|
-
catch (err) {
|
|
9573
|
-
logWebStoreError(err, "Failed to insert partial blockchain nodes");
|
|
9574
|
-
}
|
|
9575
|
-
}
|
|
9576
9614
|
async function getBlockHeaders(dbId, blockNumbers) {
|
|
9577
9615
|
try {
|
|
9578
9616
|
const db = getDatabase(dbId);
|
|
@@ -9630,33 +9668,6 @@ async function getTrackedBlockHeaderNumbers(dbId) {
|
|
|
9630
9668
|
logWebStoreError(err, "Failed to get tracked block header numbers");
|
|
9631
9669
|
}
|
|
9632
9670
|
}
|
|
9633
|
-
/**
|
|
9634
|
-
* Returns the blockchain peaks at the current sync height. Peaks live on the
|
|
9635
|
-
* `blockHeaders` row at `stateSync.blockNum` — the block that was the chain
|
|
9636
|
-
* tip when its sync ran. Returns `{ blockNum, peaks: undefined }` if the
|
|
9637
|
-
* stateSync row is missing or if that block was inserted via backfill
|
|
9638
|
-
* (which leaves `partialBlockchainPeaks` unset).
|
|
9639
|
-
*/
|
|
9640
|
-
async function getCurrentBlockchainPeaks(dbId) {
|
|
9641
|
-
try {
|
|
9642
|
-
const db = getDatabase(dbId);
|
|
9643
|
-
const stateSyncRow = await db.stateSync.get(1);
|
|
9644
|
-
if (stateSyncRow == undefined) {
|
|
9645
|
-
return { blockNum: 0, peaks: undefined };
|
|
9646
|
-
}
|
|
9647
|
-
const header = await db.blockHeaders.get(stateSyncRow.blockNum);
|
|
9648
|
-
if (header == undefined || header.partialBlockchainPeaks == undefined) {
|
|
9649
|
-
return { blockNum: stateSyncRow.blockNum, peaks: undefined };
|
|
9650
|
-
}
|
|
9651
|
-
return {
|
|
9652
|
-
blockNum: stateSyncRow.blockNum,
|
|
9653
|
-
peaks: uint8ArrayToBase64(header.partialBlockchainPeaks),
|
|
9654
|
-
};
|
|
9655
|
-
}
|
|
9656
|
-
catch (err) {
|
|
9657
|
-
logWebStoreError(err, "Failed to get current blockchain peaks");
|
|
9658
|
-
}
|
|
9659
|
-
}
|
|
9660
9671
|
async function getPartialBlockchainNodesAll(dbId) {
|
|
9661
9672
|
try {
|
|
9662
9673
|
const db = getDatabase(dbId);
|
|
@@ -9698,9 +9709,9 @@ async function pruneIrrelevantBlocks(dbId, blocksToUntrack, nodeIdsToRemove) {
|
|
|
9698
9709
|
try {
|
|
9699
9710
|
const db = getDatabase(dbId);
|
|
9700
9711
|
const numericNodeIds = nodeIdsToRemove.map(Number);
|
|
9701
|
-
const syncHeight = await db.
|
|
9712
|
+
const syncHeight = await db.blockchainCheckpoint.get(1);
|
|
9702
9713
|
if (syncHeight == undefined) {
|
|
9703
|
-
throw Error("SyncHeight is undefined -- is the
|
|
9714
|
+
throw Error("SyncHeight is undefined -- is the blockchain_checkpoint table empty?");
|
|
9704
9715
|
}
|
|
9705
9716
|
await db.dexie.transaction("rw", db.blockHeaders, db.partialBlockchainNodes, async () => {
|
|
9706
9717
|
// 1. Delete stale MMR authentication nodes.
|
|
@@ -10033,7 +10044,6 @@ async function upsertInputNote(dbId, detailsCommitment, noteId, assets, attachme
|
|
|
10033
10044
|
}
|
|
10034
10045
|
catch (error) {
|
|
10035
10046
|
logWebStoreError(error, `Error inserting note: ${detailsCommitment}`);
|
|
10036
|
-
throw error;
|
|
10037
10047
|
}
|
|
10038
10048
|
};
|
|
10039
10049
|
return db.dexie.transaction("rw", db.inputNotes, db.notesScripts, doWork);
|
|
@@ -10117,7 +10127,6 @@ async function upsertOutputNote(dbId, detailsCommitment, noteId, assets, attachm
|
|
|
10117
10127
|
}
|
|
10118
10128
|
catch (error) {
|
|
10119
10129
|
logWebStoreError(error, `Error inserting note: ${detailsCommitment}`);
|
|
10120
|
-
throw error;
|
|
10121
10130
|
}
|
|
10122
10131
|
};
|
|
10123
10132
|
return db.dexie.transaction("rw", db.outputNotes, db.notesScripts, doWork);
|
|
@@ -10360,7 +10369,6 @@ async function insertTransactionScript(dbId, scriptRoot, txScript, tx) {
|
|
|
10360
10369
|
}
|
|
10361
10370
|
catch (error) {
|
|
10362
10371
|
logWebStoreError(error, "Failed to insert transaction script");
|
|
10363
|
-
throw error;
|
|
10364
10372
|
}
|
|
10365
10373
|
}
|
|
10366
10374
|
async function upsertTransactionRecord(dbId, transactionId, details, blockNum, statusVariant, status, scriptRoot, tx) {
|
|
@@ -10378,82 +10386,8 @@ async function upsertTransactionRecord(dbId, transactionId, details, blockNum, s
|
|
|
10378
10386
|
}
|
|
10379
10387
|
catch (err) {
|
|
10380
10388
|
logWebStoreError(err, "Failed to insert proven transaction data");
|
|
10381
|
-
throw err;
|
|
10382
10389
|
}
|
|
10383
10390
|
}
|
|
10384
|
-
/**
|
|
10385
|
-
* Applies a batch of transaction updates atomically inside a single Dexie transaction.
|
|
10386
|
-
*
|
|
10387
|
-
* All sub-operations that internally call `db.dexie.transaction()` are auto-joined by Dexie
|
|
10388
|
-
* as nested sub-transactions when run inside this parent transaction, provided the parent
|
|
10389
|
-
* scope is a superset of every sub-transaction scope.
|
|
10390
|
-
*/
|
|
10391
|
-
async function applyTransactionBatch(dbId, payloads) {
|
|
10392
|
-
const db = getDatabase(dbId);
|
|
10393
|
-
await db.dexie.transaction("rw", [
|
|
10394
|
-
db.transactions,
|
|
10395
|
-
db.transactionScripts,
|
|
10396
|
-
db.latestAccountStorages,
|
|
10397
|
-
db.historicalAccountStorages,
|
|
10398
|
-
db.latestStorageMapEntries,
|
|
10399
|
-
db.historicalStorageMapEntries,
|
|
10400
|
-
db.latestAccountAssets,
|
|
10401
|
-
db.historicalAccountAssets,
|
|
10402
|
-
db.latestAccountHeaders,
|
|
10403
|
-
db.historicalAccountHeaders,
|
|
10404
|
-
db.inputNotes,
|
|
10405
|
-
db.outputNotes,
|
|
10406
|
-
db.notesScripts,
|
|
10407
|
-
db.tags,
|
|
10408
|
-
], async () => {
|
|
10409
|
-
for (const payload of payloads) {
|
|
10410
|
-
// 1. Insert the transaction record (script first, then record)
|
|
10411
|
-
const rec = payload.transactionRecord;
|
|
10412
|
-
if (rec.scriptRoot && rec.txScript) {
|
|
10413
|
-
await insertTransactionScript(dbId, rec.scriptRoot, rec.txScript);
|
|
10414
|
-
}
|
|
10415
|
-
await upsertTransactionRecord(dbId, rec.id, rec.details, rec.blockNum, rec.statusVariant, rec.status, rec.scriptRoot);
|
|
10416
|
-
// 2. Apply account state (full or delta)
|
|
10417
|
-
const acct = payload.accountState;
|
|
10418
|
-
if (acct.kind === "full") {
|
|
10419
|
-
await applyFullAccountState(dbId, acct.account);
|
|
10420
|
-
}
|
|
10421
|
-
else {
|
|
10422
|
-
await applyTransactionDelta(dbId, acct.accountId, acct.nonce, acct.updatedSlots, acct.changedMapEntries, acct.changedAssets, acct.codeRoot, acct.storageRoot, acct.vaultRoot, acct.committed, acct.commitment);
|
|
10423
|
-
}
|
|
10424
|
-
// 3. Upsert input and output notes
|
|
10425
|
-
for (const note of payload.inputNotes) {
|
|
10426
|
-
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);
|
|
10427
|
-
}
|
|
10428
|
-
for (const note of payload.outputNotes) {
|
|
10429
|
-
await upsertOutputNote(dbId, note.detailsCommitment, note.noteId, note.noteAssets, note.attachments, note.recipientDigest, note.metadata, note.nullifier, note.expectedHeight, note.stateDiscriminant, note.state);
|
|
10430
|
-
}
|
|
10431
|
-
// 4. Add note tags (deduplicated within the transaction)
|
|
10432
|
-
for (const tagEntry of payload.tags) {
|
|
10433
|
-
const tagArray = new Uint8Array(tagEntry.tag);
|
|
10434
|
-
const tagBase64 = uint8ArrayToBase64(tagArray);
|
|
10435
|
-
const sourceNoteId = tagEntry.sourceNoteId ?? "";
|
|
10436
|
-
const sourceAccountId = tagEntry.sourceAccountId ?? "";
|
|
10437
|
-
const sourceSubscriptionKey = tagEntry.sourceSubscriptionKey ?? "";
|
|
10438
|
-
// Check for existing tag to avoid duplicates (mirrors the Rust add_note_tag logic).
|
|
10439
|
-
// sourceSubscriptionKey is unindexed, so filter on it in memory — distinct
|
|
10440
|
-
// subscriptions may share a tag and must remain separate rows.
|
|
10441
|
-
const existing = await db.tags
|
|
10442
|
-
.where({ tag: tagBase64, sourceNoteId, sourceAccountId })
|
|
10443
|
-
.filter((t) => (t.sourceSubscriptionKey ?? "") === sourceSubscriptionKey)
|
|
10444
|
-
.first();
|
|
10445
|
-
if (!existing) {
|
|
10446
|
-
await db.tags.add({
|
|
10447
|
-
tag: tagBase64,
|
|
10448
|
-
sourceNoteId,
|
|
10449
|
-
sourceAccountId,
|
|
10450
|
-
sourceSubscriptionKey,
|
|
10451
|
-
});
|
|
10452
|
-
}
|
|
10453
|
-
}
|
|
10454
|
-
}
|
|
10455
|
-
});
|
|
10456
|
-
}
|
|
10457
10391
|
|
|
10458
10392
|
async function getNoteTags(dbId) {
|
|
10459
10393
|
try {
|
|
@@ -10479,7 +10413,7 @@ async function getNoteTags(dbId) {
|
|
|
10479
10413
|
async function getSyncHeight(dbId) {
|
|
10480
10414
|
try {
|
|
10481
10415
|
const db = getDatabase(dbId);
|
|
10482
|
-
const record = await db.
|
|
10416
|
+
const record = await db.blockchainCheckpoint.get(1);
|
|
10483
10417
|
if (record) {
|
|
10484
10418
|
let data = {
|
|
10485
10419
|
blockNum: record.blockNum,
|
|
@@ -10494,6 +10428,25 @@ async function getSyncHeight(dbId) {
|
|
|
10494
10428
|
logWebStoreError(error, "Error fetching sync height");
|
|
10495
10429
|
}
|
|
10496
10430
|
}
|
|
10431
|
+
async function getCurrentBlockchainPeaks(dbId) {
|
|
10432
|
+
try {
|
|
10433
|
+
const db = getDatabase(dbId);
|
|
10434
|
+
const record = await db.blockchainCheckpoint.get(1);
|
|
10435
|
+
if (!record || record.partialBlockchainPeaks.length === 0) {
|
|
10436
|
+
return {
|
|
10437
|
+
blockNum: record?.blockNum ?? 0,
|
|
10438
|
+
peaks: uint8ArrayToBase64(new Uint8Array()),
|
|
10439
|
+
};
|
|
10440
|
+
}
|
|
10441
|
+
return {
|
|
10442
|
+
blockNum: record.blockNum,
|
|
10443
|
+
peaks: uint8ArrayToBase64(record.partialBlockchainPeaks),
|
|
10444
|
+
};
|
|
10445
|
+
}
|
|
10446
|
+
catch (error) {
|
|
10447
|
+
logWebStoreError(error, "Error fetching current blockchain peaks");
|
|
10448
|
+
}
|
|
10449
|
+
}
|
|
10497
10450
|
async function addNoteTag(dbId, tag, sourceNoteId, sourceAccountId, sourceSubscriptionKey) {
|
|
10498
10451
|
try {
|
|
10499
10452
|
const db = getDatabase(dbId);
|
|
@@ -10534,10 +10487,10 @@ async function removeNoteTag(dbId, tag, sourceNoteId, sourceAccountId, sourceSub
|
|
|
10534
10487
|
}
|
|
10535
10488
|
async function applyStateSync(dbId, stateUpdate) {
|
|
10536
10489
|
const db = getDatabase(dbId);
|
|
10537
|
-
const { blockNum, flattenedNewBlockHeaders,
|
|
10490
|
+
const { blockNum, flattenedNewBlockHeaders, newPeaks, newBlockNums, blockHasRelevantNotes, serializedNodeIds, serializedNodes, committedNoteTagSources, serializedInputNotes, serializedOutputNotes, accountUpdates, transactionUpdates, } = stateUpdate;
|
|
10538
10491
|
const newBlockHeaders = reconstructFlattenedVec(flattenedNewBlockHeaders);
|
|
10539
10492
|
const tablesToAccess = [
|
|
10540
|
-
db.
|
|
10493
|
+
db.blockchainCheckpoint,
|
|
10541
10494
|
db.inputNotes,
|
|
10542
10495
|
db.outputNotes,
|
|
10543
10496
|
db.notesScripts,
|
|
@@ -10585,46 +10538,41 @@ async function applyStateSync(dbId, stateUpdate) {
|
|
|
10585
10538
|
accountCommitment: accountUpdate.accountCommitment,
|
|
10586
10539
|
accountSeed: accountUpdate.accountSeed,
|
|
10587
10540
|
}))),
|
|
10588
|
-
updateSyncHeight(tx, blockNum),
|
|
10541
|
+
updateSyncHeight(tx, blockNum, newPeaks),
|
|
10589
10542
|
updatePartialBlockchainNodes(tx, serializedNodeIds, serializedNodes),
|
|
10590
10543
|
updateCommittedNoteTags(tx, committedNoteTagSources),
|
|
10591
10544
|
Promise.all(newBlockHeaders.map((newBlockHeader, i) => {
|
|
10592
|
-
|
|
10593
|
-
// blockNum matches the new sync height). That row is always
|
|
10594
|
-
// present in this iteration because `partial_blockchain_updates`
|
|
10595
|
-
// includes the chain tip header by construction.
|
|
10596
|
-
// TODO: potentially move this to be under the sync state info table
|
|
10597
|
-
// as currently done in SQLite
|
|
10598
|
-
const peaks = newBlockNums[i] === blockNum ? partialBlockchainPeaks : undefined;
|
|
10599
|
-
return updateBlockHeader(tx, newBlockNums[i], newBlockHeader, blockHasRelevantNotes[i] == 1, peaks);
|
|
10545
|
+
return updateBlockHeader(tx, newBlockNums[i], newBlockHeader, blockHasRelevantNotes[i] == 1);
|
|
10600
10546
|
})),
|
|
10601
10547
|
]);
|
|
10602
10548
|
});
|
|
10603
10549
|
}
|
|
10604
|
-
|
|
10605
|
-
* Advances `stateSync.blockNum` only when moving forward. Mirrors SQLite's
|
|
10606
|
-
* `UPDATE blockchain_checkpoint ... WHERE block_num < ?`.
|
|
10607
|
-
*/
|
|
10608
|
-
async function updateSyncHeight(tx, blockNum) {
|
|
10550
|
+
async function updateSyncHeight(tx, blockNum, newPeaks) {
|
|
10609
10551
|
try {
|
|
10610
|
-
|
|
10552
|
+
// Only update if moving forward to prevent race conditions.
|
|
10553
|
+
// Peaks travel with blockNum: skipping the height update also skips the
|
|
10554
|
+
// peaks update, by design — a backward-going sync must not overwrite the
|
|
10555
|
+
// newer peaks with older ones.
|
|
10556
|
+
const current = await tx.blockchainCheckpoint.get(1);
|
|
10611
10557
|
if (!current || current.blockNum < blockNum) {
|
|
10612
|
-
await tx.
|
|
10558
|
+
await tx.blockchainCheckpoint.update(1, {
|
|
10613
10559
|
blockNum: blockNum,
|
|
10560
|
+
partialBlockchainPeaks: newPeaks,
|
|
10614
10561
|
});
|
|
10615
10562
|
}
|
|
10616
10563
|
}
|
|
10617
10564
|
catch (error) {
|
|
10565
|
+
// logWebStoreError always re-throws, so a failure here aborts the whole
|
|
10566
|
+
// Dexie rw transaction rather than silently committing a partial update.
|
|
10618
10567
|
logWebStoreError(error, "Failed to update sync height");
|
|
10619
10568
|
}
|
|
10620
10569
|
}
|
|
10621
|
-
async function updateBlockHeader(tx, blockNum, blockHeader, hasClientNotes
|
|
10570
|
+
async function updateBlockHeader(tx, blockNum, blockHeader, hasClientNotes) {
|
|
10622
10571
|
try {
|
|
10623
10572
|
const data = {
|
|
10624
10573
|
blockNum: blockNum,
|
|
10625
10574
|
header: blockHeader,
|
|
10626
10575
|
hasClientNotes: hasClientNotes.toString(),
|
|
10627
|
-
...(partialBlockchainPeaks !== undefined && { partialBlockchainPeaks }),
|
|
10628
10576
|
};
|
|
10629
10577
|
const existingBlockHeader = await tx.blockHeaders.get(blockNum);
|
|
10630
10578
|
if (!existingBlockHeader) {
|
|
@@ -10648,8 +10596,9 @@ async function updatePartialBlockchainNodes(tx, nodeIndexes, nodes) {
|
|
|
10648
10596
|
id: Number(nodeIndexes[index]),
|
|
10649
10597
|
node: node,
|
|
10650
10598
|
}));
|
|
10651
|
-
//
|
|
10652
|
-
await tx
|
|
10599
|
+
// Insert missing nodes and reject conflicting writes
|
|
10600
|
+
await putPartialBlockchainNodesNoOverwrite(tx
|
|
10601
|
+
.partialBlockchainNodes, data);
|
|
10653
10602
|
}
|
|
10654
10603
|
catch (err) {
|
|
10655
10604
|
logWebStoreError(err, "Failed to update partial blockchain nodes");
|
|
@@ -10774,17 +10723,6 @@ class Account {
|
|
|
10774
10723
|
const ret = wasm.account_isFaucet(this.__wbg_ptr);
|
|
10775
10724
|
return ret !== 0;
|
|
10776
10725
|
}
|
|
10777
|
-
/**
|
|
10778
|
-
* Returns true if this is a network account.
|
|
10779
|
-
*
|
|
10780
|
-
* A network account is a public account whose storage
|
|
10781
|
-
* carries the standardized network-account note-script allowlist slot.
|
|
10782
|
-
* @returns {boolean}
|
|
10783
|
-
*/
|
|
10784
|
-
isNetworkAccount() {
|
|
10785
|
-
const ret = wasm.account_isNetworkAccount(this.__wbg_ptr);
|
|
10786
|
-
return ret !== 0;
|
|
10787
|
-
}
|
|
10788
10726
|
/**
|
|
10789
10727
|
* Returns true if the account has not yet been committed to the chain.
|
|
10790
10728
|
* @returns {boolean}
|
|
@@ -10817,20 +10755,6 @@ class Account {
|
|
|
10817
10755
|
const ret = wasm.account_isRegularAccount(this.__wbg_ptr);
|
|
10818
10756
|
return ret !== 0;
|
|
10819
10757
|
}
|
|
10820
|
-
/**
|
|
10821
|
-
* Returns the note-script roots this network account is allowed to
|
|
10822
|
-
* consume, or `undefined` if this is not a network account.
|
|
10823
|
-
* @returns {Word[] | undefined}
|
|
10824
|
-
*/
|
|
10825
|
-
networkNoteAllowlist() {
|
|
10826
|
-
const ret = wasm.account_networkNoteAllowlist(this.__wbg_ptr);
|
|
10827
|
-
let v1;
|
|
10828
|
-
if (ret[0] !== 0) {
|
|
10829
|
-
v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
10830
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
10831
|
-
}
|
|
10832
|
-
return v1;
|
|
10833
|
-
}
|
|
10834
10758
|
/**
|
|
10835
10759
|
* Returns the account nonce, which is incremented on every state update.
|
|
10836
10760
|
* @returns {Felt}
|
|
@@ -11184,6 +11108,18 @@ class AccountComponent {
|
|
|
11184
11108
|
}
|
|
11185
11109
|
return AccountComponent.__wrap(ret[0]);
|
|
11186
11110
|
}
|
|
11111
|
+
/**
|
|
11112
|
+
* Returns the exact compiled code used by this component.
|
|
11113
|
+
*
|
|
11114
|
+
* Link this code when compiling scripts that invoke the component. Rebuilding a library from
|
|
11115
|
+
* the original source can produce different procedure identities than the code installed on
|
|
11116
|
+
* the account.
|
|
11117
|
+
* @returns {AccountComponentCode}
|
|
11118
|
+
*/
|
|
11119
|
+
componentCode() {
|
|
11120
|
+
const ret = wasm.accountcomponent_componentCode(this.__wbg_ptr);
|
|
11121
|
+
return AccountComponentCode.__wrap(ret);
|
|
11122
|
+
}
|
|
11187
11123
|
/**
|
|
11188
11124
|
* @param {Word} commitment
|
|
11189
11125
|
* @param {AuthScheme} auth_scheme
|
|
@@ -11210,42 +11146,6 @@ class AccountComponent {
|
|
|
11210
11146
|
}
|
|
11211
11147
|
return AccountComponent.__wrap(ret[0]);
|
|
11212
11148
|
}
|
|
11213
|
-
/**
|
|
11214
|
-
* Builds the auth component for a network account.
|
|
11215
|
-
*
|
|
11216
|
-
* A network account is a public account carrying this component: its
|
|
11217
|
-
* note-script allowlist is the standardized storage slot the node's
|
|
11218
|
-
* network-transaction builder inspects to identify the account as a network
|
|
11219
|
-
* account and route matching notes to it for auto-consumption. The account
|
|
11220
|
-
* may only consume notes whose script root is in `allowedNoteScriptRoots`
|
|
11221
|
-
* (obtain a root via `NoteScript.root()`).
|
|
11222
|
-
*
|
|
11223
|
-
* `allowedTxScriptRoots` optionally allowlists transaction script roots
|
|
11224
|
-
* (from `TransactionScript.root()`) the account will execute. When omitted
|
|
11225
|
-
* or empty, the account permits no transaction scripts and deploys and
|
|
11226
|
-
* advances via scriptless transactions only. Allowlist a script root only
|
|
11227
|
-
* if the script's effect is safe for *every* possible input: a root pins
|
|
11228
|
-
* the script's code but not its arguments or advice inputs, which the
|
|
11229
|
-
* (arbitrary) transaction submitter controls.
|
|
11230
|
-
*
|
|
11231
|
-
* # Errors
|
|
11232
|
-
* Errors if `allowedNoteScriptRoots` is empty: a network account with no
|
|
11233
|
-
* allowlisted note scripts could never consume a note.
|
|
11234
|
-
* @param {Word[]} allowed_note_script_roots
|
|
11235
|
-
* @param {Word[] | null} [allowed_tx_script_roots]
|
|
11236
|
-
* @returns {AccountComponent}
|
|
11237
|
-
*/
|
|
11238
|
-
static createNetworkAuth(allowed_note_script_roots, allowed_tx_script_roots) {
|
|
11239
|
-
const ptr0 = passArrayJsValueToWasm0(allowed_note_script_roots, wasm.__wbindgen_malloc);
|
|
11240
|
-
const len0 = WASM_VECTOR_LEN;
|
|
11241
|
-
var ptr1 = isLikeNone(allowed_tx_script_roots) ? 0 : passArrayJsValueToWasm0(allowed_tx_script_roots, wasm.__wbindgen_malloc);
|
|
11242
|
-
var len1 = WASM_VECTOR_LEN;
|
|
11243
|
-
const ret = wasm.accountcomponent_createNetworkAuth(ptr0, len0, ptr1, len1);
|
|
11244
|
-
if (ret[2]) {
|
|
11245
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
11246
|
-
}
|
|
11247
|
-
return AccountComponent.__wrap(ret[0]);
|
|
11248
|
-
}
|
|
11249
11149
|
/**
|
|
11250
11150
|
* Creates an account component from a compiled library and storage slots.
|
|
11251
11151
|
* @param {Library} library
|
|
@@ -11372,8 +11272,10 @@ if (Symbol.dispose) AccountComponentCode.prototype[Symbol.dispose] = AccountComp
|
|
|
11372
11272
|
* `AccountDelta` stores the differences between two account states.
|
|
11373
11273
|
*
|
|
11374
11274
|
* The differences are represented as follows:
|
|
11375
|
-
* - `storage`: an `
|
|
11376
|
-
*
|
|
11275
|
+
* - `storage`: an `AccountStoragePatch` with the absolute final values of changed storage slots
|
|
11276
|
+
* (storage changes have identical semantics in the delta and patch models).
|
|
11277
|
+
* - `vault`: an `AccountVaultDelta` object that contains the relative changes to the account
|
|
11278
|
+
* vault.
|
|
11377
11279
|
* - `nonce`: if the nonce of the account has changed, the new nonce is stored here.
|
|
11378
11280
|
*/
|
|
11379
11281
|
class AccountDelta {
|
|
@@ -11439,12 +11341,12 @@ class AccountDelta {
|
|
|
11439
11341
|
return ret;
|
|
11440
11342
|
}
|
|
11441
11343
|
/**
|
|
11442
|
-
* Returns the storage
|
|
11443
|
-
* @returns {
|
|
11344
|
+
* Returns the storage patch (storage changes are absolute in both models).
|
|
11345
|
+
* @returns {AccountStoragePatch}
|
|
11444
11346
|
*/
|
|
11445
11347
|
storage() {
|
|
11446
11348
|
const ret = wasm.accountdelta_storage(this.__wbg_ptr);
|
|
11447
|
-
return
|
|
11349
|
+
return AccountStoragePatch.__wrap(ret);
|
|
11448
11350
|
}
|
|
11449
11351
|
/**
|
|
11450
11352
|
* Returns the vault delta.
|
|
@@ -11839,6 +11741,90 @@ const AccountInterface = Object.freeze({
|
|
|
11839
11741
|
BasicWallet: 0, "0": "BasicWallet",
|
|
11840
11742
|
});
|
|
11841
11743
|
|
|
11744
|
+
/**
|
|
11745
|
+
* Describes the new absolute account state produced by a transaction.
|
|
11746
|
+
*/
|
|
11747
|
+
class AccountPatch {
|
|
11748
|
+
static __wrap(ptr) {
|
|
11749
|
+
ptr = ptr >>> 0;
|
|
11750
|
+
const obj = Object.create(AccountPatch.prototype);
|
|
11751
|
+
obj.__wbg_ptr = ptr;
|
|
11752
|
+
AccountPatchFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
11753
|
+
return obj;
|
|
11754
|
+
}
|
|
11755
|
+
__destroy_into_raw() {
|
|
11756
|
+
const ptr = this.__wbg_ptr;
|
|
11757
|
+
this.__wbg_ptr = 0;
|
|
11758
|
+
AccountPatchFinalization.unregister(this);
|
|
11759
|
+
return ptr;
|
|
11760
|
+
}
|
|
11761
|
+
free() {
|
|
11762
|
+
const ptr = this.__destroy_into_raw();
|
|
11763
|
+
wasm.__wbg_accountpatch_free(ptr, 0);
|
|
11764
|
+
}
|
|
11765
|
+
/**
|
|
11766
|
+
* Deserializes an account patch from bytes.
|
|
11767
|
+
* @param {Uint8Array} bytes
|
|
11768
|
+
* @returns {AccountPatch}
|
|
11769
|
+
*/
|
|
11770
|
+
static deserialize(bytes) {
|
|
11771
|
+
const ret = wasm.accountpatch_deserialize(bytes);
|
|
11772
|
+
if (ret[2]) {
|
|
11773
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
11774
|
+
}
|
|
11775
|
+
return AccountPatch.__wrap(ret[0]);
|
|
11776
|
+
}
|
|
11777
|
+
/**
|
|
11778
|
+
* Returns the final nonce, or `None` if it was unchanged.
|
|
11779
|
+
* @returns {Felt | undefined}
|
|
11780
|
+
*/
|
|
11781
|
+
finalNonce() {
|
|
11782
|
+
const ret = wasm.accountpatch_finalNonce(this.__wbg_ptr);
|
|
11783
|
+
return ret === 0 ? undefined : Felt.__wrap(ret);
|
|
11784
|
+
}
|
|
11785
|
+
/**
|
|
11786
|
+
* Returns the affected account ID.
|
|
11787
|
+
* @returns {AccountId}
|
|
11788
|
+
*/
|
|
11789
|
+
id() {
|
|
11790
|
+
const ret = wasm.accountpatch_id(this.__wbg_ptr);
|
|
11791
|
+
return AccountId.__wrap(ret);
|
|
11792
|
+
}
|
|
11793
|
+
/**
|
|
11794
|
+
* Returns true if this patch contains no state changes.
|
|
11795
|
+
* @returns {boolean}
|
|
11796
|
+
*/
|
|
11797
|
+
isEmpty() {
|
|
11798
|
+
const ret = wasm.accountpatch_isEmpty(this.__wbg_ptr);
|
|
11799
|
+
return ret !== 0;
|
|
11800
|
+
}
|
|
11801
|
+
/**
|
|
11802
|
+
* Serializes the account patch into bytes.
|
|
11803
|
+
* @returns {Uint8Array}
|
|
11804
|
+
*/
|
|
11805
|
+
serialize() {
|
|
11806
|
+
const ret = wasm.accountpatch_serialize(this.__wbg_ptr);
|
|
11807
|
+
return ret;
|
|
11808
|
+
}
|
|
11809
|
+
/**
|
|
11810
|
+
* Returns the account storage patch.
|
|
11811
|
+
* @returns {AccountStoragePatch}
|
|
11812
|
+
*/
|
|
11813
|
+
storage() {
|
|
11814
|
+
const ret = wasm.accountpatch_storage(this.__wbg_ptr);
|
|
11815
|
+
return AccountStoragePatch.__wrap(ret);
|
|
11816
|
+
}
|
|
11817
|
+
/**
|
|
11818
|
+
* Returns the account vault patch.
|
|
11819
|
+
* @returns {AccountVaultPatch}
|
|
11820
|
+
*/
|
|
11821
|
+
vault() {
|
|
11822
|
+
const ret = wasm.accountpatch_vault(this.__wbg_ptr);
|
|
11823
|
+
return AccountVaultPatch.__wrap(ret);
|
|
11824
|
+
}
|
|
11825
|
+
}
|
|
11826
|
+
if (Symbol.dispose) AccountPatch.prototype[Symbol.dispose] = AccountPatch.prototype.free;
|
|
11827
|
+
|
|
11842
11828
|
/**
|
|
11843
11829
|
* Proof of existence of an account's state at a specific block number, as returned by the node.
|
|
11844
11830
|
*
|
|
@@ -12312,74 +12298,6 @@ class AccountStorage {
|
|
|
12312
12298
|
}
|
|
12313
12299
|
if (Symbol.dispose) AccountStorage.prototype[Symbol.dispose] = AccountStorage.prototype.free;
|
|
12314
12300
|
|
|
12315
|
-
/**
|
|
12316
|
-
* `AccountStorageDelta` stores the differences between two states of account storage.
|
|
12317
|
-
*
|
|
12318
|
-
* The delta consists of two maps:
|
|
12319
|
-
* - A map containing the updates to value storage slots. The keys in this map are indexes of the
|
|
12320
|
-
* updated storage slots and the values are the new values for these slots.
|
|
12321
|
-
* - A map containing updates to storage maps. The keys in this map are indexes of the updated
|
|
12322
|
-
* storage slots and the values are corresponding storage map delta objects.
|
|
12323
|
-
*/
|
|
12324
|
-
class AccountStorageDelta {
|
|
12325
|
-
static __wrap(ptr) {
|
|
12326
|
-
ptr = ptr >>> 0;
|
|
12327
|
-
const obj = Object.create(AccountStorageDelta.prototype);
|
|
12328
|
-
obj.__wbg_ptr = ptr;
|
|
12329
|
-
AccountStorageDeltaFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
12330
|
-
return obj;
|
|
12331
|
-
}
|
|
12332
|
-
__destroy_into_raw() {
|
|
12333
|
-
const ptr = this.__wbg_ptr;
|
|
12334
|
-
this.__wbg_ptr = 0;
|
|
12335
|
-
AccountStorageDeltaFinalization.unregister(this);
|
|
12336
|
-
return ptr;
|
|
12337
|
-
}
|
|
12338
|
-
free() {
|
|
12339
|
-
const ptr = this.__destroy_into_raw();
|
|
12340
|
-
wasm.__wbg_accountstoragedelta_free(ptr, 0);
|
|
12341
|
-
}
|
|
12342
|
-
/**
|
|
12343
|
-
* Deserializes a storage delta from bytes.
|
|
12344
|
-
* @param {Uint8Array} bytes
|
|
12345
|
-
* @returns {AccountStorageDelta}
|
|
12346
|
-
*/
|
|
12347
|
-
static deserialize(bytes) {
|
|
12348
|
-
const ret = wasm.accountstoragedelta_deserialize(bytes);
|
|
12349
|
-
if (ret[2]) {
|
|
12350
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
12351
|
-
}
|
|
12352
|
-
return AccountStorageDelta.__wrap(ret[0]);
|
|
12353
|
-
}
|
|
12354
|
-
/**
|
|
12355
|
-
* Returns true if no storage slots are changed.
|
|
12356
|
-
* @returns {boolean}
|
|
12357
|
-
*/
|
|
12358
|
-
isEmpty() {
|
|
12359
|
-
const ret = wasm.accountstoragedelta_isEmpty(this.__wbg_ptr);
|
|
12360
|
-
return ret !== 0;
|
|
12361
|
-
}
|
|
12362
|
-
/**
|
|
12363
|
-
* Serializes the storage delta into bytes.
|
|
12364
|
-
* @returns {Uint8Array}
|
|
12365
|
-
*/
|
|
12366
|
-
serialize() {
|
|
12367
|
-
const ret = wasm.accountstoragedelta_serialize(this.__wbg_ptr);
|
|
12368
|
-
return ret;
|
|
12369
|
-
}
|
|
12370
|
-
/**
|
|
12371
|
-
* Returns the new values for modified storage slots.
|
|
12372
|
-
* @returns {Word[]}
|
|
12373
|
-
*/
|
|
12374
|
-
values() {
|
|
12375
|
-
const ret = wasm.accountstoragedelta_values(this.__wbg_ptr);
|
|
12376
|
-
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
12377
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
12378
|
-
return v1;
|
|
12379
|
-
}
|
|
12380
|
-
}
|
|
12381
|
-
if (Symbol.dispose) AccountStorageDelta.prototype[Symbol.dispose] = AccountStorageDelta.prototype.free;
|
|
12382
|
-
|
|
12383
12301
|
/**
|
|
12384
12302
|
* Storage visibility mode for an account.
|
|
12385
12303
|
*
|
|
@@ -12462,8 +12380,70 @@ class AccountStorageMode {
|
|
|
12462
12380
|
}
|
|
12463
12381
|
if (Symbol.dispose) AccountStorageMode.prototype[Symbol.dispose] = AccountStorageMode.prototype.free;
|
|
12464
12382
|
|
|
12465
|
-
|
|
12466
|
-
|
|
12383
|
+
/**
|
|
12384
|
+
* Absolute updates to named account storage slots.
|
|
12385
|
+
*/
|
|
12386
|
+
class AccountStoragePatch {
|
|
12387
|
+
static __wrap(ptr) {
|
|
12388
|
+
ptr = ptr >>> 0;
|
|
12389
|
+
const obj = Object.create(AccountStoragePatch.prototype);
|
|
12390
|
+
obj.__wbg_ptr = ptr;
|
|
12391
|
+
AccountStoragePatchFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
12392
|
+
return obj;
|
|
12393
|
+
}
|
|
12394
|
+
__destroy_into_raw() {
|
|
12395
|
+
const ptr = this.__wbg_ptr;
|
|
12396
|
+
this.__wbg_ptr = 0;
|
|
12397
|
+
AccountStoragePatchFinalization.unregister(this);
|
|
12398
|
+
return ptr;
|
|
12399
|
+
}
|
|
12400
|
+
free() {
|
|
12401
|
+
const ptr = this.__destroy_into_raw();
|
|
12402
|
+
wasm.__wbg_accountstoragepatch_free(ptr, 0);
|
|
12403
|
+
}
|
|
12404
|
+
/**
|
|
12405
|
+
* Deserializes a storage patch from bytes.
|
|
12406
|
+
* @param {Uint8Array} bytes
|
|
12407
|
+
* @returns {AccountStoragePatch}
|
|
12408
|
+
*/
|
|
12409
|
+
static deserialize(bytes) {
|
|
12410
|
+
const ret = wasm.accountstoragepatch_deserialize(bytes);
|
|
12411
|
+
if (ret[2]) {
|
|
12412
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
12413
|
+
}
|
|
12414
|
+
return AccountStoragePatch.__wrap(ret[0]);
|
|
12415
|
+
}
|
|
12416
|
+
/**
|
|
12417
|
+
* Returns true if no storage slots are changed.
|
|
12418
|
+
* @returns {boolean}
|
|
12419
|
+
*/
|
|
12420
|
+
isEmpty() {
|
|
12421
|
+
const ret = wasm.accountstoragepatch_isEmpty(this.__wbg_ptr);
|
|
12422
|
+
return ret !== 0;
|
|
12423
|
+
}
|
|
12424
|
+
/**
|
|
12425
|
+
* Serializes the storage patch into bytes.
|
|
12426
|
+
* @returns {Uint8Array}
|
|
12427
|
+
*/
|
|
12428
|
+
serialize() {
|
|
12429
|
+
const ret = wasm.accountstoragepatch_serialize(this.__wbg_ptr);
|
|
12430
|
+
return ret;
|
|
12431
|
+
}
|
|
12432
|
+
/**
|
|
12433
|
+
* Returns the final values for created or updated value slots.
|
|
12434
|
+
* @returns {Word[]}
|
|
12435
|
+
*/
|
|
12436
|
+
values() {
|
|
12437
|
+
const ret = wasm.accountstoragepatch_values(this.__wbg_ptr);
|
|
12438
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
12439
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
12440
|
+
return v1;
|
|
12441
|
+
}
|
|
12442
|
+
}
|
|
12443
|
+
if (Symbol.dispose) AccountStoragePatch.prototype[Symbol.dispose] = AccountStoragePatch.prototype.free;
|
|
12444
|
+
|
|
12445
|
+
class AccountStorageRequirements {
|
|
12446
|
+
static __wrap(ptr) {
|
|
12467
12447
|
ptr = ptr >>> 0;
|
|
12468
12448
|
const obj = Object.create(AccountStorageRequirements.prototype);
|
|
12469
12449
|
obj.__wbg_ptr = ptr;
|
|
@@ -12605,6 +12585,86 @@ class AccountVaultDelta {
|
|
|
12605
12585
|
}
|
|
12606
12586
|
if (Symbol.dispose) AccountVaultDelta.prototype[Symbol.dispose] = AccountVaultDelta.prototype.free;
|
|
12607
12587
|
|
|
12588
|
+
/**
|
|
12589
|
+
* Absolute updates to account vault entries.
|
|
12590
|
+
*/
|
|
12591
|
+
class AccountVaultPatch {
|
|
12592
|
+
static __wrap(ptr) {
|
|
12593
|
+
ptr = ptr >>> 0;
|
|
12594
|
+
const obj = Object.create(AccountVaultPatch.prototype);
|
|
12595
|
+
obj.__wbg_ptr = ptr;
|
|
12596
|
+
AccountVaultPatchFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
12597
|
+
return obj;
|
|
12598
|
+
}
|
|
12599
|
+
__destroy_into_raw() {
|
|
12600
|
+
const ptr = this.__wbg_ptr;
|
|
12601
|
+
this.__wbg_ptr = 0;
|
|
12602
|
+
AccountVaultPatchFinalization.unregister(this);
|
|
12603
|
+
return ptr;
|
|
12604
|
+
}
|
|
12605
|
+
free() {
|
|
12606
|
+
const ptr = this.__destroy_into_raw();
|
|
12607
|
+
wasm.__wbg_accountvaultpatch_free(ptr, 0);
|
|
12608
|
+
}
|
|
12609
|
+
/**
|
|
12610
|
+
* Deserializes a vault patch from bytes.
|
|
12611
|
+
* @param {Uint8Array} bytes
|
|
12612
|
+
* @returns {AccountVaultPatch}
|
|
12613
|
+
*/
|
|
12614
|
+
static deserialize(bytes) {
|
|
12615
|
+
const ret = wasm.accountvaultpatch_deserialize(bytes);
|
|
12616
|
+
if (ret[2]) {
|
|
12617
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
12618
|
+
}
|
|
12619
|
+
return AccountVaultPatch.__wrap(ret[0]);
|
|
12620
|
+
}
|
|
12621
|
+
/**
|
|
12622
|
+
* Returns true if no vault entries are changed.
|
|
12623
|
+
* @returns {boolean}
|
|
12624
|
+
*/
|
|
12625
|
+
isEmpty() {
|
|
12626
|
+
const ret = wasm.accountstoragepatch_isEmpty(this.__wbg_ptr);
|
|
12627
|
+
return ret !== 0;
|
|
12628
|
+
}
|
|
12629
|
+
/**
|
|
12630
|
+
* Returns the number of changed vault entries.
|
|
12631
|
+
* @returns {number}
|
|
12632
|
+
*/
|
|
12633
|
+
numAssets() {
|
|
12634
|
+
const ret = wasm.accountvaultpatch_numAssets(this.__wbg_ptr);
|
|
12635
|
+
return ret >>> 0;
|
|
12636
|
+
}
|
|
12637
|
+
/**
|
|
12638
|
+
* Returns the IDs of removed assets as their canonical words.
|
|
12639
|
+
* @returns {Word[]}
|
|
12640
|
+
*/
|
|
12641
|
+
removedAssetIds() {
|
|
12642
|
+
const ret = wasm.accountvaultpatch_removedAssetIds(this.__wbg_ptr);
|
|
12643
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
12644
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
12645
|
+
return v1;
|
|
12646
|
+
}
|
|
12647
|
+
/**
|
|
12648
|
+
* Serializes the vault patch into bytes.
|
|
12649
|
+
* @returns {Uint8Array}
|
|
12650
|
+
*/
|
|
12651
|
+
serialize() {
|
|
12652
|
+
const ret = wasm.accountvaultpatch_serialize(this.__wbg_ptr);
|
|
12653
|
+
return ret;
|
|
12654
|
+
}
|
|
12655
|
+
/**
|
|
12656
|
+
* Returns fungible assets whose final balance was added or updated.
|
|
12657
|
+
* @returns {FungibleAsset[]}
|
|
12658
|
+
*/
|
|
12659
|
+
updatedFungibleAssets() {
|
|
12660
|
+
const ret = wasm.accountvaultpatch_updatedFungibleAssets(this.__wbg_ptr);
|
|
12661
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
12662
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
12663
|
+
return v1;
|
|
12664
|
+
}
|
|
12665
|
+
}
|
|
12666
|
+
if (Symbol.dispose) AccountVaultPatch.prototype[Symbol.dispose] = AccountVaultPatch.prototype.free;
|
|
12667
|
+
|
|
12608
12668
|
/**
|
|
12609
12669
|
* Representation of a Miden address (account ID plus routing parameters).
|
|
12610
12670
|
*/
|
|
@@ -12796,13 +12856,6 @@ if (Symbol.dispose) AdviceInputs.prototype[Symbol.dispose] = AdviceInputs.protot
|
|
|
12796
12856
|
* Map of advice values keyed by words for script execution.
|
|
12797
12857
|
*/
|
|
12798
12858
|
class AdviceMap {
|
|
12799
|
-
static __wrap(ptr) {
|
|
12800
|
-
ptr = ptr >>> 0;
|
|
12801
|
-
const obj = Object.create(AdviceMap.prototype);
|
|
12802
|
-
obj.__wbg_ptr = ptr;
|
|
12803
|
-
AdviceMapFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
12804
|
-
return obj;
|
|
12805
|
-
}
|
|
12806
12859
|
__destroy_into_raw() {
|
|
12807
12860
|
const ptr = this.__wbg_ptr;
|
|
12808
12861
|
this.__wbg_ptr = 0;
|
|
@@ -13124,13 +13177,10 @@ class AuthSecretKey {
|
|
|
13124
13177
|
if (Symbol.dispose) AuthSecretKey.prototype[Symbol.dispose] = AuthSecretKey.prototype.free;
|
|
13125
13178
|
|
|
13126
13179
|
/**
|
|
13127
|
-
* Provides metadata for a fungible faucet account component.
|
|
13180
|
+
* Provides metadata for a basic fungible faucet account component.
|
|
13128
13181
|
*
|
|
13129
|
-
* Reads the on-chain `FungibleFaucet` component for the account, which holds the
|
|
13130
|
-
* info (symbol
|
|
13131
|
-
* "basic" public faucets and network-style faucets — in the current protocol the distinction is
|
|
13132
|
-
* a function of the surrounding account configuration (account type, auth, access control), not
|
|
13133
|
-
* of the faucet component itself — so this reads metadata from either kind of faucet account.
|
|
13182
|
+
* Reads the on-chain [`FungibleFaucet`] component for the account, which holds the
|
|
13183
|
+
* per-token info (symbol/decimals/maxSupply).
|
|
13134
13184
|
*/
|
|
13135
13185
|
class BasicFungibleFaucetComponent {
|
|
13136
13186
|
static __wrap(ptr) {
|
|
@@ -13158,32 +13208,6 @@ class BasicFungibleFaucetComponent {
|
|
|
13158
13208
|
const ret = wasm.basicfungiblefaucetcomponent_decimals(this.__wbg_ptr);
|
|
13159
13209
|
return ret;
|
|
13160
13210
|
}
|
|
13161
|
-
/**
|
|
13162
|
-
* Returns the optional free-form token description, or `undefined` when unset.
|
|
13163
|
-
* @returns {string | undefined}
|
|
13164
|
-
*/
|
|
13165
|
-
description() {
|
|
13166
|
-
const ret = wasm.basicfungiblefaucetcomponent_description(this.__wbg_ptr);
|
|
13167
|
-
let v1;
|
|
13168
|
-
if (ret[0] !== 0) {
|
|
13169
|
-
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
13170
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
13171
|
-
}
|
|
13172
|
-
return v1;
|
|
13173
|
-
}
|
|
13174
|
-
/**
|
|
13175
|
-
* Returns the optional external link (e.g. project website), or `undefined` when unset.
|
|
13176
|
-
* @returns {string | undefined}
|
|
13177
|
-
*/
|
|
13178
|
-
externalLink() {
|
|
13179
|
-
const ret = wasm.basicfungiblefaucetcomponent_externalLink(this.__wbg_ptr);
|
|
13180
|
-
let v1;
|
|
13181
|
-
if (ret[0] !== 0) {
|
|
13182
|
-
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
13183
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
13184
|
-
}
|
|
13185
|
-
return v1;
|
|
13186
|
-
}
|
|
13187
13211
|
/**
|
|
13188
13212
|
* Extracts faucet metadata from an account.
|
|
13189
13213
|
* @param {Account} account
|
|
@@ -13198,19 +13222,6 @@ class BasicFungibleFaucetComponent {
|
|
|
13198
13222
|
}
|
|
13199
13223
|
return BasicFungibleFaucetComponent.__wrap(ret[0]);
|
|
13200
13224
|
}
|
|
13201
|
-
/**
|
|
13202
|
-
* Returns the optional token logo URI, or `undefined` when unset.
|
|
13203
|
-
* @returns {string | undefined}
|
|
13204
|
-
*/
|
|
13205
|
-
logoUri() {
|
|
13206
|
-
const ret = wasm.basicfungiblefaucetcomponent_logoUri(this.__wbg_ptr);
|
|
13207
|
-
let v1;
|
|
13208
|
-
if (ret[0] !== 0) {
|
|
13209
|
-
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
13210
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
13211
|
-
}
|
|
13212
|
-
return v1;
|
|
13213
|
-
}
|
|
13214
13225
|
/**
|
|
13215
13226
|
* Returns the maximum token supply.
|
|
13216
13227
|
* @returns {Felt}
|
|
@@ -13227,30 +13238,6 @@ class BasicFungibleFaucetComponent {
|
|
|
13227
13238
|
const ret = wasm.basicfungiblefaucetcomponent_symbol(this.__wbg_ptr);
|
|
13228
13239
|
return TokenSymbol.__wrap(ret);
|
|
13229
13240
|
}
|
|
13230
|
-
/**
|
|
13231
|
-
* Returns the human-readable token name.
|
|
13232
|
-
* @returns {string}
|
|
13233
|
-
*/
|
|
13234
|
-
tokenName() {
|
|
13235
|
-
let deferred1_0;
|
|
13236
|
-
let deferred1_1;
|
|
13237
|
-
try {
|
|
13238
|
-
const ret = wasm.basicfungiblefaucetcomponent_tokenName(this.__wbg_ptr);
|
|
13239
|
-
deferred1_0 = ret[0];
|
|
13240
|
-
deferred1_1 = ret[1];
|
|
13241
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
13242
|
-
} finally {
|
|
13243
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
13244
|
-
}
|
|
13245
|
-
}
|
|
13246
|
-
/**
|
|
13247
|
-
* Returns the current token supply (the amount minted so far).
|
|
13248
|
-
* @returns {Felt}
|
|
13249
|
-
*/
|
|
13250
|
-
tokenSupply() {
|
|
13251
|
-
const ret = wasm.basicfungiblefaucetcomponent_tokenSupply(this.__wbg_ptr);
|
|
13252
|
-
return Felt.__wrap(ret);
|
|
13253
|
-
}
|
|
13254
13241
|
}
|
|
13255
13242
|
if (Symbol.dispose) BasicFungibleFaucetComponent.prototype[Symbol.dispose] = BasicFungibleFaucetComponent.prototype.free;
|
|
13256
13243
|
|
|
@@ -13311,7 +13298,7 @@ class BlockHeader {
|
|
|
13311
13298
|
* @returns {Word}
|
|
13312
13299
|
*/
|
|
13313
13300
|
commitment() {
|
|
13314
|
-
const ret = wasm.
|
|
13301
|
+
const ret = wasm.accountbuilderresult_seed(this.__wbg_ptr);
|
|
13315
13302
|
return Word.__wrap(ret);
|
|
13316
13303
|
}
|
|
13317
13304
|
/**
|
|
@@ -13356,7 +13343,7 @@ class BlockHeader {
|
|
|
13356
13343
|
* @returns {Word}
|
|
13357
13344
|
*/
|
|
13358
13345
|
proofCommitment() {
|
|
13359
|
-
const ret = wasm.
|
|
13346
|
+
const ret = wasm.accountbuilderresult_seed(this.__wbg_ptr);
|
|
13360
13347
|
return Word.__wrap(ret);
|
|
13361
13348
|
}
|
|
13362
13349
|
/**
|
|
@@ -13465,6 +13452,26 @@ class CodeBuilder {
|
|
|
13465
13452
|
}
|
|
13466
13453
|
return AccountComponentCode.__wrap(ret[0]);
|
|
13467
13454
|
}
|
|
13455
|
+
/**
|
|
13456
|
+
* Compiles account component code under an explicit module path.
|
|
13457
|
+
*
|
|
13458
|
+
* The module path is part of procedure identity in Miden Assembly 0.25. Callers that also
|
|
13459
|
+
* link this component into a transaction script must use the same path for both operations.
|
|
13460
|
+
* @param {string} component_path
|
|
13461
|
+
* @param {string} account_code
|
|
13462
|
+
* @returns {AccountComponentCode}
|
|
13463
|
+
*/
|
|
13464
|
+
compileAccountComponentCodeWithPath(component_path, account_code) {
|
|
13465
|
+
const ptr0 = passStringToWasm0(component_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
13466
|
+
const len0 = WASM_VECTOR_LEN;
|
|
13467
|
+
const ptr1 = passStringToWasm0(account_code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
13468
|
+
const len1 = WASM_VECTOR_LEN;
|
|
13469
|
+
const ret = wasm.codebuilder_compileAccountComponentCodeWithPath(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
13470
|
+
if (ret[2]) {
|
|
13471
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
13472
|
+
}
|
|
13473
|
+
return AccountComponentCode.__wrap(ret[0]);
|
|
13474
|
+
}
|
|
13468
13475
|
/**
|
|
13469
13476
|
* Given a Note Script's source code, compiles it with the available
|
|
13470
13477
|
* modules under this builder. Returns the compiled script.
|
|
@@ -13495,6 +13502,20 @@ class CodeBuilder {
|
|
|
13495
13502
|
}
|
|
13496
13503
|
return TransactionScript.__wrap(ret[0]);
|
|
13497
13504
|
}
|
|
13505
|
+
/**
|
|
13506
|
+
* Dynamically links the exact library installed by an account component.
|
|
13507
|
+
*
|
|
13508
|
+
* Use this for component procedures that are available on-chain and invoked with dynamic
|
|
13509
|
+
* calls, including foreign procedure invocation.
|
|
13510
|
+
* @param {AccountComponentCode} account_component_code
|
|
13511
|
+
*/
|
|
13512
|
+
linkDynamicAccountComponentCode(account_component_code) {
|
|
13513
|
+
_assertClass(account_component_code, AccountComponentCode);
|
|
13514
|
+
const ret = wasm.codebuilder_linkDynamicAccountComponentCode(this.__wbg_ptr, account_component_code.__wbg_ptr);
|
|
13515
|
+
if (ret[1]) {
|
|
13516
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
13517
|
+
}
|
|
13518
|
+
}
|
|
13498
13519
|
/**
|
|
13499
13520
|
* This is useful to dynamically link the {@link Library} of a foreign account
|
|
13500
13521
|
* that is invoked using foreign procedure invocation (FPI). Its code is available
|
|
@@ -13527,6 +13548,20 @@ class CodeBuilder {
|
|
|
13527
13548
|
throw takeFromExternrefTable0(ret[0]);
|
|
13528
13549
|
}
|
|
13529
13550
|
}
|
|
13551
|
+
/**
|
|
13552
|
+
* Statically links the exact library installed by an account component.
|
|
13553
|
+
*
|
|
13554
|
+
* This should be preferred over rebuilding the component source with `buildLibrary`, because
|
|
13555
|
+
* the installed component code is the source of truth for its procedure identities.
|
|
13556
|
+
* @param {AccountComponentCode} account_component_code
|
|
13557
|
+
*/
|
|
13558
|
+
linkStaticAccountComponentCode(account_component_code) {
|
|
13559
|
+
_assertClass(account_component_code, AccountComponentCode);
|
|
13560
|
+
const ret = wasm.codebuilder_linkStaticAccountComponentCode(this.__wbg_ptr, account_component_code.__wbg_ptr);
|
|
13561
|
+
if (ret[1]) {
|
|
13562
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
13563
|
+
}
|
|
13564
|
+
}
|
|
13530
13565
|
/**
|
|
13531
13566
|
* Statically links the given library.
|
|
13532
13567
|
*
|
|
@@ -13818,111 +13853,13 @@ class Endpoint {
|
|
|
13818
13853
|
}
|
|
13819
13854
|
if (Symbol.dispose) Endpoint.prototype[Symbol.dispose] = Endpoint.prototype.free;
|
|
13820
13855
|
|
|
13821
|
-
/**
|
|
13822
|
-
* A 20-byte Ethereum address, used as the destination of an `AggLayer` bridge-out (B2AGG) note.
|
|
13823
|
-
*
|
|
13824
|
-
* Construct one from a hex string with [`EthAddress::from_hex`] (the `0x` prefix is optional) or
|
|
13825
|
-
* from raw bytes with [`EthAddress::from_bytes`]. The canonical lowercase, `0x`-prefixed hex form
|
|
13826
|
-
* is available via [`EthAddress::to_hex`] (also exposed as `toString`).
|
|
13827
|
-
*/
|
|
13828
|
-
class EthAddress {
|
|
13829
|
-
static __wrap(ptr) {
|
|
13830
|
-
ptr = ptr >>> 0;
|
|
13831
|
-
const obj = Object.create(EthAddress.prototype);
|
|
13832
|
-
obj.__wbg_ptr = ptr;
|
|
13833
|
-
EthAddressFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
13834
|
-
return obj;
|
|
13835
|
-
}
|
|
13836
|
-
__destroy_into_raw() {
|
|
13837
|
-
const ptr = this.__wbg_ptr;
|
|
13838
|
-
this.__wbg_ptr = 0;
|
|
13839
|
-
EthAddressFinalization.unregister(this);
|
|
13840
|
-
return ptr;
|
|
13841
|
-
}
|
|
13842
|
-
free() {
|
|
13843
|
-
const ptr = this.__destroy_into_raw();
|
|
13844
|
-
wasm.__wbg_ethaddress_free(ptr, 0);
|
|
13845
|
-
}
|
|
13846
|
-
/**
|
|
13847
|
-
* Builds an Ethereum address from its raw 20-byte big-endian representation.
|
|
13848
|
-
*
|
|
13849
|
-
* Returns an error if the input is not exactly 20 bytes long.
|
|
13850
|
-
* @param {Uint8Array} bytes
|
|
13851
|
-
* @returns {EthAddress}
|
|
13852
|
-
*/
|
|
13853
|
-
static fromBytes(bytes) {
|
|
13854
|
-
const ret = wasm.ethaddress_fromBytes(bytes);
|
|
13855
|
-
if (ret[2]) {
|
|
13856
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
13857
|
-
}
|
|
13858
|
-
return EthAddress.__wrap(ret[0]);
|
|
13859
|
-
}
|
|
13860
|
-
/**
|
|
13861
|
-
* Builds an Ethereum address from a hex string (with or without the `0x` prefix).
|
|
13862
|
-
*
|
|
13863
|
-
* Returns an error if the string is not valid hex or does not encode exactly 20 bytes.
|
|
13864
|
-
* @param {string} hex
|
|
13865
|
-
* @returns {EthAddress}
|
|
13866
|
-
*/
|
|
13867
|
-
static fromHex(hex) {
|
|
13868
|
-
const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
13869
|
-
const len0 = WASM_VECTOR_LEN;
|
|
13870
|
-
const ret = wasm.ethaddress_fromHex(ptr0, len0);
|
|
13871
|
-
if (ret[2]) {
|
|
13872
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
13873
|
-
}
|
|
13874
|
-
return EthAddress.__wrap(ret[0]);
|
|
13875
|
-
}
|
|
13876
|
-
/**
|
|
13877
|
-
* Returns the raw 20-byte big-endian representation of the address.
|
|
13878
|
-
* @returns {Uint8Array}
|
|
13879
|
-
*/
|
|
13880
|
-
toBytes() {
|
|
13881
|
-
const ret = wasm.ethaddress_toBytes(this.__wbg_ptr);
|
|
13882
|
-
return ret;
|
|
13883
|
-
}
|
|
13884
|
-
/**
|
|
13885
|
-
* Returns the canonical lowercase, `0x`-prefixed hex representation of the address.
|
|
13886
|
-
* @returns {string}
|
|
13887
|
-
*/
|
|
13888
|
-
toHex() {
|
|
13889
|
-
let deferred1_0;
|
|
13890
|
-
let deferred1_1;
|
|
13891
|
-
try {
|
|
13892
|
-
const ret = wasm.ethaddress_toHex(this.__wbg_ptr);
|
|
13893
|
-
deferred1_0 = ret[0];
|
|
13894
|
-
deferred1_1 = ret[1];
|
|
13895
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
13896
|
-
} finally {
|
|
13897
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
13898
|
-
}
|
|
13899
|
-
}
|
|
13900
|
-
/**
|
|
13901
|
-
* Returns the canonical lowercase, `0x`-prefixed hex representation of the address.
|
|
13902
|
-
* @returns {string}
|
|
13903
|
-
*/
|
|
13904
|
-
toString() {
|
|
13905
|
-
let deferred1_0;
|
|
13906
|
-
let deferred1_1;
|
|
13907
|
-
try {
|
|
13908
|
-
const ret = wasm.ethaddress_toString(this.__wbg_ptr);
|
|
13909
|
-
deferred1_0 = ret[0];
|
|
13910
|
-
deferred1_1 = ret[1];
|
|
13911
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
13912
|
-
} finally {
|
|
13913
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
13914
|
-
}
|
|
13915
|
-
}
|
|
13916
|
-
}
|
|
13917
|
-
if (Symbol.dispose) EthAddress.prototype[Symbol.dispose] = EthAddress.prototype.free;
|
|
13918
|
-
|
|
13919
13856
|
/**
|
|
13920
13857
|
* Describes the result of executing a transaction program for the Miden protocol.
|
|
13921
13858
|
*
|
|
13922
13859
|
* Executed transaction serves two primary purposes:
|
|
13923
13860
|
* - It contains a complete description of the effects of the transaction. Specifically, it
|
|
13924
|
-
* contains all output notes created as the result of the transaction and
|
|
13925
|
-
*
|
|
13861
|
+
* contains all output notes created as the result of the transaction and the absolute-valued
|
|
13862
|
+
* account patch produced by execution.
|
|
13926
13863
|
* - It contains all the information required to re-execute and prove the transaction in a
|
|
13927
13864
|
* stateless manner. This includes all public transaction inputs, but also all nondeterministic
|
|
13928
13865
|
* inputs that the host provided to Miden VM while executing the transaction (i.e., advice
|
|
@@ -13946,14 +13883,6 @@ class ExecutedTransaction {
|
|
|
13946
13883
|
const ptr = this.__destroy_into_raw();
|
|
13947
13884
|
wasm.__wbg_executedtransaction_free(ptr, 0);
|
|
13948
13885
|
}
|
|
13949
|
-
/**
|
|
13950
|
-
* Returns the account delta resulting from execution.
|
|
13951
|
-
* @returns {AccountDelta}
|
|
13952
|
-
*/
|
|
13953
|
-
accountDelta() {
|
|
13954
|
-
const ret = wasm.executedtransaction_accountDelta(this.__wbg_ptr);
|
|
13955
|
-
return AccountDelta.__wrap(ret);
|
|
13956
|
-
}
|
|
13957
13886
|
/**
|
|
13958
13887
|
* Returns the account the transaction was executed against.
|
|
13959
13888
|
* @returns {AccountId}
|
|
@@ -13962,6 +13891,14 @@ class ExecutedTransaction {
|
|
|
13962
13891
|
const ret = wasm.executedtransaction_accountId(this.__wbg_ptr);
|
|
13963
13892
|
return AccountId.__wrap(ret);
|
|
13964
13893
|
}
|
|
13894
|
+
/**
|
|
13895
|
+
* Returns the absolute account patch resulting from execution.
|
|
13896
|
+
* @returns {AccountPatch}
|
|
13897
|
+
*/
|
|
13898
|
+
accountPatch() {
|
|
13899
|
+
const ret = wasm.executedtransaction_accountPatch(this.__wbg_ptr);
|
|
13900
|
+
return AccountPatch.__wrap(ret);
|
|
13901
|
+
}
|
|
13965
13902
|
/**
|
|
13966
13903
|
* Returns the block header that included the transaction.
|
|
13967
13904
|
* @returns {BlockHeader}
|
|
@@ -14234,7 +14171,7 @@ class FetchedAccount {
|
|
|
14234
14171
|
* @returns {number}
|
|
14235
14172
|
*/
|
|
14236
14173
|
lastBlockNum() {
|
|
14237
|
-
const ret = wasm.
|
|
14174
|
+
const ret = wasm.fetchedaccount_lastBlockNum(this.__wbg_ptr);
|
|
14238
14175
|
return ret >>> 0;
|
|
14239
14176
|
}
|
|
14240
14177
|
}
|
|
@@ -14680,7 +14617,7 @@ class FungibleAssetDelta {
|
|
|
14680
14617
|
* @returns {boolean}
|
|
14681
14618
|
*/
|
|
14682
14619
|
isEmpty() {
|
|
14683
|
-
const ret = wasm.
|
|
14620
|
+
const ret = wasm.accountstoragepatch_isEmpty(this.__wbg_ptr);
|
|
14684
14621
|
return ret !== 0;
|
|
14685
14622
|
}
|
|
14686
14623
|
/**
|
|
@@ -14688,7 +14625,7 @@ class FungibleAssetDelta {
|
|
|
14688
14625
|
* @returns {number}
|
|
14689
14626
|
*/
|
|
14690
14627
|
numAssets() {
|
|
14691
|
-
const ret = wasm.
|
|
14628
|
+
const ret = wasm.accountvaultpatch_numAssets(this.__wbg_ptr);
|
|
14692
14629
|
return ret >>> 0;
|
|
14693
14630
|
}
|
|
14694
14631
|
/**
|
|
@@ -14991,16 +14928,6 @@ class InputNoteRecord {
|
|
|
14991
14928
|
const ret = wasm.inputnoterecord_isConsumed(this.__wbg_ptr);
|
|
14992
14929
|
return ret !== 0;
|
|
14993
14930
|
}
|
|
14994
|
-
/**
|
|
14995
|
-
* Returns true while the note's on-chain inclusion is still unsettled
|
|
14996
|
-
* (`Expected` or `Unverified`), i.e. while sync is the mechanism that can
|
|
14997
|
-
* advance this record.
|
|
14998
|
-
* @returns {boolean}
|
|
14999
|
-
*/
|
|
15000
|
-
isInclusionPending() {
|
|
15001
|
-
const ret = wasm.inputnoterecord_isInclusionPending(this.__wbg_ptr);
|
|
15002
|
-
return ret !== 0;
|
|
15003
|
-
}
|
|
15004
14931
|
/**
|
|
15005
14932
|
* Returns true if the note is currently being processed.
|
|
15006
14933
|
* @returns {boolean}
|
|
@@ -15731,13 +15658,12 @@ class JsStateSyncUpdate {
|
|
|
15731
15658
|
return v1;
|
|
15732
15659
|
}
|
|
15733
15660
|
/**
|
|
15734
|
-
* Serialized MMR peaks at the new sync height
|
|
15735
|
-
*
|
|
15736
|
-
* `blockNum` matches `block_num`) and read back by `getCurrentBlockchainPeaks`.
|
|
15661
|
+
* Serialized MMR peaks at the new sync height. The only peaks persisted by the
|
|
15662
|
+
* client (peaks for intermediate note blocks are never read, so they are not stored).
|
|
15737
15663
|
* @returns {Uint8Array}
|
|
15738
15664
|
*/
|
|
15739
|
-
get
|
|
15740
|
-
const ret = wasm.
|
|
15665
|
+
get newPeaks() {
|
|
15666
|
+
const ret = wasm.__wbg_get_jsstatesyncupdate_newPeaks(this.__wbg_ptr);
|
|
15741
15667
|
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
15742
15668
|
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
15743
15669
|
return v1;
|
|
@@ -15850,15 +15776,14 @@ class JsStateSyncUpdate {
|
|
|
15850
15776
|
wasm.__wbg_set_jsstatesyncupdate_newBlockNums(this.__wbg_ptr, ptr0, len0);
|
|
15851
15777
|
}
|
|
15852
15778
|
/**
|
|
15853
|
-
* Serialized MMR peaks at the new sync height
|
|
15854
|
-
*
|
|
15855
|
-
* `blockNum` matches `block_num`) and read back by `getCurrentBlockchainPeaks`.
|
|
15779
|
+
* Serialized MMR peaks at the new sync height. The only peaks persisted by the
|
|
15780
|
+
* client (peaks for intermediate note blocks are never read, so they are not stored).
|
|
15856
15781
|
* @param {Uint8Array} arg0
|
|
15857
15782
|
*/
|
|
15858
|
-
set
|
|
15783
|
+
set newPeaks(arg0) {
|
|
15859
15784
|
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
15860
15785
|
const len0 = WASM_VECTOR_LEN;
|
|
15861
|
-
wasm.
|
|
15786
|
+
wasm.__wbg_set_jsstatesyncupdate_newPeaks(this.__wbg_ptr, ptr0, len0);
|
|
15862
15787
|
}
|
|
15863
15788
|
/**
|
|
15864
15789
|
* Input notes for this state update in serialized form.
|
|
@@ -16046,6 +15971,17 @@ class JsStorageSlot {
|
|
|
16046
15971
|
const ptr = this.__destroy_into_raw();
|
|
16047
15972
|
wasm.__wbg_jsstorageslot_free(ptr, 0);
|
|
16048
15973
|
}
|
|
15974
|
+
/**
|
|
15975
|
+
* The storage patch operation (create, update, or remove).
|
|
15976
|
+
*
|
|
15977
|
+
* Full-state writes do not inspect this field, but incremental writes use it to distinguish
|
|
15978
|
+
* map replacement/removal from an entry-wise update.
|
|
15979
|
+
* @returns {number}
|
|
15980
|
+
*/
|
|
15981
|
+
get patchOperation() {
|
|
15982
|
+
const ret = wasm.__wbg_get_jsstorageslot_patchOperation(this.__wbg_ptr);
|
|
15983
|
+
return ret;
|
|
15984
|
+
}
|
|
16049
15985
|
/**
|
|
16050
15986
|
* The name of the storage slot.
|
|
16051
15987
|
* @returns {string}
|
|
@@ -16086,6 +16022,16 @@ class JsStorageSlot {
|
|
|
16086
16022
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
16087
16023
|
}
|
|
16088
16024
|
}
|
|
16025
|
+
/**
|
|
16026
|
+
* The storage patch operation (create, update, or remove).
|
|
16027
|
+
*
|
|
16028
|
+
* Full-state writes do not inspect this field, but incremental writes use it to distinguish
|
|
16029
|
+
* map replacement/removal from an entry-wise update.
|
|
16030
|
+
* @param {number} arg0
|
|
16031
|
+
*/
|
|
16032
|
+
set patchOperation(arg0) {
|
|
16033
|
+
wasm.__wbg_set_jsstorageslot_patchOperation(this.__wbg_ptr, arg0);
|
|
16034
|
+
}
|
|
16089
16035
|
/**
|
|
16090
16036
|
* The name of the storage slot.
|
|
16091
16037
|
* @param {string} arg0
|
|
@@ -16287,97 +16233,6 @@ class MerklePath {
|
|
|
16287
16233
|
}
|
|
16288
16234
|
if (Symbol.dispose) MerklePath.prototype[Symbol.dispose] = MerklePath.prototype.free;
|
|
16289
16235
|
|
|
16290
|
-
/**
|
|
16291
|
-
* Targets a note at a public network account so the operator auto-consumes it.
|
|
16292
|
-
*
|
|
16293
|
-
* A note is a network note when it is `Public` and carries a valid
|
|
16294
|
-
* `NetworkAccountTarget` attachment (see `Note.isNetworkNote`).
|
|
16295
|
-
*/
|
|
16296
|
-
class NetworkAccountTarget {
|
|
16297
|
-
static __wrap(ptr) {
|
|
16298
|
-
ptr = ptr >>> 0;
|
|
16299
|
-
const obj = Object.create(NetworkAccountTarget.prototype);
|
|
16300
|
-
obj.__wbg_ptr = ptr;
|
|
16301
|
-
NetworkAccountTargetFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
16302
|
-
return obj;
|
|
16303
|
-
}
|
|
16304
|
-
__destroy_into_raw() {
|
|
16305
|
-
const ptr = this.__wbg_ptr;
|
|
16306
|
-
this.__wbg_ptr = 0;
|
|
16307
|
-
NetworkAccountTargetFinalization.unregister(this);
|
|
16308
|
-
return ptr;
|
|
16309
|
-
}
|
|
16310
|
-
free() {
|
|
16311
|
-
const ptr = this.__destroy_into_raw();
|
|
16312
|
-
wasm.__wbg_networkaccounttarget_free(ptr, 0);
|
|
16313
|
-
}
|
|
16314
|
-
/**
|
|
16315
|
-
* Returns the note execution hint.
|
|
16316
|
-
* @returns {NoteExecutionHint}
|
|
16317
|
-
*/
|
|
16318
|
-
executionHint() {
|
|
16319
|
-
const ret = wasm.networkaccounttarget_executionHint(this.__wbg_ptr);
|
|
16320
|
-
return NoteExecutionHint.__wrap(ret);
|
|
16321
|
-
}
|
|
16322
|
-
/**
|
|
16323
|
-
* Decodes a `NoteAttachment` back into a `NetworkAccountTarget`.
|
|
16324
|
-
*
|
|
16325
|
-
* # Errors
|
|
16326
|
-
* Errors if the attachment is not a valid network-account-target attachment.
|
|
16327
|
-
* @param {NoteAttachment} attachment
|
|
16328
|
-
* @returns {NetworkAccountTarget}
|
|
16329
|
-
*/
|
|
16330
|
-
static fromAttachment(attachment) {
|
|
16331
|
-
_assertClass(attachment, NoteAttachment);
|
|
16332
|
-
const ret = wasm.networkaccounttarget_fromAttachment(attachment.__wbg_ptr);
|
|
16333
|
-
if (ret[2]) {
|
|
16334
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
16335
|
-
}
|
|
16336
|
-
return NetworkAccountTarget.__wrap(ret[0]);
|
|
16337
|
-
}
|
|
16338
|
-
/**
|
|
16339
|
-
* Creates a target for the given network account. `executionHint` defaults
|
|
16340
|
-
* to `NoteExecutionHint.always()`.
|
|
16341
|
-
*
|
|
16342
|
-
* # Errors
|
|
16343
|
-
* Errors if `account_id` is not a public account.
|
|
16344
|
-
* @param {AccountId} account_id
|
|
16345
|
-
* @param {NoteExecutionHint | null} [execution_hint]
|
|
16346
|
-
*/
|
|
16347
|
-
constructor(account_id, execution_hint) {
|
|
16348
|
-
_assertClass(account_id, AccountId);
|
|
16349
|
-
let ptr0 = 0;
|
|
16350
|
-
if (!isLikeNone(execution_hint)) {
|
|
16351
|
-
_assertClass(execution_hint, NoteExecutionHint);
|
|
16352
|
-
ptr0 = execution_hint.__destroy_into_raw();
|
|
16353
|
-
}
|
|
16354
|
-
const ret = wasm.networkaccounttarget_new(account_id.__wbg_ptr, ptr0);
|
|
16355
|
-
if (ret[2]) {
|
|
16356
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
16357
|
-
}
|
|
16358
|
-
this.__wbg_ptr = ret[0] >>> 0;
|
|
16359
|
-
NetworkAccountTargetFinalization.register(this, this.__wbg_ptr, this);
|
|
16360
|
-
return this;
|
|
16361
|
-
}
|
|
16362
|
-
/**
|
|
16363
|
-
* Returns the targeted network account id.
|
|
16364
|
-
* @returns {AccountId}
|
|
16365
|
-
*/
|
|
16366
|
-
targetId() {
|
|
16367
|
-
const ret = wasm.accountreader_accountId(this.__wbg_ptr);
|
|
16368
|
-
return AccountId.__wrap(ret);
|
|
16369
|
-
}
|
|
16370
|
-
/**
|
|
16371
|
-
* Encodes this target as a `NoteAttachment`.
|
|
16372
|
-
* @returns {NoteAttachment}
|
|
16373
|
-
*/
|
|
16374
|
-
toAttachment() {
|
|
16375
|
-
const ret = wasm.networkaccounttarget_toAttachment(this.__wbg_ptr);
|
|
16376
|
-
return NoteAttachment.__wrap(ret);
|
|
16377
|
-
}
|
|
16378
|
-
}
|
|
16379
|
-
if (Symbol.dispose) NetworkAccountTarget.prototype[Symbol.dispose] = NetworkAccountTarget.prototype.free;
|
|
16380
|
-
|
|
16381
16236
|
/**
|
|
16382
16237
|
* The identifier of a Miden network.
|
|
16383
16238
|
*/
|
|
@@ -16571,16 +16426,6 @@ class Note {
|
|
|
16571
16426
|
const ret = wasm.note_assets(this.__wbg_ptr);
|
|
16572
16427
|
return NoteAssets.__wrap(ret);
|
|
16573
16428
|
}
|
|
16574
|
-
/**
|
|
16575
|
-
* Returns the note's attachments.
|
|
16576
|
-
* @returns {NoteAttachment[]}
|
|
16577
|
-
*/
|
|
16578
|
-
attachments() {
|
|
16579
|
-
const ret = wasm.note_attachments(this.__wbg_ptr);
|
|
16580
|
-
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
16581
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
16582
|
-
return v1;
|
|
16583
|
-
}
|
|
16584
16429
|
/**
|
|
16585
16430
|
* Returns the commitment to the note (its ID).
|
|
16586
16431
|
*
|
|
@@ -16591,34 +16436,8 @@ class Note {
|
|
|
16591
16436
|
* @returns {Word}
|
|
16592
16437
|
*/
|
|
16593
16438
|
commitment() {
|
|
16594
|
-
const ret = wasm.note_commitment(this.__wbg_ptr);
|
|
16595
|
-
return Word.__wrap(ret);
|
|
16596
|
-
}
|
|
16597
|
-
/**
|
|
16598
|
-
* Builds a B2AGG (Bridge-to-AggLayer) note that bridges the given assets out to another
|
|
16599
|
-
* network via the `AggLayer`.
|
|
16600
|
-
*
|
|
16601
|
-
* The note is always public and is consumed by `bridge_account`, which burns the assets so
|
|
16602
|
-
* they can be claimed on the destination network at `destination_address` (an Ethereum
|
|
16603
|
-
* address on the AggLayer-assigned `destination_network`). The assets must be fungible assets
|
|
16604
|
-
* issued by a network faucet.
|
|
16605
|
-
* @param {AccountId} sender
|
|
16606
|
-
* @param {AccountId} bridge_account
|
|
16607
|
-
* @param {NoteAssets} assets
|
|
16608
|
-
* @param {number} destination_network
|
|
16609
|
-
* @param {EthAddress} destination_address
|
|
16610
|
-
* @returns {Note}
|
|
16611
|
-
*/
|
|
16612
|
-
static createB2AggNote(sender, bridge_account, assets, destination_network, destination_address) {
|
|
16613
|
-
_assertClass(sender, AccountId);
|
|
16614
|
-
_assertClass(bridge_account, AccountId);
|
|
16615
|
-
_assertClass(assets, NoteAssets);
|
|
16616
|
-
_assertClass(destination_address, EthAddress);
|
|
16617
|
-
const ret = wasm.note_createB2AggNote(sender.__wbg_ptr, bridge_account.__wbg_ptr, assets.__wbg_ptr, destination_network, destination_address.__wbg_ptr);
|
|
16618
|
-
if (ret[2]) {
|
|
16619
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
16620
|
-
}
|
|
16621
|
-
return Note.__wrap(ret[0]);
|
|
16439
|
+
const ret = wasm.note_commitment(this.__wbg_ptr);
|
|
16440
|
+
return Word.__wrap(ret);
|
|
16622
16441
|
}
|
|
16623
16442
|
/**
|
|
16624
16443
|
* Builds a P2IDE note that can be reclaimed or timelocked based on block heights.
|
|
@@ -16682,15 +16501,6 @@ class Note {
|
|
|
16682
16501
|
const ret = wasm.note_commitment(this.__wbg_ptr);
|
|
16683
16502
|
return NoteId.__wrap(ret);
|
|
16684
16503
|
}
|
|
16685
|
-
/**
|
|
16686
|
-
* Returns true if the note is a network note (public + a valid
|
|
16687
|
-
* `NetworkAccountTarget` attachment).
|
|
16688
|
-
* @returns {boolean}
|
|
16689
|
-
*/
|
|
16690
|
-
isNetworkNote() {
|
|
16691
|
-
const ret = wasm.note_isNetworkNote(this.__wbg_ptr);
|
|
16692
|
-
return ret !== 0;
|
|
16693
|
-
}
|
|
16694
16504
|
/**
|
|
16695
16505
|
* Returns the public metadata associated with the note.
|
|
16696
16506
|
* @returns {NoteMetadata}
|
|
@@ -16750,30 +16560,6 @@ class Note {
|
|
|
16750
16560
|
const ret = wasm.note_serialize(this.__wbg_ptr);
|
|
16751
16561
|
return ret;
|
|
16752
16562
|
}
|
|
16753
|
-
/**
|
|
16754
|
-
* Creates a note carrying the provided attachments, using the metadata's
|
|
16755
|
-
* sender / note type / tag (attachments on the metadata itself are ignored).
|
|
16756
|
-
*
|
|
16757
|
-
* # Errors
|
|
16758
|
-
* Errors if the attachment set is invalid (too many attachments or words).
|
|
16759
|
-
* @param {NoteAssets} note_assets
|
|
16760
|
-
* @param {NoteMetadata} note_metadata
|
|
16761
|
-
* @param {NoteRecipient} note_recipient
|
|
16762
|
-
* @param {NoteAttachment[]} attachments
|
|
16763
|
-
* @returns {Note}
|
|
16764
|
-
*/
|
|
16765
|
-
static withAttachments(note_assets, note_metadata, note_recipient, attachments) {
|
|
16766
|
-
_assertClass(note_assets, NoteAssets);
|
|
16767
|
-
_assertClass(note_metadata, NoteMetadata);
|
|
16768
|
-
_assertClass(note_recipient, NoteRecipient);
|
|
16769
|
-
const ptr0 = passArrayJsValueToWasm0(attachments, wasm.__wbindgen_malloc);
|
|
16770
|
-
const len0 = WASM_VECTOR_LEN;
|
|
16771
|
-
const ret = wasm.note_withAttachments(note_assets.__wbg_ptr, note_metadata.__wbg_ptr, note_recipient.__wbg_ptr, ptr0, len0);
|
|
16772
|
-
if (ret[2]) {
|
|
16773
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
16774
|
-
}
|
|
16775
|
-
return Note.__wrap(ret[0]);
|
|
16776
|
-
}
|
|
16777
16563
|
}
|
|
16778
16564
|
if (Symbol.dispose) Note.prototype[Symbol.dispose] = Note.prototype.free;
|
|
16779
16565
|
|
|
@@ -17041,12 +16827,6 @@ class NoteAttachment {
|
|
|
17041
16827
|
NoteAttachmentFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
17042
16828
|
return obj;
|
|
17043
16829
|
}
|
|
17044
|
-
static __unwrap(jsValue) {
|
|
17045
|
-
if (!(jsValue instanceof NoteAttachment)) {
|
|
17046
|
-
return 0;
|
|
17047
|
-
}
|
|
17048
|
-
return jsValue.__destroy_into_raw();
|
|
17049
|
-
}
|
|
17050
16830
|
__destroy_into_raw() {
|
|
17051
16831
|
const ptr = this.__wbg_ptr;
|
|
17052
16832
|
this.__wbg_ptr = 0;
|
|
@@ -17670,6 +17450,19 @@ class NoteFile {
|
|
|
17670
17450
|
}
|
|
17671
17451
|
return NoteFile.__wrap(ret[0]);
|
|
17672
17452
|
}
|
|
17453
|
+
/**
|
|
17454
|
+
* Creates an expected-note file with the sync hint required by miden-client 0.16.
|
|
17455
|
+
* @param {NoteDetails} note_details
|
|
17456
|
+
* @param {NoteTag} note_tag
|
|
17457
|
+
* @param {number} after_block_num
|
|
17458
|
+
* @returns {NoteFile}
|
|
17459
|
+
*/
|
|
17460
|
+
static fromExpectedNote(note_details, note_tag, after_block_num) {
|
|
17461
|
+
_assertClass(note_details, NoteDetails);
|
|
17462
|
+
_assertClass(note_tag, NoteTag);
|
|
17463
|
+
const ret = wasm.notefile_fromExpectedNote(note_details.__wbg_ptr, note_tag.__wbg_ptr, after_block_num);
|
|
17464
|
+
return NoteFile.__wrap(ret);
|
|
17465
|
+
}
|
|
17673
17466
|
/**
|
|
17674
17467
|
* Creates a `NoteFile` from an input note, preserving proof when available.
|
|
17675
17468
|
* @param {InputNote} note
|
|
@@ -17681,7 +17474,11 @@ class NoteFile {
|
|
|
17681
17474
|
return NoteFile.__wrap(ret);
|
|
17682
17475
|
}
|
|
17683
17476
|
/**
|
|
17684
|
-
* Creates a `NoteFile` from note details.
|
|
17477
|
+
* Creates a `NoteFile` from note details using a zero-valued sync hint.
|
|
17478
|
+
*
|
|
17479
|
+
* miden-client 0.16 requires every expected note to include a tag and an after-block hint.
|
|
17480
|
+
* This retains the old one-argument JS API by using block zero and the default tag. Prefer
|
|
17481
|
+
* [`from_expected_note`](Self::from_expected_note) when the real sync hint is available.
|
|
17685
17482
|
* @param {NoteDetails} note_details
|
|
17686
17483
|
* @returns {NoteFile}
|
|
17687
17484
|
*/
|
|
@@ -18277,19 +18074,6 @@ class NoteRecipient {
|
|
|
18277
18074
|
const ret = wasm.accountheader_storageCommitment(this.__wbg_ptr);
|
|
18278
18075
|
return Word.__wrap(ret);
|
|
18279
18076
|
}
|
|
18280
|
-
/**
|
|
18281
|
-
* Creates a recipient from a script and storage, generating a fresh random
|
|
18282
|
-
* serial number (the secret that prevents double-spends).
|
|
18283
|
-
* @param {NoteScript} note_script
|
|
18284
|
-
* @param {NoteStorage} storage
|
|
18285
|
-
* @returns {NoteRecipient}
|
|
18286
|
-
*/
|
|
18287
|
-
static fromScript(note_script, storage) {
|
|
18288
|
-
_assertClass(note_script, NoteScript);
|
|
18289
|
-
_assertClass(storage, NoteStorage);
|
|
18290
|
-
const ret = wasm.noterecipient_fromScript(note_script.__wbg_ptr, storage.__wbg_ptr);
|
|
18291
|
-
return NoteRecipient.__wrap(ret);
|
|
18292
|
-
}
|
|
18293
18077
|
/**
|
|
18294
18078
|
* Creates a note recipient from its serial number, script, and storage.
|
|
18295
18079
|
* @param {Word} serial_num
|
|
@@ -18977,7 +18761,7 @@ class OutputNoteRecord {
|
|
|
18977
18761
|
* @returns {number}
|
|
18978
18762
|
*/
|
|
18979
18763
|
expectedHeight() {
|
|
18980
|
-
const ret = wasm.
|
|
18764
|
+
const ret = wasm.blockheader_version(this.__wbg_ptr);
|
|
18981
18765
|
return ret >>> 0;
|
|
18982
18766
|
}
|
|
18983
18767
|
/**
|
|
@@ -19012,22 +18796,12 @@ class OutputNoteRecord {
|
|
|
19012
18796
|
const ret = wasm.outputnoterecord_isConsumed(this.__wbg_ptr);
|
|
19013
18797
|
return ret !== 0;
|
|
19014
18798
|
}
|
|
19015
|
-
/**
|
|
19016
|
-
* Returns true while the note's on-chain inclusion is still unsettled
|
|
19017
|
-
* (`ExpectedFull` or `ExpectedPartial`), i.e. while sync is the mechanism
|
|
19018
|
-
* that can advance this record.
|
|
19019
|
-
* @returns {boolean}
|
|
19020
|
-
*/
|
|
19021
|
-
isInclusionPending() {
|
|
19022
|
-
const ret = wasm.outputnoterecord_isInclusionPending(this.__wbg_ptr);
|
|
19023
|
-
return ret !== 0;
|
|
19024
|
-
}
|
|
19025
18799
|
/**
|
|
19026
18800
|
* Returns the note metadata.
|
|
19027
18801
|
* @returns {NoteMetadata}
|
|
19028
18802
|
*/
|
|
19029
18803
|
metadata() {
|
|
19030
|
-
const ret = wasm.
|
|
18804
|
+
const ret = wasm.outputnoterecord_metadata(this.__wbg_ptr);
|
|
19031
18805
|
return NoteMetadata.__wrap(ret);
|
|
19032
18806
|
}
|
|
19033
18807
|
/**
|
|
@@ -19400,7 +19174,7 @@ class ProvenTransaction {
|
|
|
19400
19174
|
* @returns {AccountId}
|
|
19401
19175
|
*/
|
|
19402
19176
|
accountId() {
|
|
19403
|
-
const ret = wasm.
|
|
19177
|
+
const ret = wasm.proventransaction_accountId(this.__wbg_ptr);
|
|
19404
19178
|
return AccountId.__wrap(ret);
|
|
19405
19179
|
}
|
|
19406
19180
|
/**
|
|
@@ -19428,7 +19202,7 @@ class ProvenTransaction {
|
|
|
19428
19202
|
* @returns {TransactionId}
|
|
19429
19203
|
*/
|
|
19430
19204
|
id() {
|
|
19431
|
-
const ret = wasm.
|
|
19205
|
+
const ret = wasm.proventransaction_id(this.__wbg_ptr);
|
|
19432
19206
|
return TransactionId.__wrap(ret);
|
|
19433
19207
|
}
|
|
19434
19208
|
/**
|
|
@@ -19446,7 +19220,7 @@ class ProvenTransaction {
|
|
|
19446
19220
|
* @returns {Word}
|
|
19447
19221
|
*/
|
|
19448
19222
|
refBlockCommitment() {
|
|
19449
|
-
const ret = wasm.
|
|
19223
|
+
const ret = wasm.proventransaction_refBlockCommitment(this.__wbg_ptr);
|
|
19450
19224
|
return Word.__wrap(ret);
|
|
19451
19225
|
}
|
|
19452
19226
|
/**
|
|
@@ -19468,119 +19242,6 @@ class ProvenTransaction {
|
|
|
19468
19242
|
}
|
|
19469
19243
|
if (Symbol.dispose) ProvenTransaction.prototype[Symbol.dispose] = ProvenTransaction.prototype.free;
|
|
19470
19244
|
|
|
19471
|
-
/**
|
|
19472
|
-
* Read-only view of one PSWAP order's chain state, exposed to JavaScript.
|
|
19473
|
-
* The mutable fields (remaining amounts, depth, tip, state) advance
|
|
19474
|
-
* round-by-round as fills are discovered during sync.
|
|
19475
|
-
*/
|
|
19476
|
-
class PswapLineageRecord {
|
|
19477
|
-
static __wrap(ptr) {
|
|
19478
|
-
ptr = ptr >>> 0;
|
|
19479
|
-
const obj = Object.create(PswapLineageRecord.prototype);
|
|
19480
|
-
obj.__wbg_ptr = ptr;
|
|
19481
|
-
PswapLineageRecordFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
19482
|
-
return obj;
|
|
19483
|
-
}
|
|
19484
|
-
__destroy_into_raw() {
|
|
19485
|
-
const ptr = this.__wbg_ptr;
|
|
19486
|
-
this.__wbg_ptr = 0;
|
|
19487
|
-
PswapLineageRecordFinalization.unregister(this);
|
|
19488
|
-
return ptr;
|
|
19489
|
-
}
|
|
19490
|
-
free() {
|
|
19491
|
-
const ptr = this.__destroy_into_raw();
|
|
19492
|
-
wasm.__wbg_pswaplineagerecord_free(ptr, 0);
|
|
19493
|
-
}
|
|
19494
|
-
/**
|
|
19495
|
-
* Account that created the order and receives every payback.
|
|
19496
|
-
* @returns {AccountId}
|
|
19497
|
-
*/
|
|
19498
|
-
creatorAccountId() {
|
|
19499
|
-
const ret = wasm.pswaplineagerecord_creatorAccountId(this.__wbg_ptr);
|
|
19500
|
-
return AccountId.__wrap(ret);
|
|
19501
|
-
}
|
|
19502
|
-
/**
|
|
19503
|
-
* Depth of the current tip: 0 for the original PSWAP, +1 per fill round.
|
|
19504
|
-
* @returns {number}
|
|
19505
|
-
*/
|
|
19506
|
-
currentDepth() {
|
|
19507
|
-
const ret = wasm.pswaplineagerecord_currentDepth(this.__wbg_ptr);
|
|
19508
|
-
return ret >>> 0;
|
|
19509
|
-
}
|
|
19510
|
-
/**
|
|
19511
|
-
* Note id of the current tip in the chain.
|
|
19512
|
-
* @returns {NoteId}
|
|
19513
|
-
*/
|
|
19514
|
-
currentTipNoteId() {
|
|
19515
|
-
const ret = wasm.pswaplineagerecord_currentTipNoteId(this.__wbg_ptr);
|
|
19516
|
-
return NoteId.__wrap(ret);
|
|
19517
|
-
}
|
|
19518
|
-
/**
|
|
19519
|
-
* Stable identifier shared by every note in the chain, as a decimal string.
|
|
19520
|
-
* @returns {string}
|
|
19521
|
-
*/
|
|
19522
|
-
orderId() {
|
|
19523
|
-
let deferred1_0;
|
|
19524
|
-
let deferred1_1;
|
|
19525
|
-
try {
|
|
19526
|
-
const ret = wasm.pswaplineagerecord_orderId(this.__wbg_ptr);
|
|
19527
|
-
deferred1_0 = ret[0];
|
|
19528
|
-
deferred1_1 = ret[1];
|
|
19529
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
19530
|
-
} finally {
|
|
19531
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
19532
|
-
}
|
|
19533
|
-
}
|
|
19534
|
-
/**
|
|
19535
|
-
* Offered amount still unfilled on the current tip. The offered faucet is
|
|
19536
|
-
* chain-invariant and recovered from the original PSWAP note when needed.
|
|
19537
|
-
* @returns {bigint}
|
|
19538
|
-
*/
|
|
19539
|
-
remainingOffered() {
|
|
19540
|
-
const ret = wasm.pswaplineagerecord_remainingOffered(this.__wbg_ptr);
|
|
19541
|
-
return BigInt.asUintN(64, ret);
|
|
19542
|
-
}
|
|
19543
|
-
/**
|
|
19544
|
-
* Requested amount still outstanding on the current tip. The requested
|
|
19545
|
-
* faucet is recovered from the original PSWAP note when needed.
|
|
19546
|
-
* @returns {bigint}
|
|
19547
|
-
*/
|
|
19548
|
-
remainingRequested() {
|
|
19549
|
-
const ret = wasm.pswaplineagerecord_remainingRequested(this.__wbg_ptr);
|
|
19550
|
-
return BigInt.asUintN(64, ret);
|
|
19551
|
-
}
|
|
19552
|
-
/**
|
|
19553
|
-
* Lifecycle state of the order.
|
|
19554
|
-
* @returns {PswapLineageState}
|
|
19555
|
-
*/
|
|
19556
|
-
state() {
|
|
19557
|
-
const ret = wasm.pswaplineagerecord_state(this.__wbg_ptr);
|
|
19558
|
-
return ret;
|
|
19559
|
-
}
|
|
19560
|
-
}
|
|
19561
|
-
if (Symbol.dispose) PswapLineageRecord.prototype[Symbol.dispose] = PswapLineageRecord.prototype.free;
|
|
19562
|
-
|
|
19563
|
-
/**
|
|
19564
|
-
* Lifecycle state of a PSWAP order.
|
|
19565
|
-
*
|
|
19566
|
-
* Discriminants match the on-disk encoding in the store.
|
|
19567
|
-
* @enum {0 | 1 | 2}
|
|
19568
|
-
*/
|
|
19569
|
-
const PswapLineageState = Object.freeze({
|
|
19570
|
-
/**
|
|
19571
|
-
* Still fillable and reclaimable.
|
|
19572
|
-
*/
|
|
19573
|
-
Active: 0, "0": "Active",
|
|
19574
|
-
/**
|
|
19575
|
-
* Fully filled. Terminal.
|
|
19576
|
-
*/
|
|
19577
|
-
FullyFilled: 1, "1": "FullyFilled",
|
|
19578
|
-
/**
|
|
19579
|
-
* Reclaimed by the creator. Terminal.
|
|
19580
|
-
*/
|
|
19581
|
-
Reclaimed: 2, "2": "Reclaimed",
|
|
19582
|
-
});
|
|
19583
|
-
|
|
19584
19245
|
class PublicKey {
|
|
19585
19246
|
static __wrap(ptr) {
|
|
19586
19247
|
ptr = ptr >>> 0;
|
|
@@ -20327,7 +19988,7 @@ class SerializedOutputNoteData {
|
|
|
20327
19988
|
set attachments(arg0) {
|
|
20328
19989
|
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
20329
19990
|
const len0 = WASM_VECTOR_LEN;
|
|
20330
|
-
wasm.
|
|
19991
|
+
wasm.__wbg_set_jsstatesyncupdate_newPeaks(this.__wbg_ptr, ptr0, len0);
|
|
20331
19992
|
}
|
|
20332
19993
|
/**
|
|
20333
19994
|
* @param {string} arg0
|
|
@@ -21072,7 +20733,7 @@ if (Symbol.dispose) StorageMapEntryJs.prototype[Symbol.dispose] = StorageMapEntr
|
|
|
21072
20733
|
* Information about storage map updates for an account, as returned by the
|
|
21073
20734
|
* `syncStorageMaps` RPC endpoint.
|
|
21074
20735
|
*
|
|
21075
|
-
* Contains the
|
|
20736
|
+
* Contains the storage map entries merged over the requested block range,
|
|
21076
20737
|
* along with the chain tip and last processed block number.
|
|
21077
20738
|
*/
|
|
21078
20739
|
class StorageMapInfo {
|
|
@@ -21123,8 +20784,8 @@ class StorageMapInfo {
|
|
|
21123
20784
|
if (Symbol.dispose) StorageMapInfo.prototype[Symbol.dispose] = StorageMapInfo.prototype.free;
|
|
21124
20785
|
|
|
21125
20786
|
/**
|
|
21126
|
-
* A
|
|
21127
|
-
*
|
|
20787
|
+
* A merged storage map entry containing the last processed block number, slot name, key, and
|
|
20788
|
+
* final value. The node no longer exposes the individual block number for each update.
|
|
21128
20789
|
*/
|
|
21129
20790
|
class StorageMapUpdate {
|
|
21130
20791
|
static __wrap(ptr) {
|
|
@@ -21145,7 +20806,7 @@ class StorageMapUpdate {
|
|
|
21145
20806
|
wasm.__wbg_storagemapupdate_free(ptr, 0);
|
|
21146
20807
|
}
|
|
21147
20808
|
/**
|
|
21148
|
-
* Returns the block number
|
|
20809
|
+
* Returns the last processed block number for the merged response.
|
|
21149
20810
|
* @returns {number}
|
|
21150
20811
|
*/
|
|
21151
20812
|
blockNum() {
|
|
@@ -21888,7 +21549,7 @@ class TransactionRecord {
|
|
|
21888
21549
|
* @returns {AccountId}
|
|
21889
21550
|
*/
|
|
21890
21551
|
accountId() {
|
|
21891
|
-
const ret = wasm.
|
|
21552
|
+
const ret = wasm.proventransaction_accountId(this.__wbg_ptr);
|
|
21892
21553
|
return AccountId.__wrap(ret);
|
|
21893
21554
|
}
|
|
21894
21555
|
/**
|
|
@@ -21936,7 +21597,7 @@ class TransactionRecord {
|
|
|
21936
21597
|
* @returns {Word}
|
|
21937
21598
|
*/
|
|
21938
21599
|
initAccountState() {
|
|
21939
|
-
const ret = wasm.
|
|
21600
|
+
const ret = wasm.transactionrecord_initAccountState(this.__wbg_ptr);
|
|
21940
21601
|
return Word.__wrap(ret);
|
|
21941
21602
|
}
|
|
21942
21603
|
/**
|
|
@@ -22001,14 +21662,6 @@ class TransactionRequest {
|
|
|
22001
21662
|
const ptr = this.__destroy_into_raw();
|
|
22002
21663
|
wasm.__wbg_transactionrequest_free(ptr, 0);
|
|
22003
21664
|
}
|
|
22004
|
-
/**
|
|
22005
|
-
* Returns a copy of the advice map carried by this request.
|
|
22006
|
-
* @returns {AdviceMap}
|
|
22007
|
-
*/
|
|
22008
|
-
adviceMap() {
|
|
22009
|
-
const ret = wasm.transactionrequest_adviceMap(this.__wbg_ptr);
|
|
22010
|
-
return AdviceMap.__wrap(ret);
|
|
22011
|
-
}
|
|
22012
21665
|
/**
|
|
22013
21666
|
* Returns the authentication argument if present.
|
|
22014
21667
|
* @returns {Word | undefined}
|
|
@@ -22055,20 +21708,6 @@ class TransactionRequest {
|
|
|
22055
21708
|
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
22056
21709
|
return v1;
|
|
22057
21710
|
}
|
|
22058
|
-
/**
|
|
22059
|
-
* Returns a copy of this request with `advice_map` merged into its advice map.
|
|
22060
|
-
*
|
|
22061
|
-
* Entries are merged with last-write-wins semantics: a key already present in the request is
|
|
22062
|
-
* overwritten by the value from `advice_map`. Use this to inject advice (e.g. a signature
|
|
22063
|
-
* produced by an external signer) after the request has already been built.
|
|
22064
|
-
* @param {AdviceMap} advice_map
|
|
22065
|
-
* @returns {TransactionRequest}
|
|
22066
|
-
*/
|
|
22067
|
-
extendAdviceMap(advice_map) {
|
|
22068
|
-
_assertClass(advice_map, AdviceMap);
|
|
22069
|
-
const ret = wasm.transactionrequest_extendAdviceMap(this.__wbg_ptr, advice_map.__wbg_ptr);
|
|
22070
|
-
return TransactionRequest.__wrap(ret);
|
|
22071
|
-
}
|
|
22072
21711
|
/**
|
|
22073
21712
|
* Returns the transaction script argument if present.
|
|
22074
21713
|
* @returns {Word | undefined}
|
|
@@ -22614,12 +22253,12 @@ class TransactionStoreUpdate {
|
|
|
22614
22253
|
wasm.__wbg_transactionstoreupdate_free(ptr, 0);
|
|
22615
22254
|
}
|
|
22616
22255
|
/**
|
|
22617
|
-
* Returns the account
|
|
22618
|
-
* @returns {
|
|
22256
|
+
* Returns the absolute account patch applied by the transaction.
|
|
22257
|
+
* @returns {AccountPatch}
|
|
22619
22258
|
*/
|
|
22620
|
-
|
|
22621
|
-
const ret = wasm.
|
|
22622
|
-
return
|
|
22259
|
+
accountPatch() {
|
|
22260
|
+
const ret = wasm.transactionstoreupdate_accountPatch(this.__wbg_ptr);
|
|
22261
|
+
return AccountPatch.__wrap(ret);
|
|
22623
22262
|
}
|
|
22624
22263
|
/**
|
|
22625
22264
|
* Returns the output notes created by the transaction.
|
|
@@ -22830,10 +22469,6 @@ class WebClient {
|
|
|
22830
22469
|
return ret;
|
|
22831
22470
|
}
|
|
22832
22471
|
/**
|
|
22833
|
-
* Persists a submitted transaction and returns its pre-apply
|
|
22834
|
-
* [`TransactionStoreUpdate`]. Routes through the high-level
|
|
22835
|
-
* `Client::apply_transaction` so registered observers (e.g. PSWAP
|
|
22836
|
-
* tracking) fire.
|
|
22837
22472
|
* @param {TransactionResult} transaction_result
|
|
22838
22473
|
* @param {number} submission_height
|
|
22839
22474
|
* @returns {Promise<TransactionStoreUpdate>}
|
|
@@ -22843,22 +22478,6 @@ class WebClient {
|
|
|
22843
22478
|
const ret = wasm.webclient_applyTransaction(this.__wbg_ptr, transaction_result.__wbg_ptr, submission_height);
|
|
22844
22479
|
return ret;
|
|
22845
22480
|
}
|
|
22846
|
-
/**
|
|
22847
|
-
* Builds a transaction reclaiming the unfilled offered asset on the current
|
|
22848
|
-
* tip of an Active lineage.
|
|
22849
|
-
*
|
|
22850
|
-
* `order_id` is the order's stable identifier as a decimal string. The
|
|
22851
|
-
* returned request flows into the same submit path as the other PSWAP
|
|
22852
|
-
* cancel transactions.
|
|
22853
|
-
* @param {string} order_id
|
|
22854
|
-
* @returns {Promise<TransactionRequest>}
|
|
22855
|
-
*/
|
|
22856
|
-
buildPswapCancelByOrder(order_id) {
|
|
22857
|
-
const ptr0 = passStringToWasm0(order_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
22858
|
-
const len0 = WASM_VECTOR_LEN;
|
|
22859
|
-
const ret = wasm.webclient_buildPswapCancelByOrder(this.__wbg_ptr, ptr0, len0);
|
|
22860
|
-
return ret;
|
|
22861
|
-
}
|
|
22862
22481
|
/**
|
|
22863
22482
|
* @param {NoteType} note_type
|
|
22864
22483
|
* @param {AccountId} offered_asset_faucet_id
|
|
@@ -22886,17 +22505,13 @@ class WebClient {
|
|
|
22886
22505
|
* * `store_name`: Optional name for the web store. If `None`, the store name defaults to
|
|
22887
22506
|
* `MidenClientDB_{network_id}`, where `network_id` is derived from the `node_url`.
|
|
22888
22507
|
* Explicitly setting this allows for creating multiple isolated clients.
|
|
22889
|
-
* * `debug_mode`: Optional flag to enable debug mode for transaction execution. When enabled,
|
|
22890
|
-
* the transaction executor records additional information useful for debugging. Defaults to
|
|
22891
|
-
* disabled.
|
|
22892
22508
|
* @param {string | null} [node_url]
|
|
22893
22509
|
* @param {string | null} [node_note_transport_url]
|
|
22894
22510
|
* @param {Uint8Array | null} [seed]
|
|
22895
22511
|
* @param {string | null} [store_name]
|
|
22896
|
-
* @param {boolean | null} [debug_mode]
|
|
22897
22512
|
* @returns {Promise<any>}
|
|
22898
22513
|
*/
|
|
22899
|
-
createClient(node_url, node_note_transport_url, seed, store_name
|
|
22514
|
+
createClient(node_url, node_note_transport_url, seed, store_name) {
|
|
22900
22515
|
var ptr0 = isLikeNone(node_url) ? 0 : passStringToWasm0(node_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
22901
22516
|
var len0 = WASM_VECTOR_LEN;
|
|
22902
22517
|
var ptr1 = isLikeNone(node_note_transport_url) ? 0 : passStringToWasm0(node_note_transport_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -22905,7 +22520,7 @@ class WebClient {
|
|
|
22905
22520
|
var len2 = WASM_VECTOR_LEN;
|
|
22906
22521
|
var ptr3 = isLikeNone(store_name) ? 0 : passStringToWasm0(store_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
22907
22522
|
var len3 = WASM_VECTOR_LEN;
|
|
22908
|
-
const ret = wasm.webclient_createClient(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3
|
|
22523
|
+
const ret = wasm.webclient_createClient(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
22909
22524
|
return ret;
|
|
22910
22525
|
}
|
|
22911
22526
|
/**
|
|
@@ -22921,8 +22536,6 @@ class WebClient {
|
|
|
22921
22536
|
* * `get_key_cb`: Callback to retrieve the secret key bytes for a given public key.
|
|
22922
22537
|
* * `insert_key_cb`: Callback to persist a secret key.
|
|
22923
22538
|
* * `sign_cb`: Callback to produce serialized signature bytes for the provided inputs.
|
|
22924
|
-
* * `debug_mode`: Optional flag to enable debug mode for transaction execution. Defaults to
|
|
22925
|
-
* disabled.
|
|
22926
22539
|
* @param {string | null} [node_url]
|
|
22927
22540
|
* @param {string | null} [node_note_transport_url]
|
|
22928
22541
|
* @param {Uint8Array | null} [seed]
|
|
@@ -22930,10 +22543,9 @@ class WebClient {
|
|
|
22930
22543
|
* @param {Function | null} [get_key_cb]
|
|
22931
22544
|
* @param {Function | null} [insert_key_cb]
|
|
22932
22545
|
* @param {Function | null} [sign_cb]
|
|
22933
|
-
* @param {boolean | null} [debug_mode]
|
|
22934
22546
|
* @returns {Promise<any>}
|
|
22935
22547
|
*/
|
|
22936
|
-
createClientWithExternalKeystore(node_url, node_note_transport_url, seed, store_name, get_key_cb, insert_key_cb, sign_cb
|
|
22548
|
+
createClientWithExternalKeystore(node_url, node_note_transport_url, seed, store_name, get_key_cb, insert_key_cb, sign_cb) {
|
|
22937
22549
|
var ptr0 = isLikeNone(node_url) ? 0 : passStringToWasm0(node_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
22938
22550
|
var len0 = WASM_VECTOR_LEN;
|
|
22939
22551
|
var ptr1 = isLikeNone(node_note_transport_url) ? 0 : passStringToWasm0(node_note_transport_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -22942,7 +22554,7 @@ class WebClient {
|
|
|
22942
22554
|
var len2 = WASM_VECTOR_LEN;
|
|
22943
22555
|
var ptr3 = isLikeNone(store_name) ? 0 : passStringToWasm0(store_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
22944
22556
|
var len3 = WASM_VECTOR_LEN;
|
|
22945
|
-
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)
|
|
22557
|
+
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));
|
|
22946
22558
|
return ret;
|
|
22947
22559
|
}
|
|
22948
22560
|
/**
|
|
@@ -22971,14 +22583,18 @@ class WebClient {
|
|
|
22971
22583
|
return ret;
|
|
22972
22584
|
}
|
|
22973
22585
|
/**
|
|
22974
|
-
* Executes a transaction and returns the `TransactionSummary
|
|
22586
|
+
* Executes a transaction and returns the `TransactionSummary` the account is being asked
|
|
22587
|
+
* to authorize.
|
|
22975
22588
|
*
|
|
22976
|
-
*
|
|
22977
|
-
*
|
|
22978
|
-
*
|
|
22979
|
-
*
|
|
22589
|
+
* The summary only exists while authorization is pending: when the auth procedure aborts
|
|
22590
|
+
* with the unauthorized event (e.g. a multisig below its signing threshold), the summary
|
|
22591
|
+
* built during execution is returned so it can be signed out-of-band. If the transaction
|
|
22592
|
+
* executes successfully it was already fully authorized, no summary is produced, and this
|
|
22593
|
+
* method returns an error with code `TRANSACTION_ALREADY_AUTHORIZED` — submit the
|
|
22594
|
+
* transaction with `execute` instead.
|
|
22980
22595
|
*
|
|
22981
22596
|
* # Errors
|
|
22597
|
+
* - If the transaction executes successfully (error code `TRANSACTION_ALREADY_AUTHORIZED`).
|
|
22982
22598
|
* - If there is an internal failure during execution.
|
|
22983
22599
|
* @param {AccountId} account_id
|
|
22984
22600
|
* @param {TransactionRequest} transaction_request
|
|
@@ -23202,37 +22818,6 @@ class WebClient {
|
|
|
23202
22818
|
const ret = wasm.webclient_getOutputNotes(this.__wbg_ptr, ptr0);
|
|
23203
22819
|
return ret;
|
|
23204
22820
|
}
|
|
23205
|
-
/**
|
|
23206
|
-
* Returns the lineage for one order, or `null` if not tracked.
|
|
23207
|
-
*
|
|
23208
|
-
* `order_id` is the order's stable identifier as a decimal string.
|
|
23209
|
-
* @param {string} order_id
|
|
23210
|
-
* @returns {Promise<PswapLineageRecord | undefined>}
|
|
23211
|
-
*/
|
|
23212
|
-
getPswapLineage(order_id) {
|
|
23213
|
-
const ptr0 = passStringToWasm0(order_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
23214
|
-
const len0 = WASM_VECTOR_LEN;
|
|
23215
|
-
const ret = wasm.webclient_getPswapLineage(this.__wbg_ptr, ptr0, len0);
|
|
23216
|
-
return ret;
|
|
23217
|
-
}
|
|
23218
|
-
/**
|
|
23219
|
-
* Returns every PSWAP lineage tracked by this client.
|
|
23220
|
-
* @returns {Promise<PswapLineageRecord[]>}
|
|
23221
|
-
*/
|
|
23222
|
-
getPswapLineages() {
|
|
23223
|
-
const ret = wasm.webclient_getPswapLineages(this.__wbg_ptr);
|
|
23224
|
-
return ret;
|
|
23225
|
-
}
|
|
23226
|
-
/**
|
|
23227
|
-
* Returns lineages created by a specific local account.
|
|
23228
|
-
* @param {AccountId} creator
|
|
23229
|
-
* @returns {Promise<PswapLineageRecord[]>}
|
|
23230
|
-
*/
|
|
23231
|
-
getPswapLineagesFor(creator) {
|
|
23232
|
-
_assertClass(creator, AccountId);
|
|
23233
|
-
const ret = wasm.webclient_getPswapLineagesFor(this.__wbg_ptr, creator.__wbg_ptr);
|
|
23234
|
-
return ret;
|
|
23235
|
-
}
|
|
23236
22821
|
/**
|
|
23237
22822
|
* Returns all public key commitments associated with the given account ID.
|
|
23238
22823
|
*
|
|
@@ -23296,10 +22881,10 @@ class WebClient {
|
|
|
23296
22881
|
/**
|
|
23297
22882
|
* Imports a note file and returns the imported note's identifier.
|
|
23298
22883
|
*
|
|
23299
|
-
* A note file that carries metadata — an explicit `NoteId` or a
|
|
23300
|
-
* with proof — resolves to a concrete `NoteId`, which is returned so
|
|
23301
|
-
* caller can look the note up with [`get_input_note`].
|
|
23302
|
-
*
|
|
22884
|
+
* A note file that carries metadata — an explicit `NoteId` or a committed
|
|
22885
|
+
* note with proof — resolves to a concrete `NoteId`, which is returned so
|
|
22886
|
+
* the caller can look the note up with [`get_input_note`]. An expected-note
|
|
22887
|
+
* file has no metadata and therefore no `NoteId` yet, so its
|
|
23303
22888
|
* metadata-independent details commitment is returned instead.
|
|
23304
22889
|
*
|
|
23305
22890
|
* Migration note (miden-client PR #2214): `Client::import_notes` now
|
|
@@ -23425,30 +23010,6 @@ class WebClient {
|
|
|
23425
23010
|
const ret = wasm.webclient_newAccountWithSecretKey(this.__wbg_ptr, account.__wbg_ptr, secret_key.__wbg_ptr);
|
|
23426
23011
|
return ret;
|
|
23427
23012
|
}
|
|
23428
|
-
/**
|
|
23429
|
-
* Builds a transaction request that bridges a fungible asset out to another network via the
|
|
23430
|
-
* `AggLayer`.
|
|
23431
|
-
*
|
|
23432
|
-
* The request emits a single public B2AGG (Bridge-to-AggLayer) note holding `amount` units of
|
|
23433
|
-
* the `faucet_id` asset. The note is consumed by `bridge_account_id`, which burns the asset so
|
|
23434
|
-
* it can be claimed at `destination_address` (an Ethereum address) on the AggLayer-assigned
|
|
23435
|
-
* `destination_network`.
|
|
23436
|
-
* @param {AccountId} sender_account_id
|
|
23437
|
-
* @param {AccountId} bridge_account_id
|
|
23438
|
-
* @param {AccountId} faucet_id
|
|
23439
|
-
* @param {bigint} amount
|
|
23440
|
-
* @param {number} destination_network
|
|
23441
|
-
* @param {EthAddress} destination_address
|
|
23442
|
-
* @returns {Promise<TransactionRequest>}
|
|
23443
|
-
*/
|
|
23444
|
-
newB2AggTransactionRequest(sender_account_id, bridge_account_id, faucet_id, amount, destination_network, destination_address) {
|
|
23445
|
-
_assertClass(sender_account_id, AccountId);
|
|
23446
|
-
_assertClass(bridge_account_id, AccountId);
|
|
23447
|
-
_assertClass(faucet_id, AccountId);
|
|
23448
|
-
_assertClass(destination_address, EthAddress);
|
|
23449
|
-
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);
|
|
23450
|
-
return ret;
|
|
23451
|
-
}
|
|
23452
23013
|
/**
|
|
23453
23014
|
* @param {Note[]} list_of_notes
|
|
23454
23015
|
* @returns {TransactionRequest}
|
|
@@ -23742,25 +23303,6 @@ class WebClient {
|
|
|
23742
23303
|
const ret = wasm.webclient_submitNewTransaction(this.__wbg_ptr, account_id.__wbg_ptr, transaction_request.__wbg_ptr);
|
|
23743
23304
|
return ret;
|
|
23744
23305
|
}
|
|
23745
|
-
/**
|
|
23746
|
-
* Executes a batch of transactions against the specified account, proves them individually
|
|
23747
|
-
* and as a batch, submits the batch to the network, and atomically applies the per-tx
|
|
23748
|
-
* updates to the local store. Returns the block number the batch was accepted into.
|
|
23749
|
-
*
|
|
23750
|
-
* All transactions must target the same local account — the `account_id` argument.
|
|
23751
|
-
* Each element of `transaction_requests` is the serialized-bytes form of a
|
|
23752
|
-
* `TransactionRequest` (obtained via `tx_request.serialize()`)
|
|
23753
|
-
* @param {AccountId} account_id
|
|
23754
|
-
* @param {Uint8Array[]} transaction_requests
|
|
23755
|
-
* @returns {Promise<number>}
|
|
23756
|
-
*/
|
|
23757
|
-
submitNewTransactionBatch(account_id, transaction_requests) {
|
|
23758
|
-
_assertClass(account_id, AccountId);
|
|
23759
|
-
const ptr0 = passArrayJsValueToWasm0(transaction_requests, wasm.__wbindgen_malloc);
|
|
23760
|
-
const len0 = WASM_VECTOR_LEN;
|
|
23761
|
-
const ret = wasm.webclient_submitNewTransactionBatch(this.__wbg_ptr, account_id.__wbg_ptr, ptr0, len0);
|
|
23762
|
-
return ret;
|
|
23763
|
-
}
|
|
23764
23306
|
/**
|
|
23765
23307
|
* Executes a transaction specified by the request against the specified account, proves it
|
|
23766
23308
|
* with the user provided prover, submits it to the network, and updates the local database.
|
|
@@ -24258,7 +23800,7 @@ function __wbg_get_imports() {
|
|
|
24258
23800
|
const ret = AccountStorage.__wrap(arg0);
|
|
24259
23801
|
return ret;
|
|
24260
23802
|
},
|
|
24261
|
-
|
|
23803
|
+
__wbg_addNoteTag_1500aff2fa0d151c: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
|
|
24262
23804
|
var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
|
|
24263
23805
|
wasm.__wbindgen_free(arg2, arg3 * 1, 1);
|
|
24264
23806
|
let v1;
|
|
@@ -24286,25 +23828,7 @@ function __wbg_get_imports() {
|
|
|
24286
23828
|
__wbg_append_a992ccc37aa62dc4: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
24287
23829
|
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
24288
23830
|
}, arguments); },
|
|
24289
|
-
|
|
24290
|
-
const ret = applyFullAccountState(getStringFromWasm0(arg0, arg1), JsAccountUpdate.__wrap(arg2));
|
|
24291
|
-
return ret;
|
|
24292
|
-
},
|
|
24293
|
-
__wbg_applySettingsMutations_e98dbb5827d3ec93: function(arg0, arg1, arg2, arg3) {
|
|
24294
|
-
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
24295
|
-
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
24296
|
-
const ret = applySettingsMutations(getStringFromWasm0(arg0, arg1), v0);
|
|
24297
|
-
return ret;
|
|
24298
|
-
},
|
|
24299
|
-
__wbg_applyStateSync_c365f1affe42d064: function(arg0, arg1, arg2) {
|
|
24300
|
-
const ret = applyStateSync(getStringFromWasm0(arg0, arg1), JsStateSyncUpdate.__wrap(arg2));
|
|
24301
|
-
return ret;
|
|
24302
|
-
},
|
|
24303
|
-
__wbg_applyTransactionBatch_0b07b42c93c25447: function(arg0, arg1, arg2) {
|
|
24304
|
-
const ret = applyTransactionBatch(getStringFromWasm0(arg0, arg1), arg2);
|
|
24305
|
-
return ret;
|
|
24306
|
-
},
|
|
24307
|
-
__wbg_applyTransactionDelta_93fac37bf6e15192: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20) {
|
|
23831
|
+
__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) {
|
|
24308
23832
|
let deferred0_0;
|
|
24309
23833
|
let deferred0_1;
|
|
24310
23834
|
let deferred1_0;
|
|
@@ -24336,7 +23860,7 @@ function __wbg_get_imports() {
|
|
|
24336
23860
|
deferred7_1 = arg17;
|
|
24337
23861
|
deferred8_0 = arg19;
|
|
24338
23862
|
deferred8_1 = arg20;
|
|
24339
|
-
const ret =
|
|
23863
|
+
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));
|
|
24340
23864
|
return ret;
|
|
24341
23865
|
} finally {
|
|
24342
23866
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
@@ -24347,6 +23871,20 @@ function __wbg_get_imports() {
|
|
|
24347
23871
|
wasm.__wbindgen_free(deferred8_0, deferred8_1, 1);
|
|
24348
23872
|
}
|
|
24349
23873
|
},
|
|
23874
|
+
__wbg_applyFullAccountState_f9562e4091c2eaf6: function(arg0, arg1, arg2) {
|
|
23875
|
+
const ret = applyFullAccountState(getStringFromWasm0(arg0, arg1), JsAccountUpdate.__wrap(arg2));
|
|
23876
|
+
return ret;
|
|
23877
|
+
},
|
|
23878
|
+
__wbg_applySettingsMutations_722d272d653902a1: function(arg0, arg1, arg2, arg3) {
|
|
23879
|
+
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
23880
|
+
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
23881
|
+
const ret = applySettingsMutations(getStringFromWasm0(arg0, arg1), v0);
|
|
23882
|
+
return ret;
|
|
23883
|
+
},
|
|
23884
|
+
__wbg_applyStateSync_4c25ec00de2f60bb: function(arg0, arg1, arg2) {
|
|
23885
|
+
const ret = applyStateSync(getStringFromWasm0(arg0, arg1), JsStateSyncUpdate.__wrap(arg2));
|
|
23886
|
+
return ret;
|
|
23887
|
+
},
|
|
24350
23888
|
__wbg_assetvault_new: function(arg0) {
|
|
24351
23889
|
const ret = AssetVault.__wrap(arg0);
|
|
24352
23890
|
return ret;
|
|
@@ -24443,7 +23981,7 @@ function __wbg_get_imports() {
|
|
|
24443
23981
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24444
23982
|
}
|
|
24445
23983
|
},
|
|
24446
|
-
|
|
23984
|
+
__wbg_exportStore_3b84792dca9a9ef1: function(arg0, arg1) {
|
|
24447
23985
|
const ret = exportStore(getStringFromWasm0(arg0, arg1));
|
|
24448
23986
|
return ret;
|
|
24449
23987
|
},
|
|
@@ -24475,7 +24013,7 @@ function __wbg_get_imports() {
|
|
|
24475
24013
|
const ret = FetchedNote.__wrap(arg0);
|
|
24476
24014
|
return ret;
|
|
24477
24015
|
},
|
|
24478
|
-
|
|
24016
|
+
__wbg_forceImportStore_6a4fb8bc450bbf4a: function(arg0, arg1, arg2) {
|
|
24479
24017
|
const ret = forceImportStore(getStringFromWasm0(arg0, arg1), arg2);
|
|
24480
24018
|
return ret;
|
|
24481
24019
|
},
|
|
@@ -24483,10 +24021,6 @@ function __wbg_get_imports() {
|
|
|
24483
24021
|
const ret = ForeignAccount.__unwrap(arg0);
|
|
24484
24022
|
return ret;
|
|
24485
24023
|
},
|
|
24486
|
-
__wbg_from_bddd64e7d5ff6941: function(arg0) {
|
|
24487
|
-
const ret = Array.from(arg0);
|
|
24488
|
-
return ret;
|
|
24489
|
-
},
|
|
24490
24024
|
__wbg_fungibleasset_new: function(arg0) {
|
|
24491
24025
|
const ret = FungibleAsset.__wrap(arg0);
|
|
24492
24026
|
return ret;
|
|
@@ -24499,7 +24033,7 @@ function __wbg_get_imports() {
|
|
|
24499
24033
|
const ret = FungibleAssetDeltaItem.__wrap(arg0);
|
|
24500
24034
|
return ret;
|
|
24501
24035
|
},
|
|
24502
|
-
|
|
24036
|
+
__wbg_getAccountAddresses_68ba5f3f8a9c7e15: function(arg0, arg1, arg2, arg3) {
|
|
24503
24037
|
let deferred0_0;
|
|
24504
24038
|
let deferred0_1;
|
|
24505
24039
|
try {
|
|
@@ -24511,7 +24045,7 @@ function __wbg_get_imports() {
|
|
|
24511
24045
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24512
24046
|
}
|
|
24513
24047
|
},
|
|
24514
|
-
|
|
24048
|
+
__wbg_getAccountAuthByPubKeyCommitment_568661071566f307: function(arg0, arg1, arg2, arg3) {
|
|
24515
24049
|
let deferred0_0;
|
|
24516
24050
|
let deferred0_1;
|
|
24517
24051
|
try {
|
|
@@ -24523,7 +24057,7 @@ function __wbg_get_imports() {
|
|
|
24523
24057
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24524
24058
|
}
|
|
24525
24059
|
},
|
|
24526
|
-
|
|
24060
|
+
__wbg_getAccountCode_14e446cd1a3f814f: function(arg0, arg1, arg2, arg3) {
|
|
24527
24061
|
let deferred0_0;
|
|
24528
24062
|
let deferred0_1;
|
|
24529
24063
|
try {
|
|
@@ -24535,7 +24069,7 @@ function __wbg_get_imports() {
|
|
|
24535
24069
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24536
24070
|
}
|
|
24537
24071
|
},
|
|
24538
|
-
|
|
24072
|
+
__wbg_getAccountHeaderByCommitment_0e10e9ac733f359b: function(arg0, arg1, arg2, arg3) {
|
|
24539
24073
|
let deferred0_0;
|
|
24540
24074
|
let deferred0_1;
|
|
24541
24075
|
try {
|
|
@@ -24547,7 +24081,7 @@ function __wbg_get_imports() {
|
|
|
24547
24081
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24548
24082
|
}
|
|
24549
24083
|
},
|
|
24550
|
-
|
|
24084
|
+
__wbg_getAccountHeader_ef6ad25115d9bd02: function(arg0, arg1, arg2, arg3) {
|
|
24551
24085
|
let deferred0_0;
|
|
24552
24086
|
let deferred0_1;
|
|
24553
24087
|
try {
|
|
@@ -24559,7 +24093,7 @@ function __wbg_get_imports() {
|
|
|
24559
24093
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24560
24094
|
}
|
|
24561
24095
|
},
|
|
24562
|
-
|
|
24096
|
+
__wbg_getAccountIdByKeyCommitment_c0c17f1af8b92023: function(arg0, arg1, arg2, arg3) {
|
|
24563
24097
|
let deferred0_0;
|
|
24564
24098
|
let deferred0_1;
|
|
24565
24099
|
try {
|
|
@@ -24571,11 +24105,11 @@ function __wbg_get_imports() {
|
|
|
24571
24105
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24572
24106
|
}
|
|
24573
24107
|
},
|
|
24574
|
-
|
|
24108
|
+
__wbg_getAccountIds_07de8c6f4a5ee883: function(arg0, arg1) {
|
|
24575
24109
|
const ret = getAccountIds(getStringFromWasm0(arg0, arg1));
|
|
24576
24110
|
return ret;
|
|
24577
24111
|
},
|
|
24578
|
-
|
|
24112
|
+
__wbg_getAccountStorageMaps_b16de6210ce82188: function(arg0, arg1, arg2, arg3) {
|
|
24579
24113
|
let deferred0_0;
|
|
24580
24114
|
let deferred0_1;
|
|
24581
24115
|
try {
|
|
@@ -24587,7 +24121,7 @@ function __wbg_get_imports() {
|
|
|
24587
24121
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24588
24122
|
}
|
|
24589
24123
|
},
|
|
24590
|
-
|
|
24124
|
+
__wbg_getAccountStorage_c876ec60dbfa6cee: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
24591
24125
|
let deferred0_0;
|
|
24592
24126
|
let deferred0_1;
|
|
24593
24127
|
try {
|
|
@@ -24601,7 +24135,7 @@ function __wbg_get_imports() {
|
|
|
24601
24135
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24602
24136
|
}
|
|
24603
24137
|
},
|
|
24604
|
-
|
|
24138
|
+
__wbg_getAccountVaultAssets_479ef945dd51412a: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
24605
24139
|
let deferred0_0;
|
|
24606
24140
|
let deferred0_1;
|
|
24607
24141
|
try {
|
|
@@ -24615,27 +24149,27 @@ function __wbg_get_imports() {
|
|
|
24615
24149
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24616
24150
|
}
|
|
24617
24151
|
},
|
|
24618
|
-
|
|
24152
|
+
__wbg_getAllAccountHeaders_f78e678ad24296de: function(arg0, arg1) {
|
|
24619
24153
|
const ret = getAllAccountHeaders(getStringFromWasm0(arg0, arg1));
|
|
24620
24154
|
return ret;
|
|
24621
24155
|
},
|
|
24622
|
-
|
|
24156
|
+
__wbg_getBlockHeaders_a55990d3957c0d9d: function(arg0, arg1, arg2, arg3) {
|
|
24623
24157
|
var v0 = getArrayU32FromWasm0(arg2, arg3).slice();
|
|
24624
24158
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
24625
24159
|
const ret = getBlockHeaders(getStringFromWasm0(arg0, arg1), v0);
|
|
24626
24160
|
return ret;
|
|
24627
24161
|
},
|
|
24628
|
-
|
|
24162
|
+
__wbg_getCurrentBlockchainPeaks_b276a676a0f16d93: function(arg0, arg1) {
|
|
24629
24163
|
const ret = getCurrentBlockchainPeaks(getStringFromWasm0(arg0, arg1));
|
|
24630
24164
|
return ret;
|
|
24631
24165
|
},
|
|
24632
|
-
|
|
24166
|
+
__wbg_getForeignAccountCode_9f88c11936e9c43d: function(arg0, arg1, arg2, arg3) {
|
|
24633
24167
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
24634
24168
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
24635
24169
|
const ret = getForeignAccountCode(getStringFromWasm0(arg0, arg1), v0);
|
|
24636
24170
|
return ret;
|
|
24637
24171
|
},
|
|
24638
|
-
|
|
24172
|
+
__wbg_getInputNoteByOffset_d8ec28ef8b63a88f: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
|
|
24639
24173
|
let deferred1_0;
|
|
24640
24174
|
let deferred1_1;
|
|
24641
24175
|
try {
|
|
@@ -24649,31 +24183,31 @@ function __wbg_get_imports() {
|
|
|
24649
24183
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
24650
24184
|
}
|
|
24651
24185
|
},
|
|
24652
|
-
|
|
24186
|
+
__wbg_getInputNotesFromDetailsCommitments_9590f42d9e96e86c: function(arg0, arg1, arg2, arg3) {
|
|
24653
24187
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
24654
24188
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
24655
24189
|
const ret = getInputNotesFromDetailsCommitments(getStringFromWasm0(arg0, arg1), v0);
|
|
24656
24190
|
return ret;
|
|
24657
24191
|
},
|
|
24658
|
-
|
|
24192
|
+
__wbg_getInputNotesFromIds_d290a8e093978eae: function(arg0, arg1, arg2, arg3) {
|
|
24659
24193
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
24660
24194
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
24661
24195
|
const ret = getInputNotesFromIds(getStringFromWasm0(arg0, arg1), v0);
|
|
24662
24196
|
return ret;
|
|
24663
24197
|
},
|
|
24664
|
-
|
|
24198
|
+
__wbg_getInputNotesFromNullifiers_2b5fa39ec52ecab6: function(arg0, arg1, arg2, arg3) {
|
|
24665
24199
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
24666
24200
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
24667
24201
|
const ret = getInputNotesFromNullifiers(getStringFromWasm0(arg0, arg1), v0);
|
|
24668
24202
|
return ret;
|
|
24669
24203
|
},
|
|
24670
|
-
|
|
24204
|
+
__wbg_getInputNotes_1c76764676f21be5: function(arg0, arg1, arg2, arg3) {
|
|
24671
24205
|
var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
|
|
24672
24206
|
wasm.__wbindgen_free(arg2, arg3 * 1, 1);
|
|
24673
24207
|
const ret = getInputNotes(getStringFromWasm0(arg0, arg1), v0);
|
|
24674
24208
|
return ret;
|
|
24675
24209
|
},
|
|
24676
|
-
|
|
24210
|
+
__wbg_getKeyCommitmentsByAccountId_7962a39c985c54e5: function(arg0, arg1, arg2, arg3) {
|
|
24677
24211
|
let deferred0_0;
|
|
24678
24212
|
let deferred0_1;
|
|
24679
24213
|
try {
|
|
@@ -24685,7 +24219,7 @@ function __wbg_get_imports() {
|
|
|
24685
24219
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24686
24220
|
}
|
|
24687
24221
|
},
|
|
24688
|
-
|
|
24222
|
+
__wbg_getNoteScript_b2cf59d7cf9d19e7: function(arg0, arg1, arg2, arg3) {
|
|
24689
24223
|
let deferred0_0;
|
|
24690
24224
|
let deferred0_1;
|
|
24691
24225
|
try {
|
|
@@ -24697,39 +24231,39 @@ function __wbg_get_imports() {
|
|
|
24697
24231
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24698
24232
|
}
|
|
24699
24233
|
},
|
|
24700
|
-
|
|
24234
|
+
__wbg_getNoteTags_a45689c54d964e46: function(arg0, arg1) {
|
|
24701
24235
|
const ret = getNoteTags(getStringFromWasm0(arg0, arg1));
|
|
24702
24236
|
return ret;
|
|
24703
24237
|
},
|
|
24704
|
-
|
|
24238
|
+
__wbg_getOutputNotesFromDetailsCommitments_b15793905bc47309: function(arg0, arg1, arg2, arg3) {
|
|
24705
24239
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
24706
24240
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
24707
24241
|
const ret = getOutputNotesFromDetailsCommitments(getStringFromWasm0(arg0, arg1), v0);
|
|
24708
24242
|
return ret;
|
|
24709
24243
|
},
|
|
24710
|
-
|
|
24244
|
+
__wbg_getOutputNotesFromIds_d340ff4a6d4c5c8e: function(arg0, arg1, arg2, arg3) {
|
|
24711
24245
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
24712
24246
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
24713
24247
|
const ret = getOutputNotesFromIds(getStringFromWasm0(arg0, arg1), v0);
|
|
24714
24248
|
return ret;
|
|
24715
24249
|
},
|
|
24716
|
-
|
|
24250
|
+
__wbg_getOutputNotesFromNullifiers_48b112e53ca4eea7: function(arg0, arg1, arg2, arg3) {
|
|
24717
24251
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
24718
24252
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
24719
24253
|
const ret = getOutputNotesFromNullifiers(getStringFromWasm0(arg0, arg1), v0);
|
|
24720
24254
|
return ret;
|
|
24721
24255
|
},
|
|
24722
|
-
|
|
24256
|
+
__wbg_getOutputNotes_2679465821c837b7: function(arg0, arg1, arg2, arg3) {
|
|
24723
24257
|
var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
|
|
24724
24258
|
wasm.__wbindgen_free(arg2, arg3 * 1, 1);
|
|
24725
24259
|
const ret = getOutputNotes(getStringFromWasm0(arg0, arg1), v0);
|
|
24726
24260
|
return ret;
|
|
24727
24261
|
},
|
|
24728
|
-
|
|
24262
|
+
__wbg_getPartialBlockchainNodesAll_9496498a665775d9: function(arg0, arg1) {
|
|
24729
24263
|
const ret = getPartialBlockchainNodesAll(getStringFromWasm0(arg0, arg1));
|
|
24730
24264
|
return ret;
|
|
24731
24265
|
},
|
|
24732
|
-
|
|
24266
|
+
__wbg_getPartialBlockchainNodesUpToInOrderIndex_2196a0e786754bd1: function(arg0, arg1, arg2, arg3) {
|
|
24733
24267
|
let deferred0_0;
|
|
24734
24268
|
let deferred0_1;
|
|
24735
24269
|
try {
|
|
@@ -24741,20 +24275,20 @@ function __wbg_get_imports() {
|
|
|
24741
24275
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24742
24276
|
}
|
|
24743
24277
|
},
|
|
24744
|
-
|
|
24278
|
+
__wbg_getPartialBlockchainNodes_0a6c2a323b1f4caa: function(arg0, arg1, arg2, arg3) {
|
|
24745
24279
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
24746
24280
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
24747
24281
|
const ret = getPartialBlockchainNodes(getStringFromWasm0(arg0, arg1), v0);
|
|
24748
24282
|
return ret;
|
|
24749
24283
|
},
|
|
24750
|
-
|
|
24284
|
+
__wbg_getRandomValues_e9de607763a970bd: function() { return handleError(function (arg0, arg1) {
|
|
24751
24285
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
24752
24286
|
}, arguments); },
|
|
24753
24287
|
__wbg_getReader_f47519d698a4505e: function() { return handleError(function (arg0) {
|
|
24754
24288
|
const ret = arg0.getReader();
|
|
24755
24289
|
return ret;
|
|
24756
24290
|
}, arguments); },
|
|
24757
|
-
|
|
24291
|
+
__wbg_getSetting_319d65b5a2e111a2: function(arg0, arg1, arg2, arg3) {
|
|
24758
24292
|
let deferred0_0;
|
|
24759
24293
|
let deferred0_1;
|
|
24760
24294
|
try {
|
|
@@ -24766,7 +24300,7 @@ function __wbg_get_imports() {
|
|
|
24766
24300
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24767
24301
|
}
|
|
24768
24302
|
},
|
|
24769
|
-
|
|
24303
|
+
__wbg_getSyncHeight_94e6d0d761426ec9: function(arg0, arg1) {
|
|
24770
24304
|
const ret = getSyncHeight(getStringFromWasm0(arg0, arg1));
|
|
24771
24305
|
return ret;
|
|
24772
24306
|
},
|
|
@@ -24774,15 +24308,15 @@ function __wbg_get_imports() {
|
|
|
24774
24308
|
const ret = arg0.getTime();
|
|
24775
24309
|
return ret;
|
|
24776
24310
|
},
|
|
24777
|
-
|
|
24311
|
+
__wbg_getTrackedBlockHeaderNumbers_5a8edd94c7b7613c: function(arg0, arg1) {
|
|
24778
24312
|
const ret = getTrackedBlockHeaderNumbers(getStringFromWasm0(arg0, arg1));
|
|
24779
24313
|
return ret;
|
|
24780
24314
|
},
|
|
24781
|
-
|
|
24315
|
+
__wbg_getTrackedBlockHeaders_3292740bff6c9b4c: function(arg0, arg1) {
|
|
24782
24316
|
const ret = getTrackedBlockHeaders(getStringFromWasm0(arg0, arg1));
|
|
24783
24317
|
return ret;
|
|
24784
24318
|
},
|
|
24785
|
-
|
|
24319
|
+
__wbg_getTransactions_0c5674a652c44917: function(arg0, arg1, arg2, arg3) {
|
|
24786
24320
|
let deferred0_0;
|
|
24787
24321
|
let deferred0_1;
|
|
24788
24322
|
try {
|
|
@@ -24794,7 +24328,7 @@ function __wbg_get_imports() {
|
|
|
24794
24328
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24795
24329
|
}
|
|
24796
24330
|
},
|
|
24797
|
-
|
|
24331
|
+
__wbg_getUnspentInputNoteNullifiers_6c9d5852b42b8c73: function(arg0, arg1) {
|
|
24798
24332
|
const ret = getUnspentInputNoteNullifiers(getStringFromWasm0(arg0, arg1));
|
|
24799
24333
|
return ret;
|
|
24800
24334
|
},
|
|
@@ -24838,7 +24372,7 @@ function __wbg_get_imports() {
|
|
|
24838
24372
|
const ret = InputNoteRecord.__wrap(arg0);
|
|
24839
24373
|
return ret;
|
|
24840
24374
|
},
|
|
24841
|
-
|
|
24375
|
+
__wbg_insertAccountAddress_36db2bb32e10fd9b: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
24842
24376
|
let deferred0_0;
|
|
24843
24377
|
let deferred0_1;
|
|
24844
24378
|
try {
|
|
@@ -24852,7 +24386,7 @@ function __wbg_get_imports() {
|
|
|
24852
24386
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24853
24387
|
}
|
|
24854
24388
|
},
|
|
24855
|
-
|
|
24389
|
+
__wbg_insertAccountAuth_2763614f9c61eb99: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
24856
24390
|
let deferred0_0;
|
|
24857
24391
|
let deferred0_1;
|
|
24858
24392
|
let deferred1_0;
|
|
@@ -24869,7 +24403,7 @@ function __wbg_get_imports() {
|
|
|
24869
24403
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
24870
24404
|
}
|
|
24871
24405
|
},
|
|
24872
|
-
|
|
24406
|
+
__wbg_insertAccountKeyMapping_5440caed0fe18250: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
24873
24407
|
let deferred0_0;
|
|
24874
24408
|
let deferred0_1;
|
|
24875
24409
|
let deferred1_0;
|
|
@@ -24886,21 +24420,17 @@ function __wbg_get_imports() {
|
|
|
24886
24420
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
24887
24421
|
}
|
|
24888
24422
|
},
|
|
24889
|
-
|
|
24423
|
+
__wbg_insertBlockHeader_ca254bedd530d7a3: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
|
|
24890
24424
|
var v0 = getArrayU8FromWasm0(arg3, arg4).slice();
|
|
24891
24425
|
wasm.__wbindgen_free(arg3, arg4 * 1, 1);
|
|
24892
|
-
|
|
24893
|
-
|
|
24894
|
-
|
|
24895
|
-
|
|
24896
|
-
|
|
24897
|
-
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
24898
|
-
var v1 = getArrayJsValueFromWasm0(arg4, arg5).slice();
|
|
24899
|
-
wasm.__wbindgen_free(arg4, arg5 * 4, 4);
|
|
24900
|
-
const ret = insertPartialBlockchainNodes(getStringFromWasm0(arg0, arg1), v0, v1);
|
|
24426
|
+
var v1 = getArrayJsValueFromWasm0(arg6, arg7).slice();
|
|
24427
|
+
wasm.__wbindgen_free(arg6, arg7 * 4, 4);
|
|
24428
|
+
var v2 = getArrayJsValueFromWasm0(arg8, arg9).slice();
|
|
24429
|
+
wasm.__wbindgen_free(arg8, arg9 * 4, 4);
|
|
24430
|
+
const ret = insertBlockHeader(getStringFromWasm0(arg0, arg1), arg2 >>> 0, v0, arg5 !== 0, v1, v2);
|
|
24901
24431
|
return ret;
|
|
24902
24432
|
},
|
|
24903
|
-
|
|
24433
|
+
__wbg_insertSetting_2b672c0bf3a3668d: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
24904
24434
|
let deferred0_0;
|
|
24905
24435
|
let deferred0_1;
|
|
24906
24436
|
try {
|
|
@@ -24914,7 +24444,7 @@ function __wbg_get_imports() {
|
|
|
24914
24444
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24915
24445
|
}
|
|
24916
24446
|
},
|
|
24917
|
-
|
|
24447
|
+
__wbg_insertTransactionScript_f052607e004c23aa: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
24918
24448
|
var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
|
|
24919
24449
|
wasm.__wbindgen_free(arg2, arg3 * 1, 1);
|
|
24920
24450
|
let v1;
|
|
@@ -25011,11 +24541,11 @@ function __wbg_get_imports() {
|
|
|
25011
24541
|
const ret = arg0.length;
|
|
25012
24542
|
return ret;
|
|
25013
24543
|
},
|
|
25014
|
-
|
|
24544
|
+
__wbg_listSettingKeys_73b3c34ff51ee657: function(arg0, arg1) {
|
|
25015
24545
|
const ret = listSettingKeys(getStringFromWasm0(arg0, arg1));
|
|
25016
24546
|
return ret;
|
|
25017
24547
|
},
|
|
25018
|
-
|
|
24548
|
+
__wbg_lockAccount_a59ff3c777c9188c: function(arg0, arg1, arg2, arg3) {
|
|
25019
24549
|
let deferred0_0;
|
|
25020
24550
|
let deferred0_1;
|
|
25021
24551
|
try {
|
|
@@ -25162,10 +24692,6 @@ function __wbg_get_imports() {
|
|
|
25162
24692
|
const ret = NoteAttachment.__wrap(arg0);
|
|
25163
24693
|
return ret;
|
|
25164
24694
|
},
|
|
25165
|
-
__wbg_noteattachment_unwrap: function(arg0) {
|
|
25166
|
-
const ret = NoteAttachment.__unwrap(arg0);
|
|
25167
|
-
return ret;
|
|
25168
|
-
},
|
|
25169
24695
|
__wbg_noteconsumability_new: function(arg0) {
|
|
25170
24696
|
const ret = NoteConsumability.__wrap(arg0);
|
|
25171
24697
|
return ret;
|
|
@@ -25218,7 +24744,7 @@ function __wbg_get_imports() {
|
|
|
25218
24744
|
const ret = NoteTag.__unwrap(arg0);
|
|
25219
24745
|
return ret;
|
|
25220
24746
|
},
|
|
25221
|
-
|
|
24747
|
+
__wbg_openDatabase_8ac110fce86d145e: function(arg0, arg1, arg2, arg3) {
|
|
25222
24748
|
const ret = openDatabase(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
|
|
25223
24749
|
return ret;
|
|
25224
24750
|
},
|
|
@@ -25249,7 +24775,7 @@ function __wbg_get_imports() {
|
|
|
25249
24775
|
const ret = ProvenTransaction.__wrap(arg0);
|
|
25250
24776
|
return ret;
|
|
25251
24777
|
},
|
|
25252
|
-
|
|
24778
|
+
__wbg_pruneAccountHistory_c2e9f7b1d4846bc6: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
25253
24779
|
let deferred0_0;
|
|
25254
24780
|
let deferred0_1;
|
|
25255
24781
|
let deferred1_0;
|
|
@@ -25266,7 +24792,7 @@ function __wbg_get_imports() {
|
|
|
25266
24792
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
25267
24793
|
}
|
|
25268
24794
|
},
|
|
25269
|
-
|
|
24795
|
+
__wbg_pruneIrrelevantBlocks_33e6cf62a24f1f38: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
25270
24796
|
var v0 = getArrayU32FromWasm0(arg2, arg3).slice();
|
|
25271
24797
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
25272
24798
|
var v1 = getArrayJsValueFromWasm0(arg4, arg5).slice();
|
|
@@ -25274,14 +24800,6 @@ function __wbg_get_imports() {
|
|
|
25274
24800
|
const ret = pruneIrrelevantBlocks(getStringFromWasm0(arg0, arg1), v0, v1);
|
|
25275
24801
|
return ret;
|
|
25276
24802
|
},
|
|
25277
|
-
__wbg_pswaplineagerecord_new: function(arg0) {
|
|
25278
|
-
const ret = PswapLineageRecord.__wrap(arg0);
|
|
25279
|
-
return ret;
|
|
25280
|
-
},
|
|
25281
|
-
__wbg_push_8ffdcb2063340ba5: function(arg0, arg1) {
|
|
25282
|
-
const ret = arg0.push(arg1);
|
|
25283
|
-
return ret;
|
|
25284
|
-
},
|
|
25285
24803
|
__wbg_queueMicrotask_0aa0a927f78f5d98: function(arg0) {
|
|
25286
24804
|
const ret = arg0.queueMicrotask;
|
|
25287
24805
|
return ret;
|
|
@@ -25296,13 +24814,13 @@ function __wbg_get_imports() {
|
|
|
25296
24814
|
__wbg_releaseLock_aa5846c2494b3032: function(arg0) {
|
|
25297
24815
|
arg0.releaseLock();
|
|
25298
24816
|
},
|
|
25299
|
-
|
|
24817
|
+
__wbg_removeAccountAddress_5cbeda1f06e27b96: function(arg0, arg1, arg2, arg3) {
|
|
25300
24818
|
var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
|
|
25301
24819
|
wasm.__wbindgen_free(arg2, arg3 * 1, 1);
|
|
25302
24820
|
const ret = removeAccountAddress(getStringFromWasm0(arg0, arg1), v0);
|
|
25303
24821
|
return ret;
|
|
25304
24822
|
},
|
|
25305
|
-
|
|
24823
|
+
__wbg_removeAccountAuth_825600c45bdd5aa3: function(arg0, arg1, arg2, arg3) {
|
|
25306
24824
|
let deferred0_0;
|
|
25307
24825
|
let deferred0_1;
|
|
25308
24826
|
try {
|
|
@@ -25314,7 +24832,7 @@ function __wbg_get_imports() {
|
|
|
25314
24832
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25315
24833
|
}
|
|
25316
24834
|
},
|
|
25317
|
-
|
|
24835
|
+
__wbg_removeAllMappingsForKey_3f439269152ce6e0: function(arg0, arg1, arg2, arg3) {
|
|
25318
24836
|
let deferred0_0;
|
|
25319
24837
|
let deferred0_1;
|
|
25320
24838
|
try {
|
|
@@ -25326,7 +24844,7 @@ function __wbg_get_imports() {
|
|
|
25326
24844
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25327
24845
|
}
|
|
25328
24846
|
},
|
|
25329
|
-
|
|
24847
|
+
__wbg_removeNoteTag_e2ea5486d35929ca: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
|
|
25330
24848
|
var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
|
|
25331
24849
|
wasm.__wbindgen_free(arg2, arg3 * 1, 1);
|
|
25332
24850
|
let v1;
|
|
@@ -25347,7 +24865,7 @@ function __wbg_get_imports() {
|
|
|
25347
24865
|
const ret = removeNoteTag(getStringFromWasm0(arg0, arg1), v0, v1, v2, v3);
|
|
25348
24866
|
return ret;
|
|
25349
24867
|
},
|
|
25350
|
-
|
|
24868
|
+
__wbg_removeSetting_5fac6592df936024: function(arg0, arg1, arg2, arg3) {
|
|
25351
24869
|
let deferred0_0;
|
|
25352
24870
|
let deferred0_1;
|
|
25353
24871
|
try {
|
|
@@ -25398,9 +24916,6 @@ function __wbg_get_imports() {
|
|
|
25398
24916
|
const ret = setTimeout(arg0, arg1);
|
|
25399
24917
|
return ret;
|
|
25400
24918
|
}, arguments); },
|
|
25401
|
-
__wbg_set_3f1d0b984ed272ed: function(arg0, arg1, arg2) {
|
|
25402
|
-
arg0[arg1] = arg2;
|
|
25403
|
-
},
|
|
25404
24919
|
__wbg_set_6cb8631f80447a67: function() { return handleError(function (arg0, arg1, arg2) {
|
|
25405
24920
|
const ret = Reflect.set(arg0, arg1, arg2);
|
|
25406
24921
|
return ret;
|
|
@@ -25550,13 +25065,13 @@ function __wbg_get_imports() {
|
|
|
25550
25065
|
const ret = TransactionSummary.__wrap(arg0);
|
|
25551
25066
|
return ret;
|
|
25552
25067
|
},
|
|
25553
|
-
|
|
25068
|
+
__wbg_undoAccountStates_884490500595e8c1: function(arg0, arg1, arg2, arg3) {
|
|
25554
25069
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
25555
25070
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
25556
25071
|
const ret = undoAccountStates(getStringFromWasm0(arg0, arg1), v0);
|
|
25557
25072
|
return ret;
|
|
25558
25073
|
},
|
|
25559
|
-
|
|
25074
|
+
__wbg_upsertAccountCode_ce71ea974ae52d20: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
25560
25075
|
let deferred0_0;
|
|
25561
25076
|
let deferred0_1;
|
|
25562
25077
|
try {
|
|
@@ -25570,7 +25085,7 @@ function __wbg_get_imports() {
|
|
|
25570
25085
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25571
25086
|
}
|
|
25572
25087
|
},
|
|
25573
|
-
|
|
25088
|
+
__wbg_upsertAccountRecord_793d7ddc0ba72c6d: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17) {
|
|
25574
25089
|
let deferred0_0;
|
|
25575
25090
|
let deferred0_1;
|
|
25576
25091
|
let deferred1_0;
|
|
@@ -25612,7 +25127,7 @@ function __wbg_get_imports() {
|
|
|
25612
25127
|
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
25613
25128
|
}
|
|
25614
25129
|
},
|
|
25615
|
-
|
|
25130
|
+
__wbg_upsertAccountStorage_5e3e18f2388a4516: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
25616
25131
|
let deferred0_0;
|
|
25617
25132
|
let deferred0_1;
|
|
25618
25133
|
try {
|
|
@@ -25626,7 +25141,7 @@ function __wbg_get_imports() {
|
|
|
25626
25141
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25627
25142
|
}
|
|
25628
25143
|
},
|
|
25629
|
-
|
|
25144
|
+
__wbg_upsertForeignAccountCode_dc483b928e37841a: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
25630
25145
|
let deferred0_0;
|
|
25631
25146
|
let deferred0_1;
|
|
25632
25147
|
let deferred2_0;
|
|
@@ -25645,7 +25160,7 @@ function __wbg_get_imports() {
|
|
|
25645
25160
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
25646
25161
|
}
|
|
25647
25162
|
},
|
|
25648
|
-
|
|
25163
|
+
__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) {
|
|
25649
25164
|
let deferred0_0;
|
|
25650
25165
|
let deferred0_1;
|
|
25651
25166
|
let deferred6_0;
|
|
@@ -25694,7 +25209,7 @@ function __wbg_get_imports() {
|
|
|
25694
25209
|
wasm.__wbindgen_free(deferred9_0, deferred9_1, 1);
|
|
25695
25210
|
}
|
|
25696
25211
|
},
|
|
25697
|
-
|
|
25212
|
+
__wbg_upsertNoteScript_478f10dbd569c41c: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
25698
25213
|
let deferred0_0;
|
|
25699
25214
|
let deferred0_1;
|
|
25700
25215
|
try {
|
|
@@ -25708,7 +25223,7 @@ function __wbg_get_imports() {
|
|
|
25708
25223
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25709
25224
|
}
|
|
25710
25225
|
},
|
|
25711
|
-
|
|
25226
|
+
__wbg_upsertOutputNote_81d633e2913e530c: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19) {
|
|
25712
25227
|
let deferred0_0;
|
|
25713
25228
|
let deferred0_1;
|
|
25714
25229
|
let deferred1_0;
|
|
@@ -25743,7 +25258,7 @@ function __wbg_get_imports() {
|
|
|
25743
25258
|
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
25744
25259
|
}
|
|
25745
25260
|
},
|
|
25746
|
-
|
|
25261
|
+
__wbg_upsertStorageMapEntries_6458946c680ec0cc: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
25747
25262
|
let deferred0_0;
|
|
25748
25263
|
let deferred0_1;
|
|
25749
25264
|
try {
|
|
@@ -25757,7 +25272,7 @@ function __wbg_get_imports() {
|
|
|
25757
25272
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25758
25273
|
}
|
|
25759
25274
|
},
|
|
25760
|
-
|
|
25275
|
+
__wbg_upsertTransactionRecord_5f48cbfd35e412bc: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) {
|
|
25761
25276
|
let deferred0_0;
|
|
25762
25277
|
let deferred0_1;
|
|
25763
25278
|
try {
|
|
@@ -25778,7 +25293,7 @@ function __wbg_get_imports() {
|
|
|
25778
25293
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25779
25294
|
}
|
|
25780
25295
|
},
|
|
25781
|
-
|
|
25296
|
+
__wbg_upsertVaultAssets_3d383338bd7746b0: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
25782
25297
|
let deferred0_0;
|
|
25783
25298
|
let deferred0_1;
|
|
25784
25299
|
try {
|
|
@@ -25809,12 +25324,12 @@ function __wbg_get_imports() {
|
|
|
25809
25324
|
return ret;
|
|
25810
25325
|
},
|
|
25811
25326
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
25812
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
25327
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 388, function: Function { arguments: [Externref], shim_idx: 781, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
25813
25328
|
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_8d8dd5a992b1207e___closure__destroy___dyn_core_9b3796e30d99ddb7___ops__function__FnMut__wasm_bindgen_8d8dd5a992b1207e___JsValue____Output_______, wasm_bindgen_8d8dd5a992b1207e___convert__closures_____invoke___wasm_bindgen_8d8dd5a992b1207e___JsValue_____);
|
|
25814
25329
|
return ret;
|
|
25815
25330
|
},
|
|
25816
25331
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
25817
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
25332
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 388, function: Function { arguments: [], shim_idx: 389, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
25818
25333
|
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_8d8dd5a992b1207e___closure__destroy___dyn_core_9b3796e30d99ddb7___ops__function__FnMut__wasm_bindgen_8d8dd5a992b1207e___JsValue____Output_______, wasm_bindgen_8d8dd5a992b1207e___convert__closures_____invoke______);
|
|
25819
25334
|
return ret;
|
|
25820
25335
|
},
|
|
@@ -25824,91 +25339,79 @@ function __wbg_get_imports() {
|
|
|
25824
25339
|
return ret;
|
|
25825
25340
|
},
|
|
25826
25341
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
25827
|
-
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
25828
|
-
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
25829
|
-
return ret;
|
|
25830
|
-
},
|
|
25831
|
-
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
25832
25342
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
25833
25343
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
25834
25344
|
return ret;
|
|
25835
25345
|
},
|
|
25836
|
-
|
|
25346
|
+
__wbindgen_cast_0000000000000005: function(arg0) {
|
|
25837
25347
|
// Cast intrinsic for `U64 -> Externref`.
|
|
25838
25348
|
const ret = BigInt.asUintN(64, arg0);
|
|
25839
25349
|
return ret;
|
|
25840
25350
|
},
|
|
25841
|
-
|
|
25351
|
+
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
25842
25352
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
25843
25353
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
25844
25354
|
// Cast intrinsic for `Vector(NamedExternref("AccountHeader")) -> Externref`.
|
|
25845
25355
|
const ret = v0;
|
|
25846
25356
|
return ret;
|
|
25847
25357
|
},
|
|
25848
|
-
|
|
25358
|
+
__wbindgen_cast_0000000000000007: function(arg0, arg1) {
|
|
25849
25359
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
25850
25360
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
25851
25361
|
// Cast intrinsic for `Vector(NamedExternref("Address")) -> Externref`.
|
|
25852
25362
|
const ret = v0;
|
|
25853
25363
|
return ret;
|
|
25854
25364
|
},
|
|
25855
|
-
|
|
25365
|
+
__wbindgen_cast_0000000000000008: function(arg0, arg1) {
|
|
25856
25366
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
25857
25367
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
25858
25368
|
// Cast intrinsic for `Vector(NamedExternref("ConsumableNoteRecord")) -> Externref`.
|
|
25859
25369
|
const ret = v0;
|
|
25860
25370
|
return ret;
|
|
25861
25371
|
},
|
|
25862
|
-
|
|
25372
|
+
__wbindgen_cast_0000000000000009: function(arg0, arg1) {
|
|
25863
25373
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
25864
25374
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
25865
25375
|
// Cast intrinsic for `Vector(NamedExternref("FetchedNote")) -> Externref`.
|
|
25866
25376
|
const ret = v0;
|
|
25867
25377
|
return ret;
|
|
25868
25378
|
},
|
|
25869
|
-
|
|
25379
|
+
__wbindgen_cast_000000000000000a: function(arg0, arg1) {
|
|
25870
25380
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
25871
25381
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
25872
25382
|
// Cast intrinsic for `Vector(NamedExternref("InputNoteRecord")) -> Externref`.
|
|
25873
25383
|
const ret = v0;
|
|
25874
25384
|
return ret;
|
|
25875
25385
|
},
|
|
25876
|
-
|
|
25386
|
+
__wbindgen_cast_000000000000000b: function(arg0, arg1) {
|
|
25877
25387
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
25878
25388
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
25879
25389
|
// Cast intrinsic for `Vector(NamedExternref("OutputNoteRecord")) -> Externref`.
|
|
25880
25390
|
const ret = v0;
|
|
25881
25391
|
return ret;
|
|
25882
25392
|
},
|
|
25883
|
-
|
|
25884
|
-
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
25885
|
-
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
25886
|
-
// Cast intrinsic for `Vector(NamedExternref("PswapLineageRecord")) -> Externref`.
|
|
25887
|
-
const ret = v0;
|
|
25888
|
-
return ret;
|
|
25889
|
-
},
|
|
25890
|
-
__wbindgen_cast_000000000000000e: function(arg0, arg1) {
|
|
25393
|
+
__wbindgen_cast_000000000000000c: function(arg0, arg1) {
|
|
25891
25394
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
25892
25395
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
25893
25396
|
// Cast intrinsic for `Vector(NamedExternref("TransactionRecord")) -> Externref`.
|
|
25894
25397
|
const ret = v0;
|
|
25895
25398
|
return ret;
|
|
25896
25399
|
},
|
|
25897
|
-
|
|
25400
|
+
__wbindgen_cast_000000000000000d: function(arg0, arg1) {
|
|
25898
25401
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
25899
25402
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
25900
25403
|
// Cast intrinsic for `Vector(NamedExternref("Word")) -> Externref`.
|
|
25901
25404
|
const ret = v0;
|
|
25902
25405
|
return ret;
|
|
25903
25406
|
},
|
|
25904
|
-
|
|
25407
|
+
__wbindgen_cast_000000000000000e: function(arg0, arg1) {
|
|
25905
25408
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
25906
25409
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
25907
25410
|
// Cast intrinsic for `Vector(NamedExternref("string")) -> Externref`.
|
|
25908
25411
|
const ret = v0;
|
|
25909
25412
|
return ret;
|
|
25910
25413
|
},
|
|
25911
|
-
|
|
25414
|
+
__wbindgen_cast_000000000000000f: function(arg0, arg1) {
|
|
25912
25415
|
var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
|
|
25913
25416
|
wasm.__wbindgen_free(arg0, arg1 * 1, 1);
|
|
25914
25417
|
// Cast intrinsic for `Vector(U8) -> Externref`.
|
|
@@ -25999,6 +25502,9 @@ const AccountIdFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
25999
25502
|
const AccountIdArrayFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26000
25503
|
? { register: () => {}, unregister: () => {} }
|
|
26001
25504
|
: new FinalizationRegistry(ptr => wasm.__wbg_accountidarray_free(ptr >>> 0, 1));
|
|
25505
|
+
const AccountPatchFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
25506
|
+
? { register: () => {}, unregister: () => {} }
|
|
25507
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_accountpatch_free(ptr >>> 0, 1));
|
|
26002
25508
|
const AccountProofFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26003
25509
|
? { register: () => {}, unregister: () => {} }
|
|
26004
25510
|
: new FinalizationRegistry(ptr => wasm.__wbg_accountproof_free(ptr >>> 0, 1));
|
|
@@ -26011,18 +25517,21 @@ const AccountStatusFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
26011
25517
|
const AccountStorageFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26012
25518
|
? { register: () => {}, unregister: () => {} }
|
|
26013
25519
|
: new FinalizationRegistry(ptr => wasm.__wbg_accountstorage_free(ptr >>> 0, 1));
|
|
26014
|
-
const AccountStorageDeltaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26015
|
-
? { register: () => {}, unregister: () => {} }
|
|
26016
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_accountstoragedelta_free(ptr >>> 0, 1));
|
|
26017
25520
|
const AccountStorageModeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26018
25521
|
? { register: () => {}, unregister: () => {} }
|
|
26019
25522
|
: new FinalizationRegistry(ptr => wasm.__wbg_accountstoragemode_free(ptr >>> 0, 1));
|
|
25523
|
+
const AccountStoragePatchFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
25524
|
+
? { register: () => {}, unregister: () => {} }
|
|
25525
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_accountstoragepatch_free(ptr >>> 0, 1));
|
|
26020
25526
|
const AccountStorageRequirementsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26021
25527
|
? { register: () => {}, unregister: () => {} }
|
|
26022
25528
|
: new FinalizationRegistry(ptr => wasm.__wbg_accountstoragerequirements_free(ptr >>> 0, 1));
|
|
26023
25529
|
const AccountVaultDeltaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26024
25530
|
? { register: () => {}, unregister: () => {} }
|
|
26025
25531
|
: new FinalizationRegistry(ptr => wasm.__wbg_accountvaultdelta_free(ptr >>> 0, 1));
|
|
25532
|
+
const AccountVaultPatchFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
25533
|
+
? { register: () => {}, unregister: () => {} }
|
|
25534
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_accountvaultpatch_free(ptr >>> 0, 1));
|
|
26026
25535
|
const AddressFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26027
25536
|
? { register: () => {}, unregister: () => {} }
|
|
26028
25537
|
: new FinalizationRegistry(ptr => wasm.__wbg_address_free(ptr >>> 0, 1));
|
|
@@ -26059,9 +25568,6 @@ const ConsumableNoteRecordFinalization = (typeof FinalizationRegistry === 'undef
|
|
|
26059
25568
|
const EndpointFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26060
25569
|
? { register: () => {}, unregister: () => {} }
|
|
26061
25570
|
: new FinalizationRegistry(ptr => wasm.__wbg_endpoint_free(ptr >>> 0, 1));
|
|
26062
|
-
const EthAddressFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26063
|
-
? { register: () => {}, unregister: () => {} }
|
|
26064
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_ethaddress_free(ptr >>> 0, 1));
|
|
26065
25571
|
const ExecutedTransactionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26066
25572
|
? { register: () => {}, unregister: () => {} }
|
|
26067
25573
|
: new FinalizationRegistry(ptr => wasm.__wbg_executedtransaction_free(ptr >>> 0, 1));
|
|
@@ -26140,9 +25646,6 @@ const LibraryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
26140
25646
|
const MerklePathFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26141
25647
|
? { register: () => {}, unregister: () => {} }
|
|
26142
25648
|
: new FinalizationRegistry(ptr => wasm.__wbg_merklepath_free(ptr >>> 0, 1));
|
|
26143
|
-
const NetworkAccountTargetFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26144
|
-
? { register: () => {}, unregister: () => {} }
|
|
26145
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_networkaccounttarget_free(ptr >>> 0, 1));
|
|
26146
25649
|
const NetworkIdFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26147
25650
|
? { register: () => {}, unregister: () => {} }
|
|
26148
25651
|
: new FinalizationRegistry(ptr => wasm.__wbg_networkid_free(ptr >>> 0, 1));
|
|
@@ -26266,9 +25769,6 @@ const ProgramFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
26266
25769
|
const ProvenTransactionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26267
25770
|
? { register: () => {}, unregister: () => {} }
|
|
26268
25771
|
: new FinalizationRegistry(ptr => wasm.__wbg_proventransaction_free(ptr >>> 0, 1));
|
|
26269
|
-
const PswapLineageRecordFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26270
|
-
? { register: () => {}, unregister: () => {} }
|
|
26271
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_pswaplineagerecord_free(ptr >>> 0, 1));
|
|
26272
25772
|
const PublicKeyFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26273
25773
|
? { register: () => {}, unregister: () => {} }
|
|
26274
25774
|
: new FinalizationRegistry(ptr => wasm.__wbg_publickey_free(ptr >>> 0, 1));
|
|
@@ -26760,5 +26260,6 @@ async function __wbg_init(module_or_path) {
|
|
|
26760
26260
|
}
|
|
26761
26261
|
|
|
26762
26262
|
const module$1 = new URL("assets/miden_client_web.wasm", import.meta.url);
|
|
26763
|
-
|
|
26764
|
-
|
|
26263
|
+
|
|
26264
|
+
export { Account, AccountArray, AccountBuilder, AccountBuilderResult, AccountCode, AccountComponent, AccountComponentCode, AccountDelta, AccountFile, AccountHeader, AccountId, AccountIdArray, AccountInterface, AccountPatch, AccountProof, AccountReader, AccountStatus, AccountStorage, AccountStorageMode, AccountStoragePatch, AccountStorageRequirements, AccountType, AccountVaultDelta, AccountVaultPatch, Address, AdviceInputs, AdviceMap, AssetVault, AuthFalcon512RpoMultisigConfig, AuthScheme, AuthSecretKey, BasicFungibleFaucetComponent, BlockHeader, CodeBuilder, CommittedNote, ConsumableNoteRecord, Endpoint, ExecutedTransaction, Felt, FeltArray, FetchedAccount, FetchedNote, FlattenedU8Vec, ForeignAccount, ForeignAccountArray, FungibleAsset, FungibleAssetDelta, FungibleAssetDeltaItem, GetProceduresResultItem, InputNote, InputNoteRecord, InputNoteState, InputNotes, IntoUnderlyingByteSource, IntoUnderlyingSink, IntoUnderlyingSource, JsAccountUpdate, JsSettingMutation, JsStateSyncUpdate, JsStorageMapEntry, JsStorageSlot, JsVaultAsset, Library, MerklePath, NetworkId, NetworkNoteStatusInfo, NetworkType, Note, NoteAndArgs, NoteAndArgsArray, NoteArray, NoteAssets, NoteAttachment, NoteAttachmentScheme, NoteConsumability, NoteConsumptionStatus, NoteDetails, NoteDetailsAndTag, NoteDetailsAndTagArray, NoteExecutionHint, NoteExportFormat, NoteFile, NoteFilter, NoteFilterTypes, NoteHeader, NoteId, NoteIdAndArgs, NoteIdAndArgsArray, NoteInclusionProof, NoteLocation, NoteMetadata, NoteRecipient, NoteRecipientArray, NoteScript, NoteStorage, NoteSyncBlock, NoteSyncInfo, NoteTag, NoteType, OutputNote, OutputNoteArray, OutputNoteRecord, OutputNoteState, OutputNotes, Package, PartialNote, Poseidon2, ProcedureThreshold, Program, ProvenTransaction, PublicKey, RpcClient, Rpo256, SerializedInputNoteData, SerializedOutputNoteData, SerializedTransactionData, Signature, SigningInputs, SigningInputsType, SlotAndKeys, SparseMerklePath, StorageMap, StorageMapEntry, StorageMapEntryJs, StorageMapInfo, StorageMapUpdate, StorageSlot, StorageSlotArray, SyncSummary, TestUtils, TokenSymbol, TransactionArgs, TransactionFilter, TransactionId, TransactionProver, TransactionRecord, TransactionRequest, TransactionRequestBuilder, TransactionResult, TransactionScript, TransactionScriptInputPair, TransactionScriptInputPairArray, TransactionStatus, TransactionStoreUpdate, TransactionSummary, WebClient, WebKeystoreApi, Word, module$1 as __wasm_url, __wbg_init, createAuthFalcon512RpoMultisig, exportStore2 as exportStore, importStore, initSync, sequentialSumBench, setupLogging };
|
|
26265
|
+
//# sourceMappingURL=Cargo-LwITdlzJ-Dyl2bCwN.js.map
|