@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
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
async function loadWasm() {
|
|
6
6
|
let wasmModule;
|
|
7
7
|
if (!undefined || (undefined && !undefined.SSR)) {
|
|
8
|
-
wasmModule = await Promise.resolve().then(function () { return
|
|
8
|
+
wasmModule = await Promise.resolve().then(function () { return CargoLwITdlzJ; });
|
|
9
9
|
// The Cargo glue's __wbg_init TLA is stripped by the rollup build to
|
|
10
10
|
// prevent blocking WKWebView module evaluation. Call it explicitly here
|
|
11
11
|
// with the WASM URL that the Cargo glue pre-resolves (relative to its
|
|
@@ -8826,6 +8826,42 @@ const logWebStoreError = (error, errorContext) => {
|
|
|
8826
8826
|
}
|
|
8827
8827
|
throw error;
|
|
8828
8828
|
};
|
|
8829
|
+
// Partial blockchain (MMR) authentication nodes are part of the local
|
|
8830
|
+
// `PartialMmr` state. Once a node index is known its value is fixed, so a
|
|
8831
|
+
// later write with the same index but a different value indicates a buggy or
|
|
8832
|
+
// malicious sync path. Insert nodes that are missing, accept writes that match
|
|
8833
|
+
// the stored value, and reject conflicting writes so the known-good value is
|
|
8834
|
+
// never silently overwritten.
|
|
8835
|
+
const putPartialBlockchainNodesNoOverwrite = async (table, data) => {
|
|
8836
|
+
// Collapse duplicate indexes within the same batch up front: identical
|
|
8837
|
+
// copies are deduplicated (a repeated index would otherwise make `bulkAdd`
|
|
8838
|
+
// throw a key-collision error), and copies that disagree are rejected.
|
|
8839
|
+
const unique = new Map();
|
|
8840
|
+
for (const entry of data) {
|
|
8841
|
+
const seen = unique.get(entry.id);
|
|
8842
|
+
if (seen !== undefined && seen.node !== entry.node) {
|
|
8843
|
+
throw new Error(`Conflicting partial blockchain node ${entry.id} within the same write`);
|
|
8844
|
+
}
|
|
8845
|
+
unique.set(entry.id, entry);
|
|
8846
|
+
}
|
|
8847
|
+
const records = [...unique.values()];
|
|
8848
|
+
const existing = await table.bulkGet(records.map((entry) => entry.id));
|
|
8849
|
+
const toAdd = [];
|
|
8850
|
+
for (let i = 0; i < records.length; i++) {
|
|
8851
|
+
const current = existing[i];
|
|
8852
|
+
if (current === undefined) {
|
|
8853
|
+
toAdd.push(records[i]);
|
|
8854
|
+
}
|
|
8855
|
+
else if (current.node !== records[i].node) {
|
|
8856
|
+
throw new Error(`Refusing to overwrite partial blockchain node ${records[i].id}: ` +
|
|
8857
|
+
`stored value differs from the new value`);
|
|
8858
|
+
}
|
|
8859
|
+
// current.node === records[i].node: already stored, nothing to do.
|
|
8860
|
+
}
|
|
8861
|
+
if (toAdd.length > 0) {
|
|
8862
|
+
await table.bulkAdd(toAdd);
|
|
8863
|
+
}
|
|
8864
|
+
};
|
|
8829
8865
|
const uint8ArrayToBase64 = (bytes) => {
|
|
8830
8866
|
const binary = bytes.reduce((acc, byte) => acc + String.fromCharCode(byte), "");
|
|
8831
8867
|
return btoa(binary);
|
|
@@ -8882,7 +8918,7 @@ var Table;
|
|
|
8882
8918
|
Table["InputNotes"] = "inputNotes";
|
|
8883
8919
|
Table["OutputNotes"] = "outputNotes";
|
|
8884
8920
|
Table["NotesScripts"] = "notesScripts";
|
|
8885
|
-
Table["
|
|
8921
|
+
Table["BlockchainCheckpoint"] = "blockchainCheckpoint";
|
|
8886
8922
|
Table["BlockHeaders"] = "blockHeaders";
|
|
8887
8923
|
Table["PartialBlockchainNodes"] = "partialBlockchainNodes";
|
|
8888
8924
|
Table["Tags"] = "tags";
|
|
@@ -8893,9 +8929,7 @@ function indexes(...items) {
|
|
|
8893
8929
|
return items.join(",");
|
|
8894
8930
|
}
|
|
8895
8931
|
/** V1 baseline schema. Extracted as a constant because once migrations are enabled, this must
|
|
8896
|
-
* never be modified — all schema changes should go through new version blocks instead.
|
|
8897
|
-
* Exported for migration tests, which seed a physical v1 database before opening it with the
|
|
8898
|
-
* current version chain. */
|
|
8932
|
+
* never be modified — all schema changes should go through new version blocks instead. */
|
|
8899
8933
|
const V1_STORES = {
|
|
8900
8934
|
[Table.AccountCode]: indexes("root"),
|
|
8901
8935
|
[Table.LatestAccountStorage]: indexes("[accountId+slotName]", "accountId"),
|
|
@@ -8914,7 +8948,7 @@ const V1_STORES = {
|
|
|
8914
8948
|
[Table.InputNotes]: indexes("detailsCommitment", "noteId", "nullifier", "stateDiscriminant", "[consumedBlockHeight+consumedTxOrder+noteId]"),
|
|
8915
8949
|
[Table.OutputNotes]: indexes("detailsCommitment", "noteId", "recipientDigest", "stateDiscriminant", "nullifier"),
|
|
8916
8950
|
[Table.NotesScripts]: indexes("scriptRoot"),
|
|
8917
|
-
[Table.
|
|
8951
|
+
[Table.BlockchainCheckpoint]: indexes("id"),
|
|
8918
8952
|
[Table.BlockHeaders]: indexes("blockNum", "hasClientNotes"),
|
|
8919
8953
|
[Table.PartialBlockchainNodes]: indexes("id"),
|
|
8920
8954
|
[Table.Tags]: indexes("id++", "tag", "sourceNoteId", "sourceAccountId"),
|
|
@@ -8940,7 +8974,7 @@ class MidenDatabase {
|
|
|
8940
8974
|
inputNotes;
|
|
8941
8975
|
outputNotes;
|
|
8942
8976
|
notesScripts;
|
|
8943
|
-
|
|
8977
|
+
blockchainCheckpoint;
|
|
8944
8978
|
blockHeaders;
|
|
8945
8979
|
partialBlockchainNodes;
|
|
8946
8980
|
tags;
|
|
@@ -8950,12 +8984,11 @@ class MidenDatabase {
|
|
|
8950
8984
|
this.dexie = new Dexie(network);
|
|
8951
8985
|
// --- Schema versioning ---
|
|
8952
8986
|
//
|
|
8953
|
-
// NOTE:
|
|
8954
|
-
//
|
|
8955
|
-
//
|
|
8956
|
-
// data
|
|
8957
|
-
//
|
|
8958
|
-
// version-change nuke will be removed and migrations alone will take over.
|
|
8987
|
+
// NOTE: The migration system is not currently in use. The Miden network
|
|
8988
|
+
// resets on every upgrade, so the database is nuked whenever the client
|
|
8989
|
+
// version changes (see ensureClientVersion). Once the network stabilizes
|
|
8990
|
+
// and data can be preserved across upgrades, the version-change nuke will
|
|
8991
|
+
// be removed and migrations will take over.
|
|
8959
8992
|
//
|
|
8960
8993
|
// v1 is the baseline schema. To add a migration:
|
|
8961
8994
|
// 1. Add a .version(N+1).stores({...}).upgrade(tx => {...}) block below.
|
|
@@ -8987,43 +9020,12 @@ class MidenDatabase {
|
|
|
8987
9020
|
// Note: The `populate` hook (below the version blocks) only fires on
|
|
8988
9021
|
// first database creation, NOT during upgrades.
|
|
8989
9022
|
//
|
|
8990
|
-
//
|
|
8991
|
-
//
|
|
8992
|
-
//
|
|
8993
|
-
//
|
|
9023
|
+
// To enable migrations (stop nuking the DB on version change):
|
|
9024
|
+
// 1. Remove the nuke logic in ensureClientVersion (close/delete/open).
|
|
9025
|
+
// Just persist the new version instead.
|
|
9026
|
+
// 2. Freeze V1_STORES — never modify it again.
|
|
9027
|
+
// 3. Add version(2+) blocks below for all schema changes going forward.
|
|
8994
9028
|
this.dexie.version(1).stores(V1_STORES);
|
|
8995
|
-
// v2 (miden-client 0.15.4): prune note tags leaked by output-note
|
|
8996
|
-
// registration. Mirrors sqlite-store migration
|
|
8997
|
-
// `0002_prune_output_note_tags.sql`. Clients built against miden-client
|
|
8998
|
-
// < 0.15.4 registered a `Note`-sourced tag for every output note a
|
|
8999
|
-
// transaction created, but sync cleanup only removes tags of committed
|
|
9000
|
-
// *input* notes — leaking one `tags` row per created note. The client no
|
|
9001
|
-
// longer registers those tags; this upgrade deletes the rows already
|
|
9002
|
-
// leaked. A tag is kept while an inclusion-pending input note
|
|
9003
|
-
// (Expected = 0, Unverified = 1 — the mirror of
|
|
9004
|
-
// `InputNoteRecord::is_inclusion_pending`) still needs it.
|
|
9005
|
-
//
|
|
9006
|
-
// This data-only fix coexists with the version-change nuke above: the
|
|
9007
|
-
// nuke covers major/minor client upgrades (network resets), while this
|
|
9008
|
-
// upgrade runs for stores preserved across patch upgrades.
|
|
9009
|
-
this.dexie
|
|
9010
|
-
.version(2)
|
|
9011
|
-
.stores({})
|
|
9012
|
-
.upgrade(async (tx) => {
|
|
9013
|
-
const outputNoteCommitments = new Set(await tx.outputNotes.toCollection().primaryKeys());
|
|
9014
|
-
if (outputNoteCommitments.size === 0) {
|
|
9015
|
-
return;
|
|
9016
|
-
}
|
|
9017
|
-
const pendingInputNoteCommitments = new Set(await tx.inputNotes
|
|
9018
|
-
.where("stateDiscriminant")
|
|
9019
|
-
.anyOf([0, 1])
|
|
9020
|
-
.primaryKeys());
|
|
9021
|
-
await tx.tags
|
|
9022
|
-
.filter((tag) => !!tag.sourceNoteId &&
|
|
9023
|
-
outputNoteCommitments.has(tag.sourceNoteId) &&
|
|
9024
|
-
!pendingInputNoteCommitments.has(tag.sourceNoteId))
|
|
9025
|
-
.delete();
|
|
9026
|
-
});
|
|
9027
9029
|
this.accountCodes = this.dexie.table(Table.AccountCode);
|
|
9028
9030
|
this.latestAccountStorages = this.dexie.table(Table.LatestAccountStorage);
|
|
9029
9031
|
this.historicalAccountStorages = this.dexie.table(Table.HistoricalAccountStorage);
|
|
@@ -9041,16 +9043,20 @@ class MidenDatabase {
|
|
|
9041
9043
|
this.inputNotes = this.dexie.table(Table.InputNotes);
|
|
9042
9044
|
this.outputNotes = this.dexie.table(Table.OutputNotes);
|
|
9043
9045
|
this.notesScripts = this.dexie.table(Table.NotesScripts);
|
|
9044
|
-
this.
|
|
9046
|
+
this.blockchainCheckpoint = this.dexie.table(Table.BlockchainCheckpoint);
|
|
9045
9047
|
this.blockHeaders = this.dexie.table(Table.BlockHeaders);
|
|
9046
9048
|
this.partialBlockchainNodes = this.dexie.table(Table.PartialBlockchainNodes);
|
|
9047
9049
|
this.tags = this.dexie.table(Table.Tags);
|
|
9048
9050
|
this.foreignAccountCode = this.dexie.table(Table.ForeignAccountCode);
|
|
9049
9051
|
this.settings = this.dexie.table(Table.Settings);
|
|
9050
9052
|
this.dexie.on("populate", () => {
|
|
9051
|
-
this.
|
|
9052
|
-
.put({
|
|
9053
|
-
|
|
9053
|
+
this.blockchainCheckpoint
|
|
9054
|
+
.put({
|
|
9055
|
+
id: 1,
|
|
9056
|
+
blockNum: 0,
|
|
9057
|
+
partialBlockchainPeaks: new Uint8Array(),
|
|
9058
|
+
})
|
|
9059
|
+
/* v8 ignore next 2 — populate blockchainCheckpoint failure requires fake-indexeddb to simulate a write error, not modelable in unit tests */
|
|
9054
9060
|
.catch((err) => logWebStoreError(err, "Failed to populate DB"));
|
|
9055
9061
|
});
|
|
9056
9062
|
}
|
|
@@ -9376,7 +9382,7 @@ async function upsertVaultAssets(dbId, accountId, assets) {
|
|
|
9376
9382
|
logWebStoreError(error, `Error inserting assets`);
|
|
9377
9383
|
}
|
|
9378
9384
|
}
|
|
9379
|
-
async function
|
|
9385
|
+
async function applyAccountPatch(dbId, accountId, nonce, updatedSlots, changedMapEntries, changedAssets, codeRoot, storageRoot, vaultRoot, committed, commitment) {
|
|
9380
9386
|
try {
|
|
9381
9387
|
const db = getDatabase(dbId);
|
|
9382
9388
|
await db.dexie.transaction("rw", [
|
|
@@ -9389,7 +9395,8 @@ async function applyTransactionDelta(dbId, accountId, nonce, updatedSlots, chang
|
|
|
9389
9395
|
db.latestAccountHeaders,
|
|
9390
9396
|
db.historicalAccountHeaders,
|
|
9391
9397
|
], async () => {
|
|
9392
|
-
|
|
9398
|
+
const resetMapSlots = new Set();
|
|
9399
|
+
// Apply storage patch: read old → archive → write/delete final state.
|
|
9393
9400
|
for (const slot of updatedSlots) {
|
|
9394
9401
|
const oldSlot = await db.latestAccountStorages
|
|
9395
9402
|
.where("[accountId+slotName]")
|
|
@@ -9402,12 +9409,44 @@ async function applyTransactionDelta(dbId, accountId, nonce, updatedSlots, chang
|
|
|
9402
9409
|
oldSlotValue: oldSlot?.slotValue ?? null,
|
|
9403
9410
|
slotType: slot.slotType,
|
|
9404
9411
|
});
|
|
9405
|
-
|
|
9406
|
-
|
|
9407
|
-
|
|
9408
|
-
|
|
9409
|
-
|
|
9410
|
-
|
|
9412
|
+
// A created map is a replacement (a remove followed by create can merge to Create),
|
|
9413
|
+
// while a removed map must drop every persisted entry. Archive those entries so account
|
|
9414
|
+
// rollback can restore them.
|
|
9415
|
+
if (slot.slotType === 1 &&
|
|
9416
|
+
(slot.patchOperation === 0 || slot.patchOperation === 2)) {
|
|
9417
|
+
resetMapSlots.add(slot.slotName);
|
|
9418
|
+
const oldMapEntries = await db.latestStorageMapEntries
|
|
9419
|
+
.where("[accountId+slotName]")
|
|
9420
|
+
.equals([accountId, slot.slotName])
|
|
9421
|
+
.toArray();
|
|
9422
|
+
for (const entry of oldMapEntries) {
|
|
9423
|
+
await db.historicalStorageMapEntries.put({
|
|
9424
|
+
accountId,
|
|
9425
|
+
replacedAtNonce: nonce,
|
|
9426
|
+
slotName: entry.slotName,
|
|
9427
|
+
key: entry.key,
|
|
9428
|
+
oldValue: entry.value,
|
|
9429
|
+
});
|
|
9430
|
+
}
|
|
9431
|
+
await db.latestStorageMapEntries
|
|
9432
|
+
.where("[accountId+slotName]")
|
|
9433
|
+
.equals([accountId, slot.slotName])
|
|
9434
|
+
.delete();
|
|
9435
|
+
}
|
|
9436
|
+
if (slot.patchOperation === 2) {
|
|
9437
|
+
await db.latestAccountStorages
|
|
9438
|
+
.where("[accountId+slotName]")
|
|
9439
|
+
.equals([accountId, slot.slotName])
|
|
9440
|
+
.delete();
|
|
9441
|
+
}
|
|
9442
|
+
else {
|
|
9443
|
+
await db.latestAccountStorages.put({
|
|
9444
|
+
accountId,
|
|
9445
|
+
slotName: slot.slotName,
|
|
9446
|
+
slotValue: slot.slotValue,
|
|
9447
|
+
slotType: slot.slotType,
|
|
9448
|
+
});
|
|
9449
|
+
}
|
|
9411
9450
|
}
|
|
9412
9451
|
// Process map entries: read old → archive → update latest
|
|
9413
9452
|
for (const entry of changedMapEntries) {
|
|
@@ -9415,13 +9454,30 @@ async function applyTransactionDelta(dbId, accountId, nonce, updatedSlots, chang
|
|
|
9415
9454
|
.where("[accountId+slotName+key]")
|
|
9416
9455
|
.equals([accountId, entry.slotName, entry.key])
|
|
9417
9456
|
.first();
|
|
9418
|
-
|
|
9419
|
-
|
|
9420
|
-
|
|
9421
|
-
|
|
9422
|
-
|
|
9423
|
-
|
|
9424
|
-
|
|
9457
|
+
if (resetMapSlots.has(entry.slotName)) {
|
|
9458
|
+
const archivedEntry = await db.historicalStorageMapEntries
|
|
9459
|
+
.where("[accountId+replacedAtNonce+slotName+key]")
|
|
9460
|
+
.equals([accountId, nonce, entry.slotName, entry.key])
|
|
9461
|
+
.first();
|
|
9462
|
+
if (archivedEntry === undefined) {
|
|
9463
|
+
await db.historicalStorageMapEntries.put({
|
|
9464
|
+
accountId,
|
|
9465
|
+
replacedAtNonce: nonce,
|
|
9466
|
+
slotName: entry.slotName,
|
|
9467
|
+
key: entry.key,
|
|
9468
|
+
oldValue: null,
|
|
9469
|
+
});
|
|
9470
|
+
}
|
|
9471
|
+
}
|
|
9472
|
+
else {
|
|
9473
|
+
await db.historicalStorageMapEntries.put({
|
|
9474
|
+
accountId,
|
|
9475
|
+
replacedAtNonce: nonce,
|
|
9476
|
+
slotName: entry.slotName,
|
|
9477
|
+
key: entry.key,
|
|
9478
|
+
oldValue: oldEntry?.value ?? null,
|
|
9479
|
+
});
|
|
9480
|
+
}
|
|
9425
9481
|
// "" means removal
|
|
9426
9482
|
if (entry.value === "") {
|
|
9427
9483
|
await db.latestStorageMapEntries
|
|
@@ -9501,7 +9557,6 @@ async function applyTransactionDelta(dbId, accountId, nonce, updatedSlots, chang
|
|
|
9501
9557
|
}
|
|
9502
9558
|
catch (error) {
|
|
9503
9559
|
logWebStoreError(error, `Error applying transaction delta`);
|
|
9504
|
-
throw error;
|
|
9505
9560
|
}
|
|
9506
9561
|
}
|
|
9507
9562
|
async function archiveAndReplaceStorageSlots(db, accountId, nonce, newSlots) {
|
|
@@ -9740,7 +9795,6 @@ async function applyFullAccountState(dbId, accountState) {
|
|
|
9740
9795
|
}
|
|
9741
9796
|
catch (error) {
|
|
9742
9797
|
logWebStoreError(error, `Error applying full account state`);
|
|
9743
|
-
throw error;
|
|
9744
9798
|
}
|
|
9745
9799
|
}
|
|
9746
9800
|
async function upsertAccountRecord(dbId, accountId, codeRoot, storageRoot, vaultRoot, nonce, committed, commitment, accountSeed, watched) {
|
|
@@ -10145,33 +10199,36 @@ async function getAccountIdByKeyCommitment(dbId, pubKeyCommitmentHex) {
|
|
|
10145
10199
|
}
|
|
10146
10200
|
}
|
|
10147
10201
|
|
|
10148
|
-
async function insertBlockHeader(dbId, blockNum, header, hasClientNotes) {
|
|
10202
|
+
async function insertBlockHeader(dbId, blockNum, header, hasClientNotes, nodeIds, nodes) {
|
|
10149
10203
|
try {
|
|
10150
10204
|
const db = getDatabase(dbId);
|
|
10151
|
-
|
|
10205
|
+
if (nodeIds.length !== nodes.length) {
|
|
10206
|
+
throw new Error("nodeIds and nodes arrays must be of the same length");
|
|
10207
|
+
}
|
|
10208
|
+
const headerData = {
|
|
10152
10209
|
blockNum: blockNum,
|
|
10153
10210
|
header,
|
|
10154
10211
|
hasClientNotes: hasClientNotes.toString(),
|
|
10155
10212
|
};
|
|
10156
|
-
|
|
10157
|
-
|
|
10158
|
-
|
|
10159
|
-
|
|
10160
|
-
//
|
|
10161
|
-
//
|
|
10162
|
-
|
|
10163
|
-
|
|
10164
|
-
|
|
10165
|
-
|
|
10166
|
-
|
|
10167
|
-
|
|
10168
|
-
|
|
10169
|
-
|
|
10170
|
-
|
|
10171
|
-
|
|
10172
|
-
if
|
|
10173
|
-
|
|
10174
|
-
|
|
10213
|
+
const nodeData = nodes.map((node, index) => ({
|
|
10214
|
+
id: Number(nodeIds[index]),
|
|
10215
|
+
node: node,
|
|
10216
|
+
}));
|
|
10217
|
+
// Persist the header and its MMR nodes in one transaction so a header is never stored
|
|
10218
|
+
// without the nodes that rebuild its `PartialMmr` (mirrors miden-client's atomic insert).
|
|
10219
|
+
await db.dexie.transaction("rw", db.blockHeaders, db.partialBlockchainNodes, async () => {
|
|
10220
|
+
// Header: INSERT OR IGNORE, then one-way upgrade `has_client_notes` to true (load-bearing:
|
|
10221
|
+
// `get_tracked_block_header_numbers` filters on it to seed forest-node tracking).
|
|
10222
|
+
await db.blockHeaders.add(headerData).catch(async (err) => {
|
|
10223
|
+
if (!isConstraintError(err))
|
|
10224
|
+
throw err;
|
|
10225
|
+
if (hasClientNotes) {
|
|
10226
|
+
await db.blockHeaders.update(blockNum, { hasClientNotes: "true" });
|
|
10227
|
+
}
|
|
10228
|
+
});
|
|
10229
|
+
// Nodes: insert-if-missing with overwrite protection; a conflicting value throws and
|
|
10230
|
+
// aborts the transaction, rolling back the header write too.
|
|
10231
|
+
await putPartialBlockchainNodesNoOverwrite(db.partialBlockchainNodes, nodeData);
|
|
10175
10232
|
});
|
|
10176
10233
|
}
|
|
10177
10234
|
catch (err) {
|
|
@@ -10183,25 +10240,6 @@ function isConstraintError(err) {
|
|
|
10183
10240
|
const e = err;
|
|
10184
10241
|
return e?.name === "ConstraintError" || e?.inner?.name === "ConstraintError";
|
|
10185
10242
|
}
|
|
10186
|
-
async function insertPartialBlockchainNodes(dbId, ids, nodes) {
|
|
10187
|
-
try {
|
|
10188
|
-
const db = getDatabase(dbId);
|
|
10189
|
-
if (ids.length !== nodes.length) {
|
|
10190
|
-
throw new Error("ids and nodes arrays must be of the same length");
|
|
10191
|
-
}
|
|
10192
|
-
if (ids.length === 0) {
|
|
10193
|
-
return;
|
|
10194
|
-
}
|
|
10195
|
-
const data = nodes.map((node, index) => ({
|
|
10196
|
-
id: Number(ids[index]),
|
|
10197
|
-
node: node,
|
|
10198
|
-
}));
|
|
10199
|
-
await db.partialBlockchainNodes.bulkPut(data);
|
|
10200
|
-
}
|
|
10201
|
-
catch (err) {
|
|
10202
|
-
logWebStoreError(err, "Failed to insert partial blockchain nodes");
|
|
10203
|
-
}
|
|
10204
|
-
}
|
|
10205
10243
|
async function getBlockHeaders(dbId, blockNumbers) {
|
|
10206
10244
|
try {
|
|
10207
10245
|
const db = getDatabase(dbId);
|
|
@@ -10259,33 +10297,6 @@ async function getTrackedBlockHeaderNumbers(dbId) {
|
|
|
10259
10297
|
logWebStoreError(err, "Failed to get tracked block header numbers");
|
|
10260
10298
|
}
|
|
10261
10299
|
}
|
|
10262
|
-
/**
|
|
10263
|
-
* Returns the blockchain peaks at the current sync height. Peaks live on the
|
|
10264
|
-
* `blockHeaders` row at `stateSync.blockNum` — the block that was the chain
|
|
10265
|
-
* tip when its sync ran. Returns `{ blockNum, peaks: undefined }` if the
|
|
10266
|
-
* stateSync row is missing or if that block was inserted via backfill
|
|
10267
|
-
* (which leaves `partialBlockchainPeaks` unset).
|
|
10268
|
-
*/
|
|
10269
|
-
async function getCurrentBlockchainPeaks(dbId) {
|
|
10270
|
-
try {
|
|
10271
|
-
const db = getDatabase(dbId);
|
|
10272
|
-
const stateSyncRow = await db.stateSync.get(1);
|
|
10273
|
-
if (stateSyncRow == undefined) {
|
|
10274
|
-
return { blockNum: 0, peaks: undefined };
|
|
10275
|
-
}
|
|
10276
|
-
const header = await db.blockHeaders.get(stateSyncRow.blockNum);
|
|
10277
|
-
if (header == undefined || header.partialBlockchainPeaks == undefined) {
|
|
10278
|
-
return { blockNum: stateSyncRow.blockNum, peaks: undefined };
|
|
10279
|
-
}
|
|
10280
|
-
return {
|
|
10281
|
-
blockNum: stateSyncRow.blockNum,
|
|
10282
|
-
peaks: uint8ArrayToBase64(header.partialBlockchainPeaks),
|
|
10283
|
-
};
|
|
10284
|
-
}
|
|
10285
|
-
catch (err) {
|
|
10286
|
-
logWebStoreError(err, "Failed to get current blockchain peaks");
|
|
10287
|
-
}
|
|
10288
|
-
}
|
|
10289
10300
|
async function getPartialBlockchainNodesAll(dbId) {
|
|
10290
10301
|
try {
|
|
10291
10302
|
const db = getDatabase(dbId);
|
|
@@ -10327,9 +10338,9 @@ async function pruneIrrelevantBlocks(dbId, blocksToUntrack, nodeIdsToRemove) {
|
|
|
10327
10338
|
try {
|
|
10328
10339
|
const db = getDatabase(dbId);
|
|
10329
10340
|
const numericNodeIds = nodeIdsToRemove.map(Number);
|
|
10330
|
-
const syncHeight = await db.
|
|
10341
|
+
const syncHeight = await db.blockchainCheckpoint.get(1);
|
|
10331
10342
|
if (syncHeight == undefined) {
|
|
10332
|
-
throw Error("SyncHeight is undefined -- is the
|
|
10343
|
+
throw Error("SyncHeight is undefined -- is the blockchain_checkpoint table empty?");
|
|
10333
10344
|
}
|
|
10334
10345
|
await db.dexie.transaction("rw", db.blockHeaders, db.partialBlockchainNodes, async () => {
|
|
10335
10346
|
// 1. Delete stale MMR authentication nodes.
|
|
@@ -10662,7 +10673,6 @@ async function upsertInputNote(dbId, detailsCommitment, noteId, assets, attachme
|
|
|
10662
10673
|
}
|
|
10663
10674
|
catch (error) {
|
|
10664
10675
|
logWebStoreError(error, `Error inserting note: ${detailsCommitment}`);
|
|
10665
|
-
throw error;
|
|
10666
10676
|
}
|
|
10667
10677
|
};
|
|
10668
10678
|
return db.dexie.transaction("rw", db.inputNotes, db.notesScripts, doWork);
|
|
@@ -10746,7 +10756,6 @@ async function upsertOutputNote(dbId, detailsCommitment, noteId, assets, attachm
|
|
|
10746
10756
|
}
|
|
10747
10757
|
catch (error) {
|
|
10748
10758
|
logWebStoreError(error, `Error inserting note: ${detailsCommitment}`);
|
|
10749
|
-
throw error;
|
|
10750
10759
|
}
|
|
10751
10760
|
};
|
|
10752
10761
|
return db.dexie.transaction("rw", db.outputNotes, db.notesScripts, doWork);
|
|
@@ -10989,7 +10998,6 @@ async function insertTransactionScript(dbId, scriptRoot, txScript, tx) {
|
|
|
10989
10998
|
}
|
|
10990
10999
|
catch (error) {
|
|
10991
11000
|
logWebStoreError(error, "Failed to insert transaction script");
|
|
10992
|
-
throw error;
|
|
10993
11001
|
}
|
|
10994
11002
|
}
|
|
10995
11003
|
async function upsertTransactionRecord(dbId, transactionId, details, blockNum, statusVariant, status, scriptRoot, tx) {
|
|
@@ -11007,82 +11015,8 @@ async function upsertTransactionRecord(dbId, transactionId, details, blockNum, s
|
|
|
11007
11015
|
}
|
|
11008
11016
|
catch (err) {
|
|
11009
11017
|
logWebStoreError(err, "Failed to insert proven transaction data");
|
|
11010
|
-
throw err;
|
|
11011
11018
|
}
|
|
11012
11019
|
}
|
|
11013
|
-
/**
|
|
11014
|
-
* Applies a batch of transaction updates atomically inside a single Dexie transaction.
|
|
11015
|
-
*
|
|
11016
|
-
* All sub-operations that internally call `db.dexie.transaction()` are auto-joined by Dexie
|
|
11017
|
-
* as nested sub-transactions when run inside this parent transaction, provided the parent
|
|
11018
|
-
* scope is a superset of every sub-transaction scope.
|
|
11019
|
-
*/
|
|
11020
|
-
async function applyTransactionBatch(dbId, payloads) {
|
|
11021
|
-
const db = getDatabase(dbId);
|
|
11022
|
-
await db.dexie.transaction("rw", [
|
|
11023
|
-
db.transactions,
|
|
11024
|
-
db.transactionScripts,
|
|
11025
|
-
db.latestAccountStorages,
|
|
11026
|
-
db.historicalAccountStorages,
|
|
11027
|
-
db.latestStorageMapEntries,
|
|
11028
|
-
db.historicalStorageMapEntries,
|
|
11029
|
-
db.latestAccountAssets,
|
|
11030
|
-
db.historicalAccountAssets,
|
|
11031
|
-
db.latestAccountHeaders,
|
|
11032
|
-
db.historicalAccountHeaders,
|
|
11033
|
-
db.inputNotes,
|
|
11034
|
-
db.outputNotes,
|
|
11035
|
-
db.notesScripts,
|
|
11036
|
-
db.tags,
|
|
11037
|
-
], async () => {
|
|
11038
|
-
for (const payload of payloads) {
|
|
11039
|
-
// 1. Insert the transaction record (script first, then record)
|
|
11040
|
-
const rec = payload.transactionRecord;
|
|
11041
|
-
if (rec.scriptRoot && rec.txScript) {
|
|
11042
|
-
await insertTransactionScript(dbId, rec.scriptRoot, rec.txScript);
|
|
11043
|
-
}
|
|
11044
|
-
await upsertTransactionRecord(dbId, rec.id, rec.details, rec.blockNum, rec.statusVariant, rec.status, rec.scriptRoot);
|
|
11045
|
-
// 2. Apply account state (full or delta)
|
|
11046
|
-
const acct = payload.accountState;
|
|
11047
|
-
if (acct.kind === "full") {
|
|
11048
|
-
await applyFullAccountState(dbId, acct.account);
|
|
11049
|
-
}
|
|
11050
|
-
else {
|
|
11051
|
-
await applyTransactionDelta(dbId, acct.accountId, acct.nonce, acct.updatedSlots, acct.changedMapEntries, acct.changedAssets, acct.codeRoot, acct.storageRoot, acct.vaultRoot, acct.committed, acct.commitment);
|
|
11052
|
-
}
|
|
11053
|
-
// 3. Upsert input and output notes
|
|
11054
|
-
for (const note of payload.inputNotes) {
|
|
11055
|
-
await upsertInputNote(dbId, note.detailsCommitment, note.noteId, note.noteAssets, note.attachments, note.serialNumber, note.inputs, note.noteScriptRoot, note.noteScript, note.nullifier, note.createdAt, note.stateDiscriminant, note.state, note.consumedBlockHeight ?? null, note.consumedTxOrder ?? null, note.consumerAccountId ?? null);
|
|
11056
|
-
}
|
|
11057
|
-
for (const note of payload.outputNotes) {
|
|
11058
|
-
await upsertOutputNote(dbId, note.detailsCommitment, note.noteId, note.noteAssets, note.attachments, note.recipientDigest, note.metadata, note.nullifier, note.expectedHeight, note.stateDiscriminant, note.state);
|
|
11059
|
-
}
|
|
11060
|
-
// 4. Add note tags (deduplicated within the transaction)
|
|
11061
|
-
for (const tagEntry of payload.tags) {
|
|
11062
|
-
const tagArray = new Uint8Array(tagEntry.tag);
|
|
11063
|
-
const tagBase64 = uint8ArrayToBase64(tagArray);
|
|
11064
|
-
const sourceNoteId = tagEntry.sourceNoteId ?? "";
|
|
11065
|
-
const sourceAccountId = tagEntry.sourceAccountId ?? "";
|
|
11066
|
-
const sourceSubscriptionKey = tagEntry.sourceSubscriptionKey ?? "";
|
|
11067
|
-
// Check for existing tag to avoid duplicates (mirrors the Rust add_note_tag logic).
|
|
11068
|
-
// sourceSubscriptionKey is unindexed, so filter on it in memory — distinct
|
|
11069
|
-
// subscriptions may share a tag and must remain separate rows.
|
|
11070
|
-
const existing = await db.tags
|
|
11071
|
-
.where({ tag: tagBase64, sourceNoteId, sourceAccountId })
|
|
11072
|
-
.filter((t) => (t.sourceSubscriptionKey ?? "") === sourceSubscriptionKey)
|
|
11073
|
-
.first();
|
|
11074
|
-
if (!existing) {
|
|
11075
|
-
await db.tags.add({
|
|
11076
|
-
tag: tagBase64,
|
|
11077
|
-
sourceNoteId,
|
|
11078
|
-
sourceAccountId,
|
|
11079
|
-
sourceSubscriptionKey,
|
|
11080
|
-
});
|
|
11081
|
-
}
|
|
11082
|
-
}
|
|
11083
|
-
}
|
|
11084
|
-
});
|
|
11085
|
-
}
|
|
11086
11020
|
|
|
11087
11021
|
async function getNoteTags(dbId) {
|
|
11088
11022
|
try {
|
|
@@ -11108,7 +11042,7 @@ async function getNoteTags(dbId) {
|
|
|
11108
11042
|
async function getSyncHeight(dbId) {
|
|
11109
11043
|
try {
|
|
11110
11044
|
const db = getDatabase(dbId);
|
|
11111
|
-
const record = await db.
|
|
11045
|
+
const record = await db.blockchainCheckpoint.get(1);
|
|
11112
11046
|
if (record) {
|
|
11113
11047
|
let data = {
|
|
11114
11048
|
blockNum: record.blockNum,
|
|
@@ -11123,6 +11057,25 @@ async function getSyncHeight(dbId) {
|
|
|
11123
11057
|
logWebStoreError(error, "Error fetching sync height");
|
|
11124
11058
|
}
|
|
11125
11059
|
}
|
|
11060
|
+
async function getCurrentBlockchainPeaks(dbId) {
|
|
11061
|
+
try {
|
|
11062
|
+
const db = getDatabase(dbId);
|
|
11063
|
+
const record = await db.blockchainCheckpoint.get(1);
|
|
11064
|
+
if (!record || record.partialBlockchainPeaks.length === 0) {
|
|
11065
|
+
return {
|
|
11066
|
+
blockNum: record?.blockNum ?? 0,
|
|
11067
|
+
peaks: uint8ArrayToBase64(new Uint8Array()),
|
|
11068
|
+
};
|
|
11069
|
+
}
|
|
11070
|
+
return {
|
|
11071
|
+
blockNum: record.blockNum,
|
|
11072
|
+
peaks: uint8ArrayToBase64(record.partialBlockchainPeaks),
|
|
11073
|
+
};
|
|
11074
|
+
}
|
|
11075
|
+
catch (error) {
|
|
11076
|
+
logWebStoreError(error, "Error fetching current blockchain peaks");
|
|
11077
|
+
}
|
|
11078
|
+
}
|
|
11126
11079
|
async function addNoteTag(dbId, tag, sourceNoteId, sourceAccountId, sourceSubscriptionKey) {
|
|
11127
11080
|
try {
|
|
11128
11081
|
const db = getDatabase(dbId);
|
|
@@ -11163,10 +11116,10 @@ async function removeNoteTag(dbId, tag, sourceNoteId, sourceAccountId, sourceSub
|
|
|
11163
11116
|
}
|
|
11164
11117
|
async function applyStateSync(dbId, stateUpdate) {
|
|
11165
11118
|
const db = getDatabase(dbId);
|
|
11166
|
-
const { blockNum, flattenedNewBlockHeaders,
|
|
11119
|
+
const { blockNum, flattenedNewBlockHeaders, newPeaks, newBlockNums, blockHasRelevantNotes, serializedNodeIds, serializedNodes, committedNoteTagSources, serializedInputNotes, serializedOutputNotes, accountUpdates, transactionUpdates, } = stateUpdate;
|
|
11167
11120
|
const newBlockHeaders = reconstructFlattenedVec(flattenedNewBlockHeaders);
|
|
11168
11121
|
const tablesToAccess = [
|
|
11169
|
-
db.
|
|
11122
|
+
db.blockchainCheckpoint,
|
|
11170
11123
|
db.inputNotes,
|
|
11171
11124
|
db.outputNotes,
|
|
11172
11125
|
db.notesScripts,
|
|
@@ -11214,46 +11167,41 @@ async function applyStateSync(dbId, stateUpdate) {
|
|
|
11214
11167
|
accountCommitment: accountUpdate.accountCommitment,
|
|
11215
11168
|
accountSeed: accountUpdate.accountSeed,
|
|
11216
11169
|
}))),
|
|
11217
|
-
updateSyncHeight(tx, blockNum),
|
|
11170
|
+
updateSyncHeight(tx, blockNum, newPeaks),
|
|
11218
11171
|
updatePartialBlockchainNodes(tx, serializedNodeIds, serializedNodes),
|
|
11219
11172
|
updateCommittedNoteTags(tx, committedNoteTagSources),
|
|
11220
11173
|
Promise.all(newBlockHeaders.map((newBlockHeader, i) => {
|
|
11221
|
-
|
|
11222
|
-
// blockNum matches the new sync height). That row is always
|
|
11223
|
-
// present in this iteration because `partial_blockchain_updates`
|
|
11224
|
-
// includes the chain tip header by construction.
|
|
11225
|
-
// TODO: potentially move this to be under the sync state info table
|
|
11226
|
-
// as currently done in SQLite
|
|
11227
|
-
const peaks = newBlockNums[i] === blockNum ? partialBlockchainPeaks : undefined;
|
|
11228
|
-
return updateBlockHeader(tx, newBlockNums[i], newBlockHeader, blockHasRelevantNotes[i] == 1, peaks);
|
|
11174
|
+
return updateBlockHeader(tx, newBlockNums[i], newBlockHeader, blockHasRelevantNotes[i] == 1);
|
|
11229
11175
|
})),
|
|
11230
11176
|
]);
|
|
11231
11177
|
});
|
|
11232
11178
|
}
|
|
11233
|
-
|
|
11234
|
-
* Advances `stateSync.blockNum` only when moving forward. Mirrors SQLite's
|
|
11235
|
-
* `UPDATE blockchain_checkpoint ... WHERE block_num < ?`.
|
|
11236
|
-
*/
|
|
11237
|
-
async function updateSyncHeight(tx, blockNum) {
|
|
11179
|
+
async function updateSyncHeight(tx, blockNum, newPeaks) {
|
|
11238
11180
|
try {
|
|
11239
|
-
|
|
11181
|
+
// Only update if moving forward to prevent race conditions.
|
|
11182
|
+
// Peaks travel with blockNum: skipping the height update also skips the
|
|
11183
|
+
// peaks update, by design — a backward-going sync must not overwrite the
|
|
11184
|
+
// newer peaks with older ones.
|
|
11185
|
+
const current = await tx.blockchainCheckpoint.get(1);
|
|
11240
11186
|
if (!current || current.blockNum < blockNum) {
|
|
11241
|
-
await tx.
|
|
11187
|
+
await tx.blockchainCheckpoint.update(1, {
|
|
11242
11188
|
blockNum: blockNum,
|
|
11189
|
+
partialBlockchainPeaks: newPeaks,
|
|
11243
11190
|
});
|
|
11244
11191
|
}
|
|
11245
11192
|
}
|
|
11246
11193
|
catch (error) {
|
|
11194
|
+
// logWebStoreError always re-throws, so a failure here aborts the whole
|
|
11195
|
+
// Dexie rw transaction rather than silently committing a partial update.
|
|
11247
11196
|
logWebStoreError(error, "Failed to update sync height");
|
|
11248
11197
|
}
|
|
11249
11198
|
}
|
|
11250
|
-
async function updateBlockHeader(tx, blockNum, blockHeader, hasClientNotes
|
|
11199
|
+
async function updateBlockHeader(tx, blockNum, blockHeader, hasClientNotes) {
|
|
11251
11200
|
try {
|
|
11252
11201
|
const data = {
|
|
11253
11202
|
blockNum: blockNum,
|
|
11254
11203
|
header: blockHeader,
|
|
11255
11204
|
hasClientNotes: hasClientNotes.toString(),
|
|
11256
|
-
...(partialBlockchainPeaks !== undefined && { partialBlockchainPeaks }),
|
|
11257
11205
|
};
|
|
11258
11206
|
const existingBlockHeader = await tx.blockHeaders.get(blockNum);
|
|
11259
11207
|
if (!existingBlockHeader) {
|
|
@@ -11277,8 +11225,9 @@ async function updatePartialBlockchainNodes(tx, nodeIndexes, nodes) {
|
|
|
11277
11225
|
id: Number(nodeIndexes[index]),
|
|
11278
11226
|
node: node,
|
|
11279
11227
|
}));
|
|
11280
|
-
//
|
|
11281
|
-
await tx
|
|
11228
|
+
// Insert missing nodes and reject conflicting writes
|
|
11229
|
+
await putPartialBlockchainNodesNoOverwrite(tx
|
|
11230
|
+
.partialBlockchainNodes, data);
|
|
11282
11231
|
}
|
|
11283
11232
|
catch (err) {
|
|
11284
11233
|
logWebStoreError(err, "Failed to update partial blockchain nodes");
|
|
@@ -11403,17 +11352,6 @@ class Account {
|
|
|
11403
11352
|
const ret = wasm.account_isFaucet(this.__wbg_ptr);
|
|
11404
11353
|
return ret !== 0;
|
|
11405
11354
|
}
|
|
11406
|
-
/**
|
|
11407
|
-
* Returns true if this is a network account.
|
|
11408
|
-
*
|
|
11409
|
-
* A network account is a public account whose storage
|
|
11410
|
-
* carries the standardized network-account note-script allowlist slot.
|
|
11411
|
-
* @returns {boolean}
|
|
11412
|
-
*/
|
|
11413
|
-
isNetworkAccount() {
|
|
11414
|
-
const ret = wasm.account_isNetworkAccount(this.__wbg_ptr);
|
|
11415
|
-
return ret !== 0;
|
|
11416
|
-
}
|
|
11417
11355
|
/**
|
|
11418
11356
|
* Returns true if the account has not yet been committed to the chain.
|
|
11419
11357
|
* @returns {boolean}
|
|
@@ -11446,20 +11384,6 @@ class Account {
|
|
|
11446
11384
|
const ret = wasm.account_isRegularAccount(this.__wbg_ptr);
|
|
11447
11385
|
return ret !== 0;
|
|
11448
11386
|
}
|
|
11449
|
-
/**
|
|
11450
|
-
* Returns the note-script roots this network account is allowed to
|
|
11451
|
-
* consume, or `undefined` if this is not a network account.
|
|
11452
|
-
* @returns {Word[] | undefined}
|
|
11453
|
-
*/
|
|
11454
|
-
networkNoteAllowlist() {
|
|
11455
|
-
const ret = wasm.account_networkNoteAllowlist(this.__wbg_ptr);
|
|
11456
|
-
let v1;
|
|
11457
|
-
if (ret[0] !== 0) {
|
|
11458
|
-
v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
11459
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
11460
|
-
}
|
|
11461
|
-
return v1;
|
|
11462
|
-
}
|
|
11463
11387
|
/**
|
|
11464
11388
|
* Returns the account nonce, which is incremented on every state update.
|
|
11465
11389
|
* @returns {Felt}
|
|
@@ -11813,6 +11737,18 @@ class AccountComponent {
|
|
|
11813
11737
|
}
|
|
11814
11738
|
return AccountComponent.__wrap(ret[0]);
|
|
11815
11739
|
}
|
|
11740
|
+
/**
|
|
11741
|
+
* Returns the exact compiled code used by this component.
|
|
11742
|
+
*
|
|
11743
|
+
* Link this code when compiling scripts that invoke the component. Rebuilding a library from
|
|
11744
|
+
* the original source can produce different procedure identities than the code installed on
|
|
11745
|
+
* the account.
|
|
11746
|
+
* @returns {AccountComponentCode}
|
|
11747
|
+
*/
|
|
11748
|
+
componentCode() {
|
|
11749
|
+
const ret = wasm.accountcomponent_componentCode(this.__wbg_ptr);
|
|
11750
|
+
return AccountComponentCode.__wrap(ret);
|
|
11751
|
+
}
|
|
11816
11752
|
/**
|
|
11817
11753
|
* @param {Word} commitment
|
|
11818
11754
|
* @param {AuthScheme} auth_scheme
|
|
@@ -11839,42 +11775,6 @@ class AccountComponent {
|
|
|
11839
11775
|
}
|
|
11840
11776
|
return AccountComponent.__wrap(ret[0]);
|
|
11841
11777
|
}
|
|
11842
|
-
/**
|
|
11843
|
-
* Builds the auth component for a network account.
|
|
11844
|
-
*
|
|
11845
|
-
* A network account is a public account carrying this component: its
|
|
11846
|
-
* note-script allowlist is the standardized storage slot the node's
|
|
11847
|
-
* network-transaction builder inspects to identify the account as a network
|
|
11848
|
-
* account and route matching notes to it for auto-consumption. The account
|
|
11849
|
-
* may only consume notes whose script root is in `allowedNoteScriptRoots`
|
|
11850
|
-
* (obtain a root via `NoteScript.root()`).
|
|
11851
|
-
*
|
|
11852
|
-
* `allowedTxScriptRoots` optionally allowlists transaction script roots
|
|
11853
|
-
* (from `TransactionScript.root()`) the account will execute. When omitted
|
|
11854
|
-
* or empty, the account permits no transaction scripts and deploys and
|
|
11855
|
-
* advances via scriptless transactions only. Allowlist a script root only
|
|
11856
|
-
* if the script's effect is safe for *every* possible input: a root pins
|
|
11857
|
-
* the script's code but not its arguments or advice inputs, which the
|
|
11858
|
-
* (arbitrary) transaction submitter controls.
|
|
11859
|
-
*
|
|
11860
|
-
* # Errors
|
|
11861
|
-
* Errors if `allowedNoteScriptRoots` is empty: a network account with no
|
|
11862
|
-
* allowlisted note scripts could never consume a note.
|
|
11863
|
-
* @param {Word[]} allowed_note_script_roots
|
|
11864
|
-
* @param {Word[] | null} [allowed_tx_script_roots]
|
|
11865
|
-
* @returns {AccountComponent}
|
|
11866
|
-
*/
|
|
11867
|
-
static createNetworkAuth(allowed_note_script_roots, allowed_tx_script_roots) {
|
|
11868
|
-
const ptr0 = passArrayJsValueToWasm0(allowed_note_script_roots, wasm.__wbindgen_malloc);
|
|
11869
|
-
const len0 = WASM_VECTOR_LEN;
|
|
11870
|
-
var ptr1 = isLikeNone(allowed_tx_script_roots) ? 0 : passArrayJsValueToWasm0(allowed_tx_script_roots, wasm.__wbindgen_malloc);
|
|
11871
|
-
var len1 = WASM_VECTOR_LEN;
|
|
11872
|
-
const ret = wasm.accountcomponent_createNetworkAuth(ptr0, len0, ptr1, len1);
|
|
11873
|
-
if (ret[2]) {
|
|
11874
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
11875
|
-
}
|
|
11876
|
-
return AccountComponent.__wrap(ret[0]);
|
|
11877
|
-
}
|
|
11878
11778
|
/**
|
|
11879
11779
|
* Creates an account component from a compiled library and storage slots.
|
|
11880
11780
|
* @param {Library} library
|
|
@@ -12001,8 +11901,10 @@ if (Symbol.dispose) AccountComponentCode.prototype[Symbol.dispose] = AccountComp
|
|
|
12001
11901
|
* `AccountDelta` stores the differences between two account states.
|
|
12002
11902
|
*
|
|
12003
11903
|
* The differences are represented as follows:
|
|
12004
|
-
* - `storage`: an `
|
|
12005
|
-
*
|
|
11904
|
+
* - `storage`: an `AccountStoragePatch` with the absolute final values of changed storage slots
|
|
11905
|
+
* (storage changes have identical semantics in the delta and patch models).
|
|
11906
|
+
* - `vault`: an `AccountVaultDelta` object that contains the relative changes to the account
|
|
11907
|
+
* vault.
|
|
12006
11908
|
* - `nonce`: if the nonce of the account has changed, the new nonce is stored here.
|
|
12007
11909
|
*/
|
|
12008
11910
|
class AccountDelta {
|
|
@@ -12068,12 +11970,12 @@ class AccountDelta {
|
|
|
12068
11970
|
return ret;
|
|
12069
11971
|
}
|
|
12070
11972
|
/**
|
|
12071
|
-
* Returns the storage
|
|
12072
|
-
* @returns {
|
|
11973
|
+
* Returns the storage patch (storage changes are absolute in both models).
|
|
11974
|
+
* @returns {AccountStoragePatch}
|
|
12073
11975
|
*/
|
|
12074
11976
|
storage() {
|
|
12075
11977
|
const ret = wasm.accountdelta_storage(this.__wbg_ptr);
|
|
12076
|
-
return
|
|
11978
|
+
return AccountStoragePatch.__wrap(ret);
|
|
12077
11979
|
}
|
|
12078
11980
|
/**
|
|
12079
11981
|
* Returns the vault delta.
|
|
@@ -12468,6 +12370,90 @@ const AccountInterface = Object.freeze({
|
|
|
12468
12370
|
BasicWallet: 0, "0": "BasicWallet",
|
|
12469
12371
|
});
|
|
12470
12372
|
|
|
12373
|
+
/**
|
|
12374
|
+
* Describes the new absolute account state produced by a transaction.
|
|
12375
|
+
*/
|
|
12376
|
+
class AccountPatch {
|
|
12377
|
+
static __wrap(ptr) {
|
|
12378
|
+
ptr = ptr >>> 0;
|
|
12379
|
+
const obj = Object.create(AccountPatch.prototype);
|
|
12380
|
+
obj.__wbg_ptr = ptr;
|
|
12381
|
+
AccountPatchFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
12382
|
+
return obj;
|
|
12383
|
+
}
|
|
12384
|
+
__destroy_into_raw() {
|
|
12385
|
+
const ptr = this.__wbg_ptr;
|
|
12386
|
+
this.__wbg_ptr = 0;
|
|
12387
|
+
AccountPatchFinalization.unregister(this);
|
|
12388
|
+
return ptr;
|
|
12389
|
+
}
|
|
12390
|
+
free() {
|
|
12391
|
+
const ptr = this.__destroy_into_raw();
|
|
12392
|
+
wasm.__wbg_accountpatch_free(ptr, 0);
|
|
12393
|
+
}
|
|
12394
|
+
/**
|
|
12395
|
+
* Deserializes an account patch from bytes.
|
|
12396
|
+
* @param {Uint8Array} bytes
|
|
12397
|
+
* @returns {AccountPatch}
|
|
12398
|
+
*/
|
|
12399
|
+
static deserialize(bytes) {
|
|
12400
|
+
const ret = wasm.accountpatch_deserialize(bytes);
|
|
12401
|
+
if (ret[2]) {
|
|
12402
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
12403
|
+
}
|
|
12404
|
+
return AccountPatch.__wrap(ret[0]);
|
|
12405
|
+
}
|
|
12406
|
+
/**
|
|
12407
|
+
* Returns the final nonce, or `None` if it was unchanged.
|
|
12408
|
+
* @returns {Felt | undefined}
|
|
12409
|
+
*/
|
|
12410
|
+
finalNonce() {
|
|
12411
|
+
const ret = wasm.accountpatch_finalNonce(this.__wbg_ptr);
|
|
12412
|
+
return ret === 0 ? undefined : Felt.__wrap(ret);
|
|
12413
|
+
}
|
|
12414
|
+
/**
|
|
12415
|
+
* Returns the affected account ID.
|
|
12416
|
+
* @returns {AccountId}
|
|
12417
|
+
*/
|
|
12418
|
+
id() {
|
|
12419
|
+
const ret = wasm.accountpatch_id(this.__wbg_ptr);
|
|
12420
|
+
return AccountId.__wrap(ret);
|
|
12421
|
+
}
|
|
12422
|
+
/**
|
|
12423
|
+
* Returns true if this patch contains no state changes.
|
|
12424
|
+
* @returns {boolean}
|
|
12425
|
+
*/
|
|
12426
|
+
isEmpty() {
|
|
12427
|
+
const ret = wasm.accountpatch_isEmpty(this.__wbg_ptr);
|
|
12428
|
+
return ret !== 0;
|
|
12429
|
+
}
|
|
12430
|
+
/**
|
|
12431
|
+
* Serializes the account patch into bytes.
|
|
12432
|
+
* @returns {Uint8Array}
|
|
12433
|
+
*/
|
|
12434
|
+
serialize() {
|
|
12435
|
+
const ret = wasm.accountpatch_serialize(this.__wbg_ptr);
|
|
12436
|
+
return ret;
|
|
12437
|
+
}
|
|
12438
|
+
/**
|
|
12439
|
+
* Returns the account storage patch.
|
|
12440
|
+
* @returns {AccountStoragePatch}
|
|
12441
|
+
*/
|
|
12442
|
+
storage() {
|
|
12443
|
+
const ret = wasm.accountpatch_storage(this.__wbg_ptr);
|
|
12444
|
+
return AccountStoragePatch.__wrap(ret);
|
|
12445
|
+
}
|
|
12446
|
+
/**
|
|
12447
|
+
* Returns the account vault patch.
|
|
12448
|
+
* @returns {AccountVaultPatch}
|
|
12449
|
+
*/
|
|
12450
|
+
vault() {
|
|
12451
|
+
const ret = wasm.accountpatch_vault(this.__wbg_ptr);
|
|
12452
|
+
return AccountVaultPatch.__wrap(ret);
|
|
12453
|
+
}
|
|
12454
|
+
}
|
|
12455
|
+
if (Symbol.dispose) AccountPatch.prototype[Symbol.dispose] = AccountPatch.prototype.free;
|
|
12456
|
+
|
|
12471
12457
|
/**
|
|
12472
12458
|
* Proof of existence of an account's state at a specific block number, as returned by the node.
|
|
12473
12459
|
*
|
|
@@ -12941,74 +12927,6 @@ class AccountStorage {
|
|
|
12941
12927
|
}
|
|
12942
12928
|
if (Symbol.dispose) AccountStorage.prototype[Symbol.dispose] = AccountStorage.prototype.free;
|
|
12943
12929
|
|
|
12944
|
-
/**
|
|
12945
|
-
* `AccountStorageDelta` stores the differences between two states of account storage.
|
|
12946
|
-
*
|
|
12947
|
-
* The delta consists of two maps:
|
|
12948
|
-
* - A map containing the updates to value storage slots. The keys in this map are indexes of the
|
|
12949
|
-
* updated storage slots and the values are the new values for these slots.
|
|
12950
|
-
* - A map containing updates to storage maps. The keys in this map are indexes of the updated
|
|
12951
|
-
* storage slots and the values are corresponding storage map delta objects.
|
|
12952
|
-
*/
|
|
12953
|
-
class AccountStorageDelta {
|
|
12954
|
-
static __wrap(ptr) {
|
|
12955
|
-
ptr = ptr >>> 0;
|
|
12956
|
-
const obj = Object.create(AccountStorageDelta.prototype);
|
|
12957
|
-
obj.__wbg_ptr = ptr;
|
|
12958
|
-
AccountStorageDeltaFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
12959
|
-
return obj;
|
|
12960
|
-
}
|
|
12961
|
-
__destroy_into_raw() {
|
|
12962
|
-
const ptr = this.__wbg_ptr;
|
|
12963
|
-
this.__wbg_ptr = 0;
|
|
12964
|
-
AccountStorageDeltaFinalization.unregister(this);
|
|
12965
|
-
return ptr;
|
|
12966
|
-
}
|
|
12967
|
-
free() {
|
|
12968
|
-
const ptr = this.__destroy_into_raw();
|
|
12969
|
-
wasm.__wbg_accountstoragedelta_free(ptr, 0);
|
|
12970
|
-
}
|
|
12971
|
-
/**
|
|
12972
|
-
* Deserializes a storage delta from bytes.
|
|
12973
|
-
* @param {Uint8Array} bytes
|
|
12974
|
-
* @returns {AccountStorageDelta}
|
|
12975
|
-
*/
|
|
12976
|
-
static deserialize(bytes) {
|
|
12977
|
-
const ret = wasm.accountstoragedelta_deserialize(bytes);
|
|
12978
|
-
if (ret[2]) {
|
|
12979
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
12980
|
-
}
|
|
12981
|
-
return AccountStorageDelta.__wrap(ret[0]);
|
|
12982
|
-
}
|
|
12983
|
-
/**
|
|
12984
|
-
* Returns true if no storage slots are changed.
|
|
12985
|
-
* @returns {boolean}
|
|
12986
|
-
*/
|
|
12987
|
-
isEmpty() {
|
|
12988
|
-
const ret = wasm.accountstoragedelta_isEmpty(this.__wbg_ptr);
|
|
12989
|
-
return ret !== 0;
|
|
12990
|
-
}
|
|
12991
|
-
/**
|
|
12992
|
-
* Serializes the storage delta into bytes.
|
|
12993
|
-
* @returns {Uint8Array}
|
|
12994
|
-
*/
|
|
12995
|
-
serialize() {
|
|
12996
|
-
const ret = wasm.accountstoragedelta_serialize(this.__wbg_ptr);
|
|
12997
|
-
return ret;
|
|
12998
|
-
}
|
|
12999
|
-
/**
|
|
13000
|
-
* Returns the new values for modified storage slots.
|
|
13001
|
-
* @returns {Word[]}
|
|
13002
|
-
*/
|
|
13003
|
-
values() {
|
|
13004
|
-
const ret = wasm.accountstoragedelta_values(this.__wbg_ptr);
|
|
13005
|
-
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
13006
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
13007
|
-
return v1;
|
|
13008
|
-
}
|
|
13009
|
-
}
|
|
13010
|
-
if (Symbol.dispose) AccountStorageDelta.prototype[Symbol.dispose] = AccountStorageDelta.prototype.free;
|
|
13011
|
-
|
|
13012
12930
|
/**
|
|
13013
12931
|
* Storage visibility mode for an account.
|
|
13014
12932
|
*
|
|
@@ -13091,8 +13009,70 @@ class AccountStorageMode {
|
|
|
13091
13009
|
}
|
|
13092
13010
|
if (Symbol.dispose) AccountStorageMode.prototype[Symbol.dispose] = AccountStorageMode.prototype.free;
|
|
13093
13011
|
|
|
13094
|
-
|
|
13095
|
-
|
|
13012
|
+
/**
|
|
13013
|
+
* Absolute updates to named account storage slots.
|
|
13014
|
+
*/
|
|
13015
|
+
class AccountStoragePatch {
|
|
13016
|
+
static __wrap(ptr) {
|
|
13017
|
+
ptr = ptr >>> 0;
|
|
13018
|
+
const obj = Object.create(AccountStoragePatch.prototype);
|
|
13019
|
+
obj.__wbg_ptr = ptr;
|
|
13020
|
+
AccountStoragePatchFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
13021
|
+
return obj;
|
|
13022
|
+
}
|
|
13023
|
+
__destroy_into_raw() {
|
|
13024
|
+
const ptr = this.__wbg_ptr;
|
|
13025
|
+
this.__wbg_ptr = 0;
|
|
13026
|
+
AccountStoragePatchFinalization.unregister(this);
|
|
13027
|
+
return ptr;
|
|
13028
|
+
}
|
|
13029
|
+
free() {
|
|
13030
|
+
const ptr = this.__destroy_into_raw();
|
|
13031
|
+
wasm.__wbg_accountstoragepatch_free(ptr, 0);
|
|
13032
|
+
}
|
|
13033
|
+
/**
|
|
13034
|
+
* Deserializes a storage patch from bytes.
|
|
13035
|
+
* @param {Uint8Array} bytes
|
|
13036
|
+
* @returns {AccountStoragePatch}
|
|
13037
|
+
*/
|
|
13038
|
+
static deserialize(bytes) {
|
|
13039
|
+
const ret = wasm.accountstoragepatch_deserialize(bytes);
|
|
13040
|
+
if (ret[2]) {
|
|
13041
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
13042
|
+
}
|
|
13043
|
+
return AccountStoragePatch.__wrap(ret[0]);
|
|
13044
|
+
}
|
|
13045
|
+
/**
|
|
13046
|
+
* Returns true if no storage slots are changed.
|
|
13047
|
+
* @returns {boolean}
|
|
13048
|
+
*/
|
|
13049
|
+
isEmpty() {
|
|
13050
|
+
const ret = wasm.accountstoragepatch_isEmpty(this.__wbg_ptr);
|
|
13051
|
+
return ret !== 0;
|
|
13052
|
+
}
|
|
13053
|
+
/**
|
|
13054
|
+
* Serializes the storage patch into bytes.
|
|
13055
|
+
* @returns {Uint8Array}
|
|
13056
|
+
*/
|
|
13057
|
+
serialize() {
|
|
13058
|
+
const ret = wasm.accountstoragepatch_serialize(this.__wbg_ptr);
|
|
13059
|
+
return ret;
|
|
13060
|
+
}
|
|
13061
|
+
/**
|
|
13062
|
+
* Returns the final values for created or updated value slots.
|
|
13063
|
+
* @returns {Word[]}
|
|
13064
|
+
*/
|
|
13065
|
+
values() {
|
|
13066
|
+
const ret = wasm.accountstoragepatch_values(this.__wbg_ptr);
|
|
13067
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
13068
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
13069
|
+
return v1;
|
|
13070
|
+
}
|
|
13071
|
+
}
|
|
13072
|
+
if (Symbol.dispose) AccountStoragePatch.prototype[Symbol.dispose] = AccountStoragePatch.prototype.free;
|
|
13073
|
+
|
|
13074
|
+
class AccountStorageRequirements {
|
|
13075
|
+
static __wrap(ptr) {
|
|
13096
13076
|
ptr = ptr >>> 0;
|
|
13097
13077
|
const obj = Object.create(AccountStorageRequirements.prototype);
|
|
13098
13078
|
obj.__wbg_ptr = ptr;
|
|
@@ -13234,6 +13214,86 @@ class AccountVaultDelta {
|
|
|
13234
13214
|
}
|
|
13235
13215
|
if (Symbol.dispose) AccountVaultDelta.prototype[Symbol.dispose] = AccountVaultDelta.prototype.free;
|
|
13236
13216
|
|
|
13217
|
+
/**
|
|
13218
|
+
* Absolute updates to account vault entries.
|
|
13219
|
+
*/
|
|
13220
|
+
class AccountVaultPatch {
|
|
13221
|
+
static __wrap(ptr) {
|
|
13222
|
+
ptr = ptr >>> 0;
|
|
13223
|
+
const obj = Object.create(AccountVaultPatch.prototype);
|
|
13224
|
+
obj.__wbg_ptr = ptr;
|
|
13225
|
+
AccountVaultPatchFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
13226
|
+
return obj;
|
|
13227
|
+
}
|
|
13228
|
+
__destroy_into_raw() {
|
|
13229
|
+
const ptr = this.__wbg_ptr;
|
|
13230
|
+
this.__wbg_ptr = 0;
|
|
13231
|
+
AccountVaultPatchFinalization.unregister(this);
|
|
13232
|
+
return ptr;
|
|
13233
|
+
}
|
|
13234
|
+
free() {
|
|
13235
|
+
const ptr = this.__destroy_into_raw();
|
|
13236
|
+
wasm.__wbg_accountvaultpatch_free(ptr, 0);
|
|
13237
|
+
}
|
|
13238
|
+
/**
|
|
13239
|
+
* Deserializes a vault patch from bytes.
|
|
13240
|
+
* @param {Uint8Array} bytes
|
|
13241
|
+
* @returns {AccountVaultPatch}
|
|
13242
|
+
*/
|
|
13243
|
+
static deserialize(bytes) {
|
|
13244
|
+
const ret = wasm.accountvaultpatch_deserialize(bytes);
|
|
13245
|
+
if (ret[2]) {
|
|
13246
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
13247
|
+
}
|
|
13248
|
+
return AccountVaultPatch.__wrap(ret[0]);
|
|
13249
|
+
}
|
|
13250
|
+
/**
|
|
13251
|
+
* Returns true if no vault entries are changed.
|
|
13252
|
+
* @returns {boolean}
|
|
13253
|
+
*/
|
|
13254
|
+
isEmpty() {
|
|
13255
|
+
const ret = wasm.accountstoragepatch_isEmpty(this.__wbg_ptr);
|
|
13256
|
+
return ret !== 0;
|
|
13257
|
+
}
|
|
13258
|
+
/**
|
|
13259
|
+
* Returns the number of changed vault entries.
|
|
13260
|
+
* @returns {number}
|
|
13261
|
+
*/
|
|
13262
|
+
numAssets() {
|
|
13263
|
+
const ret = wasm.accountvaultpatch_numAssets(this.__wbg_ptr);
|
|
13264
|
+
return ret >>> 0;
|
|
13265
|
+
}
|
|
13266
|
+
/**
|
|
13267
|
+
* Returns the IDs of removed assets as their canonical words.
|
|
13268
|
+
* @returns {Word[]}
|
|
13269
|
+
*/
|
|
13270
|
+
removedAssetIds() {
|
|
13271
|
+
const ret = wasm.accountvaultpatch_removedAssetIds(this.__wbg_ptr);
|
|
13272
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
13273
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
13274
|
+
return v1;
|
|
13275
|
+
}
|
|
13276
|
+
/**
|
|
13277
|
+
* Serializes the vault patch into bytes.
|
|
13278
|
+
* @returns {Uint8Array}
|
|
13279
|
+
*/
|
|
13280
|
+
serialize() {
|
|
13281
|
+
const ret = wasm.accountvaultpatch_serialize(this.__wbg_ptr);
|
|
13282
|
+
return ret;
|
|
13283
|
+
}
|
|
13284
|
+
/**
|
|
13285
|
+
* Returns fungible assets whose final balance was added or updated.
|
|
13286
|
+
* @returns {FungibleAsset[]}
|
|
13287
|
+
*/
|
|
13288
|
+
updatedFungibleAssets() {
|
|
13289
|
+
const ret = wasm.accountvaultpatch_updatedFungibleAssets(this.__wbg_ptr);
|
|
13290
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
13291
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
13292
|
+
return v1;
|
|
13293
|
+
}
|
|
13294
|
+
}
|
|
13295
|
+
if (Symbol.dispose) AccountVaultPatch.prototype[Symbol.dispose] = AccountVaultPatch.prototype.free;
|
|
13296
|
+
|
|
13237
13297
|
/**
|
|
13238
13298
|
* Representation of a Miden address (account ID plus routing parameters).
|
|
13239
13299
|
*/
|
|
@@ -13425,13 +13485,6 @@ if (Symbol.dispose) AdviceInputs.prototype[Symbol.dispose] = AdviceInputs.protot
|
|
|
13425
13485
|
* Map of advice values keyed by words for script execution.
|
|
13426
13486
|
*/
|
|
13427
13487
|
class AdviceMap {
|
|
13428
|
-
static __wrap(ptr) {
|
|
13429
|
-
ptr = ptr >>> 0;
|
|
13430
|
-
const obj = Object.create(AdviceMap.prototype);
|
|
13431
|
-
obj.__wbg_ptr = ptr;
|
|
13432
|
-
AdviceMapFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
13433
|
-
return obj;
|
|
13434
|
-
}
|
|
13435
13488
|
__destroy_into_raw() {
|
|
13436
13489
|
const ptr = this.__wbg_ptr;
|
|
13437
13490
|
this.__wbg_ptr = 0;
|
|
@@ -13753,13 +13806,10 @@ class AuthSecretKey {
|
|
|
13753
13806
|
if (Symbol.dispose) AuthSecretKey.prototype[Symbol.dispose] = AuthSecretKey.prototype.free;
|
|
13754
13807
|
|
|
13755
13808
|
/**
|
|
13756
|
-
* Provides metadata for a fungible faucet account component.
|
|
13809
|
+
* Provides metadata for a basic fungible faucet account component.
|
|
13757
13810
|
*
|
|
13758
|
-
* Reads the on-chain `FungibleFaucet` component for the account, which holds the
|
|
13759
|
-
* info (symbol
|
|
13760
|
-
* "basic" public faucets and network-style faucets — in the current protocol the distinction is
|
|
13761
|
-
* a function of the surrounding account configuration (account type, auth, access control), not
|
|
13762
|
-
* of the faucet component itself — so this reads metadata from either kind of faucet account.
|
|
13811
|
+
* Reads the on-chain [`FungibleFaucet`] component for the account, which holds the
|
|
13812
|
+
* per-token info (symbol/decimals/maxSupply).
|
|
13763
13813
|
*/
|
|
13764
13814
|
class BasicFungibleFaucetComponent {
|
|
13765
13815
|
static __wrap(ptr) {
|
|
@@ -13787,32 +13837,6 @@ class BasicFungibleFaucetComponent {
|
|
|
13787
13837
|
const ret = wasm.basicfungiblefaucetcomponent_decimals(this.__wbg_ptr);
|
|
13788
13838
|
return ret;
|
|
13789
13839
|
}
|
|
13790
|
-
/**
|
|
13791
|
-
* Returns the optional free-form token description, or `undefined` when unset.
|
|
13792
|
-
* @returns {string | undefined}
|
|
13793
|
-
*/
|
|
13794
|
-
description() {
|
|
13795
|
-
const ret = wasm.basicfungiblefaucetcomponent_description(this.__wbg_ptr);
|
|
13796
|
-
let v1;
|
|
13797
|
-
if (ret[0] !== 0) {
|
|
13798
|
-
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
13799
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
13800
|
-
}
|
|
13801
|
-
return v1;
|
|
13802
|
-
}
|
|
13803
|
-
/**
|
|
13804
|
-
* Returns the optional external link (e.g. project website), or `undefined` when unset.
|
|
13805
|
-
* @returns {string | undefined}
|
|
13806
|
-
*/
|
|
13807
|
-
externalLink() {
|
|
13808
|
-
const ret = wasm.basicfungiblefaucetcomponent_externalLink(this.__wbg_ptr);
|
|
13809
|
-
let v1;
|
|
13810
|
-
if (ret[0] !== 0) {
|
|
13811
|
-
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
13812
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
13813
|
-
}
|
|
13814
|
-
return v1;
|
|
13815
|
-
}
|
|
13816
13840
|
/**
|
|
13817
13841
|
* Extracts faucet metadata from an account.
|
|
13818
13842
|
* @param {Account} account
|
|
@@ -13827,19 +13851,6 @@ class BasicFungibleFaucetComponent {
|
|
|
13827
13851
|
}
|
|
13828
13852
|
return BasicFungibleFaucetComponent.__wrap(ret[0]);
|
|
13829
13853
|
}
|
|
13830
|
-
/**
|
|
13831
|
-
* Returns the optional token logo URI, or `undefined` when unset.
|
|
13832
|
-
* @returns {string | undefined}
|
|
13833
|
-
*/
|
|
13834
|
-
logoUri() {
|
|
13835
|
-
const ret = wasm.basicfungiblefaucetcomponent_logoUri(this.__wbg_ptr);
|
|
13836
|
-
let v1;
|
|
13837
|
-
if (ret[0] !== 0) {
|
|
13838
|
-
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
13839
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
13840
|
-
}
|
|
13841
|
-
return v1;
|
|
13842
|
-
}
|
|
13843
13854
|
/**
|
|
13844
13855
|
* Returns the maximum token supply.
|
|
13845
13856
|
* @returns {Felt}
|
|
@@ -13856,30 +13867,6 @@ class BasicFungibleFaucetComponent {
|
|
|
13856
13867
|
const ret = wasm.basicfungiblefaucetcomponent_symbol(this.__wbg_ptr);
|
|
13857
13868
|
return TokenSymbol.__wrap(ret);
|
|
13858
13869
|
}
|
|
13859
|
-
/**
|
|
13860
|
-
* Returns the human-readable token name.
|
|
13861
|
-
* @returns {string}
|
|
13862
|
-
*/
|
|
13863
|
-
tokenName() {
|
|
13864
|
-
let deferred1_0;
|
|
13865
|
-
let deferred1_1;
|
|
13866
|
-
try {
|
|
13867
|
-
const ret = wasm.basicfungiblefaucetcomponent_tokenName(this.__wbg_ptr);
|
|
13868
|
-
deferred1_0 = ret[0];
|
|
13869
|
-
deferred1_1 = ret[1];
|
|
13870
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
13871
|
-
} finally {
|
|
13872
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
13873
|
-
}
|
|
13874
|
-
}
|
|
13875
|
-
/**
|
|
13876
|
-
* Returns the current token supply (the amount minted so far).
|
|
13877
|
-
* @returns {Felt}
|
|
13878
|
-
*/
|
|
13879
|
-
tokenSupply() {
|
|
13880
|
-
const ret = wasm.basicfungiblefaucetcomponent_tokenSupply(this.__wbg_ptr);
|
|
13881
|
-
return Felt.__wrap(ret);
|
|
13882
|
-
}
|
|
13883
13870
|
}
|
|
13884
13871
|
if (Symbol.dispose) BasicFungibleFaucetComponent.prototype[Symbol.dispose] = BasicFungibleFaucetComponent.prototype.free;
|
|
13885
13872
|
|
|
@@ -13940,7 +13927,7 @@ class BlockHeader {
|
|
|
13940
13927
|
* @returns {Word}
|
|
13941
13928
|
*/
|
|
13942
13929
|
commitment() {
|
|
13943
|
-
const ret = wasm.
|
|
13930
|
+
const ret = wasm.accountbuilderresult_seed(this.__wbg_ptr);
|
|
13944
13931
|
return Word.__wrap(ret);
|
|
13945
13932
|
}
|
|
13946
13933
|
/**
|
|
@@ -13985,7 +13972,7 @@ class BlockHeader {
|
|
|
13985
13972
|
* @returns {Word}
|
|
13986
13973
|
*/
|
|
13987
13974
|
proofCommitment() {
|
|
13988
|
-
const ret = wasm.
|
|
13975
|
+
const ret = wasm.accountbuilderresult_seed(this.__wbg_ptr);
|
|
13989
13976
|
return Word.__wrap(ret);
|
|
13990
13977
|
}
|
|
13991
13978
|
/**
|
|
@@ -14094,6 +14081,26 @@ class CodeBuilder {
|
|
|
14094
14081
|
}
|
|
14095
14082
|
return AccountComponentCode.__wrap(ret[0]);
|
|
14096
14083
|
}
|
|
14084
|
+
/**
|
|
14085
|
+
* Compiles account component code under an explicit module path.
|
|
14086
|
+
*
|
|
14087
|
+
* The module path is part of procedure identity in Miden Assembly 0.25. Callers that also
|
|
14088
|
+
* link this component into a transaction script must use the same path for both operations.
|
|
14089
|
+
* @param {string} component_path
|
|
14090
|
+
* @param {string} account_code
|
|
14091
|
+
* @returns {AccountComponentCode}
|
|
14092
|
+
*/
|
|
14093
|
+
compileAccountComponentCodeWithPath(component_path, account_code) {
|
|
14094
|
+
const ptr0 = passStringToWasm0(component_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
14095
|
+
const len0 = WASM_VECTOR_LEN;
|
|
14096
|
+
const ptr1 = passStringToWasm0(account_code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
14097
|
+
const len1 = WASM_VECTOR_LEN;
|
|
14098
|
+
const ret = wasm.codebuilder_compileAccountComponentCodeWithPath(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
14099
|
+
if (ret[2]) {
|
|
14100
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
14101
|
+
}
|
|
14102
|
+
return AccountComponentCode.__wrap(ret[0]);
|
|
14103
|
+
}
|
|
14097
14104
|
/**
|
|
14098
14105
|
* Given a Note Script's source code, compiles it with the available
|
|
14099
14106
|
* modules under this builder. Returns the compiled script.
|
|
@@ -14124,6 +14131,20 @@ class CodeBuilder {
|
|
|
14124
14131
|
}
|
|
14125
14132
|
return TransactionScript.__wrap(ret[0]);
|
|
14126
14133
|
}
|
|
14134
|
+
/**
|
|
14135
|
+
* Dynamically links the exact library installed by an account component.
|
|
14136
|
+
*
|
|
14137
|
+
* Use this for component procedures that are available on-chain and invoked with dynamic
|
|
14138
|
+
* calls, including foreign procedure invocation.
|
|
14139
|
+
* @param {AccountComponentCode} account_component_code
|
|
14140
|
+
*/
|
|
14141
|
+
linkDynamicAccountComponentCode(account_component_code) {
|
|
14142
|
+
_assertClass(account_component_code, AccountComponentCode);
|
|
14143
|
+
const ret = wasm.codebuilder_linkDynamicAccountComponentCode(this.__wbg_ptr, account_component_code.__wbg_ptr);
|
|
14144
|
+
if (ret[1]) {
|
|
14145
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
14146
|
+
}
|
|
14147
|
+
}
|
|
14127
14148
|
/**
|
|
14128
14149
|
* This is useful to dynamically link the {@link Library} of a foreign account
|
|
14129
14150
|
* that is invoked using foreign procedure invocation (FPI). Its code is available
|
|
@@ -14156,6 +14177,20 @@ class CodeBuilder {
|
|
|
14156
14177
|
throw takeFromExternrefTable0(ret[0]);
|
|
14157
14178
|
}
|
|
14158
14179
|
}
|
|
14180
|
+
/**
|
|
14181
|
+
* Statically links the exact library installed by an account component.
|
|
14182
|
+
*
|
|
14183
|
+
* This should be preferred over rebuilding the component source with `buildLibrary`, because
|
|
14184
|
+
* the installed component code is the source of truth for its procedure identities.
|
|
14185
|
+
* @param {AccountComponentCode} account_component_code
|
|
14186
|
+
*/
|
|
14187
|
+
linkStaticAccountComponentCode(account_component_code) {
|
|
14188
|
+
_assertClass(account_component_code, AccountComponentCode);
|
|
14189
|
+
const ret = wasm.codebuilder_linkStaticAccountComponentCode(this.__wbg_ptr, account_component_code.__wbg_ptr);
|
|
14190
|
+
if (ret[1]) {
|
|
14191
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
14192
|
+
}
|
|
14193
|
+
}
|
|
14159
14194
|
/**
|
|
14160
14195
|
* Statically links the given library.
|
|
14161
14196
|
*
|
|
@@ -14447,111 +14482,13 @@ class Endpoint {
|
|
|
14447
14482
|
}
|
|
14448
14483
|
if (Symbol.dispose) Endpoint.prototype[Symbol.dispose] = Endpoint.prototype.free;
|
|
14449
14484
|
|
|
14450
|
-
/**
|
|
14451
|
-
* A 20-byte Ethereum address, used as the destination of an `AggLayer` bridge-out (B2AGG) note.
|
|
14452
|
-
*
|
|
14453
|
-
* Construct one from a hex string with [`EthAddress::from_hex`] (the `0x` prefix is optional) or
|
|
14454
|
-
* from raw bytes with [`EthAddress::from_bytes`]. The canonical lowercase, `0x`-prefixed hex form
|
|
14455
|
-
* is available via [`EthAddress::to_hex`] (also exposed as `toString`).
|
|
14456
|
-
*/
|
|
14457
|
-
class EthAddress {
|
|
14458
|
-
static __wrap(ptr) {
|
|
14459
|
-
ptr = ptr >>> 0;
|
|
14460
|
-
const obj = Object.create(EthAddress.prototype);
|
|
14461
|
-
obj.__wbg_ptr = ptr;
|
|
14462
|
-
EthAddressFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
14463
|
-
return obj;
|
|
14464
|
-
}
|
|
14465
|
-
__destroy_into_raw() {
|
|
14466
|
-
const ptr = this.__wbg_ptr;
|
|
14467
|
-
this.__wbg_ptr = 0;
|
|
14468
|
-
EthAddressFinalization.unregister(this);
|
|
14469
|
-
return ptr;
|
|
14470
|
-
}
|
|
14471
|
-
free() {
|
|
14472
|
-
const ptr = this.__destroy_into_raw();
|
|
14473
|
-
wasm.__wbg_ethaddress_free(ptr, 0);
|
|
14474
|
-
}
|
|
14475
|
-
/**
|
|
14476
|
-
* Builds an Ethereum address from its raw 20-byte big-endian representation.
|
|
14477
|
-
*
|
|
14478
|
-
* Returns an error if the input is not exactly 20 bytes long.
|
|
14479
|
-
* @param {Uint8Array} bytes
|
|
14480
|
-
* @returns {EthAddress}
|
|
14481
|
-
*/
|
|
14482
|
-
static fromBytes(bytes) {
|
|
14483
|
-
const ret = wasm.ethaddress_fromBytes(bytes);
|
|
14484
|
-
if (ret[2]) {
|
|
14485
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
14486
|
-
}
|
|
14487
|
-
return EthAddress.__wrap(ret[0]);
|
|
14488
|
-
}
|
|
14489
|
-
/**
|
|
14490
|
-
* Builds an Ethereum address from a hex string (with or without the `0x` prefix).
|
|
14491
|
-
*
|
|
14492
|
-
* Returns an error if the string is not valid hex or does not encode exactly 20 bytes.
|
|
14493
|
-
* @param {string} hex
|
|
14494
|
-
* @returns {EthAddress}
|
|
14495
|
-
*/
|
|
14496
|
-
static fromHex(hex) {
|
|
14497
|
-
const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
14498
|
-
const len0 = WASM_VECTOR_LEN;
|
|
14499
|
-
const ret = wasm.ethaddress_fromHex(ptr0, len0);
|
|
14500
|
-
if (ret[2]) {
|
|
14501
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
14502
|
-
}
|
|
14503
|
-
return EthAddress.__wrap(ret[0]);
|
|
14504
|
-
}
|
|
14505
|
-
/**
|
|
14506
|
-
* Returns the raw 20-byte big-endian representation of the address.
|
|
14507
|
-
* @returns {Uint8Array}
|
|
14508
|
-
*/
|
|
14509
|
-
toBytes() {
|
|
14510
|
-
const ret = wasm.ethaddress_toBytes(this.__wbg_ptr);
|
|
14511
|
-
return ret;
|
|
14512
|
-
}
|
|
14513
|
-
/**
|
|
14514
|
-
* Returns the canonical lowercase, `0x`-prefixed hex representation of the address.
|
|
14515
|
-
* @returns {string}
|
|
14516
|
-
*/
|
|
14517
|
-
toHex() {
|
|
14518
|
-
let deferred1_0;
|
|
14519
|
-
let deferred1_1;
|
|
14520
|
-
try {
|
|
14521
|
-
const ret = wasm.ethaddress_toHex(this.__wbg_ptr);
|
|
14522
|
-
deferred1_0 = ret[0];
|
|
14523
|
-
deferred1_1 = ret[1];
|
|
14524
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
14525
|
-
} finally {
|
|
14526
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
14527
|
-
}
|
|
14528
|
-
}
|
|
14529
|
-
/**
|
|
14530
|
-
* Returns the canonical lowercase, `0x`-prefixed hex representation of the address.
|
|
14531
|
-
* @returns {string}
|
|
14532
|
-
*/
|
|
14533
|
-
toString() {
|
|
14534
|
-
let deferred1_0;
|
|
14535
|
-
let deferred1_1;
|
|
14536
|
-
try {
|
|
14537
|
-
const ret = wasm.ethaddress_toString(this.__wbg_ptr);
|
|
14538
|
-
deferred1_0 = ret[0];
|
|
14539
|
-
deferred1_1 = ret[1];
|
|
14540
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
14541
|
-
} finally {
|
|
14542
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
14543
|
-
}
|
|
14544
|
-
}
|
|
14545
|
-
}
|
|
14546
|
-
if (Symbol.dispose) EthAddress.prototype[Symbol.dispose] = EthAddress.prototype.free;
|
|
14547
|
-
|
|
14548
14485
|
/**
|
|
14549
14486
|
* Describes the result of executing a transaction program for the Miden protocol.
|
|
14550
14487
|
*
|
|
14551
14488
|
* Executed transaction serves two primary purposes:
|
|
14552
14489
|
* - It contains a complete description of the effects of the transaction. Specifically, it
|
|
14553
|
-
* contains all output notes created as the result of the transaction and
|
|
14554
|
-
*
|
|
14490
|
+
* contains all output notes created as the result of the transaction and the absolute-valued
|
|
14491
|
+
* account patch produced by execution.
|
|
14555
14492
|
* - It contains all the information required to re-execute and prove the transaction in a
|
|
14556
14493
|
* stateless manner. This includes all public transaction inputs, but also all nondeterministic
|
|
14557
14494
|
* inputs that the host provided to Miden VM while executing the transaction (i.e., advice
|
|
@@ -14575,14 +14512,6 @@ class ExecutedTransaction {
|
|
|
14575
14512
|
const ptr = this.__destroy_into_raw();
|
|
14576
14513
|
wasm.__wbg_executedtransaction_free(ptr, 0);
|
|
14577
14514
|
}
|
|
14578
|
-
/**
|
|
14579
|
-
* Returns the account delta resulting from execution.
|
|
14580
|
-
* @returns {AccountDelta}
|
|
14581
|
-
*/
|
|
14582
|
-
accountDelta() {
|
|
14583
|
-
const ret = wasm.executedtransaction_accountDelta(this.__wbg_ptr);
|
|
14584
|
-
return AccountDelta.__wrap(ret);
|
|
14585
|
-
}
|
|
14586
14515
|
/**
|
|
14587
14516
|
* Returns the account the transaction was executed against.
|
|
14588
14517
|
* @returns {AccountId}
|
|
@@ -14591,6 +14520,14 @@ class ExecutedTransaction {
|
|
|
14591
14520
|
const ret = wasm.executedtransaction_accountId(this.__wbg_ptr);
|
|
14592
14521
|
return AccountId.__wrap(ret);
|
|
14593
14522
|
}
|
|
14523
|
+
/**
|
|
14524
|
+
* Returns the absolute account patch resulting from execution.
|
|
14525
|
+
* @returns {AccountPatch}
|
|
14526
|
+
*/
|
|
14527
|
+
accountPatch() {
|
|
14528
|
+
const ret = wasm.executedtransaction_accountPatch(this.__wbg_ptr);
|
|
14529
|
+
return AccountPatch.__wrap(ret);
|
|
14530
|
+
}
|
|
14594
14531
|
/**
|
|
14595
14532
|
* Returns the block header that included the transaction.
|
|
14596
14533
|
* @returns {BlockHeader}
|
|
@@ -14863,7 +14800,7 @@ class FetchedAccount {
|
|
|
14863
14800
|
* @returns {number}
|
|
14864
14801
|
*/
|
|
14865
14802
|
lastBlockNum() {
|
|
14866
|
-
const ret = wasm.
|
|
14803
|
+
const ret = wasm.fetchedaccount_lastBlockNum(this.__wbg_ptr);
|
|
14867
14804
|
return ret >>> 0;
|
|
14868
14805
|
}
|
|
14869
14806
|
}
|
|
@@ -15309,7 +15246,7 @@ class FungibleAssetDelta {
|
|
|
15309
15246
|
* @returns {boolean}
|
|
15310
15247
|
*/
|
|
15311
15248
|
isEmpty() {
|
|
15312
|
-
const ret = wasm.
|
|
15249
|
+
const ret = wasm.accountstoragepatch_isEmpty(this.__wbg_ptr);
|
|
15313
15250
|
return ret !== 0;
|
|
15314
15251
|
}
|
|
15315
15252
|
/**
|
|
@@ -15317,7 +15254,7 @@ class FungibleAssetDelta {
|
|
|
15317
15254
|
* @returns {number}
|
|
15318
15255
|
*/
|
|
15319
15256
|
numAssets() {
|
|
15320
|
-
const ret = wasm.
|
|
15257
|
+
const ret = wasm.accountvaultpatch_numAssets(this.__wbg_ptr);
|
|
15321
15258
|
return ret >>> 0;
|
|
15322
15259
|
}
|
|
15323
15260
|
/**
|
|
@@ -15620,16 +15557,6 @@ class InputNoteRecord {
|
|
|
15620
15557
|
const ret = wasm.inputnoterecord_isConsumed(this.__wbg_ptr);
|
|
15621
15558
|
return ret !== 0;
|
|
15622
15559
|
}
|
|
15623
|
-
/**
|
|
15624
|
-
* Returns true while the note's on-chain inclusion is still unsettled
|
|
15625
|
-
* (`Expected` or `Unverified`), i.e. while sync is the mechanism that can
|
|
15626
|
-
* advance this record.
|
|
15627
|
-
* @returns {boolean}
|
|
15628
|
-
*/
|
|
15629
|
-
isInclusionPending() {
|
|
15630
|
-
const ret = wasm.inputnoterecord_isInclusionPending(this.__wbg_ptr);
|
|
15631
|
-
return ret !== 0;
|
|
15632
|
-
}
|
|
15633
15560
|
/**
|
|
15634
15561
|
* Returns true if the note is currently being processed.
|
|
15635
15562
|
* @returns {boolean}
|
|
@@ -16360,13 +16287,12 @@ class JsStateSyncUpdate {
|
|
|
16360
16287
|
return v1;
|
|
16361
16288
|
}
|
|
16362
16289
|
/**
|
|
16363
|
-
* Serialized MMR peaks at the new sync height
|
|
16364
|
-
*
|
|
16365
|
-
* `blockNum` matches `block_num`) and read back by `getCurrentBlockchainPeaks`.
|
|
16290
|
+
* Serialized MMR peaks at the new sync height. The only peaks persisted by the
|
|
16291
|
+
* client (peaks for intermediate note blocks are never read, so they are not stored).
|
|
16366
16292
|
* @returns {Uint8Array}
|
|
16367
16293
|
*/
|
|
16368
|
-
get
|
|
16369
|
-
const ret = wasm.
|
|
16294
|
+
get newPeaks() {
|
|
16295
|
+
const ret = wasm.__wbg_get_jsstatesyncupdate_newPeaks(this.__wbg_ptr);
|
|
16370
16296
|
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
16371
16297
|
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
16372
16298
|
return v1;
|
|
@@ -16479,15 +16405,14 @@ class JsStateSyncUpdate {
|
|
|
16479
16405
|
wasm.__wbg_set_jsstatesyncupdate_newBlockNums(this.__wbg_ptr, ptr0, len0);
|
|
16480
16406
|
}
|
|
16481
16407
|
/**
|
|
16482
|
-
* Serialized MMR peaks at the new sync height
|
|
16483
|
-
*
|
|
16484
|
-
* `blockNum` matches `block_num`) and read back by `getCurrentBlockchainPeaks`.
|
|
16408
|
+
* Serialized MMR peaks at the new sync height. The only peaks persisted by the
|
|
16409
|
+
* client (peaks for intermediate note blocks are never read, so they are not stored).
|
|
16485
16410
|
* @param {Uint8Array} arg0
|
|
16486
16411
|
*/
|
|
16487
|
-
set
|
|
16412
|
+
set newPeaks(arg0) {
|
|
16488
16413
|
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
16489
16414
|
const len0 = WASM_VECTOR_LEN;
|
|
16490
|
-
wasm.
|
|
16415
|
+
wasm.__wbg_set_jsstatesyncupdate_newPeaks(this.__wbg_ptr, ptr0, len0);
|
|
16491
16416
|
}
|
|
16492
16417
|
/**
|
|
16493
16418
|
* Input notes for this state update in serialized form.
|
|
@@ -16675,6 +16600,17 @@ class JsStorageSlot {
|
|
|
16675
16600
|
const ptr = this.__destroy_into_raw();
|
|
16676
16601
|
wasm.__wbg_jsstorageslot_free(ptr, 0);
|
|
16677
16602
|
}
|
|
16603
|
+
/**
|
|
16604
|
+
* The storage patch operation (create, update, or remove).
|
|
16605
|
+
*
|
|
16606
|
+
* Full-state writes do not inspect this field, but incremental writes use it to distinguish
|
|
16607
|
+
* map replacement/removal from an entry-wise update.
|
|
16608
|
+
* @returns {number}
|
|
16609
|
+
*/
|
|
16610
|
+
get patchOperation() {
|
|
16611
|
+
const ret = wasm.__wbg_get_jsstorageslot_patchOperation(this.__wbg_ptr);
|
|
16612
|
+
return ret;
|
|
16613
|
+
}
|
|
16678
16614
|
/**
|
|
16679
16615
|
* The name of the storage slot.
|
|
16680
16616
|
* @returns {string}
|
|
@@ -16715,6 +16651,16 @@ class JsStorageSlot {
|
|
|
16715
16651
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
16716
16652
|
}
|
|
16717
16653
|
}
|
|
16654
|
+
/**
|
|
16655
|
+
* The storage patch operation (create, update, or remove).
|
|
16656
|
+
*
|
|
16657
|
+
* Full-state writes do not inspect this field, but incremental writes use it to distinguish
|
|
16658
|
+
* map replacement/removal from an entry-wise update.
|
|
16659
|
+
* @param {number} arg0
|
|
16660
|
+
*/
|
|
16661
|
+
set patchOperation(arg0) {
|
|
16662
|
+
wasm.__wbg_set_jsstorageslot_patchOperation(this.__wbg_ptr, arg0);
|
|
16663
|
+
}
|
|
16718
16664
|
/**
|
|
16719
16665
|
* The name of the storage slot.
|
|
16720
16666
|
* @param {string} arg0
|
|
@@ -16916,97 +16862,6 @@ class MerklePath {
|
|
|
16916
16862
|
}
|
|
16917
16863
|
if (Symbol.dispose) MerklePath.prototype[Symbol.dispose] = MerklePath.prototype.free;
|
|
16918
16864
|
|
|
16919
|
-
/**
|
|
16920
|
-
* Targets a note at a public network account so the operator auto-consumes it.
|
|
16921
|
-
*
|
|
16922
|
-
* A note is a network note when it is `Public` and carries a valid
|
|
16923
|
-
* `NetworkAccountTarget` attachment (see `Note.isNetworkNote`).
|
|
16924
|
-
*/
|
|
16925
|
-
class NetworkAccountTarget {
|
|
16926
|
-
static __wrap(ptr) {
|
|
16927
|
-
ptr = ptr >>> 0;
|
|
16928
|
-
const obj = Object.create(NetworkAccountTarget.prototype);
|
|
16929
|
-
obj.__wbg_ptr = ptr;
|
|
16930
|
-
NetworkAccountTargetFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
16931
|
-
return obj;
|
|
16932
|
-
}
|
|
16933
|
-
__destroy_into_raw() {
|
|
16934
|
-
const ptr = this.__wbg_ptr;
|
|
16935
|
-
this.__wbg_ptr = 0;
|
|
16936
|
-
NetworkAccountTargetFinalization.unregister(this);
|
|
16937
|
-
return ptr;
|
|
16938
|
-
}
|
|
16939
|
-
free() {
|
|
16940
|
-
const ptr = this.__destroy_into_raw();
|
|
16941
|
-
wasm.__wbg_networkaccounttarget_free(ptr, 0);
|
|
16942
|
-
}
|
|
16943
|
-
/**
|
|
16944
|
-
* Returns the note execution hint.
|
|
16945
|
-
* @returns {NoteExecutionHint}
|
|
16946
|
-
*/
|
|
16947
|
-
executionHint() {
|
|
16948
|
-
const ret = wasm.networkaccounttarget_executionHint(this.__wbg_ptr);
|
|
16949
|
-
return NoteExecutionHint.__wrap(ret);
|
|
16950
|
-
}
|
|
16951
|
-
/**
|
|
16952
|
-
* Decodes a `NoteAttachment` back into a `NetworkAccountTarget`.
|
|
16953
|
-
*
|
|
16954
|
-
* # Errors
|
|
16955
|
-
* Errors if the attachment is not a valid network-account-target attachment.
|
|
16956
|
-
* @param {NoteAttachment} attachment
|
|
16957
|
-
* @returns {NetworkAccountTarget}
|
|
16958
|
-
*/
|
|
16959
|
-
static fromAttachment(attachment) {
|
|
16960
|
-
_assertClass(attachment, NoteAttachment);
|
|
16961
|
-
const ret = wasm.networkaccounttarget_fromAttachment(attachment.__wbg_ptr);
|
|
16962
|
-
if (ret[2]) {
|
|
16963
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
16964
|
-
}
|
|
16965
|
-
return NetworkAccountTarget.__wrap(ret[0]);
|
|
16966
|
-
}
|
|
16967
|
-
/**
|
|
16968
|
-
* Creates a target for the given network account. `executionHint` defaults
|
|
16969
|
-
* to `NoteExecutionHint.always()`.
|
|
16970
|
-
*
|
|
16971
|
-
* # Errors
|
|
16972
|
-
* Errors if `account_id` is not a public account.
|
|
16973
|
-
* @param {AccountId} account_id
|
|
16974
|
-
* @param {NoteExecutionHint | null} [execution_hint]
|
|
16975
|
-
*/
|
|
16976
|
-
constructor(account_id, execution_hint) {
|
|
16977
|
-
_assertClass(account_id, AccountId);
|
|
16978
|
-
let ptr0 = 0;
|
|
16979
|
-
if (!isLikeNone(execution_hint)) {
|
|
16980
|
-
_assertClass(execution_hint, NoteExecutionHint);
|
|
16981
|
-
ptr0 = execution_hint.__destroy_into_raw();
|
|
16982
|
-
}
|
|
16983
|
-
const ret = wasm.networkaccounttarget_new(account_id.__wbg_ptr, ptr0);
|
|
16984
|
-
if (ret[2]) {
|
|
16985
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
16986
|
-
}
|
|
16987
|
-
this.__wbg_ptr = ret[0] >>> 0;
|
|
16988
|
-
NetworkAccountTargetFinalization.register(this, this.__wbg_ptr, this);
|
|
16989
|
-
return this;
|
|
16990
|
-
}
|
|
16991
|
-
/**
|
|
16992
|
-
* Returns the targeted network account id.
|
|
16993
|
-
* @returns {AccountId}
|
|
16994
|
-
*/
|
|
16995
|
-
targetId() {
|
|
16996
|
-
const ret = wasm.accountreader_accountId(this.__wbg_ptr);
|
|
16997
|
-
return AccountId.__wrap(ret);
|
|
16998
|
-
}
|
|
16999
|
-
/**
|
|
17000
|
-
* Encodes this target as a `NoteAttachment`.
|
|
17001
|
-
* @returns {NoteAttachment}
|
|
17002
|
-
*/
|
|
17003
|
-
toAttachment() {
|
|
17004
|
-
const ret = wasm.networkaccounttarget_toAttachment(this.__wbg_ptr);
|
|
17005
|
-
return NoteAttachment.__wrap(ret);
|
|
17006
|
-
}
|
|
17007
|
-
}
|
|
17008
|
-
if (Symbol.dispose) NetworkAccountTarget.prototype[Symbol.dispose] = NetworkAccountTarget.prototype.free;
|
|
17009
|
-
|
|
17010
16865
|
/**
|
|
17011
16866
|
* The identifier of a Miden network.
|
|
17012
16867
|
*/
|
|
@@ -17200,16 +17055,6 @@ class Note {
|
|
|
17200
17055
|
const ret = wasm.note_assets(this.__wbg_ptr);
|
|
17201
17056
|
return NoteAssets.__wrap(ret);
|
|
17202
17057
|
}
|
|
17203
|
-
/**
|
|
17204
|
-
* Returns the note's attachments.
|
|
17205
|
-
* @returns {NoteAttachment[]}
|
|
17206
|
-
*/
|
|
17207
|
-
attachments() {
|
|
17208
|
-
const ret = wasm.note_attachments(this.__wbg_ptr);
|
|
17209
|
-
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
17210
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
17211
|
-
return v1;
|
|
17212
|
-
}
|
|
17213
17058
|
/**
|
|
17214
17059
|
* Returns the commitment to the note (its ID).
|
|
17215
17060
|
*
|
|
@@ -17219,35 +17064,9 @@ class Note {
|
|
|
17219
17064
|
* unchanged.
|
|
17220
17065
|
* @returns {Word}
|
|
17221
17066
|
*/
|
|
17222
|
-
commitment() {
|
|
17223
|
-
const ret = wasm.note_commitment(this.__wbg_ptr);
|
|
17224
|
-
return Word.__wrap(ret);
|
|
17225
|
-
}
|
|
17226
|
-
/**
|
|
17227
|
-
* Builds a B2AGG (Bridge-to-AggLayer) note that bridges the given assets out to another
|
|
17228
|
-
* network via the `AggLayer`.
|
|
17229
|
-
*
|
|
17230
|
-
* The note is always public and is consumed by `bridge_account`, which burns the assets so
|
|
17231
|
-
* they can be claimed on the destination network at `destination_address` (an Ethereum
|
|
17232
|
-
* address on the AggLayer-assigned `destination_network`). The assets must be fungible assets
|
|
17233
|
-
* issued by a network faucet.
|
|
17234
|
-
* @param {AccountId} sender
|
|
17235
|
-
* @param {AccountId} bridge_account
|
|
17236
|
-
* @param {NoteAssets} assets
|
|
17237
|
-
* @param {number} destination_network
|
|
17238
|
-
* @param {EthAddress} destination_address
|
|
17239
|
-
* @returns {Note}
|
|
17240
|
-
*/
|
|
17241
|
-
static createB2AggNote(sender, bridge_account, assets, destination_network, destination_address) {
|
|
17242
|
-
_assertClass(sender, AccountId);
|
|
17243
|
-
_assertClass(bridge_account, AccountId);
|
|
17244
|
-
_assertClass(assets, NoteAssets);
|
|
17245
|
-
_assertClass(destination_address, EthAddress);
|
|
17246
|
-
const ret = wasm.note_createB2AggNote(sender.__wbg_ptr, bridge_account.__wbg_ptr, assets.__wbg_ptr, destination_network, destination_address.__wbg_ptr);
|
|
17247
|
-
if (ret[2]) {
|
|
17248
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
17249
|
-
}
|
|
17250
|
-
return Note.__wrap(ret[0]);
|
|
17067
|
+
commitment() {
|
|
17068
|
+
const ret = wasm.note_commitment(this.__wbg_ptr);
|
|
17069
|
+
return Word.__wrap(ret);
|
|
17251
17070
|
}
|
|
17252
17071
|
/**
|
|
17253
17072
|
* Builds a P2IDE note that can be reclaimed or timelocked based on block heights.
|
|
@@ -17311,15 +17130,6 @@ class Note {
|
|
|
17311
17130
|
const ret = wasm.note_commitment(this.__wbg_ptr);
|
|
17312
17131
|
return NoteId.__wrap(ret);
|
|
17313
17132
|
}
|
|
17314
|
-
/**
|
|
17315
|
-
* Returns true if the note is a network note (public + a valid
|
|
17316
|
-
* `NetworkAccountTarget` attachment).
|
|
17317
|
-
* @returns {boolean}
|
|
17318
|
-
*/
|
|
17319
|
-
isNetworkNote() {
|
|
17320
|
-
const ret = wasm.note_isNetworkNote(this.__wbg_ptr);
|
|
17321
|
-
return ret !== 0;
|
|
17322
|
-
}
|
|
17323
17133
|
/**
|
|
17324
17134
|
* Returns the public metadata associated with the note.
|
|
17325
17135
|
* @returns {NoteMetadata}
|
|
@@ -17379,30 +17189,6 @@ class Note {
|
|
|
17379
17189
|
const ret = wasm.note_serialize(this.__wbg_ptr);
|
|
17380
17190
|
return ret;
|
|
17381
17191
|
}
|
|
17382
|
-
/**
|
|
17383
|
-
* Creates a note carrying the provided attachments, using the metadata's
|
|
17384
|
-
* sender / note type / tag (attachments on the metadata itself are ignored).
|
|
17385
|
-
*
|
|
17386
|
-
* # Errors
|
|
17387
|
-
* Errors if the attachment set is invalid (too many attachments or words).
|
|
17388
|
-
* @param {NoteAssets} note_assets
|
|
17389
|
-
* @param {NoteMetadata} note_metadata
|
|
17390
|
-
* @param {NoteRecipient} note_recipient
|
|
17391
|
-
* @param {NoteAttachment[]} attachments
|
|
17392
|
-
* @returns {Note}
|
|
17393
|
-
*/
|
|
17394
|
-
static withAttachments(note_assets, note_metadata, note_recipient, attachments) {
|
|
17395
|
-
_assertClass(note_assets, NoteAssets);
|
|
17396
|
-
_assertClass(note_metadata, NoteMetadata);
|
|
17397
|
-
_assertClass(note_recipient, NoteRecipient);
|
|
17398
|
-
const ptr0 = passArrayJsValueToWasm0(attachments, wasm.__wbindgen_malloc);
|
|
17399
|
-
const len0 = WASM_VECTOR_LEN;
|
|
17400
|
-
const ret = wasm.note_withAttachments(note_assets.__wbg_ptr, note_metadata.__wbg_ptr, note_recipient.__wbg_ptr, ptr0, len0);
|
|
17401
|
-
if (ret[2]) {
|
|
17402
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
17403
|
-
}
|
|
17404
|
-
return Note.__wrap(ret[0]);
|
|
17405
|
-
}
|
|
17406
17192
|
}
|
|
17407
17193
|
if (Symbol.dispose) Note.prototype[Symbol.dispose] = Note.prototype.free;
|
|
17408
17194
|
|
|
@@ -17670,12 +17456,6 @@ class NoteAttachment {
|
|
|
17670
17456
|
NoteAttachmentFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
17671
17457
|
return obj;
|
|
17672
17458
|
}
|
|
17673
|
-
static __unwrap(jsValue) {
|
|
17674
|
-
if (!(jsValue instanceof NoteAttachment)) {
|
|
17675
|
-
return 0;
|
|
17676
|
-
}
|
|
17677
|
-
return jsValue.__destroy_into_raw();
|
|
17678
|
-
}
|
|
17679
17459
|
__destroy_into_raw() {
|
|
17680
17460
|
const ptr = this.__wbg_ptr;
|
|
17681
17461
|
this.__wbg_ptr = 0;
|
|
@@ -18299,6 +18079,19 @@ class NoteFile {
|
|
|
18299
18079
|
}
|
|
18300
18080
|
return NoteFile.__wrap(ret[0]);
|
|
18301
18081
|
}
|
|
18082
|
+
/**
|
|
18083
|
+
* Creates an expected-note file with the sync hint required by miden-client 0.16.
|
|
18084
|
+
* @param {NoteDetails} note_details
|
|
18085
|
+
* @param {NoteTag} note_tag
|
|
18086
|
+
* @param {number} after_block_num
|
|
18087
|
+
* @returns {NoteFile}
|
|
18088
|
+
*/
|
|
18089
|
+
static fromExpectedNote(note_details, note_tag, after_block_num) {
|
|
18090
|
+
_assertClass(note_details, NoteDetails);
|
|
18091
|
+
_assertClass(note_tag, NoteTag);
|
|
18092
|
+
const ret = wasm.notefile_fromExpectedNote(note_details.__wbg_ptr, note_tag.__wbg_ptr, after_block_num);
|
|
18093
|
+
return NoteFile.__wrap(ret);
|
|
18094
|
+
}
|
|
18302
18095
|
/**
|
|
18303
18096
|
* Creates a `NoteFile` from an input note, preserving proof when available.
|
|
18304
18097
|
* @param {InputNote} note
|
|
@@ -18310,7 +18103,11 @@ class NoteFile {
|
|
|
18310
18103
|
return NoteFile.__wrap(ret);
|
|
18311
18104
|
}
|
|
18312
18105
|
/**
|
|
18313
|
-
* Creates a `NoteFile` from note details.
|
|
18106
|
+
* Creates a `NoteFile` from note details using a zero-valued sync hint.
|
|
18107
|
+
*
|
|
18108
|
+
* miden-client 0.16 requires every expected note to include a tag and an after-block hint.
|
|
18109
|
+
* This retains the old one-argument JS API by using block zero and the default tag. Prefer
|
|
18110
|
+
* [`from_expected_note`](Self::from_expected_note) when the real sync hint is available.
|
|
18314
18111
|
* @param {NoteDetails} note_details
|
|
18315
18112
|
* @returns {NoteFile}
|
|
18316
18113
|
*/
|
|
@@ -18906,19 +18703,6 @@ class NoteRecipient {
|
|
|
18906
18703
|
const ret = wasm.accountheader_storageCommitment(this.__wbg_ptr);
|
|
18907
18704
|
return Word.__wrap(ret);
|
|
18908
18705
|
}
|
|
18909
|
-
/**
|
|
18910
|
-
* Creates a recipient from a script and storage, generating a fresh random
|
|
18911
|
-
* serial number (the secret that prevents double-spends).
|
|
18912
|
-
* @param {NoteScript} note_script
|
|
18913
|
-
* @param {NoteStorage} storage
|
|
18914
|
-
* @returns {NoteRecipient}
|
|
18915
|
-
*/
|
|
18916
|
-
static fromScript(note_script, storage) {
|
|
18917
|
-
_assertClass(note_script, NoteScript);
|
|
18918
|
-
_assertClass(storage, NoteStorage);
|
|
18919
|
-
const ret = wasm.noterecipient_fromScript(note_script.__wbg_ptr, storage.__wbg_ptr);
|
|
18920
|
-
return NoteRecipient.__wrap(ret);
|
|
18921
|
-
}
|
|
18922
18706
|
/**
|
|
18923
18707
|
* Creates a note recipient from its serial number, script, and storage.
|
|
18924
18708
|
* @param {Word} serial_num
|
|
@@ -19606,7 +19390,7 @@ class OutputNoteRecord {
|
|
|
19606
19390
|
* @returns {number}
|
|
19607
19391
|
*/
|
|
19608
19392
|
expectedHeight() {
|
|
19609
|
-
const ret = wasm.
|
|
19393
|
+
const ret = wasm.blockheader_version(this.__wbg_ptr);
|
|
19610
19394
|
return ret >>> 0;
|
|
19611
19395
|
}
|
|
19612
19396
|
/**
|
|
@@ -19641,22 +19425,12 @@ class OutputNoteRecord {
|
|
|
19641
19425
|
const ret = wasm.outputnoterecord_isConsumed(this.__wbg_ptr);
|
|
19642
19426
|
return ret !== 0;
|
|
19643
19427
|
}
|
|
19644
|
-
/**
|
|
19645
|
-
* Returns true while the note's on-chain inclusion is still unsettled
|
|
19646
|
-
* (`ExpectedFull` or `ExpectedPartial`), i.e. while sync is the mechanism
|
|
19647
|
-
* that can advance this record.
|
|
19648
|
-
* @returns {boolean}
|
|
19649
|
-
*/
|
|
19650
|
-
isInclusionPending() {
|
|
19651
|
-
const ret = wasm.outputnoterecord_isInclusionPending(this.__wbg_ptr);
|
|
19652
|
-
return ret !== 0;
|
|
19653
|
-
}
|
|
19654
19428
|
/**
|
|
19655
19429
|
* Returns the note metadata.
|
|
19656
19430
|
* @returns {NoteMetadata}
|
|
19657
19431
|
*/
|
|
19658
19432
|
metadata() {
|
|
19659
|
-
const ret = wasm.
|
|
19433
|
+
const ret = wasm.outputnoterecord_metadata(this.__wbg_ptr);
|
|
19660
19434
|
return NoteMetadata.__wrap(ret);
|
|
19661
19435
|
}
|
|
19662
19436
|
/**
|
|
@@ -20029,7 +19803,7 @@ class ProvenTransaction {
|
|
|
20029
19803
|
* @returns {AccountId}
|
|
20030
19804
|
*/
|
|
20031
19805
|
accountId() {
|
|
20032
|
-
const ret = wasm.
|
|
19806
|
+
const ret = wasm.proventransaction_accountId(this.__wbg_ptr);
|
|
20033
19807
|
return AccountId.__wrap(ret);
|
|
20034
19808
|
}
|
|
20035
19809
|
/**
|
|
@@ -20057,7 +19831,7 @@ class ProvenTransaction {
|
|
|
20057
19831
|
* @returns {TransactionId}
|
|
20058
19832
|
*/
|
|
20059
19833
|
id() {
|
|
20060
|
-
const ret = wasm.
|
|
19834
|
+
const ret = wasm.proventransaction_id(this.__wbg_ptr);
|
|
20061
19835
|
return TransactionId.__wrap(ret);
|
|
20062
19836
|
}
|
|
20063
19837
|
/**
|
|
@@ -20075,7 +19849,7 @@ class ProvenTransaction {
|
|
|
20075
19849
|
* @returns {Word}
|
|
20076
19850
|
*/
|
|
20077
19851
|
refBlockCommitment() {
|
|
20078
|
-
const ret = wasm.
|
|
19852
|
+
const ret = wasm.proventransaction_refBlockCommitment(this.__wbg_ptr);
|
|
20079
19853
|
return Word.__wrap(ret);
|
|
20080
19854
|
}
|
|
20081
19855
|
/**
|
|
@@ -20097,119 +19871,6 @@ class ProvenTransaction {
|
|
|
20097
19871
|
}
|
|
20098
19872
|
if (Symbol.dispose) ProvenTransaction.prototype[Symbol.dispose] = ProvenTransaction.prototype.free;
|
|
20099
19873
|
|
|
20100
|
-
/**
|
|
20101
|
-
* Read-only view of one PSWAP order's chain state, exposed to JavaScript.
|
|
20102
|
-
* The mutable fields (remaining amounts, depth, tip, state) advance
|
|
20103
|
-
* round-by-round as fills are discovered during sync.
|
|
20104
|
-
*/
|
|
20105
|
-
class PswapLineageRecord {
|
|
20106
|
-
static __wrap(ptr) {
|
|
20107
|
-
ptr = ptr >>> 0;
|
|
20108
|
-
const obj = Object.create(PswapLineageRecord.prototype);
|
|
20109
|
-
obj.__wbg_ptr = ptr;
|
|
20110
|
-
PswapLineageRecordFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
20111
|
-
return obj;
|
|
20112
|
-
}
|
|
20113
|
-
__destroy_into_raw() {
|
|
20114
|
-
const ptr = this.__wbg_ptr;
|
|
20115
|
-
this.__wbg_ptr = 0;
|
|
20116
|
-
PswapLineageRecordFinalization.unregister(this);
|
|
20117
|
-
return ptr;
|
|
20118
|
-
}
|
|
20119
|
-
free() {
|
|
20120
|
-
const ptr = this.__destroy_into_raw();
|
|
20121
|
-
wasm.__wbg_pswaplineagerecord_free(ptr, 0);
|
|
20122
|
-
}
|
|
20123
|
-
/**
|
|
20124
|
-
* Account that created the order and receives every payback.
|
|
20125
|
-
* @returns {AccountId}
|
|
20126
|
-
*/
|
|
20127
|
-
creatorAccountId() {
|
|
20128
|
-
const ret = wasm.pswaplineagerecord_creatorAccountId(this.__wbg_ptr);
|
|
20129
|
-
return AccountId.__wrap(ret);
|
|
20130
|
-
}
|
|
20131
|
-
/**
|
|
20132
|
-
* Depth of the current tip: 0 for the original PSWAP, +1 per fill round.
|
|
20133
|
-
* @returns {number}
|
|
20134
|
-
*/
|
|
20135
|
-
currentDepth() {
|
|
20136
|
-
const ret = wasm.pswaplineagerecord_currentDepth(this.__wbg_ptr);
|
|
20137
|
-
return ret >>> 0;
|
|
20138
|
-
}
|
|
20139
|
-
/**
|
|
20140
|
-
* Note id of the current tip in the chain.
|
|
20141
|
-
* @returns {NoteId}
|
|
20142
|
-
*/
|
|
20143
|
-
currentTipNoteId() {
|
|
20144
|
-
const ret = wasm.pswaplineagerecord_currentTipNoteId(this.__wbg_ptr);
|
|
20145
|
-
return NoteId.__wrap(ret);
|
|
20146
|
-
}
|
|
20147
|
-
/**
|
|
20148
|
-
* Stable identifier shared by every note in the chain, as a decimal string.
|
|
20149
|
-
* @returns {string}
|
|
20150
|
-
*/
|
|
20151
|
-
orderId() {
|
|
20152
|
-
let deferred1_0;
|
|
20153
|
-
let deferred1_1;
|
|
20154
|
-
try {
|
|
20155
|
-
const ret = wasm.pswaplineagerecord_orderId(this.__wbg_ptr);
|
|
20156
|
-
deferred1_0 = ret[0];
|
|
20157
|
-
deferred1_1 = ret[1];
|
|
20158
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
20159
|
-
} finally {
|
|
20160
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
20161
|
-
}
|
|
20162
|
-
}
|
|
20163
|
-
/**
|
|
20164
|
-
* Offered amount still unfilled on the current tip. The offered faucet is
|
|
20165
|
-
* chain-invariant and recovered from the original PSWAP note when needed.
|
|
20166
|
-
* @returns {bigint}
|
|
20167
|
-
*/
|
|
20168
|
-
remainingOffered() {
|
|
20169
|
-
const ret = wasm.pswaplineagerecord_remainingOffered(this.__wbg_ptr);
|
|
20170
|
-
return BigInt.asUintN(64, ret);
|
|
20171
|
-
}
|
|
20172
|
-
/**
|
|
20173
|
-
* Requested amount still outstanding on the current tip. The requested
|
|
20174
|
-
* faucet is recovered from the original PSWAP note when needed.
|
|
20175
|
-
* @returns {bigint}
|
|
20176
|
-
*/
|
|
20177
|
-
remainingRequested() {
|
|
20178
|
-
const ret = wasm.pswaplineagerecord_remainingRequested(this.__wbg_ptr);
|
|
20179
|
-
return BigInt.asUintN(64, ret);
|
|
20180
|
-
}
|
|
20181
|
-
/**
|
|
20182
|
-
* Lifecycle state of the order.
|
|
20183
|
-
* @returns {PswapLineageState}
|
|
20184
|
-
*/
|
|
20185
|
-
state() {
|
|
20186
|
-
const ret = wasm.pswaplineagerecord_state(this.__wbg_ptr);
|
|
20187
|
-
return ret;
|
|
20188
|
-
}
|
|
20189
|
-
}
|
|
20190
|
-
if (Symbol.dispose) PswapLineageRecord.prototype[Symbol.dispose] = PswapLineageRecord.prototype.free;
|
|
20191
|
-
|
|
20192
|
-
/**
|
|
20193
|
-
* Lifecycle state of a PSWAP order.
|
|
20194
|
-
*
|
|
20195
|
-
* Discriminants match the on-disk encoding in the store.
|
|
20196
|
-
* @enum {0 | 1 | 2}
|
|
20197
|
-
*/
|
|
20198
|
-
const PswapLineageState = Object.freeze({
|
|
20199
|
-
/**
|
|
20200
|
-
* Still fillable and reclaimable.
|
|
20201
|
-
*/
|
|
20202
|
-
Active: 0, "0": "Active",
|
|
20203
|
-
/**
|
|
20204
|
-
* Fully filled. Terminal.
|
|
20205
|
-
*/
|
|
20206
|
-
FullyFilled: 1, "1": "FullyFilled",
|
|
20207
|
-
/**
|
|
20208
|
-
* Reclaimed by the creator. Terminal.
|
|
20209
|
-
*/
|
|
20210
|
-
Reclaimed: 2, "2": "Reclaimed",
|
|
20211
|
-
});
|
|
20212
|
-
|
|
20213
19874
|
class PublicKey {
|
|
20214
19875
|
static __wrap(ptr) {
|
|
20215
19876
|
ptr = ptr >>> 0;
|
|
@@ -20956,7 +20617,7 @@ class SerializedOutputNoteData {
|
|
|
20956
20617
|
set attachments(arg0) {
|
|
20957
20618
|
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
20958
20619
|
const len0 = WASM_VECTOR_LEN;
|
|
20959
|
-
wasm.
|
|
20620
|
+
wasm.__wbg_set_jsstatesyncupdate_newPeaks(this.__wbg_ptr, ptr0, len0);
|
|
20960
20621
|
}
|
|
20961
20622
|
/**
|
|
20962
20623
|
* @param {string} arg0
|
|
@@ -21701,7 +21362,7 @@ if (Symbol.dispose) StorageMapEntryJs.prototype[Symbol.dispose] = StorageMapEntr
|
|
|
21701
21362
|
* Information about storage map updates for an account, as returned by the
|
|
21702
21363
|
* `syncStorageMaps` RPC endpoint.
|
|
21703
21364
|
*
|
|
21704
|
-
* Contains the
|
|
21365
|
+
* Contains the storage map entries merged over the requested block range,
|
|
21705
21366
|
* along with the chain tip and last processed block number.
|
|
21706
21367
|
*/
|
|
21707
21368
|
class StorageMapInfo {
|
|
@@ -21752,8 +21413,8 @@ class StorageMapInfo {
|
|
|
21752
21413
|
if (Symbol.dispose) StorageMapInfo.prototype[Symbol.dispose] = StorageMapInfo.prototype.free;
|
|
21753
21414
|
|
|
21754
21415
|
/**
|
|
21755
|
-
* A
|
|
21756
|
-
*
|
|
21416
|
+
* A merged storage map entry containing the last processed block number, slot name, key, and
|
|
21417
|
+
* final value. The node no longer exposes the individual block number for each update.
|
|
21757
21418
|
*/
|
|
21758
21419
|
class StorageMapUpdate {
|
|
21759
21420
|
static __wrap(ptr) {
|
|
@@ -21774,7 +21435,7 @@ class StorageMapUpdate {
|
|
|
21774
21435
|
wasm.__wbg_storagemapupdate_free(ptr, 0);
|
|
21775
21436
|
}
|
|
21776
21437
|
/**
|
|
21777
|
-
* Returns the block number
|
|
21438
|
+
* Returns the last processed block number for the merged response.
|
|
21778
21439
|
* @returns {number}
|
|
21779
21440
|
*/
|
|
21780
21441
|
blockNum() {
|
|
@@ -22517,7 +22178,7 @@ class TransactionRecord {
|
|
|
22517
22178
|
* @returns {AccountId}
|
|
22518
22179
|
*/
|
|
22519
22180
|
accountId() {
|
|
22520
|
-
const ret = wasm.
|
|
22181
|
+
const ret = wasm.proventransaction_accountId(this.__wbg_ptr);
|
|
22521
22182
|
return AccountId.__wrap(ret);
|
|
22522
22183
|
}
|
|
22523
22184
|
/**
|
|
@@ -22565,7 +22226,7 @@ class TransactionRecord {
|
|
|
22565
22226
|
* @returns {Word}
|
|
22566
22227
|
*/
|
|
22567
22228
|
initAccountState() {
|
|
22568
|
-
const ret = wasm.
|
|
22229
|
+
const ret = wasm.transactionrecord_initAccountState(this.__wbg_ptr);
|
|
22569
22230
|
return Word.__wrap(ret);
|
|
22570
22231
|
}
|
|
22571
22232
|
/**
|
|
@@ -22630,14 +22291,6 @@ class TransactionRequest {
|
|
|
22630
22291
|
const ptr = this.__destroy_into_raw();
|
|
22631
22292
|
wasm.__wbg_transactionrequest_free(ptr, 0);
|
|
22632
22293
|
}
|
|
22633
|
-
/**
|
|
22634
|
-
* Returns a copy of the advice map carried by this request.
|
|
22635
|
-
* @returns {AdviceMap}
|
|
22636
|
-
*/
|
|
22637
|
-
adviceMap() {
|
|
22638
|
-
const ret = wasm.transactionrequest_adviceMap(this.__wbg_ptr);
|
|
22639
|
-
return AdviceMap.__wrap(ret);
|
|
22640
|
-
}
|
|
22641
22294
|
/**
|
|
22642
22295
|
* Returns the authentication argument if present.
|
|
22643
22296
|
* @returns {Word | undefined}
|
|
@@ -22684,20 +22337,6 @@ class TransactionRequest {
|
|
|
22684
22337
|
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
22685
22338
|
return v1;
|
|
22686
22339
|
}
|
|
22687
|
-
/**
|
|
22688
|
-
* Returns a copy of this request with `advice_map` merged into its advice map.
|
|
22689
|
-
*
|
|
22690
|
-
* Entries are merged with last-write-wins semantics: a key already present in the request is
|
|
22691
|
-
* overwritten by the value from `advice_map`. Use this to inject advice (e.g. a signature
|
|
22692
|
-
* produced by an external signer) after the request has already been built.
|
|
22693
|
-
* @param {AdviceMap} advice_map
|
|
22694
|
-
* @returns {TransactionRequest}
|
|
22695
|
-
*/
|
|
22696
|
-
extendAdviceMap(advice_map) {
|
|
22697
|
-
_assertClass(advice_map, AdviceMap);
|
|
22698
|
-
const ret = wasm.transactionrequest_extendAdviceMap(this.__wbg_ptr, advice_map.__wbg_ptr);
|
|
22699
|
-
return TransactionRequest.__wrap(ret);
|
|
22700
|
-
}
|
|
22701
22340
|
/**
|
|
22702
22341
|
* Returns the transaction script argument if present.
|
|
22703
22342
|
* @returns {Word | undefined}
|
|
@@ -23243,12 +22882,12 @@ class TransactionStoreUpdate {
|
|
|
23243
22882
|
wasm.__wbg_transactionstoreupdate_free(ptr, 0);
|
|
23244
22883
|
}
|
|
23245
22884
|
/**
|
|
23246
|
-
* Returns the account
|
|
23247
|
-
* @returns {
|
|
22885
|
+
* Returns the absolute account patch applied by the transaction.
|
|
22886
|
+
* @returns {AccountPatch}
|
|
23248
22887
|
*/
|
|
23249
|
-
|
|
23250
|
-
const ret = wasm.
|
|
23251
|
-
return
|
|
22888
|
+
accountPatch() {
|
|
22889
|
+
const ret = wasm.transactionstoreupdate_accountPatch(this.__wbg_ptr);
|
|
22890
|
+
return AccountPatch.__wrap(ret);
|
|
23252
22891
|
}
|
|
23253
22892
|
/**
|
|
23254
22893
|
* Returns the output notes created by the transaction.
|
|
@@ -23459,10 +23098,6 @@ class WebClient {
|
|
|
23459
23098
|
return ret;
|
|
23460
23099
|
}
|
|
23461
23100
|
/**
|
|
23462
|
-
* Persists a submitted transaction and returns its pre-apply
|
|
23463
|
-
* [`TransactionStoreUpdate`]. Routes through the high-level
|
|
23464
|
-
* `Client::apply_transaction` so registered observers (e.g. PSWAP
|
|
23465
|
-
* tracking) fire.
|
|
23466
23101
|
* @param {TransactionResult} transaction_result
|
|
23467
23102
|
* @param {number} submission_height
|
|
23468
23103
|
* @returns {Promise<TransactionStoreUpdate>}
|
|
@@ -23472,22 +23107,6 @@ class WebClient {
|
|
|
23472
23107
|
const ret = wasm.webclient_applyTransaction(this.__wbg_ptr, transaction_result.__wbg_ptr, submission_height);
|
|
23473
23108
|
return ret;
|
|
23474
23109
|
}
|
|
23475
|
-
/**
|
|
23476
|
-
* Builds a transaction reclaiming the unfilled offered asset on the current
|
|
23477
|
-
* tip of an Active lineage.
|
|
23478
|
-
*
|
|
23479
|
-
* `order_id` is the order's stable identifier as a decimal string. The
|
|
23480
|
-
* returned request flows into the same submit path as the other PSWAP
|
|
23481
|
-
* cancel transactions.
|
|
23482
|
-
* @param {string} order_id
|
|
23483
|
-
* @returns {Promise<TransactionRequest>}
|
|
23484
|
-
*/
|
|
23485
|
-
buildPswapCancelByOrder(order_id) {
|
|
23486
|
-
const ptr0 = passStringToWasm0(order_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
23487
|
-
const len0 = WASM_VECTOR_LEN;
|
|
23488
|
-
const ret = wasm.webclient_buildPswapCancelByOrder(this.__wbg_ptr, ptr0, len0);
|
|
23489
|
-
return ret;
|
|
23490
|
-
}
|
|
23491
23110
|
/**
|
|
23492
23111
|
* @param {NoteType} note_type
|
|
23493
23112
|
* @param {AccountId} offered_asset_faucet_id
|
|
@@ -23515,17 +23134,13 @@ class WebClient {
|
|
|
23515
23134
|
* * `store_name`: Optional name for the web store. If `None`, the store name defaults to
|
|
23516
23135
|
* `MidenClientDB_{network_id}`, where `network_id` is derived from the `node_url`.
|
|
23517
23136
|
* Explicitly setting this allows for creating multiple isolated clients.
|
|
23518
|
-
* * `debug_mode`: Optional flag to enable debug mode for transaction execution. When enabled,
|
|
23519
|
-
* the transaction executor records additional information useful for debugging. Defaults to
|
|
23520
|
-
* disabled.
|
|
23521
23137
|
* @param {string | null} [node_url]
|
|
23522
23138
|
* @param {string | null} [node_note_transport_url]
|
|
23523
23139
|
* @param {Uint8Array | null} [seed]
|
|
23524
23140
|
* @param {string | null} [store_name]
|
|
23525
|
-
* @param {boolean | null} [debug_mode]
|
|
23526
23141
|
* @returns {Promise<any>}
|
|
23527
23142
|
*/
|
|
23528
|
-
createClient(node_url, node_note_transport_url, seed, store_name
|
|
23143
|
+
createClient(node_url, node_note_transport_url, seed, store_name) {
|
|
23529
23144
|
var ptr0 = isLikeNone(node_url) ? 0 : passStringToWasm0(node_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
23530
23145
|
var len0 = WASM_VECTOR_LEN;
|
|
23531
23146
|
var ptr1 = isLikeNone(node_note_transport_url) ? 0 : passStringToWasm0(node_note_transport_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -23534,7 +23149,7 @@ class WebClient {
|
|
|
23534
23149
|
var len2 = WASM_VECTOR_LEN;
|
|
23535
23150
|
var ptr3 = isLikeNone(store_name) ? 0 : passStringToWasm0(store_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
23536
23151
|
var len3 = WASM_VECTOR_LEN;
|
|
23537
|
-
const ret = wasm.webclient_createClient(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3
|
|
23152
|
+
const ret = wasm.webclient_createClient(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
23538
23153
|
return ret;
|
|
23539
23154
|
}
|
|
23540
23155
|
/**
|
|
@@ -23550,8 +23165,6 @@ class WebClient {
|
|
|
23550
23165
|
* * `get_key_cb`: Callback to retrieve the secret key bytes for a given public key.
|
|
23551
23166
|
* * `insert_key_cb`: Callback to persist a secret key.
|
|
23552
23167
|
* * `sign_cb`: Callback to produce serialized signature bytes for the provided inputs.
|
|
23553
|
-
* * `debug_mode`: Optional flag to enable debug mode for transaction execution. Defaults to
|
|
23554
|
-
* disabled.
|
|
23555
23168
|
* @param {string | null} [node_url]
|
|
23556
23169
|
* @param {string | null} [node_note_transport_url]
|
|
23557
23170
|
* @param {Uint8Array | null} [seed]
|
|
@@ -23559,10 +23172,9 @@ class WebClient {
|
|
|
23559
23172
|
* @param {Function | null} [get_key_cb]
|
|
23560
23173
|
* @param {Function | null} [insert_key_cb]
|
|
23561
23174
|
* @param {Function | null} [sign_cb]
|
|
23562
|
-
* @param {boolean | null} [debug_mode]
|
|
23563
23175
|
* @returns {Promise<any>}
|
|
23564
23176
|
*/
|
|
23565
|
-
createClientWithExternalKeystore(node_url, node_note_transport_url, seed, store_name, get_key_cb, insert_key_cb, sign_cb
|
|
23177
|
+
createClientWithExternalKeystore(node_url, node_note_transport_url, seed, store_name, get_key_cb, insert_key_cb, sign_cb) {
|
|
23566
23178
|
var ptr0 = isLikeNone(node_url) ? 0 : passStringToWasm0(node_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
23567
23179
|
var len0 = WASM_VECTOR_LEN;
|
|
23568
23180
|
var ptr1 = isLikeNone(node_note_transport_url) ? 0 : passStringToWasm0(node_note_transport_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -23571,7 +23183,7 @@ class WebClient {
|
|
|
23571
23183
|
var len2 = WASM_VECTOR_LEN;
|
|
23572
23184
|
var ptr3 = isLikeNone(store_name) ? 0 : passStringToWasm0(store_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
23573
23185
|
var len3 = WASM_VECTOR_LEN;
|
|
23574
|
-
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)
|
|
23186
|
+
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));
|
|
23575
23187
|
return ret;
|
|
23576
23188
|
}
|
|
23577
23189
|
/**
|
|
@@ -23600,14 +23212,18 @@ class WebClient {
|
|
|
23600
23212
|
return ret;
|
|
23601
23213
|
}
|
|
23602
23214
|
/**
|
|
23603
|
-
* Executes a transaction and returns the `TransactionSummary
|
|
23215
|
+
* Executes a transaction and returns the `TransactionSummary` the account is being asked
|
|
23216
|
+
* to authorize.
|
|
23604
23217
|
*
|
|
23605
|
-
*
|
|
23606
|
-
*
|
|
23607
|
-
*
|
|
23608
|
-
*
|
|
23218
|
+
* The summary only exists while authorization is pending: when the auth procedure aborts
|
|
23219
|
+
* with the unauthorized event (e.g. a multisig below its signing threshold), the summary
|
|
23220
|
+
* built during execution is returned so it can be signed out-of-band. If the transaction
|
|
23221
|
+
* executes successfully it was already fully authorized, no summary is produced, and this
|
|
23222
|
+
* method returns an error with code `TRANSACTION_ALREADY_AUTHORIZED` — submit the
|
|
23223
|
+
* transaction with `execute` instead.
|
|
23609
23224
|
*
|
|
23610
23225
|
* # Errors
|
|
23226
|
+
* - If the transaction executes successfully (error code `TRANSACTION_ALREADY_AUTHORIZED`).
|
|
23611
23227
|
* - If there is an internal failure during execution.
|
|
23612
23228
|
* @param {AccountId} account_id
|
|
23613
23229
|
* @param {TransactionRequest} transaction_request
|
|
@@ -23831,37 +23447,6 @@ class WebClient {
|
|
|
23831
23447
|
const ret = wasm.webclient_getOutputNotes(this.__wbg_ptr, ptr0);
|
|
23832
23448
|
return ret;
|
|
23833
23449
|
}
|
|
23834
|
-
/**
|
|
23835
|
-
* Returns the lineage for one order, or `null` if not tracked.
|
|
23836
|
-
*
|
|
23837
|
-
* `order_id` is the order's stable identifier as a decimal string.
|
|
23838
|
-
* @param {string} order_id
|
|
23839
|
-
* @returns {Promise<PswapLineageRecord | undefined>}
|
|
23840
|
-
*/
|
|
23841
|
-
getPswapLineage(order_id) {
|
|
23842
|
-
const ptr0 = passStringToWasm0(order_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
23843
|
-
const len0 = WASM_VECTOR_LEN;
|
|
23844
|
-
const ret = wasm.webclient_getPswapLineage(this.__wbg_ptr, ptr0, len0);
|
|
23845
|
-
return ret;
|
|
23846
|
-
}
|
|
23847
|
-
/**
|
|
23848
|
-
* Returns every PSWAP lineage tracked by this client.
|
|
23849
|
-
* @returns {Promise<PswapLineageRecord[]>}
|
|
23850
|
-
*/
|
|
23851
|
-
getPswapLineages() {
|
|
23852
|
-
const ret = wasm.webclient_getPswapLineages(this.__wbg_ptr);
|
|
23853
|
-
return ret;
|
|
23854
|
-
}
|
|
23855
|
-
/**
|
|
23856
|
-
* Returns lineages created by a specific local account.
|
|
23857
|
-
* @param {AccountId} creator
|
|
23858
|
-
* @returns {Promise<PswapLineageRecord[]>}
|
|
23859
|
-
*/
|
|
23860
|
-
getPswapLineagesFor(creator) {
|
|
23861
|
-
_assertClass(creator, AccountId);
|
|
23862
|
-
const ret = wasm.webclient_getPswapLineagesFor(this.__wbg_ptr, creator.__wbg_ptr);
|
|
23863
|
-
return ret;
|
|
23864
|
-
}
|
|
23865
23450
|
/**
|
|
23866
23451
|
* Returns all public key commitments associated with the given account ID.
|
|
23867
23452
|
*
|
|
@@ -23925,10 +23510,10 @@ class WebClient {
|
|
|
23925
23510
|
/**
|
|
23926
23511
|
* Imports a note file and returns the imported note's identifier.
|
|
23927
23512
|
*
|
|
23928
|
-
* A note file that carries metadata — an explicit `NoteId` or a
|
|
23929
|
-
* with proof — resolves to a concrete `NoteId`, which is returned so
|
|
23930
|
-
* caller can look the note up with [`get_input_note`].
|
|
23931
|
-
*
|
|
23513
|
+
* A note file that carries metadata — an explicit `NoteId` or a committed
|
|
23514
|
+
* note with proof — resolves to a concrete `NoteId`, which is returned so
|
|
23515
|
+
* the caller can look the note up with [`get_input_note`]. An expected-note
|
|
23516
|
+
* file has no metadata and therefore no `NoteId` yet, so its
|
|
23932
23517
|
* metadata-independent details commitment is returned instead.
|
|
23933
23518
|
*
|
|
23934
23519
|
* Migration note (miden-client PR #2214): `Client::import_notes` now
|
|
@@ -24054,30 +23639,6 @@ class WebClient {
|
|
|
24054
23639
|
const ret = wasm.webclient_newAccountWithSecretKey(this.__wbg_ptr, account.__wbg_ptr, secret_key.__wbg_ptr);
|
|
24055
23640
|
return ret;
|
|
24056
23641
|
}
|
|
24057
|
-
/**
|
|
24058
|
-
* Builds a transaction request that bridges a fungible asset out to another network via the
|
|
24059
|
-
* `AggLayer`.
|
|
24060
|
-
*
|
|
24061
|
-
* The request emits a single public B2AGG (Bridge-to-AggLayer) note holding `amount` units of
|
|
24062
|
-
* the `faucet_id` asset. The note is consumed by `bridge_account_id`, which burns the asset so
|
|
24063
|
-
* it can be claimed at `destination_address` (an Ethereum address) on the AggLayer-assigned
|
|
24064
|
-
* `destination_network`.
|
|
24065
|
-
* @param {AccountId} sender_account_id
|
|
24066
|
-
* @param {AccountId} bridge_account_id
|
|
24067
|
-
* @param {AccountId} faucet_id
|
|
24068
|
-
* @param {bigint} amount
|
|
24069
|
-
* @param {number} destination_network
|
|
24070
|
-
* @param {EthAddress} destination_address
|
|
24071
|
-
* @returns {Promise<TransactionRequest>}
|
|
24072
|
-
*/
|
|
24073
|
-
newB2AggTransactionRequest(sender_account_id, bridge_account_id, faucet_id, amount, destination_network, destination_address) {
|
|
24074
|
-
_assertClass(sender_account_id, AccountId);
|
|
24075
|
-
_assertClass(bridge_account_id, AccountId);
|
|
24076
|
-
_assertClass(faucet_id, AccountId);
|
|
24077
|
-
_assertClass(destination_address, EthAddress);
|
|
24078
|
-
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);
|
|
24079
|
-
return ret;
|
|
24080
|
-
}
|
|
24081
23642
|
/**
|
|
24082
23643
|
* @param {Note[]} list_of_notes
|
|
24083
23644
|
* @returns {TransactionRequest}
|
|
@@ -24371,25 +23932,6 @@ class WebClient {
|
|
|
24371
23932
|
const ret = wasm.webclient_submitNewTransaction(this.__wbg_ptr, account_id.__wbg_ptr, transaction_request.__wbg_ptr);
|
|
24372
23933
|
return ret;
|
|
24373
23934
|
}
|
|
24374
|
-
/**
|
|
24375
|
-
* Executes a batch of transactions against the specified account, proves them individually
|
|
24376
|
-
* and as a batch, submits the batch to the network, and atomically applies the per-tx
|
|
24377
|
-
* updates to the local store. Returns the block number the batch was accepted into.
|
|
24378
|
-
*
|
|
24379
|
-
* All transactions must target the same local account — the `account_id` argument.
|
|
24380
|
-
* Each element of `transaction_requests` is the serialized-bytes form of a
|
|
24381
|
-
* `TransactionRequest` (obtained via `tx_request.serialize()`)
|
|
24382
|
-
* @param {AccountId} account_id
|
|
24383
|
-
* @param {Uint8Array[]} transaction_requests
|
|
24384
|
-
* @returns {Promise<number>}
|
|
24385
|
-
*/
|
|
24386
|
-
submitNewTransactionBatch(account_id, transaction_requests) {
|
|
24387
|
-
_assertClass(account_id, AccountId);
|
|
24388
|
-
const ptr0 = passArrayJsValueToWasm0(transaction_requests, wasm.__wbindgen_malloc);
|
|
24389
|
-
const len0 = WASM_VECTOR_LEN;
|
|
24390
|
-
const ret = wasm.webclient_submitNewTransactionBatch(this.__wbg_ptr, account_id.__wbg_ptr, ptr0, len0);
|
|
24391
|
-
return ret;
|
|
24392
|
-
}
|
|
24393
23935
|
/**
|
|
24394
23936
|
* Executes a transaction specified by the request against the specified account, proves it
|
|
24395
23937
|
* with the user provided prover, submits it to the network, and updates the local database.
|
|
@@ -24887,7 +24429,7 @@ function __wbg_get_imports() {
|
|
|
24887
24429
|
const ret = AccountStorage.__wrap(arg0);
|
|
24888
24430
|
return ret;
|
|
24889
24431
|
},
|
|
24890
|
-
|
|
24432
|
+
__wbg_addNoteTag_1500aff2fa0d151c: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
|
|
24891
24433
|
var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
|
|
24892
24434
|
wasm.__wbindgen_free(arg2, arg3 * 1, 1);
|
|
24893
24435
|
let v1;
|
|
@@ -24915,25 +24457,7 @@ function __wbg_get_imports() {
|
|
|
24915
24457
|
__wbg_append_a992ccc37aa62dc4: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
24916
24458
|
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
24917
24459
|
}, arguments); },
|
|
24918
|
-
|
|
24919
|
-
const ret = applyFullAccountState(getStringFromWasm0(arg0, arg1), JsAccountUpdate.__wrap(arg2));
|
|
24920
|
-
return ret;
|
|
24921
|
-
},
|
|
24922
|
-
__wbg_applySettingsMutations_e98dbb5827d3ec93: function(arg0, arg1, arg2, arg3) {
|
|
24923
|
-
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
24924
|
-
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
24925
|
-
const ret = applySettingsMutations(getStringFromWasm0(arg0, arg1), v0);
|
|
24926
|
-
return ret;
|
|
24927
|
-
},
|
|
24928
|
-
__wbg_applyStateSync_c365f1affe42d064: function(arg0, arg1, arg2) {
|
|
24929
|
-
const ret = applyStateSync(getStringFromWasm0(arg0, arg1), JsStateSyncUpdate.__wrap(arg2));
|
|
24930
|
-
return ret;
|
|
24931
|
-
},
|
|
24932
|
-
__wbg_applyTransactionBatch_0b07b42c93c25447: function(arg0, arg1, arg2) {
|
|
24933
|
-
const ret = applyTransactionBatch(getStringFromWasm0(arg0, arg1), arg2);
|
|
24934
|
-
return ret;
|
|
24935
|
-
},
|
|
24936
|
-
__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) {
|
|
24460
|
+
__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) {
|
|
24937
24461
|
let deferred0_0;
|
|
24938
24462
|
let deferred0_1;
|
|
24939
24463
|
let deferred1_0;
|
|
@@ -24965,7 +24489,7 @@ function __wbg_get_imports() {
|
|
|
24965
24489
|
deferred7_1 = arg17;
|
|
24966
24490
|
deferred8_0 = arg19;
|
|
24967
24491
|
deferred8_1 = arg20;
|
|
24968
|
-
const ret =
|
|
24492
|
+
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));
|
|
24969
24493
|
return ret;
|
|
24970
24494
|
} finally {
|
|
24971
24495
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
@@ -24976,6 +24500,20 @@ function __wbg_get_imports() {
|
|
|
24976
24500
|
wasm.__wbindgen_free(deferred8_0, deferred8_1, 1);
|
|
24977
24501
|
}
|
|
24978
24502
|
},
|
|
24503
|
+
__wbg_applyFullAccountState_f9562e4091c2eaf6: function(arg0, arg1, arg2) {
|
|
24504
|
+
const ret = applyFullAccountState(getStringFromWasm0(arg0, arg1), JsAccountUpdate.__wrap(arg2));
|
|
24505
|
+
return ret;
|
|
24506
|
+
},
|
|
24507
|
+
__wbg_applySettingsMutations_722d272d653902a1: function(arg0, arg1, arg2, arg3) {
|
|
24508
|
+
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
24509
|
+
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
24510
|
+
const ret = applySettingsMutations(getStringFromWasm0(arg0, arg1), v0);
|
|
24511
|
+
return ret;
|
|
24512
|
+
},
|
|
24513
|
+
__wbg_applyStateSync_4c25ec00de2f60bb: function(arg0, arg1, arg2) {
|
|
24514
|
+
const ret = applyStateSync(getStringFromWasm0(arg0, arg1), JsStateSyncUpdate.__wrap(arg2));
|
|
24515
|
+
return ret;
|
|
24516
|
+
},
|
|
24979
24517
|
__wbg_assetvault_new: function(arg0) {
|
|
24980
24518
|
const ret = AssetVault.__wrap(arg0);
|
|
24981
24519
|
return ret;
|
|
@@ -25072,7 +24610,7 @@ function __wbg_get_imports() {
|
|
|
25072
24610
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25073
24611
|
}
|
|
25074
24612
|
},
|
|
25075
|
-
|
|
24613
|
+
__wbg_exportStore_3b84792dca9a9ef1: function(arg0, arg1) {
|
|
25076
24614
|
const ret = exportStore(getStringFromWasm0(arg0, arg1));
|
|
25077
24615
|
return ret;
|
|
25078
24616
|
},
|
|
@@ -25104,7 +24642,7 @@ function __wbg_get_imports() {
|
|
|
25104
24642
|
const ret = FetchedNote.__wrap(arg0);
|
|
25105
24643
|
return ret;
|
|
25106
24644
|
},
|
|
25107
|
-
|
|
24645
|
+
__wbg_forceImportStore_6a4fb8bc450bbf4a: function(arg0, arg1, arg2) {
|
|
25108
24646
|
const ret = forceImportStore(getStringFromWasm0(arg0, arg1), arg2);
|
|
25109
24647
|
return ret;
|
|
25110
24648
|
},
|
|
@@ -25112,10 +24650,6 @@ function __wbg_get_imports() {
|
|
|
25112
24650
|
const ret = ForeignAccount.__unwrap(arg0);
|
|
25113
24651
|
return ret;
|
|
25114
24652
|
},
|
|
25115
|
-
__wbg_from_bddd64e7d5ff6941: function(arg0) {
|
|
25116
|
-
const ret = Array.from(arg0);
|
|
25117
|
-
return ret;
|
|
25118
|
-
},
|
|
25119
24653
|
__wbg_fungibleasset_new: function(arg0) {
|
|
25120
24654
|
const ret = FungibleAsset.__wrap(arg0);
|
|
25121
24655
|
return ret;
|
|
@@ -25128,7 +24662,7 @@ function __wbg_get_imports() {
|
|
|
25128
24662
|
const ret = FungibleAssetDeltaItem.__wrap(arg0);
|
|
25129
24663
|
return ret;
|
|
25130
24664
|
},
|
|
25131
|
-
|
|
24665
|
+
__wbg_getAccountAddresses_68ba5f3f8a9c7e15: function(arg0, arg1, arg2, arg3) {
|
|
25132
24666
|
let deferred0_0;
|
|
25133
24667
|
let deferred0_1;
|
|
25134
24668
|
try {
|
|
@@ -25140,7 +24674,7 @@ function __wbg_get_imports() {
|
|
|
25140
24674
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25141
24675
|
}
|
|
25142
24676
|
},
|
|
25143
|
-
|
|
24677
|
+
__wbg_getAccountAuthByPubKeyCommitment_568661071566f307: function(arg0, arg1, arg2, arg3) {
|
|
25144
24678
|
let deferred0_0;
|
|
25145
24679
|
let deferred0_1;
|
|
25146
24680
|
try {
|
|
@@ -25152,7 +24686,7 @@ function __wbg_get_imports() {
|
|
|
25152
24686
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25153
24687
|
}
|
|
25154
24688
|
},
|
|
25155
|
-
|
|
24689
|
+
__wbg_getAccountCode_14e446cd1a3f814f: function(arg0, arg1, arg2, arg3) {
|
|
25156
24690
|
let deferred0_0;
|
|
25157
24691
|
let deferred0_1;
|
|
25158
24692
|
try {
|
|
@@ -25164,7 +24698,7 @@ function __wbg_get_imports() {
|
|
|
25164
24698
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25165
24699
|
}
|
|
25166
24700
|
},
|
|
25167
|
-
|
|
24701
|
+
__wbg_getAccountHeaderByCommitment_0e10e9ac733f359b: function(arg0, arg1, arg2, arg3) {
|
|
25168
24702
|
let deferred0_0;
|
|
25169
24703
|
let deferred0_1;
|
|
25170
24704
|
try {
|
|
@@ -25176,7 +24710,7 @@ function __wbg_get_imports() {
|
|
|
25176
24710
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25177
24711
|
}
|
|
25178
24712
|
},
|
|
25179
|
-
|
|
24713
|
+
__wbg_getAccountHeader_ef6ad25115d9bd02: function(arg0, arg1, arg2, arg3) {
|
|
25180
24714
|
let deferred0_0;
|
|
25181
24715
|
let deferred0_1;
|
|
25182
24716
|
try {
|
|
@@ -25188,7 +24722,7 @@ function __wbg_get_imports() {
|
|
|
25188
24722
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25189
24723
|
}
|
|
25190
24724
|
},
|
|
25191
|
-
|
|
24725
|
+
__wbg_getAccountIdByKeyCommitment_c0c17f1af8b92023: function(arg0, arg1, arg2, arg3) {
|
|
25192
24726
|
let deferred0_0;
|
|
25193
24727
|
let deferred0_1;
|
|
25194
24728
|
try {
|
|
@@ -25200,11 +24734,11 @@ function __wbg_get_imports() {
|
|
|
25200
24734
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25201
24735
|
}
|
|
25202
24736
|
},
|
|
25203
|
-
|
|
24737
|
+
__wbg_getAccountIds_07de8c6f4a5ee883: function(arg0, arg1) {
|
|
25204
24738
|
const ret = getAccountIds(getStringFromWasm0(arg0, arg1));
|
|
25205
24739
|
return ret;
|
|
25206
24740
|
},
|
|
25207
|
-
|
|
24741
|
+
__wbg_getAccountStorageMaps_b16de6210ce82188: function(arg0, arg1, arg2, arg3) {
|
|
25208
24742
|
let deferred0_0;
|
|
25209
24743
|
let deferred0_1;
|
|
25210
24744
|
try {
|
|
@@ -25216,7 +24750,7 @@ function __wbg_get_imports() {
|
|
|
25216
24750
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25217
24751
|
}
|
|
25218
24752
|
},
|
|
25219
|
-
|
|
24753
|
+
__wbg_getAccountStorage_c876ec60dbfa6cee: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
25220
24754
|
let deferred0_0;
|
|
25221
24755
|
let deferred0_1;
|
|
25222
24756
|
try {
|
|
@@ -25230,7 +24764,7 @@ function __wbg_get_imports() {
|
|
|
25230
24764
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25231
24765
|
}
|
|
25232
24766
|
},
|
|
25233
|
-
|
|
24767
|
+
__wbg_getAccountVaultAssets_479ef945dd51412a: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
25234
24768
|
let deferred0_0;
|
|
25235
24769
|
let deferred0_1;
|
|
25236
24770
|
try {
|
|
@@ -25244,27 +24778,27 @@ function __wbg_get_imports() {
|
|
|
25244
24778
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25245
24779
|
}
|
|
25246
24780
|
},
|
|
25247
|
-
|
|
24781
|
+
__wbg_getAllAccountHeaders_f78e678ad24296de: function(arg0, arg1) {
|
|
25248
24782
|
const ret = getAllAccountHeaders(getStringFromWasm0(arg0, arg1));
|
|
25249
24783
|
return ret;
|
|
25250
24784
|
},
|
|
25251
|
-
|
|
24785
|
+
__wbg_getBlockHeaders_a55990d3957c0d9d: function(arg0, arg1, arg2, arg3) {
|
|
25252
24786
|
var v0 = getArrayU32FromWasm0(arg2, arg3).slice();
|
|
25253
24787
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
25254
24788
|
const ret = getBlockHeaders(getStringFromWasm0(arg0, arg1), v0);
|
|
25255
24789
|
return ret;
|
|
25256
24790
|
},
|
|
25257
|
-
|
|
24791
|
+
__wbg_getCurrentBlockchainPeaks_b276a676a0f16d93: function(arg0, arg1) {
|
|
25258
24792
|
const ret = getCurrentBlockchainPeaks(getStringFromWasm0(arg0, arg1));
|
|
25259
24793
|
return ret;
|
|
25260
24794
|
},
|
|
25261
|
-
|
|
24795
|
+
__wbg_getForeignAccountCode_9f88c11936e9c43d: function(arg0, arg1, arg2, arg3) {
|
|
25262
24796
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
25263
24797
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
25264
24798
|
const ret = getForeignAccountCode(getStringFromWasm0(arg0, arg1), v0);
|
|
25265
24799
|
return ret;
|
|
25266
24800
|
},
|
|
25267
|
-
|
|
24801
|
+
__wbg_getInputNoteByOffset_d8ec28ef8b63a88f: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
|
|
25268
24802
|
let deferred1_0;
|
|
25269
24803
|
let deferred1_1;
|
|
25270
24804
|
try {
|
|
@@ -25278,31 +24812,31 @@ function __wbg_get_imports() {
|
|
|
25278
24812
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
25279
24813
|
}
|
|
25280
24814
|
},
|
|
25281
|
-
|
|
24815
|
+
__wbg_getInputNotesFromDetailsCommitments_9590f42d9e96e86c: function(arg0, arg1, arg2, arg3) {
|
|
25282
24816
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
25283
24817
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
25284
24818
|
const ret = getInputNotesFromDetailsCommitments(getStringFromWasm0(arg0, arg1), v0);
|
|
25285
24819
|
return ret;
|
|
25286
24820
|
},
|
|
25287
|
-
|
|
24821
|
+
__wbg_getInputNotesFromIds_d290a8e093978eae: function(arg0, arg1, arg2, arg3) {
|
|
25288
24822
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
25289
24823
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
25290
24824
|
const ret = getInputNotesFromIds(getStringFromWasm0(arg0, arg1), v0);
|
|
25291
24825
|
return ret;
|
|
25292
24826
|
},
|
|
25293
|
-
|
|
24827
|
+
__wbg_getInputNotesFromNullifiers_2b5fa39ec52ecab6: function(arg0, arg1, arg2, arg3) {
|
|
25294
24828
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
25295
24829
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
25296
24830
|
const ret = getInputNotesFromNullifiers(getStringFromWasm0(arg0, arg1), v0);
|
|
25297
24831
|
return ret;
|
|
25298
24832
|
},
|
|
25299
|
-
|
|
24833
|
+
__wbg_getInputNotes_1c76764676f21be5: function(arg0, arg1, arg2, arg3) {
|
|
25300
24834
|
var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
|
|
25301
24835
|
wasm.__wbindgen_free(arg2, arg3 * 1, 1);
|
|
25302
24836
|
const ret = getInputNotes(getStringFromWasm0(arg0, arg1), v0);
|
|
25303
24837
|
return ret;
|
|
25304
24838
|
},
|
|
25305
|
-
|
|
24839
|
+
__wbg_getKeyCommitmentsByAccountId_7962a39c985c54e5: function(arg0, arg1, arg2, arg3) {
|
|
25306
24840
|
let deferred0_0;
|
|
25307
24841
|
let deferred0_1;
|
|
25308
24842
|
try {
|
|
@@ -25314,7 +24848,7 @@ function __wbg_get_imports() {
|
|
|
25314
24848
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25315
24849
|
}
|
|
25316
24850
|
},
|
|
25317
|
-
|
|
24851
|
+
__wbg_getNoteScript_b2cf59d7cf9d19e7: function(arg0, arg1, arg2, arg3) {
|
|
25318
24852
|
let deferred0_0;
|
|
25319
24853
|
let deferred0_1;
|
|
25320
24854
|
try {
|
|
@@ -25326,39 +24860,39 @@ function __wbg_get_imports() {
|
|
|
25326
24860
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25327
24861
|
}
|
|
25328
24862
|
},
|
|
25329
|
-
|
|
24863
|
+
__wbg_getNoteTags_a45689c54d964e46: function(arg0, arg1) {
|
|
25330
24864
|
const ret = getNoteTags(getStringFromWasm0(arg0, arg1));
|
|
25331
24865
|
return ret;
|
|
25332
24866
|
},
|
|
25333
|
-
|
|
24867
|
+
__wbg_getOutputNotesFromDetailsCommitments_b15793905bc47309: function(arg0, arg1, arg2, arg3) {
|
|
25334
24868
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
25335
24869
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
25336
24870
|
const ret = getOutputNotesFromDetailsCommitments(getStringFromWasm0(arg0, arg1), v0);
|
|
25337
24871
|
return ret;
|
|
25338
24872
|
},
|
|
25339
|
-
|
|
24873
|
+
__wbg_getOutputNotesFromIds_d340ff4a6d4c5c8e: function(arg0, arg1, arg2, arg3) {
|
|
25340
24874
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
25341
24875
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
25342
24876
|
const ret = getOutputNotesFromIds(getStringFromWasm0(arg0, arg1), v0);
|
|
25343
24877
|
return ret;
|
|
25344
24878
|
},
|
|
25345
|
-
|
|
24879
|
+
__wbg_getOutputNotesFromNullifiers_48b112e53ca4eea7: function(arg0, arg1, arg2, arg3) {
|
|
25346
24880
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
25347
24881
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
25348
24882
|
const ret = getOutputNotesFromNullifiers(getStringFromWasm0(arg0, arg1), v0);
|
|
25349
24883
|
return ret;
|
|
25350
24884
|
},
|
|
25351
|
-
|
|
24885
|
+
__wbg_getOutputNotes_2679465821c837b7: function(arg0, arg1, arg2, arg3) {
|
|
25352
24886
|
var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
|
|
25353
24887
|
wasm.__wbindgen_free(arg2, arg3 * 1, 1);
|
|
25354
24888
|
const ret = getOutputNotes(getStringFromWasm0(arg0, arg1), v0);
|
|
25355
24889
|
return ret;
|
|
25356
24890
|
},
|
|
25357
|
-
|
|
24891
|
+
__wbg_getPartialBlockchainNodesAll_9496498a665775d9: function(arg0, arg1) {
|
|
25358
24892
|
const ret = getPartialBlockchainNodesAll(getStringFromWasm0(arg0, arg1));
|
|
25359
24893
|
return ret;
|
|
25360
24894
|
},
|
|
25361
|
-
|
|
24895
|
+
__wbg_getPartialBlockchainNodesUpToInOrderIndex_2196a0e786754bd1: function(arg0, arg1, arg2, arg3) {
|
|
25362
24896
|
let deferred0_0;
|
|
25363
24897
|
let deferred0_1;
|
|
25364
24898
|
try {
|
|
@@ -25370,20 +24904,20 @@ function __wbg_get_imports() {
|
|
|
25370
24904
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25371
24905
|
}
|
|
25372
24906
|
},
|
|
25373
|
-
|
|
24907
|
+
__wbg_getPartialBlockchainNodes_0a6c2a323b1f4caa: function(arg0, arg1, arg2, arg3) {
|
|
25374
24908
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
25375
24909
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
25376
24910
|
const ret = getPartialBlockchainNodes(getStringFromWasm0(arg0, arg1), v0);
|
|
25377
24911
|
return ret;
|
|
25378
24912
|
},
|
|
25379
|
-
|
|
24913
|
+
__wbg_getRandomValues_e9de607763a970bd: function() { return handleError(function (arg0, arg1) {
|
|
25380
24914
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
25381
24915
|
}, arguments); },
|
|
25382
24916
|
__wbg_getReader_f47519d698a4505e: function() { return handleError(function (arg0) {
|
|
25383
24917
|
const ret = arg0.getReader();
|
|
25384
24918
|
return ret;
|
|
25385
24919
|
}, arguments); },
|
|
25386
|
-
|
|
24920
|
+
__wbg_getSetting_319d65b5a2e111a2: function(arg0, arg1, arg2, arg3) {
|
|
25387
24921
|
let deferred0_0;
|
|
25388
24922
|
let deferred0_1;
|
|
25389
24923
|
try {
|
|
@@ -25395,7 +24929,7 @@ function __wbg_get_imports() {
|
|
|
25395
24929
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25396
24930
|
}
|
|
25397
24931
|
},
|
|
25398
|
-
|
|
24932
|
+
__wbg_getSyncHeight_94e6d0d761426ec9: function(arg0, arg1) {
|
|
25399
24933
|
const ret = getSyncHeight(getStringFromWasm0(arg0, arg1));
|
|
25400
24934
|
return ret;
|
|
25401
24935
|
},
|
|
@@ -25403,15 +24937,15 @@ function __wbg_get_imports() {
|
|
|
25403
24937
|
const ret = arg0.getTime();
|
|
25404
24938
|
return ret;
|
|
25405
24939
|
},
|
|
25406
|
-
|
|
24940
|
+
__wbg_getTrackedBlockHeaderNumbers_5a8edd94c7b7613c: function(arg0, arg1) {
|
|
25407
24941
|
const ret = getTrackedBlockHeaderNumbers(getStringFromWasm0(arg0, arg1));
|
|
25408
24942
|
return ret;
|
|
25409
24943
|
},
|
|
25410
|
-
|
|
24944
|
+
__wbg_getTrackedBlockHeaders_3292740bff6c9b4c: function(arg0, arg1) {
|
|
25411
24945
|
const ret = getTrackedBlockHeaders(getStringFromWasm0(arg0, arg1));
|
|
25412
24946
|
return ret;
|
|
25413
24947
|
},
|
|
25414
|
-
|
|
24948
|
+
__wbg_getTransactions_0c5674a652c44917: function(arg0, arg1, arg2, arg3) {
|
|
25415
24949
|
let deferred0_0;
|
|
25416
24950
|
let deferred0_1;
|
|
25417
24951
|
try {
|
|
@@ -25423,7 +24957,7 @@ function __wbg_get_imports() {
|
|
|
25423
24957
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25424
24958
|
}
|
|
25425
24959
|
},
|
|
25426
|
-
|
|
24960
|
+
__wbg_getUnspentInputNoteNullifiers_6c9d5852b42b8c73: function(arg0, arg1) {
|
|
25427
24961
|
const ret = getUnspentInputNoteNullifiers(getStringFromWasm0(arg0, arg1));
|
|
25428
24962
|
return ret;
|
|
25429
24963
|
},
|
|
@@ -25467,7 +25001,7 @@ function __wbg_get_imports() {
|
|
|
25467
25001
|
const ret = InputNoteRecord.__wrap(arg0);
|
|
25468
25002
|
return ret;
|
|
25469
25003
|
},
|
|
25470
|
-
|
|
25004
|
+
__wbg_insertAccountAddress_36db2bb32e10fd9b: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
25471
25005
|
let deferred0_0;
|
|
25472
25006
|
let deferred0_1;
|
|
25473
25007
|
try {
|
|
@@ -25481,7 +25015,7 @@ function __wbg_get_imports() {
|
|
|
25481
25015
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25482
25016
|
}
|
|
25483
25017
|
},
|
|
25484
|
-
|
|
25018
|
+
__wbg_insertAccountAuth_2763614f9c61eb99: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
25485
25019
|
let deferred0_0;
|
|
25486
25020
|
let deferred0_1;
|
|
25487
25021
|
let deferred1_0;
|
|
@@ -25498,7 +25032,7 @@ function __wbg_get_imports() {
|
|
|
25498
25032
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
25499
25033
|
}
|
|
25500
25034
|
},
|
|
25501
|
-
|
|
25035
|
+
__wbg_insertAccountKeyMapping_5440caed0fe18250: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
25502
25036
|
let deferred0_0;
|
|
25503
25037
|
let deferred0_1;
|
|
25504
25038
|
let deferred1_0;
|
|
@@ -25515,21 +25049,17 @@ function __wbg_get_imports() {
|
|
|
25515
25049
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
25516
25050
|
}
|
|
25517
25051
|
},
|
|
25518
|
-
|
|
25052
|
+
__wbg_insertBlockHeader_ca254bedd530d7a3: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
|
|
25519
25053
|
var v0 = getArrayU8FromWasm0(arg3, arg4).slice();
|
|
25520
25054
|
wasm.__wbindgen_free(arg3, arg4 * 1, 1);
|
|
25521
|
-
|
|
25522
|
-
|
|
25523
|
-
|
|
25524
|
-
|
|
25525
|
-
|
|
25526
|
-
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
25527
|
-
var v1 = getArrayJsValueFromWasm0(arg4, arg5).slice();
|
|
25528
|
-
wasm.__wbindgen_free(arg4, arg5 * 4, 4);
|
|
25529
|
-
const ret = insertPartialBlockchainNodes(getStringFromWasm0(arg0, arg1), v0, v1);
|
|
25055
|
+
var v1 = getArrayJsValueFromWasm0(arg6, arg7).slice();
|
|
25056
|
+
wasm.__wbindgen_free(arg6, arg7 * 4, 4);
|
|
25057
|
+
var v2 = getArrayJsValueFromWasm0(arg8, arg9).slice();
|
|
25058
|
+
wasm.__wbindgen_free(arg8, arg9 * 4, 4);
|
|
25059
|
+
const ret = insertBlockHeader(getStringFromWasm0(arg0, arg1), arg2 >>> 0, v0, arg5 !== 0, v1, v2);
|
|
25530
25060
|
return ret;
|
|
25531
25061
|
},
|
|
25532
|
-
|
|
25062
|
+
__wbg_insertSetting_2b672c0bf3a3668d: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
25533
25063
|
let deferred0_0;
|
|
25534
25064
|
let deferred0_1;
|
|
25535
25065
|
try {
|
|
@@ -25543,7 +25073,7 @@ function __wbg_get_imports() {
|
|
|
25543
25073
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25544
25074
|
}
|
|
25545
25075
|
},
|
|
25546
|
-
|
|
25076
|
+
__wbg_insertTransactionScript_f052607e004c23aa: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
25547
25077
|
var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
|
|
25548
25078
|
wasm.__wbindgen_free(arg2, arg3 * 1, 1);
|
|
25549
25079
|
let v1;
|
|
@@ -25640,11 +25170,11 @@ function __wbg_get_imports() {
|
|
|
25640
25170
|
const ret = arg0.length;
|
|
25641
25171
|
return ret;
|
|
25642
25172
|
},
|
|
25643
|
-
|
|
25173
|
+
__wbg_listSettingKeys_73b3c34ff51ee657: function(arg0, arg1) {
|
|
25644
25174
|
const ret = listSettingKeys(getStringFromWasm0(arg0, arg1));
|
|
25645
25175
|
return ret;
|
|
25646
25176
|
},
|
|
25647
|
-
|
|
25177
|
+
__wbg_lockAccount_a59ff3c777c9188c: function(arg0, arg1, arg2, arg3) {
|
|
25648
25178
|
let deferred0_0;
|
|
25649
25179
|
let deferred0_1;
|
|
25650
25180
|
try {
|
|
@@ -25791,10 +25321,6 @@ function __wbg_get_imports() {
|
|
|
25791
25321
|
const ret = NoteAttachment.__wrap(arg0);
|
|
25792
25322
|
return ret;
|
|
25793
25323
|
},
|
|
25794
|
-
__wbg_noteattachment_unwrap: function(arg0) {
|
|
25795
|
-
const ret = NoteAttachment.__unwrap(arg0);
|
|
25796
|
-
return ret;
|
|
25797
|
-
},
|
|
25798
25324
|
__wbg_noteconsumability_new: function(arg0) {
|
|
25799
25325
|
const ret = NoteConsumability.__wrap(arg0);
|
|
25800
25326
|
return ret;
|
|
@@ -25847,7 +25373,7 @@ function __wbg_get_imports() {
|
|
|
25847
25373
|
const ret = NoteTag.__unwrap(arg0);
|
|
25848
25374
|
return ret;
|
|
25849
25375
|
},
|
|
25850
|
-
|
|
25376
|
+
__wbg_openDatabase_8ac110fce86d145e: function(arg0, arg1, arg2, arg3) {
|
|
25851
25377
|
const ret = openDatabase(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
|
|
25852
25378
|
return ret;
|
|
25853
25379
|
},
|
|
@@ -25878,7 +25404,7 @@ function __wbg_get_imports() {
|
|
|
25878
25404
|
const ret = ProvenTransaction.__wrap(arg0);
|
|
25879
25405
|
return ret;
|
|
25880
25406
|
},
|
|
25881
|
-
|
|
25407
|
+
__wbg_pruneAccountHistory_c2e9f7b1d4846bc6: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
25882
25408
|
let deferred0_0;
|
|
25883
25409
|
let deferred0_1;
|
|
25884
25410
|
let deferred1_0;
|
|
@@ -25895,7 +25421,7 @@ function __wbg_get_imports() {
|
|
|
25895
25421
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
25896
25422
|
}
|
|
25897
25423
|
},
|
|
25898
|
-
|
|
25424
|
+
__wbg_pruneIrrelevantBlocks_33e6cf62a24f1f38: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
25899
25425
|
var v0 = getArrayU32FromWasm0(arg2, arg3).slice();
|
|
25900
25426
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
25901
25427
|
var v1 = getArrayJsValueFromWasm0(arg4, arg5).slice();
|
|
@@ -25903,14 +25429,6 @@ function __wbg_get_imports() {
|
|
|
25903
25429
|
const ret = pruneIrrelevantBlocks(getStringFromWasm0(arg0, arg1), v0, v1);
|
|
25904
25430
|
return ret;
|
|
25905
25431
|
},
|
|
25906
|
-
__wbg_pswaplineagerecord_new: function(arg0) {
|
|
25907
|
-
const ret = PswapLineageRecord.__wrap(arg0);
|
|
25908
|
-
return ret;
|
|
25909
|
-
},
|
|
25910
|
-
__wbg_push_8ffdcb2063340ba5: function(arg0, arg1) {
|
|
25911
|
-
const ret = arg0.push(arg1);
|
|
25912
|
-
return ret;
|
|
25913
|
-
},
|
|
25914
25432
|
__wbg_queueMicrotask_0aa0a927f78f5d98: function(arg0) {
|
|
25915
25433
|
const ret = arg0.queueMicrotask;
|
|
25916
25434
|
return ret;
|
|
@@ -25925,13 +25443,13 @@ function __wbg_get_imports() {
|
|
|
25925
25443
|
__wbg_releaseLock_aa5846c2494b3032: function(arg0) {
|
|
25926
25444
|
arg0.releaseLock();
|
|
25927
25445
|
},
|
|
25928
|
-
|
|
25446
|
+
__wbg_removeAccountAddress_5cbeda1f06e27b96: function(arg0, arg1, arg2, arg3) {
|
|
25929
25447
|
var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
|
|
25930
25448
|
wasm.__wbindgen_free(arg2, arg3 * 1, 1);
|
|
25931
25449
|
const ret = removeAccountAddress(getStringFromWasm0(arg0, arg1), v0);
|
|
25932
25450
|
return ret;
|
|
25933
25451
|
},
|
|
25934
|
-
|
|
25452
|
+
__wbg_removeAccountAuth_825600c45bdd5aa3: function(arg0, arg1, arg2, arg3) {
|
|
25935
25453
|
let deferred0_0;
|
|
25936
25454
|
let deferred0_1;
|
|
25937
25455
|
try {
|
|
@@ -25943,7 +25461,7 @@ function __wbg_get_imports() {
|
|
|
25943
25461
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25944
25462
|
}
|
|
25945
25463
|
},
|
|
25946
|
-
|
|
25464
|
+
__wbg_removeAllMappingsForKey_3f439269152ce6e0: function(arg0, arg1, arg2, arg3) {
|
|
25947
25465
|
let deferred0_0;
|
|
25948
25466
|
let deferred0_1;
|
|
25949
25467
|
try {
|
|
@@ -25955,7 +25473,7 @@ function __wbg_get_imports() {
|
|
|
25955
25473
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25956
25474
|
}
|
|
25957
25475
|
},
|
|
25958
|
-
|
|
25476
|
+
__wbg_removeNoteTag_e2ea5486d35929ca: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
|
|
25959
25477
|
var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
|
|
25960
25478
|
wasm.__wbindgen_free(arg2, arg3 * 1, 1);
|
|
25961
25479
|
let v1;
|
|
@@ -25976,7 +25494,7 @@ function __wbg_get_imports() {
|
|
|
25976
25494
|
const ret = removeNoteTag(getStringFromWasm0(arg0, arg1), v0, v1, v2, v3);
|
|
25977
25495
|
return ret;
|
|
25978
25496
|
},
|
|
25979
|
-
|
|
25497
|
+
__wbg_removeSetting_5fac6592df936024: function(arg0, arg1, arg2, arg3) {
|
|
25980
25498
|
let deferred0_0;
|
|
25981
25499
|
let deferred0_1;
|
|
25982
25500
|
try {
|
|
@@ -26027,9 +25545,6 @@ function __wbg_get_imports() {
|
|
|
26027
25545
|
const ret = setTimeout(arg0, arg1);
|
|
26028
25546
|
return ret;
|
|
26029
25547
|
}, arguments); },
|
|
26030
|
-
__wbg_set_3f1d0b984ed272ed: function(arg0, arg1, arg2) {
|
|
26031
|
-
arg0[arg1] = arg2;
|
|
26032
|
-
},
|
|
26033
25548
|
__wbg_set_6cb8631f80447a67: function() { return handleError(function (arg0, arg1, arg2) {
|
|
26034
25549
|
const ret = Reflect.set(arg0, arg1, arg2);
|
|
26035
25550
|
return ret;
|
|
@@ -26179,13 +25694,13 @@ function __wbg_get_imports() {
|
|
|
26179
25694
|
const ret = TransactionSummary.__wrap(arg0);
|
|
26180
25695
|
return ret;
|
|
26181
25696
|
},
|
|
26182
|
-
|
|
25697
|
+
__wbg_undoAccountStates_884490500595e8c1: function(arg0, arg1, arg2, arg3) {
|
|
26183
25698
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
26184
25699
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
26185
25700
|
const ret = undoAccountStates(getStringFromWasm0(arg0, arg1), v0);
|
|
26186
25701
|
return ret;
|
|
26187
25702
|
},
|
|
26188
|
-
|
|
25703
|
+
__wbg_upsertAccountCode_ce71ea974ae52d20: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
26189
25704
|
let deferred0_0;
|
|
26190
25705
|
let deferred0_1;
|
|
26191
25706
|
try {
|
|
@@ -26199,7 +25714,7 @@ function __wbg_get_imports() {
|
|
|
26199
25714
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
26200
25715
|
}
|
|
26201
25716
|
},
|
|
26202
|
-
|
|
25717
|
+
__wbg_upsertAccountRecord_793d7ddc0ba72c6d: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17) {
|
|
26203
25718
|
let deferred0_0;
|
|
26204
25719
|
let deferred0_1;
|
|
26205
25720
|
let deferred1_0;
|
|
@@ -26241,7 +25756,7 @@ function __wbg_get_imports() {
|
|
|
26241
25756
|
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
26242
25757
|
}
|
|
26243
25758
|
},
|
|
26244
|
-
|
|
25759
|
+
__wbg_upsertAccountStorage_5e3e18f2388a4516: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
26245
25760
|
let deferred0_0;
|
|
26246
25761
|
let deferred0_1;
|
|
26247
25762
|
try {
|
|
@@ -26255,7 +25770,7 @@ function __wbg_get_imports() {
|
|
|
26255
25770
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
26256
25771
|
}
|
|
26257
25772
|
},
|
|
26258
|
-
|
|
25773
|
+
__wbg_upsertForeignAccountCode_dc483b928e37841a: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
26259
25774
|
let deferred0_0;
|
|
26260
25775
|
let deferred0_1;
|
|
26261
25776
|
let deferred2_0;
|
|
@@ -26274,7 +25789,7 @@ function __wbg_get_imports() {
|
|
|
26274
25789
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
26275
25790
|
}
|
|
26276
25791
|
},
|
|
26277
|
-
|
|
25792
|
+
__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) {
|
|
26278
25793
|
let deferred0_0;
|
|
26279
25794
|
let deferred0_1;
|
|
26280
25795
|
let deferred6_0;
|
|
@@ -26323,7 +25838,7 @@ function __wbg_get_imports() {
|
|
|
26323
25838
|
wasm.__wbindgen_free(deferred9_0, deferred9_1, 1);
|
|
26324
25839
|
}
|
|
26325
25840
|
},
|
|
26326
|
-
|
|
25841
|
+
__wbg_upsertNoteScript_478f10dbd569c41c: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
26327
25842
|
let deferred0_0;
|
|
26328
25843
|
let deferred0_1;
|
|
26329
25844
|
try {
|
|
@@ -26337,7 +25852,7 @@ function __wbg_get_imports() {
|
|
|
26337
25852
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
26338
25853
|
}
|
|
26339
25854
|
},
|
|
26340
|
-
|
|
25855
|
+
__wbg_upsertOutputNote_81d633e2913e530c: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19) {
|
|
26341
25856
|
let deferred0_0;
|
|
26342
25857
|
let deferred0_1;
|
|
26343
25858
|
let deferred1_0;
|
|
@@ -26372,7 +25887,7 @@ function __wbg_get_imports() {
|
|
|
26372
25887
|
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
26373
25888
|
}
|
|
26374
25889
|
},
|
|
26375
|
-
|
|
25890
|
+
__wbg_upsertStorageMapEntries_6458946c680ec0cc: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
26376
25891
|
let deferred0_0;
|
|
26377
25892
|
let deferred0_1;
|
|
26378
25893
|
try {
|
|
@@ -26386,7 +25901,7 @@ function __wbg_get_imports() {
|
|
|
26386
25901
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
26387
25902
|
}
|
|
26388
25903
|
},
|
|
26389
|
-
|
|
25904
|
+
__wbg_upsertTransactionRecord_5f48cbfd35e412bc: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) {
|
|
26390
25905
|
let deferred0_0;
|
|
26391
25906
|
let deferred0_1;
|
|
26392
25907
|
try {
|
|
@@ -26407,7 +25922,7 @@ function __wbg_get_imports() {
|
|
|
26407
25922
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
26408
25923
|
}
|
|
26409
25924
|
},
|
|
26410
|
-
|
|
25925
|
+
__wbg_upsertVaultAssets_3d383338bd7746b0: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
26411
25926
|
let deferred0_0;
|
|
26412
25927
|
let deferred0_1;
|
|
26413
25928
|
try {
|
|
@@ -26438,12 +25953,12 @@ function __wbg_get_imports() {
|
|
|
26438
25953
|
return ret;
|
|
26439
25954
|
},
|
|
26440
25955
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
26441
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
25956
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 388, function: Function { arguments: [Externref], shim_idx: 781, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
26442
25957
|
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_____);
|
|
26443
25958
|
return ret;
|
|
26444
25959
|
},
|
|
26445
25960
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
26446
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
25961
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 388, function: Function { arguments: [], shim_idx: 389, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
26447
25962
|
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______);
|
|
26448
25963
|
return ret;
|
|
26449
25964
|
},
|
|
@@ -26453,91 +25968,79 @@ function __wbg_get_imports() {
|
|
|
26453
25968
|
return ret;
|
|
26454
25969
|
},
|
|
26455
25970
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
26456
|
-
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
26457
|
-
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
26458
|
-
return ret;
|
|
26459
|
-
},
|
|
26460
|
-
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
26461
25971
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
26462
25972
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
26463
25973
|
return ret;
|
|
26464
25974
|
},
|
|
26465
|
-
|
|
25975
|
+
__wbindgen_cast_0000000000000005: function(arg0) {
|
|
26466
25976
|
// Cast intrinsic for `U64 -> Externref`.
|
|
26467
25977
|
const ret = BigInt.asUintN(64, arg0);
|
|
26468
25978
|
return ret;
|
|
26469
25979
|
},
|
|
26470
|
-
|
|
25980
|
+
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
26471
25981
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
26472
25982
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
26473
25983
|
// Cast intrinsic for `Vector(NamedExternref("AccountHeader")) -> Externref`.
|
|
26474
25984
|
const ret = v0;
|
|
26475
25985
|
return ret;
|
|
26476
25986
|
},
|
|
26477
|
-
|
|
25987
|
+
__wbindgen_cast_0000000000000007: function(arg0, arg1) {
|
|
26478
25988
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
26479
25989
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
26480
25990
|
// Cast intrinsic for `Vector(NamedExternref("Address")) -> Externref`.
|
|
26481
25991
|
const ret = v0;
|
|
26482
25992
|
return ret;
|
|
26483
25993
|
},
|
|
26484
|
-
|
|
25994
|
+
__wbindgen_cast_0000000000000008: function(arg0, arg1) {
|
|
26485
25995
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
26486
25996
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
26487
25997
|
// Cast intrinsic for `Vector(NamedExternref("ConsumableNoteRecord")) -> Externref`.
|
|
26488
25998
|
const ret = v0;
|
|
26489
25999
|
return ret;
|
|
26490
26000
|
},
|
|
26491
|
-
|
|
26001
|
+
__wbindgen_cast_0000000000000009: function(arg0, arg1) {
|
|
26492
26002
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
26493
26003
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
26494
26004
|
// Cast intrinsic for `Vector(NamedExternref("FetchedNote")) -> Externref`.
|
|
26495
26005
|
const ret = v0;
|
|
26496
26006
|
return ret;
|
|
26497
26007
|
},
|
|
26498
|
-
|
|
26008
|
+
__wbindgen_cast_000000000000000a: function(arg0, arg1) {
|
|
26499
26009
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
26500
26010
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
26501
26011
|
// Cast intrinsic for `Vector(NamedExternref("InputNoteRecord")) -> Externref`.
|
|
26502
26012
|
const ret = v0;
|
|
26503
26013
|
return ret;
|
|
26504
26014
|
},
|
|
26505
|
-
|
|
26015
|
+
__wbindgen_cast_000000000000000b: function(arg0, arg1) {
|
|
26506
26016
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
26507
26017
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
26508
26018
|
// Cast intrinsic for `Vector(NamedExternref("OutputNoteRecord")) -> Externref`.
|
|
26509
26019
|
const ret = v0;
|
|
26510
26020
|
return ret;
|
|
26511
26021
|
},
|
|
26512
|
-
|
|
26513
|
-
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
26514
|
-
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
26515
|
-
// Cast intrinsic for `Vector(NamedExternref("PswapLineageRecord")) -> Externref`.
|
|
26516
|
-
const ret = v0;
|
|
26517
|
-
return ret;
|
|
26518
|
-
},
|
|
26519
|
-
__wbindgen_cast_000000000000000e: function(arg0, arg1) {
|
|
26022
|
+
__wbindgen_cast_000000000000000c: function(arg0, arg1) {
|
|
26520
26023
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
26521
26024
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
26522
26025
|
// Cast intrinsic for `Vector(NamedExternref("TransactionRecord")) -> Externref`.
|
|
26523
26026
|
const ret = v0;
|
|
26524
26027
|
return ret;
|
|
26525
26028
|
},
|
|
26526
|
-
|
|
26029
|
+
__wbindgen_cast_000000000000000d: function(arg0, arg1) {
|
|
26527
26030
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
26528
26031
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
26529
26032
|
// Cast intrinsic for `Vector(NamedExternref("Word")) -> Externref`.
|
|
26530
26033
|
const ret = v0;
|
|
26531
26034
|
return ret;
|
|
26532
26035
|
},
|
|
26533
|
-
|
|
26036
|
+
__wbindgen_cast_000000000000000e: function(arg0, arg1) {
|
|
26534
26037
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
26535
26038
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
26536
26039
|
// Cast intrinsic for `Vector(NamedExternref("string")) -> Externref`.
|
|
26537
26040
|
const ret = v0;
|
|
26538
26041
|
return ret;
|
|
26539
26042
|
},
|
|
26540
|
-
|
|
26043
|
+
__wbindgen_cast_000000000000000f: function(arg0, arg1) {
|
|
26541
26044
|
var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
|
|
26542
26045
|
wasm.__wbindgen_free(arg0, arg1 * 1, 1);
|
|
26543
26046
|
// Cast intrinsic for `Vector(U8) -> Externref`.
|
|
@@ -26628,6 +26131,9 @@ const AccountIdFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
26628
26131
|
const AccountIdArrayFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26629
26132
|
? { register: () => {}, unregister: () => {} }
|
|
26630
26133
|
: new FinalizationRegistry(ptr => wasm.__wbg_accountidarray_free(ptr >>> 0, 1));
|
|
26134
|
+
const AccountPatchFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26135
|
+
? { register: () => {}, unregister: () => {} }
|
|
26136
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_accountpatch_free(ptr >>> 0, 1));
|
|
26631
26137
|
const AccountProofFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26632
26138
|
? { register: () => {}, unregister: () => {} }
|
|
26633
26139
|
: new FinalizationRegistry(ptr => wasm.__wbg_accountproof_free(ptr >>> 0, 1));
|
|
@@ -26640,18 +26146,21 @@ const AccountStatusFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
26640
26146
|
const AccountStorageFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26641
26147
|
? { register: () => {}, unregister: () => {} }
|
|
26642
26148
|
: new FinalizationRegistry(ptr => wasm.__wbg_accountstorage_free(ptr >>> 0, 1));
|
|
26643
|
-
const AccountStorageDeltaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26644
|
-
? { register: () => {}, unregister: () => {} }
|
|
26645
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_accountstoragedelta_free(ptr >>> 0, 1));
|
|
26646
26149
|
const AccountStorageModeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26647
26150
|
? { register: () => {}, unregister: () => {} }
|
|
26648
26151
|
: new FinalizationRegistry(ptr => wasm.__wbg_accountstoragemode_free(ptr >>> 0, 1));
|
|
26152
|
+
const AccountStoragePatchFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26153
|
+
? { register: () => {}, unregister: () => {} }
|
|
26154
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_accountstoragepatch_free(ptr >>> 0, 1));
|
|
26649
26155
|
const AccountStorageRequirementsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26650
26156
|
? { register: () => {}, unregister: () => {} }
|
|
26651
26157
|
: new FinalizationRegistry(ptr => wasm.__wbg_accountstoragerequirements_free(ptr >>> 0, 1));
|
|
26652
26158
|
const AccountVaultDeltaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26653
26159
|
? { register: () => {}, unregister: () => {} }
|
|
26654
26160
|
: new FinalizationRegistry(ptr => wasm.__wbg_accountvaultdelta_free(ptr >>> 0, 1));
|
|
26161
|
+
const AccountVaultPatchFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26162
|
+
? { register: () => {}, unregister: () => {} }
|
|
26163
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_accountvaultpatch_free(ptr >>> 0, 1));
|
|
26655
26164
|
const AddressFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26656
26165
|
? { register: () => {}, unregister: () => {} }
|
|
26657
26166
|
: new FinalizationRegistry(ptr => wasm.__wbg_address_free(ptr >>> 0, 1));
|
|
@@ -26688,9 +26197,6 @@ const ConsumableNoteRecordFinalization = (typeof FinalizationRegistry === 'undef
|
|
|
26688
26197
|
const EndpointFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26689
26198
|
? { register: () => {}, unregister: () => {} }
|
|
26690
26199
|
: new FinalizationRegistry(ptr => wasm.__wbg_endpoint_free(ptr >>> 0, 1));
|
|
26691
|
-
const EthAddressFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26692
|
-
? { register: () => {}, unregister: () => {} }
|
|
26693
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_ethaddress_free(ptr >>> 0, 1));
|
|
26694
26200
|
const ExecutedTransactionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26695
26201
|
? { register: () => {}, unregister: () => {} }
|
|
26696
26202
|
: new FinalizationRegistry(ptr => wasm.__wbg_executedtransaction_free(ptr >>> 0, 1));
|
|
@@ -26769,9 +26275,6 @@ const LibraryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
26769
26275
|
const MerklePathFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26770
26276
|
? { register: () => {}, unregister: () => {} }
|
|
26771
26277
|
: new FinalizationRegistry(ptr => wasm.__wbg_merklepath_free(ptr >>> 0, 1));
|
|
26772
|
-
const NetworkAccountTargetFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26773
|
-
? { register: () => {}, unregister: () => {} }
|
|
26774
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_networkaccounttarget_free(ptr >>> 0, 1));
|
|
26775
26278
|
const NetworkIdFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26776
26279
|
? { register: () => {}, unregister: () => {} }
|
|
26777
26280
|
: new FinalizationRegistry(ptr => wasm.__wbg_networkid_free(ptr >>> 0, 1));
|
|
@@ -26895,9 +26398,6 @@ const ProgramFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
26895
26398
|
const ProvenTransactionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26896
26399
|
? { register: () => {}, unregister: () => {} }
|
|
26897
26400
|
: new FinalizationRegistry(ptr => wasm.__wbg_proventransaction_free(ptr >>> 0, 1));
|
|
26898
|
-
const PswapLineageRecordFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26899
|
-
? { register: () => {}, unregister: () => {} }
|
|
26900
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_pswaplineagerecord_free(ptr >>> 0, 1));
|
|
26901
26401
|
const PublicKeyFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26902
26402
|
? { register: () => {}, unregister: () => {} }
|
|
26903
26403
|
: new FinalizationRegistry(ptr => wasm.__wbg_publickey_free(ptr >>> 0, 1));
|
|
@@ -27390,7 +26890,7 @@ async function __wbg_init(module_or_path) {
|
|
|
27390
26890
|
|
|
27391
26891
|
const module$1 = new URL("assets/miden_client_web.wasm", self.location.href);
|
|
27392
26892
|
|
|
27393
|
-
var
|
|
26893
|
+
var CargoLwITdlzJ = /*#__PURE__*/Object.freeze({
|
|
27394
26894
|
__proto__: null,
|
|
27395
26895
|
Account: Account,
|
|
27396
26896
|
AccountArray: AccountArray,
|
|
@@ -27405,15 +26905,17 @@ var CargoCysp4vto = /*#__PURE__*/Object.freeze({
|
|
|
27405
26905
|
AccountId: AccountId,
|
|
27406
26906
|
AccountIdArray: AccountIdArray,
|
|
27407
26907
|
AccountInterface: AccountInterface,
|
|
26908
|
+
AccountPatch: AccountPatch,
|
|
27408
26909
|
AccountProof: AccountProof,
|
|
27409
26910
|
AccountReader: AccountReader,
|
|
27410
26911
|
AccountStatus: AccountStatus,
|
|
27411
26912
|
AccountStorage: AccountStorage,
|
|
27412
|
-
AccountStorageDelta: AccountStorageDelta,
|
|
27413
26913
|
AccountStorageMode: AccountStorageMode,
|
|
26914
|
+
AccountStoragePatch: AccountStoragePatch,
|
|
27414
26915
|
AccountStorageRequirements: AccountStorageRequirements,
|
|
27415
26916
|
AccountType: AccountType,
|
|
27416
26917
|
AccountVaultDelta: AccountVaultDelta,
|
|
26918
|
+
AccountVaultPatch: AccountVaultPatch,
|
|
27417
26919
|
Address: Address,
|
|
27418
26920
|
AdviceInputs: AdviceInputs,
|
|
27419
26921
|
AdviceMap: AdviceMap,
|
|
@@ -27427,7 +26929,6 @@ var CargoCysp4vto = /*#__PURE__*/Object.freeze({
|
|
|
27427
26929
|
CommittedNote: CommittedNote,
|
|
27428
26930
|
ConsumableNoteRecord: ConsumableNoteRecord,
|
|
27429
26931
|
Endpoint: Endpoint,
|
|
27430
|
-
EthAddress: EthAddress,
|
|
27431
26932
|
ExecutedTransaction: ExecutedTransaction,
|
|
27432
26933
|
Felt: Felt,
|
|
27433
26934
|
FeltArray: FeltArray,
|
|
@@ -27455,7 +26956,6 @@ var CargoCysp4vto = /*#__PURE__*/Object.freeze({
|
|
|
27455
26956
|
JsVaultAsset: JsVaultAsset,
|
|
27456
26957
|
Library: Library,
|
|
27457
26958
|
MerklePath: MerklePath,
|
|
27458
|
-
NetworkAccountTarget: NetworkAccountTarget,
|
|
27459
26959
|
NetworkId: NetworkId,
|
|
27460
26960
|
NetworkNoteStatusInfo: NetworkNoteStatusInfo,
|
|
27461
26961
|
NetworkType: NetworkType,
|
|
@@ -27502,8 +27002,6 @@ var CargoCysp4vto = /*#__PURE__*/Object.freeze({
|
|
|
27502
27002
|
ProcedureThreshold: ProcedureThreshold,
|
|
27503
27003
|
Program: Program,
|
|
27504
27004
|
ProvenTransaction: ProvenTransaction,
|
|
27505
|
-
PswapLineageRecord: PswapLineageRecord,
|
|
27506
|
-
PswapLineageState: PswapLineageState,
|
|
27507
27005
|
PublicKey: PublicKey,
|
|
27508
27006
|
RpcClient: RpcClient,
|
|
27509
27007
|
Rpo256: Rpo256,
|