@miden-sdk/miden-sdk 0.14.11 → 0.15.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mt/{Cargo-CZopJ--X.js → Cargo-smJQCGjz.js} +1111 -768
- package/dist/mt/Cargo-smJQCGjz.js.map +1 -0
- package/dist/mt/api-types.d.ts +122 -33
- package/dist/mt/assets/miden_client_web.wasm +0 -0
- package/dist/mt/crates/miden_client_web.d.ts +376 -303
- package/dist/mt/docs-entry.d.ts +3 -0
- package/dist/mt/eager.js +7 -4
- package/dist/mt/eager.js.map +1 -1
- package/dist/mt/index.d.ts +103 -10
- package/dist/mt/index.js +669 -312
- 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/workers/{Cargo-CZopJ--X-SsyOTzpb.js → Cargo-smJQCGjz-q4GYXDiD.js} +1111 -768
- package/dist/mt/workers/Cargo-smJQCGjz-q4GYXDiD.js.map +1 -0
- package/dist/mt/workers/assets/miden_client_web.wasm +0 -0
- package/dist/mt/workers/web-client-methods-worker.js +1140 -792
- package/dist/mt/workers/web-client-methods-worker.js.map +1 -1
- package/dist/mt/workers/web-client-methods-worker.module.js +23 -19
- package/dist/mt/workers/web-client-methods-worker.module.js.map +1 -1
- package/dist/mt/workers/workerHelpers.js +1 -1
- package/dist/st/{Cargo-DC6jSekr.js → Cargo-CG4XszZo.js} +1105 -763
- package/dist/st/Cargo-CG4XszZo.js.map +1 -0
- package/dist/st/api-types.d.ts +122 -33
- package/dist/st/assets/miden_client_web.wasm +0 -0
- package/dist/st/crates/miden_client_web.d.ts +376 -303
- package/dist/st/docs-entry.d.ts +3 -0
- package/dist/st/eager.js +7 -4
- package/dist/st/eager.js.map +1 -1
- package/dist/st/index.d.ts +103 -10
- package/dist/st/index.js +669 -312
- package/dist/st/index.js.map +1 -1
- package/dist/st/wasm.js +1 -1
- package/dist/st/workers/{Cargo-DC6jSekr-BG7C7m56.js → Cargo-CG4XszZo-S7EHAZSa.js} +1105 -763
- package/dist/st/workers/Cargo-CG4XszZo-S7EHAZSa.js.map +1 -0
- package/dist/st/workers/assets/miden_client_web.wasm +0 -0
- package/dist/st/workers/web-client-methods-worker.js +1134 -787
- package/dist/st/workers/web-client-methods-worker.js.map +1 -1
- package/dist/st/workers/web-client-methods-worker.module.js +23 -19
- package/dist/st/workers/web-client-methods-worker.module.js.map +1 -1
- package/js/client.js +491 -0
- package/js/node/client-factory.js +117 -0
- package/js/node/loader.js +138 -0
- package/js/node/napi-compat.js +253 -0
- package/js/node-index.js +194 -0
- package/js/resources/accounts.js +222 -0
- package/js/resources/compiler.js +74 -0
- package/js/resources/keystore.js +54 -0
- package/js/resources/notes.js +124 -0
- package/js/resources/settings.js +30 -0
- package/js/resources/tags.js +31 -0
- package/js/resources/transactions.js +667 -0
- package/js/standalone.js +109 -0
- package/js/utils.js +232 -0
- package/package.json +17 -2
- package/dist/mt/Cargo-CZopJ--X.js.map +0 -1
- package/dist/mt/workers/Cargo-CZopJ--X-SsyOTzpb.js.map +0 -1
- package/dist/st/Cargo-DC6jSekr.js.map +0 -1
- package/dist/st/workers/Cargo-DC6jSekr-BG7C7m56.js.map +0 -1
|
@@ -8280,7 +8280,7 @@ const V1_STORES = {
|
|
|
8280
8280
|
[Table.Addresses]: indexes("address", "id"),
|
|
8281
8281
|
[Table.Transactions]: indexes("id", "statusVariant"),
|
|
8282
8282
|
[Table.TransactionScripts]: indexes("scriptRoot"),
|
|
8283
|
-
[Table.InputNotes]: indexes("noteId", "nullifier", "stateDiscriminant", "[consumedBlockHeight+consumedTxOrder+noteId]"),
|
|
8283
|
+
[Table.InputNotes]: indexes("detailsCommitment", "noteId", "nullifier", "stateDiscriminant", "[consumedBlockHeight+consumedTxOrder+noteId]"),
|
|
8284
8284
|
[Table.OutputNotes]: indexes("noteId", "recipientDigest", "stateDiscriminant", "nullifier"),
|
|
8285
8285
|
[Table.NotesScripts]: indexes("scriptRoot"),
|
|
8286
8286
|
[Table.StateSync]: indexes("id"),
|
|
@@ -9472,13 +9472,12 @@ async function getAccountIdByKeyCommitment(dbId, pubKeyCommitmentHex) {
|
|
|
9472
9472
|
}
|
|
9473
9473
|
}
|
|
9474
9474
|
|
|
9475
|
-
async function insertBlockHeader(dbId, blockNum, header,
|
|
9475
|
+
async function insertBlockHeader(dbId, blockNum, header, hasClientNotes) {
|
|
9476
9476
|
try {
|
|
9477
9477
|
const db = getDatabase(dbId);
|
|
9478
9478
|
const data = {
|
|
9479
9479
|
blockNum: blockNum,
|
|
9480
9480
|
header,
|
|
9481
|
-
partialBlockchainPeaks,
|
|
9482
9481
|
hasClientNotes: hasClientNotes.toString(),
|
|
9483
9482
|
};
|
|
9484
9483
|
// Mirror SQLite's `insert_block_header_tx`: do an INSERT OR IGNORE on the
|
|
@@ -9486,12 +9485,8 @@ async function insertBlockHeader(dbId, blockNum, header, partialBlockchainPeaks,
|
|
|
9486
9485
|
// says so. Two callers hit this:
|
|
9487
9486
|
// - Genesis flow — no existing row; the add succeeds.
|
|
9488
9487
|
// - `get_and_store_authenticated_block` for a past block — a row
|
|
9489
|
-
// written by `applyStateSync` typically already exists.
|
|
9490
|
-
//
|
|
9491
|
-
// block_num) with peaks from the caller's current `PartialMmr`
|
|
9492
|
-
// forest (popcount == current sync height). Later reads of those
|
|
9493
|
-
// peaks trip `MmrPeaks::new`'s InvalidPeaks validation and wedge
|
|
9494
|
-
// sync for the rest of the session.
|
|
9488
|
+
// written by `applyStateSync` typically already exists. We keep that
|
|
9489
|
+
// row untouched.
|
|
9495
9490
|
//
|
|
9496
9491
|
// The `has_client_notes` upgrade is load-bearing: `get_tracked_block_
|
|
9497
9492
|
// header_numbers` filters by this flag to seed `tracked_leaves`, which
|
|
@@ -9544,11 +9539,9 @@ async function getBlockHeaders(dbId, blockNumbers) {
|
|
|
9544
9539
|
}
|
|
9545
9540
|
else {
|
|
9546
9541
|
const headerBase64 = uint8ArrayToBase64(result.header);
|
|
9547
|
-
const partialBlockchainPeaksBase64 = uint8ArrayToBase64(result.partialBlockchainPeaks);
|
|
9548
9542
|
return {
|
|
9549
9543
|
blockNum: result.blockNum,
|
|
9550
9544
|
header: headerBase64,
|
|
9551
|
-
partialBlockchainPeaks: partialBlockchainPeaksBase64,
|
|
9552
9545
|
hasClientNotes: result.hasClientNotes === "true",
|
|
9553
9546
|
};
|
|
9554
9547
|
}
|
|
@@ -9568,11 +9561,9 @@ async function getTrackedBlockHeaders(dbId) {
|
|
|
9568
9561
|
.toArray();
|
|
9569
9562
|
const processedRecords = await Promise.all(allMatchingRecords.map((record) => {
|
|
9570
9563
|
const headerBase64 = uint8ArrayToBase64(record.header);
|
|
9571
|
-
const partialBlockchainPeaksBase64 = uint8ArrayToBase64(record.partialBlockchainPeaks);
|
|
9572
9564
|
return {
|
|
9573
9565
|
blockNum: record.blockNum,
|
|
9574
9566
|
header: headerBase64,
|
|
9575
|
-
partialBlockchainPeaks: partialBlockchainPeaksBase64,
|
|
9576
9567
|
hasClientNotes: record.hasClientNotes === "true",
|
|
9577
9568
|
};
|
|
9578
9569
|
}));
|
|
@@ -9595,22 +9586,31 @@ async function getTrackedBlockHeaderNumbers(dbId) {
|
|
|
9595
9586
|
logWebStoreError(err, "Failed to get tracked block header numbers");
|
|
9596
9587
|
}
|
|
9597
9588
|
}
|
|
9598
|
-
|
|
9589
|
+
/**
|
|
9590
|
+
* Returns the blockchain peaks at the current sync height. Peaks live on the
|
|
9591
|
+
* `blockHeaders` row at `stateSync.blockNum` — the block that was the chain
|
|
9592
|
+
* tip when its sync ran. Returns `{ blockNum, peaks: undefined }` if the
|
|
9593
|
+
* stateSync row is missing or if that block was inserted via backfill
|
|
9594
|
+
* (which leaves `partialBlockchainPeaks` unset).
|
|
9595
|
+
*/
|
|
9596
|
+
async function getCurrentBlockchainPeaks(dbId) {
|
|
9599
9597
|
try {
|
|
9600
9598
|
const db = getDatabase(dbId);
|
|
9601
|
-
const
|
|
9602
|
-
if (
|
|
9603
|
-
return {
|
|
9604
|
-
|
|
9605
|
-
|
|
9599
|
+
const stateSyncRow = await db.stateSync.get(1);
|
|
9600
|
+
if (stateSyncRow == undefined) {
|
|
9601
|
+
return { blockNum: 0, peaks: undefined };
|
|
9602
|
+
}
|
|
9603
|
+
const header = await db.blockHeaders.get(stateSyncRow.blockNum);
|
|
9604
|
+
if (header == undefined || header.partialBlockchainPeaks == undefined) {
|
|
9605
|
+
return { blockNum: stateSyncRow.blockNum, peaks: undefined };
|
|
9606
9606
|
}
|
|
9607
|
-
const partialBlockchainPeaksBase64 = uint8ArrayToBase64(blockHeader.partialBlockchainPeaks);
|
|
9608
9607
|
return {
|
|
9609
|
-
|
|
9608
|
+
blockNum: stateSyncRow.blockNum,
|
|
9609
|
+
peaks: uint8ArrayToBase64(header.partialBlockchainPeaks),
|
|
9610
9610
|
};
|
|
9611
9611
|
}
|
|
9612
9612
|
catch (err) {
|
|
9613
|
-
logWebStoreError(err, "Failed to get
|
|
9613
|
+
logWebStoreError(err, "Failed to get current blockchain peaks");
|
|
9614
9614
|
}
|
|
9615
9615
|
}
|
|
9616
9616
|
async function getPartialBlockchainNodesAll(dbId) {
|
|
@@ -9650,19 +9650,34 @@ async function getPartialBlockchainNodesUpToInOrderIndex(dbId, maxInOrderIndex)
|
|
|
9650
9650
|
logWebStoreError(err, "Failed to get partial blockchain nodes up to index");
|
|
9651
9651
|
}
|
|
9652
9652
|
}
|
|
9653
|
-
async function pruneIrrelevantBlocks(dbId) {
|
|
9653
|
+
async function pruneIrrelevantBlocks(dbId, blocksToUntrack, nodeIdsToRemove) {
|
|
9654
9654
|
try {
|
|
9655
9655
|
const db = getDatabase(dbId);
|
|
9656
|
+
const numericNodeIds = nodeIdsToRemove.map(Number);
|
|
9656
9657
|
const syncHeight = await db.stateSync.get(1);
|
|
9657
9658
|
if (syncHeight == undefined) {
|
|
9658
9659
|
throw Error("SyncHeight is undefined -- is the state sync table empty?");
|
|
9659
9660
|
}
|
|
9660
|
-
|
|
9661
|
-
.
|
|
9662
|
-
.
|
|
9663
|
-
|
|
9664
|
-
|
|
9665
|
-
|
|
9661
|
+
await db.dexie.transaction("rw", db.blockHeaders, db.partialBlockchainNodes, async () => {
|
|
9662
|
+
// 1. Delete stale MMR authentication nodes.
|
|
9663
|
+
if (numericNodeIds.length > 0) {
|
|
9664
|
+
await db.partialBlockchainNodes.bulkDelete(numericNodeIds);
|
|
9665
|
+
}
|
|
9666
|
+
// 2. Mark untracked blocks as irrelevant.
|
|
9667
|
+
if (blocksToUntrack.length > 0) {
|
|
9668
|
+
await db.blockHeaders
|
|
9669
|
+
.where("blockNum")
|
|
9670
|
+
.anyOf(blocksToUntrack)
|
|
9671
|
+
.modify({ hasClientNotes: "false" });
|
|
9672
|
+
}
|
|
9673
|
+
// 3. Delete irrelevant block headers.
|
|
9674
|
+
const allMatchingRecords = await db.blockHeaders
|
|
9675
|
+
.where("hasClientNotes")
|
|
9676
|
+
.equals("false")
|
|
9677
|
+
.and((record) => record.blockNum !== 0 && record.blockNum !== syncHeight.blockNum)
|
|
9678
|
+
.toArray();
|
|
9679
|
+
await db.blockHeaders.bulkDelete(allMatchingRecords.map((r) => r.blockNum));
|
|
9680
|
+
});
|
|
9666
9681
|
}
|
|
9667
9682
|
catch (err) {
|
|
9668
9683
|
logWebStoreError(err, "Failed to prune irrelevant blocks");
|
|
@@ -9913,13 +9928,20 @@ async function getNoteScript(dbId, scriptRoot) {
|
|
|
9913
9928
|
logWebStoreError(err, "Failed to get note script from root");
|
|
9914
9929
|
}
|
|
9915
9930
|
}
|
|
9916
|
-
async function upsertInputNote(dbId, noteId, assets, serialNumber, inputs, scriptRoot, serializedNoteScript, nullifier, serializedCreatedAt, stateDiscriminant, state, consumedBlockHeight, consumedTxOrder, consumerAccountId, tx) {
|
|
9931
|
+
async function upsertInputNote(dbId, detailsCommitment, noteId, assets, attachments, serialNumber, inputs, scriptRoot, serializedNoteScript, nullifier, serializedCreatedAt, stateDiscriminant, state, consumedBlockHeight, consumedTxOrder, consumerAccountId, tx) {
|
|
9917
9932
|
const db = getDatabase(dbId);
|
|
9918
9933
|
const doWork = async (t) => {
|
|
9919
9934
|
try {
|
|
9920
9935
|
const data = {
|
|
9921
|
-
|
|
9936
|
+
// The details commitment is the primary key. It is always present, even
|
|
9937
|
+
// for partial notes lacking a noteId, so a partial note that later gains
|
|
9938
|
+
// its noteId updates the same row instead of inserting a duplicate.
|
|
9939
|
+
detailsCommitment,
|
|
9940
|
+
// Convert null -> undefined so Dexie omits the noteId secondary index
|
|
9941
|
+
// for partial notes that don't have one yet.
|
|
9942
|
+
noteId: noteId ?? undefined,
|
|
9922
9943
|
assets,
|
|
9944
|
+
attachments,
|
|
9923
9945
|
serialNumber,
|
|
9924
9946
|
inputs,
|
|
9925
9947
|
scriptRoot,
|
|
@@ -9942,7 +9964,7 @@ async function upsertInputNote(dbId, noteId, assets, serialNumber, inputs, scrip
|
|
|
9942
9964
|
/* v8 ignore next 3 — requires a mid-transaction Dexie write failure, not modelable with fake-indexeddb */
|
|
9943
9965
|
}
|
|
9944
9966
|
catch (error) {
|
|
9945
|
-
logWebStoreError(error, `Error inserting note: ${
|
|
9967
|
+
logWebStoreError(error, `Error inserting note: ${detailsCommitment}`);
|
|
9946
9968
|
}
|
|
9947
9969
|
};
|
|
9948
9970
|
return db.dexie.transaction("rw", db.inputNotes, db.notesScripts, doWork);
|
|
@@ -10005,13 +10027,14 @@ async function getInputNoteByOffset(dbId, states, consumerAccountId, blockStart,
|
|
|
10005
10027
|
logWebStoreError(err, "Failed to get input note by offset");
|
|
10006
10028
|
}
|
|
10007
10029
|
}
|
|
10008
|
-
async function upsertOutputNote(dbId, noteId, assets, recipientDigest, metadata, nullifier, expectedHeight, stateDiscriminant, state, tx) {
|
|
10030
|
+
async function upsertOutputNote(dbId, noteId, assets, attachments, recipientDigest, metadata, nullifier, expectedHeight, stateDiscriminant, state, tx) {
|
|
10009
10031
|
const db = getDatabase(dbId);
|
|
10010
10032
|
const doWork = async (t) => {
|
|
10011
10033
|
try {
|
|
10012
10034
|
const data = {
|
|
10013
10035
|
noteId,
|
|
10014
10036
|
assets,
|
|
10037
|
+
attachments,
|
|
10015
10038
|
recipientDigest,
|
|
10016
10039
|
metadata,
|
|
10017
10040
|
nullifier: nullifier ? nullifier : undefined,
|
|
@@ -10032,6 +10055,7 @@ async function processInputNotes(dbId, notes) {
|
|
|
10032
10055
|
const db = getDatabase(dbId);
|
|
10033
10056
|
return await Promise.all(notes.map(async (note) => {
|
|
10034
10057
|
const assetsBase64 = uint8ArrayToBase64(note.assets);
|
|
10058
|
+
const attachmentsBase64 = uint8ArrayToBase64(note.attachments);
|
|
10035
10059
|
const serialNumberBase64 = uint8ArrayToBase64(note.serialNumber);
|
|
10036
10060
|
const inputsBase64 = uint8ArrayToBase64(note.inputs);
|
|
10037
10061
|
let serializedNoteScriptBase64 = undefined;
|
|
@@ -10044,6 +10068,7 @@ async function processInputNotes(dbId, notes) {
|
|
|
10044
10068
|
const stateBase64 = uint8ArrayToBase64(note.state);
|
|
10045
10069
|
return {
|
|
10046
10070
|
assets: assetsBase64,
|
|
10071
|
+
attachments: attachmentsBase64,
|
|
10047
10072
|
serialNumber: serialNumberBase64,
|
|
10048
10073
|
inputs: inputsBase64,
|
|
10049
10074
|
createdAt: note.serializedCreatedAt,
|
|
@@ -10055,10 +10080,12 @@ async function processInputNotes(dbId, notes) {
|
|
|
10055
10080
|
async function processOutputNotes(notes) {
|
|
10056
10081
|
return await Promise.all(notes.map((note) => {
|
|
10057
10082
|
const assetsBase64 = uint8ArrayToBase64(note.assets);
|
|
10083
|
+
const attachmentsBase64 = uint8ArrayToBase64(note.attachments);
|
|
10058
10084
|
const metadataBase64 = uint8ArrayToBase64(note.metadata);
|
|
10059
10085
|
const stateBase64 = uint8ArrayToBase64(note.state);
|
|
10060
10086
|
return {
|
|
10061
10087
|
assets: assetsBase64,
|
|
10088
|
+
attachments: attachmentsBase64,
|
|
10062
10089
|
recipientDigest: note.recipientDigest,
|
|
10063
10090
|
metadata: metadataBase64,
|
|
10064
10091
|
expectedHeight: note.expectedHeight,
|
|
@@ -10327,9 +10354,8 @@ async function removeNoteTag(dbId, tag, sourceNoteId, sourceAccountId) {
|
|
|
10327
10354
|
}
|
|
10328
10355
|
async function applyStateSync(dbId, stateUpdate) {
|
|
10329
10356
|
const db = getDatabase(dbId);
|
|
10330
|
-
const { blockNum, flattenedNewBlockHeaders,
|
|
10357
|
+
const { blockNum, flattenedNewBlockHeaders, partialBlockchainPeaks, newBlockNums, blockHasRelevantNotes, serializedNodeIds, serializedNodes, committedNoteTagSources, serializedInputNotes, serializedOutputNotes, accountUpdates, transactionUpdates, } = stateUpdate;
|
|
10331
10358
|
const newBlockHeaders = reconstructFlattenedVec(flattenedNewBlockHeaders);
|
|
10332
|
-
const partialBlockchainPeaks = reconstructFlattenedVec(flattenedPartialBlockChainPeaks);
|
|
10333
10359
|
const tablesToAccess = [
|
|
10334
10360
|
db.stateSync,
|
|
10335
10361
|
db.inputNotes,
|
|
@@ -10352,10 +10378,10 @@ async function applyStateSync(dbId, stateUpdate) {
|
|
|
10352
10378
|
return await db.dexie.transaction("rw", tablesToAccess, async (tx) => {
|
|
10353
10379
|
await Promise.all([
|
|
10354
10380
|
Promise.all(serializedInputNotes.map((note) => {
|
|
10355
|
-
return upsertInputNote(dbId, note.noteId, note.noteAssets, note.serialNumber, note.inputs, note.noteScriptRoot, note.noteScript, note.nullifier, note.createdAt, note.stateDiscriminant, note.state, note.consumedBlockHeight, note.consumedTxOrder, note.consumerAccountId);
|
|
10381
|
+
return upsertInputNote(dbId, note.detailsCommitment, note.noteId, note.noteAssets, note.attachments, note.serialNumber, note.inputs, note.noteScriptRoot, note.noteScript, note.nullifier, note.createdAt, note.stateDiscriminant, note.state, note.consumedBlockHeight, note.consumedTxOrder, note.consumerAccountId);
|
|
10356
10382
|
})),
|
|
10357
10383
|
Promise.all(serializedOutputNotes.map((note) => {
|
|
10358
|
-
return upsertOutputNote(dbId, note.noteId, note.noteAssets, note.recipientDigest, note.metadata, note.nullifier, note.expectedHeight, note.stateDiscriminant, note.state);
|
|
10384
|
+
return upsertOutputNote(dbId, note.noteId, note.noteAssets, note.attachments, note.recipientDigest, note.metadata, note.nullifier, note.expectedHeight, note.stateDiscriminant, note.state);
|
|
10359
10385
|
})),
|
|
10360
10386
|
Promise.all(transactionUpdates.map((transactionRecord) => {
|
|
10361
10387
|
let promises = [
|
|
@@ -10381,16 +10407,26 @@ async function applyStateSync(dbId, stateUpdate) {
|
|
|
10381
10407
|
}))),
|
|
10382
10408
|
updateSyncHeight(tx, blockNum),
|
|
10383
10409
|
updatePartialBlockchainNodes(tx, serializedNodeIds, serializedNodes),
|
|
10384
|
-
updateCommittedNoteTags(tx,
|
|
10410
|
+
updateCommittedNoteTags(tx, committedNoteTagSources),
|
|
10385
10411
|
Promise.all(newBlockHeaders.map((newBlockHeader, i) => {
|
|
10386
|
-
|
|
10412
|
+
// Peaks are attached only to the chain-tip block (the one whose
|
|
10413
|
+
// blockNum matches the new sync height). That row is always
|
|
10414
|
+
// present in this iteration because `partial_blockchain_updates`
|
|
10415
|
+
// includes the chain tip header by construction.
|
|
10416
|
+
// TODO: potentially move this to be under the sync state info table
|
|
10417
|
+
// as currently done in SQLite
|
|
10418
|
+
const peaks = newBlockNums[i] === blockNum ? partialBlockchainPeaks : undefined;
|
|
10419
|
+
return updateBlockHeader(tx, newBlockNums[i], newBlockHeader, blockHasRelevantNotes[i] == 1, peaks);
|
|
10387
10420
|
})),
|
|
10388
10421
|
]);
|
|
10389
10422
|
});
|
|
10390
10423
|
}
|
|
10424
|
+
/**
|
|
10425
|
+
* Advances `stateSync.blockNum` only when moving forward. Mirrors SQLite's
|
|
10426
|
+
* `UPDATE blockchain_checkpoint ... WHERE block_num < ?`.
|
|
10427
|
+
*/
|
|
10391
10428
|
async function updateSyncHeight(tx, blockNum) {
|
|
10392
10429
|
try {
|
|
10393
|
-
// Only update if moving forward to prevent race conditions
|
|
10394
10430
|
const current = await tx.stateSync.get(1);
|
|
10395
10431
|
if (!current || current.blockNum < blockNum) {
|
|
10396
10432
|
await tx.stateSync.update(1, {
|
|
@@ -10402,13 +10438,13 @@ async function updateSyncHeight(tx, blockNum) {
|
|
|
10402
10438
|
logWebStoreError(error, "Failed to update sync height");
|
|
10403
10439
|
}
|
|
10404
10440
|
}
|
|
10405
|
-
async function updateBlockHeader(tx, blockNum, blockHeader,
|
|
10441
|
+
async function updateBlockHeader(tx, blockNum, blockHeader, hasClientNotes, partialBlockchainPeaks) {
|
|
10406
10442
|
try {
|
|
10407
10443
|
const data = {
|
|
10408
10444
|
blockNum: blockNum,
|
|
10409
10445
|
header: blockHeader,
|
|
10410
|
-
partialBlockchainPeaks,
|
|
10411
10446
|
hasClientNotes: hasClientNotes.toString(),
|
|
10447
|
+
...(partialBlockchainPeaks !== undefined && { partialBlockchainPeaks }),
|
|
10412
10448
|
};
|
|
10413
10449
|
const existingBlockHeader = await tx.blockHeaders.get(blockNum);
|
|
10414
10450
|
if (!existingBlockHeader) {
|
|
@@ -10439,13 +10475,13 @@ async function updatePartialBlockchainNodes(tx, nodeIndexes, nodes) {
|
|
|
10439
10475
|
logWebStoreError(err, "Failed to update partial blockchain nodes");
|
|
10440
10476
|
}
|
|
10441
10477
|
}
|
|
10442
|
-
async function updateCommittedNoteTags(tx,
|
|
10478
|
+
async function updateCommittedNoteTags(tx, committedNoteTagSources) {
|
|
10443
10479
|
try {
|
|
10444
|
-
for (let i = 0; i <
|
|
10445
|
-
const
|
|
10480
|
+
for (let i = 0; i < committedNoteTagSources.length; i++) {
|
|
10481
|
+
const tagSource = committedNoteTagSources[i];
|
|
10446
10482
|
await tx.tags
|
|
10447
10483
|
.where("sourceNoteId")
|
|
10448
|
-
.equals(
|
|
10484
|
+
.equals(tagSource)
|
|
10449
10485
|
.delete();
|
|
10450
10486
|
}
|
|
10451
10487
|
}
|
|
@@ -10650,21 +10686,13 @@ class Account {
|
|
|
10650
10686
|
return AccountId.__wrap(ret);
|
|
10651
10687
|
}
|
|
10652
10688
|
/**
|
|
10653
|
-
* Returns true if the account
|
|
10689
|
+
* Returns true if the account exposes a fungible-faucet interface.
|
|
10654
10690
|
* @returns {boolean}
|
|
10655
10691
|
*/
|
|
10656
10692
|
isFaucet() {
|
|
10657
10693
|
const ret = wasm.account_isFaucet(this.__wbg_ptr);
|
|
10658
10694
|
return ret !== 0;
|
|
10659
10695
|
}
|
|
10660
|
-
/**
|
|
10661
|
-
* Returns true if this is a network-owned account.
|
|
10662
|
-
* @returns {boolean}
|
|
10663
|
-
*/
|
|
10664
|
-
isNetwork() {
|
|
10665
|
-
const ret = wasm.account_isNetwork(this.__wbg_ptr);
|
|
10666
|
-
return ret !== 0;
|
|
10667
|
-
}
|
|
10668
10696
|
/**
|
|
10669
10697
|
* Returns true if the account has not yet been committed to the chain.
|
|
10670
10698
|
* @returns {boolean}
|
|
@@ -10690,21 +10718,13 @@ class Account {
|
|
|
10690
10718
|
return ret !== 0;
|
|
10691
10719
|
}
|
|
10692
10720
|
/**
|
|
10693
|
-
* Returns true if the account is a regular
|
|
10721
|
+
* Returns true if the account is a regular (non-faucet) account.
|
|
10694
10722
|
* @returns {boolean}
|
|
10695
10723
|
*/
|
|
10696
10724
|
isRegularAccount() {
|
|
10697
10725
|
const ret = wasm.account_isRegularAccount(this.__wbg_ptr);
|
|
10698
10726
|
return ret !== 0;
|
|
10699
10727
|
}
|
|
10700
|
-
/**
|
|
10701
|
-
* Returns true if the account can update its code.
|
|
10702
|
-
* @returns {boolean}
|
|
10703
|
-
*/
|
|
10704
|
-
isUpdatable() {
|
|
10705
|
-
const ret = wasm.account_isUpdatable(this.__wbg_ptr);
|
|
10706
|
-
return ret !== 0;
|
|
10707
|
-
}
|
|
10708
10728
|
/**
|
|
10709
10729
|
* Returns the account nonce, which is incremented on every state update.
|
|
10710
10730
|
* @returns {Felt}
|
|
@@ -10804,18 +10824,13 @@ class AccountArray {
|
|
|
10804
10824
|
wasm.accountarray_push(this.__wbg_ptr, element.__wbg_ptr);
|
|
10805
10825
|
}
|
|
10806
10826
|
/**
|
|
10807
|
-
* Replace the element at `index`. Borrows + clones the input
|
|
10808
|
-
* (mirrors `push`), so the caller's JS handle remains valid
|
|
10809
|
-
* after the call. Without this borrow, passing `elem` by
|
|
10810
|
-
* value would move the underlying Rust value out of the
|
|
10811
|
-
* caller's JS handle and any subsequent method on it would
|
|
10812
|
-
* panic with `"null pointer passed to rust"`.
|
|
10813
10827
|
* @param {number} index
|
|
10814
10828
|
* @param {Account} elem
|
|
10815
10829
|
*/
|
|
10816
10830
|
replaceAt(index, elem) {
|
|
10817
10831
|
_assertClass(elem, Account);
|
|
10818
|
-
|
|
10832
|
+
var ptr0 = elem.__destroy_into_raw();
|
|
10833
|
+
const ret = wasm.accountarray_replaceAt(this.__wbg_ptr, index, ptr0);
|
|
10819
10834
|
if (ret[1]) {
|
|
10820
10835
|
throw takeFromExternrefTable0(ret[0]);
|
|
10821
10836
|
}
|
|
@@ -10843,28 +10858,31 @@ class AccountBuilder {
|
|
|
10843
10858
|
}
|
|
10844
10859
|
/**
|
|
10845
10860
|
* Sets the account type (regular, faucet, etc.).
|
|
10846
|
-
*
|
|
10847
|
-
* Accepts either a numeric WASM enum value (0–3) or a string name
|
|
10848
|
-
* (`"FungibleFaucet"`, `"NonFungibleFaucet"`,
|
|
10849
|
-
* `"RegularAccountImmutableCode"`, `"RegularAccountUpdatableCode"`).
|
|
10850
|
-
* @param {any} account_type
|
|
10861
|
+
* @param {AccountType} account_type
|
|
10851
10862
|
* @returns {AccountBuilder}
|
|
10852
10863
|
*/
|
|
10853
10864
|
accountType(account_type) {
|
|
10854
|
-
const
|
|
10855
|
-
|
|
10865
|
+
const ret = wasm.accountbuilder_accountType(this.__wbg_ptr, account_type);
|
|
10866
|
+
return AccountBuilder.__wrap(ret);
|
|
10867
|
+
}
|
|
10868
|
+
/**
|
|
10869
|
+
* Builds the account (including merged storage schema commitment metadata) and returns it
|
|
10870
|
+
* together with the derived seed.
|
|
10871
|
+
* @returns {AccountBuilderResult}
|
|
10872
|
+
*/
|
|
10873
|
+
build() {
|
|
10874
|
+
const ret = wasm.accountbuilder_build(this.__wbg_ptr);
|
|
10856
10875
|
if (ret[2]) {
|
|
10857
10876
|
throw takeFromExternrefTable0(ret[1]);
|
|
10858
10877
|
}
|
|
10859
|
-
return
|
|
10878
|
+
return AccountBuilderResult.__wrap(ret[0]);
|
|
10860
10879
|
}
|
|
10861
10880
|
/**
|
|
10862
|
-
* Builds the account
|
|
10881
|
+
* Builds the account without adding the schema commitment component (legacy behavior).
|
|
10863
10882
|
* @returns {AccountBuilderResult}
|
|
10864
10883
|
*/
|
|
10865
|
-
|
|
10866
|
-
const
|
|
10867
|
-
const ret = wasm.accountbuilder_build(ptr);
|
|
10884
|
+
buildWithoutSchemaCommitment() {
|
|
10885
|
+
const ret = wasm.accountbuilder_buildWithoutSchemaCommitment(this.__wbg_ptr);
|
|
10868
10886
|
if (ret[2]) {
|
|
10869
10887
|
throw takeFromExternrefTable0(ret[1]);
|
|
10870
10888
|
}
|
|
@@ -10887,13 +10905,17 @@ class AccountBuilder {
|
|
|
10887
10905
|
}
|
|
10888
10906
|
/**
|
|
10889
10907
|
* Sets the storage mode (public/private) for the account.
|
|
10908
|
+
*
|
|
10909
|
+
* The 0.15 protocol surface collapsed `AccountStorageMode` and `AccountType` into a
|
|
10910
|
+
* single 2-way `AccountType` flag: setting the storage mode IS setting the account
|
|
10911
|
+
* type. Calling both `accountType()` and `storageMode()` on the same builder is the
|
|
10912
|
+
* last-write-wins on the underlying flag. Method kept for JS-surface back-compat.
|
|
10890
10913
|
* @param {AccountStorageMode} storage_mode
|
|
10891
10914
|
* @returns {AccountBuilder}
|
|
10892
10915
|
*/
|
|
10893
10916
|
storageMode(storage_mode) {
|
|
10894
|
-
const ptr = this.__destroy_into_raw();
|
|
10895
10917
|
_assertClass(storage_mode, AccountStorageMode);
|
|
10896
|
-
const ret = wasm.accountbuilder_storageMode(
|
|
10918
|
+
const ret = wasm.accountbuilder_storageMode(this.__wbg_ptr, storage_mode.__wbg_ptr);
|
|
10897
10919
|
return AccountBuilder.__wrap(ret);
|
|
10898
10920
|
}
|
|
10899
10921
|
/**
|
|
@@ -10902,17 +10924,15 @@ class AccountBuilder {
|
|
|
10902
10924
|
* @returns {AccountBuilder}
|
|
10903
10925
|
*/
|
|
10904
10926
|
withAuthComponent(account_component) {
|
|
10905
|
-
const ptr = this.__destroy_into_raw();
|
|
10906
10927
|
_assertClass(account_component, AccountComponent);
|
|
10907
|
-
const ret = wasm.accountbuilder_withAuthComponent(
|
|
10928
|
+
const ret = wasm.accountbuilder_withAuthComponent(this.__wbg_ptr, account_component.__wbg_ptr);
|
|
10908
10929
|
return AccountBuilder.__wrap(ret);
|
|
10909
10930
|
}
|
|
10910
10931
|
/**
|
|
10911
10932
|
* @returns {AccountBuilder}
|
|
10912
10933
|
*/
|
|
10913
10934
|
withBasicWalletComponent() {
|
|
10914
|
-
const
|
|
10915
|
-
const ret = wasm.accountbuilder_withBasicWalletComponent(ptr);
|
|
10935
|
+
const ret = wasm.accountbuilder_withBasicWalletComponent(this.__wbg_ptr);
|
|
10916
10936
|
return AccountBuilder.__wrap(ret);
|
|
10917
10937
|
}
|
|
10918
10938
|
/**
|
|
@@ -10921,9 +10941,8 @@ class AccountBuilder {
|
|
|
10921
10941
|
* @returns {AccountBuilder}
|
|
10922
10942
|
*/
|
|
10923
10943
|
withComponent(account_component) {
|
|
10924
|
-
const ptr = this.__destroy_into_raw();
|
|
10925
10944
|
_assertClass(account_component, AccountComponent);
|
|
10926
|
-
const ret = wasm.accountbuilder_withComponent(
|
|
10945
|
+
const ret = wasm.accountbuilder_withComponent(this.__wbg_ptr, account_component.__wbg_ptr);
|
|
10927
10946
|
return AccountBuilder.__wrap(ret);
|
|
10928
10947
|
}
|
|
10929
10948
|
/**
|
|
@@ -10931,8 +10950,7 @@ class AccountBuilder {
|
|
|
10931
10950
|
* @returns {AccountBuilder}
|
|
10932
10951
|
*/
|
|
10933
10952
|
withNoAuthComponent() {
|
|
10934
|
-
const
|
|
10935
|
-
const ret = wasm.accountbuilder_withNoAuthComponent(ptr);
|
|
10953
|
+
const ret = wasm.accountbuilder_withNoAuthComponent(this.__wbg_ptr);
|
|
10936
10954
|
return AccountBuilder.__wrap(ret);
|
|
10937
10955
|
}
|
|
10938
10956
|
}
|
|
@@ -11110,7 +11128,8 @@ class AccountComponent {
|
|
|
11110
11128
|
static fromPackage(_package, storage_slots) {
|
|
11111
11129
|
_assertClass(_package, Package);
|
|
11112
11130
|
_assertClass(storage_slots, StorageSlotArray);
|
|
11113
|
-
|
|
11131
|
+
var ptr0 = storage_slots.__destroy_into_raw();
|
|
11132
|
+
const ret = wasm.accountcomponent_fromPackage(_package.__wbg_ptr, ptr0);
|
|
11114
11133
|
if (ret[2]) {
|
|
11115
11134
|
throw takeFromExternrefTable0(ret[1]);
|
|
11116
11135
|
}
|
|
@@ -11157,11 +11176,15 @@ class AccountComponent {
|
|
|
11157
11176
|
}
|
|
11158
11177
|
/**
|
|
11159
11178
|
* Marks the component as supporting all account types.
|
|
11179
|
+
*
|
|
11180
|
+
* The 0.15 protocol collapsed the per-account-type flag set on
|
|
11181
|
+
* `AccountComponentMetadata::new` — every component now applies to every account type
|
|
11182
|
+
* implicitly, so this method's job is to re-derive the metadata under the new
|
|
11183
|
+
* (name-only) constructor while keeping the JS API surface stable.
|
|
11160
11184
|
* @returns {AccountComponent}
|
|
11161
11185
|
*/
|
|
11162
11186
|
withSupportsAllTypes() {
|
|
11163
|
-
const
|
|
11164
|
-
const ret = wasm.accountcomponent_withSupportsAllTypes(ptr);
|
|
11187
|
+
const ret = wasm.accountcomponent_withSupportsAllTypes(this.__wbg_ptr);
|
|
11165
11188
|
return AccountComponent.__wrap(ret);
|
|
11166
11189
|
}
|
|
11167
11190
|
}
|
|
@@ -11516,22 +11539,6 @@ class AccountId {
|
|
|
11516
11539
|
}
|
|
11517
11540
|
return AccountId.__wrap(ret[0]);
|
|
11518
11541
|
}
|
|
11519
|
-
/**
|
|
11520
|
-
* Returns true if the ID refers to a faucet.
|
|
11521
|
-
* @returns {boolean}
|
|
11522
|
-
*/
|
|
11523
|
-
isFaucet() {
|
|
11524
|
-
const ret = wasm.accountid_isFaucet(this.__wbg_ptr);
|
|
11525
|
-
return ret !== 0;
|
|
11526
|
-
}
|
|
11527
|
-
/**
|
|
11528
|
-
* Returns true if the ID is reserved for network accounts.
|
|
11529
|
-
* @returns {boolean}
|
|
11530
|
-
*/
|
|
11531
|
-
isNetwork() {
|
|
11532
|
-
const ret = wasm.accountid_isNetwork(this.__wbg_ptr);
|
|
11533
|
-
return ret !== 0;
|
|
11534
|
-
}
|
|
11535
11542
|
/**
|
|
11536
11543
|
* Returns true if the account uses private storage.
|
|
11537
11544
|
* @returns {boolean}
|
|
@@ -11548,14 +11555,6 @@ class AccountId {
|
|
|
11548
11555
|
const ret = wasm.accountid_isPublic(this.__wbg_ptr);
|
|
11549
11556
|
return ret !== 0;
|
|
11550
11557
|
}
|
|
11551
|
-
/**
|
|
11552
|
-
* Returns true if the ID refers to a regular account.
|
|
11553
|
-
* @returns {boolean}
|
|
11554
|
-
*/
|
|
11555
|
-
isRegularAccount() {
|
|
11556
|
-
const ret = wasm.accountid_isRegularAccount(this.__wbg_ptr);
|
|
11557
|
-
return ret !== 0;
|
|
11558
|
-
}
|
|
11559
11558
|
/**
|
|
11560
11559
|
* Returns the prefix field element storing metadata about version, type, and storage mode.
|
|
11561
11560
|
* @returns {Felt}
|
|
@@ -11673,18 +11672,13 @@ class AccountIdArray {
|
|
|
11673
11672
|
wasm.accountidarray_push(this.__wbg_ptr, element.__wbg_ptr);
|
|
11674
11673
|
}
|
|
11675
11674
|
/**
|
|
11676
|
-
* Replace the element at `index`. Borrows + clones the input
|
|
11677
|
-
* (mirrors `push`), so the caller's JS handle remains valid
|
|
11678
|
-
* after the call. Without this borrow, passing `elem` by
|
|
11679
|
-
* value would move the underlying Rust value out of the
|
|
11680
|
-
* caller's JS handle and any subsequent method on it would
|
|
11681
|
-
* panic with `"null pointer passed to rust"`.
|
|
11682
11675
|
* @param {number} index
|
|
11683
11676
|
* @param {AccountId} elem
|
|
11684
11677
|
*/
|
|
11685
11678
|
replaceAt(index, elem) {
|
|
11686
11679
|
_assertClass(elem, AccountId);
|
|
11687
|
-
|
|
11680
|
+
var ptr0 = elem.__destroy_into_raw();
|
|
11681
|
+
const ret = wasm.accountidarray_replaceAt(this.__wbg_ptr, index, ptr0);
|
|
11688
11682
|
if (ret[1]) {
|
|
11689
11683
|
throw takeFromExternrefTable0(ret[0]);
|
|
11690
11684
|
}
|
|
@@ -11775,7 +11769,7 @@ class AccountProof {
|
|
|
11775
11769
|
*
|
|
11776
11770
|
* Each entry contains a `key` and `value` as `Word` objects.
|
|
11777
11771
|
* @param {string} slot_name
|
|
11778
|
-
* @returns {
|
|
11772
|
+
* @returns {StorageMapEntryJs[] | undefined}
|
|
11779
11773
|
*/
|
|
11780
11774
|
getStorageMapEntries(slot_name) {
|
|
11781
11775
|
const ptr0 = passStringToWasm0(slot_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -11853,6 +11847,22 @@ class AccountProof {
|
|
|
11853
11847
|
const ret = wasm.accountproof_numStorageSlots(this.__wbg_ptr);
|
|
11854
11848
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
11855
11849
|
}
|
|
11850
|
+
/**
|
|
11851
|
+
* Returns the fungible assets in the account's vault, if vault details were included
|
|
11852
|
+
* in the proof response.
|
|
11853
|
+
*
|
|
11854
|
+
* Returns `undefined` if the account is private or vault data was not requested.
|
|
11855
|
+
* @returns {FungibleAsset[] | undefined}
|
|
11856
|
+
*/
|
|
11857
|
+
vaultFungibleAssets() {
|
|
11858
|
+
const ret = wasm.accountproof_vaultFungibleAssets(this.__wbg_ptr);
|
|
11859
|
+
let v1;
|
|
11860
|
+
if (ret[0] !== 0) {
|
|
11861
|
+
v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
11862
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
11863
|
+
}
|
|
11864
|
+
return v1;
|
|
11865
|
+
}
|
|
11856
11866
|
}
|
|
11857
11867
|
if (Symbol.dispose) AccountProof.prototype[Symbol.dispose] = AccountProof.prototype.free;
|
|
11858
11868
|
|
|
@@ -12120,7 +12130,7 @@ class AccountStorage {
|
|
|
12120
12130
|
* Returns `undefined` if the slot isn't a map or doesn't exist.
|
|
12121
12131
|
* Returns `[]` if the map exists but is empty.
|
|
12122
12132
|
* @param {string} slot_name
|
|
12123
|
-
* @returns {
|
|
12133
|
+
* @returns {StorageMapEntry[] | undefined}
|
|
12124
12134
|
*/
|
|
12125
12135
|
getMapEntries(slot_name) {
|
|
12126
12136
|
const ptr0 = passStringToWasm0(slot_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -12229,6 +12239,15 @@ if (Symbol.dispose) AccountStorageDelta.prototype[Symbol.dispose] = AccountStora
|
|
|
12229
12239
|
|
|
12230
12240
|
/**
|
|
12231
12241
|
* Storage visibility mode for an account.
|
|
12242
|
+
*
|
|
12243
|
+
* In the 0.15 protocol surface this is the same enum as `AccountType`
|
|
12244
|
+
* (the on-chain identifier no longer carries any faucet-vs-regular or
|
|
12245
|
+
* updatable-vs-immutable distinction), so internally we wrap an
|
|
12246
|
+
* `AccountType`. The standalone `AccountStorageMode` type still exists at
|
|
12247
|
+
* the JS API surface for backwards compatibility with code that wrote
|
|
12248
|
+
* `AccountStorageMode.public()` / `.private()`. The pre-existing `.network()`
|
|
12249
|
+
* constructor was removed — the network storage mode does not exist on the
|
|
12250
|
+
* 0.15 chain.
|
|
12232
12251
|
*/
|
|
12233
12252
|
class AccountStorageMode {
|
|
12234
12253
|
static __wrap(ptr) {
|
|
@@ -12264,14 +12283,6 @@ class AccountStorageMode {
|
|
|
12264
12283
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
12265
12284
|
}
|
|
12266
12285
|
}
|
|
12267
|
-
/**
|
|
12268
|
-
* Creates a network storage mode.
|
|
12269
|
-
* @returns {AccountStorageMode}
|
|
12270
|
-
*/
|
|
12271
|
-
static network() {
|
|
12272
|
-
const ret = wasm.accountstoragemode_network();
|
|
12273
|
-
return AccountStorageMode.__wrap(ret);
|
|
12274
|
-
}
|
|
12275
12286
|
/**
|
|
12276
12287
|
* Creates a private storage mode.
|
|
12277
12288
|
* @returns {AccountStorageMode}
|
|
@@ -12290,6 +12301,9 @@ class AccountStorageMode {
|
|
|
12290
12301
|
}
|
|
12291
12302
|
/**
|
|
12292
12303
|
* Parses a storage mode from its string representation.
|
|
12304
|
+
*
|
|
12305
|
+
* Accepts `"private"` and `"public"`; any other input — including the
|
|
12306
|
+
* previously-supported `"network"` — is rejected.
|
|
12293
12307
|
* @param {string} s
|
|
12294
12308
|
* @returns {AccountStorageMode}
|
|
12295
12309
|
*/
|
|
@@ -12350,13 +12364,17 @@ class AccountStorageRequirements {
|
|
|
12350
12364
|
if (Symbol.dispose) AccountStorageRequirements.prototype[Symbol.dispose] = AccountStorageRequirements.prototype.free;
|
|
12351
12365
|
|
|
12352
12366
|
/**
|
|
12353
|
-
*
|
|
12367
|
+
* Storage mode of an account. The 0.15 protocol collapses the previous
|
|
12368
|
+
* 4-way `{ FungibleFaucet, NonFungibleFaucet, RegularAccountImmutableCode,
|
|
12369
|
+
* RegularAccountUpdatableCode }` distinction into a 2-way storage flag —
|
|
12370
|
+
* faucet-vs-regular and updatable-vs-immutable distinctions are no longer
|
|
12371
|
+
* part of the on-chain `AccountType` and the API loses no information by
|
|
12372
|
+
* narrowing here too.
|
|
12373
|
+
* @enum {0 | 1}
|
|
12354
12374
|
*/
|
|
12355
12375
|
const AccountType = Object.freeze({
|
|
12356
|
-
|
|
12357
|
-
|
|
12358
|
-
RegularAccountImmutableCode: 2, "2": "RegularAccountImmutableCode",
|
|
12359
|
-
RegularAccountUpdatableCode: 3, "3": "RegularAccountUpdatableCode",
|
|
12376
|
+
Private: 0, "0": "Private",
|
|
12377
|
+
Public: 1, "1": "Public",
|
|
12360
12378
|
});
|
|
12361
12379
|
|
|
12362
12380
|
/**
|
|
@@ -12654,13 +12672,14 @@ class AdviceMap {
|
|
|
12654
12672
|
insert(key, value) {
|
|
12655
12673
|
_assertClass(key, Word);
|
|
12656
12674
|
_assertClass(value, FeltArray);
|
|
12657
|
-
|
|
12658
|
-
|
|
12675
|
+
var ptr0 = value.__destroy_into_raw();
|
|
12676
|
+
const ret = wasm.advicemap_insert(this.__wbg_ptr, key.__wbg_ptr, ptr0);
|
|
12677
|
+
let v2;
|
|
12659
12678
|
if (ret[0] !== 0) {
|
|
12660
|
-
|
|
12679
|
+
v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
12661
12680
|
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
12662
12681
|
}
|
|
12663
|
-
return
|
|
12682
|
+
return v2;
|
|
12664
12683
|
}
|
|
12665
12684
|
/**
|
|
12666
12685
|
* Creates an empty advice map.
|
|
@@ -12717,6 +12736,17 @@ class AssetVault {
|
|
|
12717
12736
|
}
|
|
12718
12737
|
/**
|
|
12719
12738
|
* Returns the balance for the given fungible faucet, or zero if absent.
|
|
12739
|
+
*
|
|
12740
|
+
* `get_balance` on the 0.15 surface keys by `AssetVaultKey`, not `AccountId`, and
|
|
12741
|
+
* validates the composition. The callback flag is `Disabled` because fungible balance
|
|
12742
|
+
* reads don't run asset callbacks. Returns zero on lookup error (`Err` arms here would
|
|
12743
|
+
* indicate the key was constructed wrong, which can't happen for fungible keys built
|
|
12744
|
+
* this way).
|
|
12745
|
+
*
|
|
12746
|
+
* NOTE: the `AssetVaultKey` encodes the callback flag, so this reports only the balance
|
|
12747
|
+
* of callback-*disabled* fungible assets. Faucets built by this SDK omit transfer policies
|
|
12748
|
+
* and therefore mint callback-disabled assets, so this is exact for them; an asset minted
|
|
12749
|
+
* elsewhere with callbacks enabled would not be counted here.
|
|
12720
12750
|
* @param {AccountId} faucet_id
|
|
12721
12751
|
* @returns {bigint}
|
|
12722
12752
|
*/
|
|
@@ -12809,10 +12839,9 @@ class AuthFalcon512RpoMultisigConfig {
|
|
|
12809
12839
|
* @returns {AuthFalcon512RpoMultisigConfig}
|
|
12810
12840
|
*/
|
|
12811
12841
|
withProcThresholds(proc_thresholds) {
|
|
12812
|
-
const ptr = this.__destroy_into_raw();
|
|
12813
12842
|
const ptr0 = passArrayJsValueToWasm0(proc_thresholds, wasm.__wbindgen_malloc);
|
|
12814
12843
|
const len0 = WASM_VECTOR_LEN;
|
|
12815
|
-
const ret = wasm.authfalcon512rpomultisigconfig_withProcThresholds(
|
|
12844
|
+
const ret = wasm.authfalcon512rpomultisigconfig_withProcThresholds(this.__wbg_ptr, ptr0, len0);
|
|
12816
12845
|
if (ret[2]) {
|
|
12817
12846
|
throw takeFromExternrefTable0(ret[1]);
|
|
12818
12847
|
}
|
|
@@ -12954,6 +12983,9 @@ if (Symbol.dispose) AuthSecretKey.prototype[Symbol.dispose] = AuthSecretKey.prot
|
|
|
12954
12983
|
|
|
12955
12984
|
/**
|
|
12956
12985
|
* Provides metadata for a basic fungible faucet account component.
|
|
12986
|
+
*
|
|
12987
|
+
* Reads the on-chain [`FungibleFaucet`] component for the account, which holds the
|
|
12988
|
+
* per-token info (symbol/decimals/maxSupply).
|
|
12957
12989
|
*/
|
|
12958
12990
|
class BasicFungibleFaucetComponent {
|
|
12959
12991
|
static __wrap(ptr) {
|
|
@@ -13000,7 +13032,7 @@ class BasicFungibleFaucetComponent {
|
|
|
13000
13032
|
* @returns {Felt}
|
|
13001
13033
|
*/
|
|
13002
13034
|
maxSupply() {
|
|
13003
|
-
const ret = wasm.
|
|
13035
|
+
const ret = wasm.basicfungiblefaucetcomponent_maxSupply(this.__wbg_ptr);
|
|
13004
13036
|
return Felt.__wrap(ret);
|
|
13005
13037
|
}
|
|
13006
13038
|
/**
|
|
@@ -13083,8 +13115,8 @@ class BlockHeader {
|
|
|
13083
13115
|
* network.
|
|
13084
13116
|
* @returns {AccountId}
|
|
13085
13117
|
*/
|
|
13086
|
-
|
|
13087
|
-
const ret = wasm.
|
|
13118
|
+
feeFaucetId() {
|
|
13119
|
+
const ret = wasm.blockheader_feeFaucetId(this.__wbg_ptr);
|
|
13088
13120
|
return AccountId.__wrap(ret);
|
|
13089
13121
|
}
|
|
13090
13122
|
/**
|
|
@@ -13327,14 +13359,6 @@ class CommittedNote {
|
|
|
13327
13359
|
const ptr = this.__destroy_into_raw();
|
|
13328
13360
|
wasm.__wbg_committednote_free(ptr, 0);
|
|
13329
13361
|
}
|
|
13330
|
-
/**
|
|
13331
|
-
* Returns the full note metadata when the attachment payload is available.
|
|
13332
|
-
* @returns {NoteMetadata | undefined}
|
|
13333
|
-
*/
|
|
13334
|
-
fullMetadata() {
|
|
13335
|
-
const ret = wasm.committednote_fullMetadata(this.__wbg_ptr);
|
|
13336
|
-
return ret === 0 ? undefined : NoteMetadata.__wrap(ret);
|
|
13337
|
-
}
|
|
13338
13362
|
/**
|
|
13339
13363
|
* Returns the inclusion path for the note in the block's note tree.
|
|
13340
13364
|
* @returns {SparseMerklePath}
|
|
@@ -13353,9 +13377,6 @@ class CommittedNote {
|
|
|
13353
13377
|
}
|
|
13354
13378
|
/**
|
|
13355
13379
|
* Returns the note metadata.
|
|
13356
|
-
*
|
|
13357
|
-
* If only metadata headers are available, the returned metadata contains
|
|
13358
|
-
* the sender, note type, and tag without attachment payload.
|
|
13359
13380
|
* @returns {NoteMetadata}
|
|
13360
13381
|
*/
|
|
13361
13382
|
metadata() {
|
|
@@ -13730,12 +13751,18 @@ class Felt {
|
|
|
13730
13751
|
return BigInt.asUintN(64, ret);
|
|
13731
13752
|
}
|
|
13732
13753
|
/**
|
|
13733
|
-
* Creates a new field element
|
|
13754
|
+
* Creates a new field element.
|
|
13755
|
+
*
|
|
13756
|
+
* Returns an error if `value` is outside the field's representable
|
|
13757
|
+
* range (`Felt::new` is fallible on the 0.15 protocol surface).
|
|
13734
13758
|
* @param {bigint} value
|
|
13735
13759
|
*/
|
|
13736
13760
|
constructor(value) {
|
|
13737
13761
|
const ret = wasm.felt_new(value);
|
|
13738
|
-
|
|
13762
|
+
if (ret[2]) {
|
|
13763
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
13764
|
+
}
|
|
13765
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
13739
13766
|
FeltFinalization.register(this, this.__wbg_ptr, this);
|
|
13740
13767
|
return this;
|
|
13741
13768
|
}
|
|
@@ -13821,18 +13848,13 @@ class FeltArray {
|
|
|
13821
13848
|
wasm.feltarray_push(this.__wbg_ptr, element.__wbg_ptr);
|
|
13822
13849
|
}
|
|
13823
13850
|
/**
|
|
13824
|
-
* Replace the element at `index`. Borrows + clones the input
|
|
13825
|
-
* (mirrors `push`), so the caller's JS handle remains valid
|
|
13826
|
-
* after the call. Without this borrow, passing `elem` by
|
|
13827
|
-
* value would move the underlying Rust value out of the
|
|
13828
|
-
* caller's JS handle and any subsequent method on it would
|
|
13829
|
-
* panic with `"null pointer passed to rust"`.
|
|
13830
13851
|
* @param {number} index
|
|
13831
13852
|
* @param {Felt} elem
|
|
13832
13853
|
*/
|
|
13833
13854
|
replaceAt(index, elem) {
|
|
13834
13855
|
_assertClass(elem, Felt);
|
|
13835
|
-
|
|
13856
|
+
var ptr0 = elem.__destroy_into_raw();
|
|
13857
|
+
const ret = wasm.feltarray_replaceAt(this.__wbg_ptr, index, ptr0);
|
|
13836
13858
|
if (ret[1]) {
|
|
13837
13859
|
throw takeFromExternrefTable0(ret[0]);
|
|
13838
13860
|
}
|
|
@@ -13885,14 +13907,6 @@ class FetchedAccount {
|
|
|
13885
13907
|
const ret = wasm.fetchedaccount_commitment(this.__wbg_ptr);
|
|
13886
13908
|
return Word.__wrap(ret);
|
|
13887
13909
|
}
|
|
13888
|
-
/**
|
|
13889
|
-
* Returns true when the account is a network account.
|
|
13890
|
-
* @returns {boolean}
|
|
13891
|
-
*/
|
|
13892
|
-
isNetwork() {
|
|
13893
|
-
const ret = wasm.fetchedaccount_isNetwork(this.__wbg_ptr);
|
|
13894
|
-
return ret !== 0;
|
|
13895
|
-
}
|
|
13896
13910
|
/**
|
|
13897
13911
|
* Returns true when the account is private.
|
|
13898
13912
|
* @returns {boolean}
|
|
@@ -13923,8 +13937,15 @@ if (Symbol.dispose) FetchedAccount.prototype[Symbol.dispose] = FetchedAccount.pr
|
|
|
13923
13937
|
/**
|
|
13924
13938
|
* Wrapper for a note fetched over RPC.
|
|
13925
13939
|
*
|
|
13926
|
-
* It
|
|
13927
|
-
* public notes
|
|
13940
|
+
* It carries the note ID, public metadata, and inclusion proof. The full note body is only
|
|
13941
|
+
* present for public notes; for private notes only the header-shaped fields and inclusion
|
|
13942
|
+
* proof are available — the body lives off-chain.
|
|
13943
|
+
*
|
|
13944
|
+
* 0.15 protocol surface: the on-chain `NoteHeader` now commits to a
|
|
13945
|
+
* `NoteDetailsCommitment` rather than the `NoteId`, so a `NoteHeader` can no longer be
|
|
13946
|
+
* reconstructed from header-shaped fields alone for private notes. We therefore expose
|
|
13947
|
+
* the constituent fields (`noteId`, `metadata`) directly on `FetchedNote` instead of a
|
|
13948
|
+
* `header` getter.
|
|
13928
13949
|
*/
|
|
13929
13950
|
class FetchedNote {
|
|
13930
13951
|
static __wrap(ptr) {
|
|
@@ -13956,12 +13977,18 @@ class FetchedNote {
|
|
|
13956
13977
|
return ret === 0 ? undefined : InputNote.__wrap(ret);
|
|
13957
13978
|
}
|
|
13958
13979
|
/**
|
|
13959
|
-
* The note's
|
|
13960
|
-
*
|
|
13980
|
+
* The note's attachments.
|
|
13981
|
+
*
|
|
13982
|
+
* 0.15 returns attachment content over RPC for both public and private notes, so this is
|
|
13983
|
+
* populated even when the note body itself is private. An empty array means the note
|
|
13984
|
+
* carries no attachments.
|
|
13985
|
+
* @returns {NoteAttachment[]}
|
|
13961
13986
|
*/
|
|
13962
|
-
get
|
|
13963
|
-
const ret = wasm.
|
|
13964
|
-
|
|
13987
|
+
get attachments() {
|
|
13988
|
+
const ret = wasm.fetchednote_attachments(this.__wbg_ptr);
|
|
13989
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
13990
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
13991
|
+
return v1;
|
|
13965
13992
|
}
|
|
13966
13993
|
/**
|
|
13967
13994
|
* The note's inclusion proof.
|
|
@@ -14200,18 +14227,13 @@ class ForeignAccountArray {
|
|
|
14200
14227
|
wasm.foreignaccountarray_push(this.__wbg_ptr, element.__wbg_ptr);
|
|
14201
14228
|
}
|
|
14202
14229
|
/**
|
|
14203
|
-
* Replace the element at `index`. Borrows + clones the input
|
|
14204
|
-
* (mirrors `push`), so the caller's JS handle remains valid
|
|
14205
|
-
* after the call. Without this borrow, passing `elem` by
|
|
14206
|
-
* value would move the underlying Rust value out of the
|
|
14207
|
-
* caller's JS handle and any subsequent method on it would
|
|
14208
|
-
* panic with `"null pointer passed to rust"`.
|
|
14209
14230
|
* @param {number} index
|
|
14210
14231
|
* @param {ForeignAccount} elem
|
|
14211
14232
|
*/
|
|
14212
14233
|
replaceAt(index, elem) {
|
|
14213
14234
|
_assertClass(elem, ForeignAccount);
|
|
14214
|
-
|
|
14235
|
+
var ptr0 = elem.__destroy_into_raw();
|
|
14236
|
+
const ret = wasm.foreignaccountarray_replaceAt(this.__wbg_ptr, index, ptr0);
|
|
14215
14237
|
if (ret[1]) {
|
|
14216
14238
|
throw takeFromExternrefTable0(ret[0]);
|
|
14217
14239
|
}
|
|
@@ -14281,7 +14303,10 @@ class FungibleAsset {
|
|
|
14281
14303
|
constructor(faucet_id, amount) {
|
|
14282
14304
|
_assertClass(faucet_id, AccountId);
|
|
14283
14305
|
const ret = wasm.fungibleasset_new(faucet_id.__wbg_ptr, amount);
|
|
14284
|
-
|
|
14306
|
+
if (ret[2]) {
|
|
14307
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
14308
|
+
}
|
|
14309
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
14285
14310
|
FungibleAssetFinalization.register(this, this.__wbg_ptr, this);
|
|
14286
14311
|
return this;
|
|
14287
14312
|
}
|
|
@@ -14311,6 +14336,10 @@ class FungibleAssetDelta {
|
|
|
14311
14336
|
}
|
|
14312
14337
|
/**
|
|
14313
14338
|
* Returns the delta amount for a given faucet, if present.
|
|
14339
|
+
*
|
|
14340
|
+
* The vault key here is the one used by the fungible-delta tree, which the upstream
|
|
14341
|
+
* surface keys with `AssetCallbackFlag::Disabled` — fungible balance deltas don't run
|
|
14342
|
+
* asset callbacks. `new_fungible` on the 0.15 surface is infallible.
|
|
14314
14343
|
* @param {AccountId} faucet_id
|
|
14315
14344
|
* @returns {bigint | undefined}
|
|
14316
14345
|
*/
|
|
@@ -14485,7 +14514,12 @@ class InputNote {
|
|
|
14485
14514
|
return InputNote.__wrap(ret);
|
|
14486
14515
|
}
|
|
14487
14516
|
/**
|
|
14488
|
-
* Returns the commitment to the note ID
|
|
14517
|
+
* Returns the commitment to the note (its ID).
|
|
14518
|
+
*
|
|
14519
|
+
* Migration note (miden-client PR #2214): `Note::commitment()` was
|
|
14520
|
+
* removed on the 0.15 surface — the note ID *is* the commitment (it
|
|
14521
|
+
* hashes details + metadata). Return the underlying `NoteId` as a
|
|
14522
|
+
* `Word` so the JS API contract is unchanged.
|
|
14489
14523
|
* @returns {Word}
|
|
14490
14524
|
*/
|
|
14491
14525
|
commitment() {
|
|
@@ -14571,6 +14605,22 @@ class InputNoteRecord {
|
|
|
14571
14605
|
const ptr = this.__destroy_into_raw();
|
|
14572
14606
|
wasm.__wbg_inputnoterecord_free(ptr, 0);
|
|
14573
14607
|
}
|
|
14608
|
+
/**
|
|
14609
|
+
* Returns the note's attachments.
|
|
14610
|
+
*
|
|
14611
|
+
* On the 0.15 surface the full attachment content (the packed words) lives
|
|
14612
|
+
* on the note record itself rather than on `NoteMetadata` (which only
|
|
14613
|
+
* carries the attachment headers). This exposes that content so JS callers
|
|
14614
|
+
* can decode payloads packed via the `createNoteAttachment` helper. An
|
|
14615
|
+
* empty array means the note carries no attachments.
|
|
14616
|
+
* @returns {NoteAttachment[]}
|
|
14617
|
+
*/
|
|
14618
|
+
attachments() {
|
|
14619
|
+
const ret = wasm.inputnoterecord_attachments(this.__wbg_ptr);
|
|
14620
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
14621
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
14622
|
+
return v1;
|
|
14623
|
+
}
|
|
14574
14624
|
/**
|
|
14575
14625
|
* Returns the note commitment (id + metadata), if available.
|
|
14576
14626
|
* @returns {Word | undefined}
|
|
@@ -14601,12 +14651,16 @@ class InputNoteRecord {
|
|
|
14601
14651
|
return NoteDetails.__wrap(ret);
|
|
14602
14652
|
}
|
|
14603
14653
|
/**
|
|
14604
|
-
* Returns the note ID.
|
|
14605
|
-
*
|
|
14654
|
+
* Returns the note ID when available.
|
|
14655
|
+
*
|
|
14656
|
+
* Migration note (miden-client PR #2214): `InputNoteRecord::id()`
|
|
14657
|
+
* returns `Option<NoteId>` — partial / metadata-less notes have no
|
|
14658
|
+
* metadata-bearing ID yet.
|
|
14659
|
+
* @returns {NoteId | undefined}
|
|
14606
14660
|
*/
|
|
14607
14661
|
id() {
|
|
14608
14662
|
const ret = wasm.inputnoterecord_id(this.__wbg_ptr);
|
|
14609
|
-
return NoteId.__wrap(ret);
|
|
14663
|
+
return ret === 0 ? undefined : NoteId.__wrap(ret);
|
|
14610
14664
|
}
|
|
14611
14665
|
/**
|
|
14612
14666
|
* Returns the inclusion proof when the note is authenticated.
|
|
@@ -14649,20 +14703,20 @@ class InputNoteRecord {
|
|
|
14649
14703
|
return ret === 0 ? undefined : NoteMetadata.__wrap(ret);
|
|
14650
14704
|
}
|
|
14651
14705
|
/**
|
|
14652
|
-
* Returns the nullifier for this note.
|
|
14653
|
-
*
|
|
14706
|
+
* Returns the nullifier for this note when available.
|
|
14707
|
+
*
|
|
14708
|
+
* Migration note (miden-client PR #2214): `InputNoteRecord::nullifier()`
|
|
14709
|
+
* returns `Option<Nullifier>` — partial notes have no nullifier yet.
|
|
14710
|
+
* @returns {string | undefined}
|
|
14654
14711
|
*/
|
|
14655
14712
|
nullifier() {
|
|
14656
|
-
|
|
14657
|
-
let
|
|
14658
|
-
|
|
14659
|
-
|
|
14660
|
-
|
|
14661
|
-
deferred1_1 = ret[1];
|
|
14662
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
14663
|
-
} finally {
|
|
14664
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
14713
|
+
const ret = wasm.inputnoterecord_nullifier(this.__wbg_ptr);
|
|
14714
|
+
let v1;
|
|
14715
|
+
if (ret[0] !== 0) {
|
|
14716
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
14717
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
14665
14718
|
}
|
|
14719
|
+
return v1;
|
|
14666
14720
|
}
|
|
14667
14721
|
/**
|
|
14668
14722
|
* Returns the current processing state for this note.
|
|
@@ -15233,11 +15287,12 @@ class JsStateSyncUpdate {
|
|
|
15233
15287
|
return ret >>> 0;
|
|
15234
15288
|
}
|
|
15235
15289
|
/**
|
|
15236
|
-
*
|
|
15290
|
+
* Details-commitment hex of committed notes whose tracking tags
|
|
15291
|
+
* (`NoteTagSource::Note`) should be removed from the client's local state.
|
|
15237
15292
|
* @returns {string[]}
|
|
15238
15293
|
*/
|
|
15239
|
-
get
|
|
15240
|
-
const ret = wasm.
|
|
15294
|
+
get committedNoteTagSources() {
|
|
15295
|
+
const ret = wasm.__wbg_get_jsstatesyncupdate_committedNoteTagSources(this.__wbg_ptr);
|
|
15241
15296
|
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
15242
15297
|
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
15243
15298
|
return v1;
|
|
@@ -15250,15 +15305,6 @@ class JsStateSyncUpdate {
|
|
|
15250
15305
|
const ret = wasm.__wbg_get_jsstatesyncupdate_flattenedNewBlockHeaders(this.__wbg_ptr);
|
|
15251
15306
|
return FlattenedU8Vec.__wrap(ret);
|
|
15252
15307
|
}
|
|
15253
|
-
/**
|
|
15254
|
-
* Flattened byte array containing partial blockchain peaks used for merkle tree
|
|
15255
|
-
* verification.
|
|
15256
|
-
* @returns {FlattenedU8Vec}
|
|
15257
|
-
*/
|
|
15258
|
-
get flattenedPartialBlockChainPeaks() {
|
|
15259
|
-
const ret = wasm.__wbg_get_jsstatesyncupdate_flattenedPartialBlockChainPeaks(this.__wbg_ptr);
|
|
15260
|
-
return FlattenedU8Vec.__wrap(ret);
|
|
15261
|
-
}
|
|
15262
15308
|
/**
|
|
15263
15309
|
* The block numbers corresponding to each header in `flattened_new_block_headers`.
|
|
15264
15310
|
* This vec should have the same length as the number of headers, with each index
|
|
@@ -15271,6 +15317,18 @@ class JsStateSyncUpdate {
|
|
|
15271
15317
|
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
15272
15318
|
return v1;
|
|
15273
15319
|
}
|
|
15320
|
+
/**
|
|
15321
|
+
* Serialized MMR peaks at the new sync height (single set for the whole update).
|
|
15322
|
+
* Written onto the chain-tip block's `blockHeaders` row (the one whose
|
|
15323
|
+
* `blockNum` matches `block_num`) and read back by `getCurrentBlockchainPeaks`.
|
|
15324
|
+
* @returns {Uint8Array}
|
|
15325
|
+
*/
|
|
15326
|
+
get partialBlockchainPeaks() {
|
|
15327
|
+
const ret = wasm.__wbg_get_jsstatesyncupdate_partialBlockchainPeaks(this.__wbg_ptr);
|
|
15328
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
15329
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
15330
|
+
return v1;
|
|
15331
|
+
}
|
|
15274
15332
|
/**
|
|
15275
15333
|
* Input notes for this state update in serialized form.
|
|
15276
15334
|
* @returns {SerializedInputNoteData[]}
|
|
@@ -15349,13 +15407,14 @@ class JsStateSyncUpdate {
|
|
|
15349
15407
|
wasm.__wbg_set_jsstatesyncupdate_blockNum(this.__wbg_ptr, arg0);
|
|
15350
15408
|
}
|
|
15351
15409
|
/**
|
|
15352
|
-
*
|
|
15410
|
+
* Details-commitment hex of committed notes whose tracking tags
|
|
15411
|
+
* (`NoteTagSource::Note`) should be removed from the client's local state.
|
|
15353
15412
|
* @param {string[]} arg0
|
|
15354
15413
|
*/
|
|
15355
|
-
set
|
|
15414
|
+
set committedNoteTagSources(arg0) {
|
|
15356
15415
|
const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
15357
15416
|
const len0 = WASM_VECTOR_LEN;
|
|
15358
|
-
wasm.
|
|
15417
|
+
wasm.__wbg_set_jsstatesyncupdate_committedNoteTagSources(this.__wbg_ptr, ptr0, len0);
|
|
15359
15418
|
}
|
|
15360
15419
|
/**
|
|
15361
15420
|
* The new block headers for this state update, serialized into a flattened byte array.
|
|
@@ -15366,16 +15425,6 @@ class JsStateSyncUpdate {
|
|
|
15366
15425
|
var ptr0 = arg0.__destroy_into_raw();
|
|
15367
15426
|
wasm.__wbg_set_jsstatesyncupdate_flattenedNewBlockHeaders(this.__wbg_ptr, ptr0);
|
|
15368
15427
|
}
|
|
15369
|
-
/**
|
|
15370
|
-
* Flattened byte array containing partial blockchain peaks used for merkle tree
|
|
15371
|
-
* verification.
|
|
15372
|
-
* @param {FlattenedU8Vec} arg0
|
|
15373
|
-
*/
|
|
15374
|
-
set flattenedPartialBlockChainPeaks(arg0) {
|
|
15375
|
-
_assertClass(arg0, FlattenedU8Vec);
|
|
15376
|
-
var ptr0 = arg0.__destroy_into_raw();
|
|
15377
|
-
wasm.__wbg_set_jsstatesyncupdate_flattenedPartialBlockChainPeaks(this.__wbg_ptr, ptr0);
|
|
15378
|
-
}
|
|
15379
15428
|
/**
|
|
15380
15429
|
* The block numbers corresponding to each header in `flattened_new_block_headers`.
|
|
15381
15430
|
* This vec should have the same length as the number of headers, with each index
|
|
@@ -15387,6 +15436,17 @@ class JsStateSyncUpdate {
|
|
|
15387
15436
|
const len0 = WASM_VECTOR_LEN;
|
|
15388
15437
|
wasm.__wbg_set_jsstatesyncupdate_newBlockNums(this.__wbg_ptr, ptr0, len0);
|
|
15389
15438
|
}
|
|
15439
|
+
/**
|
|
15440
|
+
* Serialized MMR peaks at the new sync height (single set for the whole update).
|
|
15441
|
+
* Written onto the chain-tip block's `blockHeaders` row (the one whose
|
|
15442
|
+
* `blockNum` matches `block_num`) and read back by `getCurrentBlockchainPeaks`.
|
|
15443
|
+
* @param {Uint8Array} arg0
|
|
15444
|
+
*/
|
|
15445
|
+
set partialBlockchainPeaks(arg0) {
|
|
15446
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
15447
|
+
const len0 = WASM_VECTOR_LEN;
|
|
15448
|
+
wasm.__wbg_set_jsstatesyncupdate_partialBlockchainPeaks(this.__wbg_ptr, ptr0, len0);
|
|
15449
|
+
}
|
|
15390
15450
|
/**
|
|
15391
15451
|
* Input notes for this state update in serialized form.
|
|
15392
15452
|
* @param {SerializedInputNoteData[]} arg0
|
|
@@ -15875,6 +15935,76 @@ class NetworkId {
|
|
|
15875
15935
|
}
|
|
15876
15936
|
if (Symbol.dispose) NetworkId.prototype[Symbol.dispose] = NetworkId.prototype.free;
|
|
15877
15937
|
|
|
15938
|
+
/**
|
|
15939
|
+
* Status of a network note in the node.
|
|
15940
|
+
*/
|
|
15941
|
+
class NetworkNoteStatusInfo {
|
|
15942
|
+
static __wrap(ptr) {
|
|
15943
|
+
ptr = ptr >>> 0;
|
|
15944
|
+
const obj = Object.create(NetworkNoteStatusInfo.prototype);
|
|
15945
|
+
obj.__wbg_ptr = ptr;
|
|
15946
|
+
NetworkNoteStatusInfoFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
15947
|
+
return obj;
|
|
15948
|
+
}
|
|
15949
|
+
__destroy_into_raw() {
|
|
15950
|
+
const ptr = this.__wbg_ptr;
|
|
15951
|
+
this.__wbg_ptr = 0;
|
|
15952
|
+
NetworkNoteStatusInfoFinalization.unregister(this);
|
|
15953
|
+
return ptr;
|
|
15954
|
+
}
|
|
15955
|
+
free() {
|
|
15956
|
+
const ptr = this.__destroy_into_raw();
|
|
15957
|
+
wasm.__wbg_networknotestatusinfo_free(ptr, 0);
|
|
15958
|
+
}
|
|
15959
|
+
/**
|
|
15960
|
+
* Returns the number of processing attempts.
|
|
15961
|
+
* @returns {number}
|
|
15962
|
+
*/
|
|
15963
|
+
get attemptCount() {
|
|
15964
|
+
const ret = wasm.networknotestatusinfo_attemptCount(this.__wbg_ptr);
|
|
15965
|
+
return ret >>> 0;
|
|
15966
|
+
}
|
|
15967
|
+
/**
|
|
15968
|
+
* Returns the block number of the last processing attempt, if any.
|
|
15969
|
+
* @returns {number | undefined}
|
|
15970
|
+
*/
|
|
15971
|
+
get lastAttemptBlockNum() {
|
|
15972
|
+
const ret = wasm.networknotestatusinfo_lastAttemptBlockNum(this.__wbg_ptr);
|
|
15973
|
+
return ret === 0x100000001 ? undefined : ret;
|
|
15974
|
+
}
|
|
15975
|
+
/**
|
|
15976
|
+
* Returns the last error message, if any.
|
|
15977
|
+
* @returns {string | undefined}
|
|
15978
|
+
*/
|
|
15979
|
+
get lastError() {
|
|
15980
|
+
const ret = wasm.networknotestatusinfo_lastError(this.__wbg_ptr);
|
|
15981
|
+
let v1;
|
|
15982
|
+
if (ret[0] !== 0) {
|
|
15983
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
15984
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
15985
|
+
}
|
|
15986
|
+
return v1;
|
|
15987
|
+
}
|
|
15988
|
+
/**
|
|
15989
|
+
* Returns the status as a string: `"Pending"`, `"NullifierInflight"`, `"Discarded"`, or
|
|
15990
|
+
* `"NullifierCommitted"`.
|
|
15991
|
+
* @returns {string}
|
|
15992
|
+
*/
|
|
15993
|
+
get status() {
|
|
15994
|
+
let deferred1_0;
|
|
15995
|
+
let deferred1_1;
|
|
15996
|
+
try {
|
|
15997
|
+
const ret = wasm.networknotestatusinfo_status(this.__wbg_ptr);
|
|
15998
|
+
deferred1_0 = ret[0];
|
|
15999
|
+
deferred1_1 = ret[1];
|
|
16000
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
16001
|
+
} finally {
|
|
16002
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
16003
|
+
}
|
|
16004
|
+
}
|
|
16005
|
+
}
|
|
16006
|
+
if (Symbol.dispose) NetworkNoteStatusInfo.prototype[Symbol.dispose] = NetworkNoteStatusInfo.prototype.free;
|
|
16007
|
+
|
|
15878
16008
|
/**
|
|
15879
16009
|
* The type of a Miden network.
|
|
15880
16010
|
* @enum {0 | 1 | 2 | 3}
|
|
@@ -15938,7 +16068,12 @@ class Note {
|
|
|
15938
16068
|
return NoteAssets.__wrap(ret);
|
|
15939
16069
|
}
|
|
15940
16070
|
/**
|
|
15941
|
-
* Returns the commitment to the note ID
|
|
16071
|
+
* Returns the commitment to the note (its ID).
|
|
16072
|
+
*
|
|
16073
|
+
* Migration note (miden-client PR #2214): `Note::commitment()` was
|
|
16074
|
+
* removed on the 0.15 surface — the note ID is the commitment. Return
|
|
16075
|
+
* the underlying `NoteId` as a `Word` so the JS API contract is
|
|
16076
|
+
* unchanged.
|
|
15942
16077
|
* @returns {Word}
|
|
15943
16078
|
*/
|
|
15944
16079
|
commitment() {
|
|
@@ -16004,7 +16139,7 @@ class Note {
|
|
|
16004
16139
|
* @returns {NoteId}
|
|
16005
16140
|
*/
|
|
16006
16141
|
id() {
|
|
16007
|
-
const ret = wasm.
|
|
16142
|
+
const ret = wasm.note_commitment(this.__wbg_ptr);
|
|
16008
16143
|
return NoteId.__wrap(ret);
|
|
16009
16144
|
}
|
|
16010
16145
|
/**
|
|
@@ -16012,11 +16147,15 @@ class Note {
|
|
|
16012
16147
|
* @returns {NoteMetadata}
|
|
16013
16148
|
*/
|
|
16014
16149
|
metadata() {
|
|
16015
|
-
const ret = wasm.
|
|
16150
|
+
const ret = wasm.committednote_metadata(this.__wbg_ptr);
|
|
16016
16151
|
return NoteMetadata.__wrap(ret);
|
|
16017
16152
|
}
|
|
16018
16153
|
/**
|
|
16019
16154
|
* Creates a new note from the provided assets, metadata, and recipient.
|
|
16155
|
+
*
|
|
16156
|
+
* Migration note (miden-client PR #2214): `Note::new` now takes a
|
|
16157
|
+
* `PartialNoteMetadata` (not `NoteMetadata`). Extract the partial
|
|
16158
|
+
* fields from the JS-side `NoteMetadata` and reconstruct.
|
|
16020
16159
|
* @param {NoteAssets} note_assets
|
|
16021
16160
|
* @param {NoteMetadata} note_metadata
|
|
16022
16161
|
* @param {NoteRecipient} note_recipient
|
|
@@ -16165,18 +16304,13 @@ class NoteAndArgsArray {
|
|
|
16165
16304
|
wasm.noteandargsarray_push(this.__wbg_ptr, element.__wbg_ptr);
|
|
16166
16305
|
}
|
|
16167
16306
|
/**
|
|
16168
|
-
* Replace the element at `index`. Borrows + clones the input
|
|
16169
|
-
* (mirrors `push`), so the caller's JS handle remains valid
|
|
16170
|
-
* after the call. Without this borrow, passing `elem` by
|
|
16171
|
-
* value would move the underlying Rust value out of the
|
|
16172
|
-
* caller's JS handle and any subsequent method on it would
|
|
16173
|
-
* panic with `"null pointer passed to rust"`.
|
|
16174
16307
|
* @param {number} index
|
|
16175
16308
|
* @param {NoteAndArgs} elem
|
|
16176
16309
|
*/
|
|
16177
16310
|
replaceAt(index, elem) {
|
|
16178
16311
|
_assertClass(elem, NoteAndArgs);
|
|
16179
|
-
|
|
16312
|
+
var ptr0 = elem.__destroy_into_raw();
|
|
16313
|
+
const ret = wasm.noteandargsarray_replaceAt(this.__wbg_ptr, index, ptr0);
|
|
16180
16314
|
if (ret[1]) {
|
|
16181
16315
|
throw takeFromExternrefTable0(ret[0]);
|
|
16182
16316
|
}
|
|
@@ -16240,18 +16374,13 @@ class NoteArray {
|
|
|
16240
16374
|
wasm.notearray_push(this.__wbg_ptr, element.__wbg_ptr);
|
|
16241
16375
|
}
|
|
16242
16376
|
/**
|
|
16243
|
-
* Replace the element at `index`. Borrows + clones the input
|
|
16244
|
-
* (mirrors `push`), so the caller's JS handle remains valid
|
|
16245
|
-
* after the call. Without this borrow, passing `elem` by
|
|
16246
|
-
* value would move the underlying Rust value out of the
|
|
16247
|
-
* caller's JS handle and any subsequent method on it would
|
|
16248
|
-
* panic with `"null pointer passed to rust"`.
|
|
16249
16377
|
* @param {number} index
|
|
16250
16378
|
* @param {Note} elem
|
|
16251
16379
|
*/
|
|
16252
16380
|
replaceAt(index, elem) {
|
|
16253
16381
|
_assertClass(elem, Note);
|
|
16254
|
-
|
|
16382
|
+
var ptr0 = elem.__destroy_into_raw();
|
|
16383
|
+
const ret = wasm.notearray_replaceAt(this.__wbg_ptr, index, ptr0);
|
|
16255
16384
|
if (ret[1]) {
|
|
16256
16385
|
throw takeFromExternrefTable0(ret[0]);
|
|
16257
16386
|
}
|
|
@@ -16323,9 +16452,13 @@ if (Symbol.dispose) NoteAssets.prototype[Symbol.dispose] = NoteAssets.prototype.
|
|
|
16323
16452
|
/**
|
|
16324
16453
|
* An attachment to a note.
|
|
16325
16454
|
*
|
|
16326
|
-
*
|
|
16327
|
-
*
|
|
16328
|
-
*
|
|
16455
|
+
* 0.15 protocol surface: an attachment is a `(scheme, content)` pair where
|
|
16456
|
+
* `content` is a flat `Vec<Word>` of 1..=256 words. The previous
|
|
16457
|
+
* `NoteAttachmentKind { Word, Array }` dispatch and the per-variant
|
|
16458
|
+
* `asWord` / `asArray` / `newWord` / `newArray` getters/constructors no
|
|
16459
|
+
* longer exist — content is always word-vector-shaped now. Use
|
|
16460
|
+
* `fromWord(scheme, word)` for the common single-word case or
|
|
16461
|
+
* `fromWords(scheme, words)` for multi-word content.
|
|
16329
16462
|
*/
|
|
16330
16463
|
class NoteAttachment {
|
|
16331
16464
|
static __wrap(ptr) {
|
|
@@ -16345,30 +16478,6 @@ class NoteAttachment {
|
|
|
16345
16478
|
const ptr = this.__destroy_into_raw();
|
|
16346
16479
|
wasm.__wbg_noteattachment_free(ptr, 0);
|
|
16347
16480
|
}
|
|
16348
|
-
/**
|
|
16349
|
-
* Returns the content as an array of Felts if the attachment kind is Array, otherwise None.
|
|
16350
|
-
* @returns {FeltArray | undefined}
|
|
16351
|
-
*/
|
|
16352
|
-
asArray() {
|
|
16353
|
-
const ret = wasm.noteattachment_asArray(this.__wbg_ptr);
|
|
16354
|
-
return ret === 0 ? undefined : FeltArray.__wrap(ret);
|
|
16355
|
-
}
|
|
16356
|
-
/**
|
|
16357
|
-
* Returns the content as a Word if the attachment kind is Word, otherwise None.
|
|
16358
|
-
* @returns {Word | undefined}
|
|
16359
|
-
*/
|
|
16360
|
-
asWord() {
|
|
16361
|
-
const ret = wasm.noteattachment_asWord(this.__wbg_ptr);
|
|
16362
|
-
return ret === 0 ? undefined : Word.__wrap(ret);
|
|
16363
|
-
}
|
|
16364
|
-
/**
|
|
16365
|
-
* Returns the attachment kind.
|
|
16366
|
-
* @returns {NoteAttachmentKind}
|
|
16367
|
-
*/
|
|
16368
|
-
attachmentKind() {
|
|
16369
|
-
const ret = wasm.noteattachment_attachmentKind(this.__wbg_ptr);
|
|
16370
|
-
return ret;
|
|
16371
|
-
}
|
|
16372
16481
|
/**
|
|
16373
16482
|
* Returns the attachment scheme.
|
|
16374
16483
|
* @returns {NoteAttachmentScheme}
|
|
@@ -16378,80 +16487,90 @@ class NoteAttachment {
|
|
|
16378
16487
|
return NoteAttachmentScheme.__wrap(ret);
|
|
16379
16488
|
}
|
|
16380
16489
|
/**
|
|
16381
|
-
* Creates a
|
|
16490
|
+
* Creates a new note attachment from a single word.
|
|
16491
|
+
* @param {NoteAttachmentScheme} scheme
|
|
16492
|
+
* @param {Word} word
|
|
16493
|
+
* @returns {NoteAttachment}
|
|
16382
16494
|
*/
|
|
16383
|
-
|
|
16384
|
-
|
|
16385
|
-
|
|
16386
|
-
|
|
16387
|
-
return
|
|
16495
|
+
static fromWord(scheme, word) {
|
|
16496
|
+
_assertClass(scheme, NoteAttachmentScheme);
|
|
16497
|
+
_assertClass(word, Word);
|
|
16498
|
+
const ret = wasm.noteattachment_fromWord(scheme.__wbg_ptr, word.__wbg_ptr);
|
|
16499
|
+
return NoteAttachment.__wrap(ret);
|
|
16388
16500
|
}
|
|
16389
16501
|
/**
|
|
16390
|
-
* Creates a new note attachment
|
|
16502
|
+
* Creates a new note attachment from a vector of words.
|
|
16503
|
+
*
|
|
16504
|
+
* # Errors
|
|
16505
|
+
* Returns an error if `words` is empty or exceeds `NoteAttachment::MAX_NUM_WORDS`.
|
|
16391
16506
|
* @param {NoteAttachmentScheme} scheme
|
|
16392
|
-
* @param {
|
|
16507
|
+
* @param {Word[]} words
|
|
16393
16508
|
* @returns {NoteAttachment}
|
|
16394
16509
|
*/
|
|
16395
|
-
static
|
|
16510
|
+
static fromWords(scheme, words) {
|
|
16396
16511
|
_assertClass(scheme, NoteAttachmentScheme);
|
|
16397
|
-
|
|
16398
|
-
const
|
|
16512
|
+
const ptr0 = passArrayJsValueToWasm0(words, wasm.__wbindgen_malloc);
|
|
16513
|
+
const len0 = WASM_VECTOR_LEN;
|
|
16514
|
+
const ret = wasm.noteattachment_fromWords(scheme.__wbg_ptr, ptr0, len0);
|
|
16399
16515
|
if (ret[2]) {
|
|
16400
16516
|
throw takeFromExternrefTable0(ret[1]);
|
|
16401
16517
|
}
|
|
16402
16518
|
return NoteAttachment.__wrap(ret[0]);
|
|
16403
16519
|
}
|
|
16404
16520
|
/**
|
|
16405
|
-
* Creates a
|
|
16521
|
+
* Creates a note attachment from an optional list of packed values.
|
|
16406
16522
|
*
|
|
16407
|
-
*
|
|
16408
|
-
*
|
|
16409
|
-
*
|
|
16410
|
-
*
|
|
16411
|
-
*
|
|
16412
|
-
*
|
|
16413
|
-
*
|
|
16523
|
+
* Mirrors the encoding the JS-side `createNoteAttachment` helper performs
|
|
16524
|
+
* and preserves the `new NoteAttachment()` / `new NoteAttachment([...])`
|
|
16525
|
+
* ergonomics the package's own JS wrappers (`js/standalone.js`,
|
|
16526
|
+
* `js/resources/transactions.js`) rely on. The 0.15 surface has no truly
|
|
16527
|
+
* empty attachment (content is 1..=256 words), so the empty case is
|
|
16528
|
+
* represented as a single zero [`Word`] with the `none` scheme:
|
|
16529
|
+
* - no args / empty list → single zero-`Word`, `none` scheme.
|
|
16530
|
+
* - any number of values → padded to a whole number of `Word`s, `none` scheme.
|
|
16414
16531
|
*
|
|
16415
16532
|
* # Errors
|
|
16416
|
-
* Returns an error if
|
|
16417
|
-
*
|
|
16418
|
-
* @param {
|
|
16419
|
-
* @returns {NoteAttachment}
|
|
16533
|
+
* Returns an error if a value is not a canonical field element, or if the
|
|
16534
|
+
* packed word count exceeds `NoteAttachment::MAX_NUM_WORDS`.
|
|
16535
|
+
* @param {BigUint64Array | null} [values]
|
|
16420
16536
|
*/
|
|
16421
|
-
|
|
16422
|
-
|
|
16423
|
-
|
|
16424
|
-
const ret = wasm.
|
|
16537
|
+
constructor(values) {
|
|
16538
|
+
var ptr0 = isLikeNone(values) ? 0 : passArray64ToWasm0(values, wasm.__wbindgen_malloc);
|
|
16539
|
+
var len0 = WASM_VECTOR_LEN;
|
|
16540
|
+
const ret = wasm.noteattachment_new(ptr0, len0);
|
|
16425
16541
|
if (ret[2]) {
|
|
16426
16542
|
throw takeFromExternrefTable0(ret[1]);
|
|
16427
16543
|
}
|
|
16428
|
-
|
|
16544
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
16545
|
+
NoteAttachmentFinalization.register(this, this.__wbg_ptr, this);
|
|
16546
|
+
return this;
|
|
16429
16547
|
}
|
|
16430
16548
|
/**
|
|
16431
|
-
*
|
|
16432
|
-
* @
|
|
16433
|
-
* @param {Word} word
|
|
16434
|
-
* @returns {NoteAttachment}
|
|
16549
|
+
* Returns the number of words in this attachment.
|
|
16550
|
+
* @returns {number}
|
|
16435
16551
|
*/
|
|
16436
|
-
|
|
16437
|
-
|
|
16438
|
-
|
|
16439
|
-
|
|
16440
|
-
|
|
16552
|
+
numWords() {
|
|
16553
|
+
const ret = wasm.noteattachment_numWords(this.__wbg_ptr);
|
|
16554
|
+
return ret;
|
|
16555
|
+
}
|
|
16556
|
+
/**
|
|
16557
|
+
* Returns the attachment content as its constituent words.
|
|
16558
|
+
*
|
|
16559
|
+
* The content is always word-vector-shaped on the 0.15 surface, so this is
|
|
16560
|
+
* the inverse of `fromWord` / `fromWords`: it yields the same `Word`s the
|
|
16561
|
+
* attachment was built from (in order), letting JS callers decode the
|
|
16562
|
+
* packed values back out.
|
|
16563
|
+
* @returns {Word[]}
|
|
16564
|
+
*/
|
|
16565
|
+
toWords() {
|
|
16566
|
+
const ret = wasm.noteattachment_toWords(this.__wbg_ptr);
|
|
16567
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
16568
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
16569
|
+
return v1;
|
|
16441
16570
|
}
|
|
16442
16571
|
}
|
|
16443
16572
|
if (Symbol.dispose) NoteAttachment.prototype[Symbol.dispose] = NoteAttachment.prototype.free;
|
|
16444
16573
|
|
|
16445
|
-
/**
|
|
16446
|
-
* Defines the payload shape of a note attachment.
|
|
16447
|
-
* @enum {0 | 1 | 2}
|
|
16448
|
-
*/
|
|
16449
|
-
const NoteAttachmentKind = Object.freeze({
|
|
16450
|
-
None: 0, "0": "None",
|
|
16451
|
-
Word: 1, "1": "Word",
|
|
16452
|
-
Array: 2, "2": "Array",
|
|
16453
|
-
});
|
|
16454
|
-
|
|
16455
16574
|
/**
|
|
16456
16575
|
* Describes the type of a note attachment.
|
|
16457
16576
|
*
|
|
@@ -16476,14 +16595,6 @@ class NoteAttachmentScheme {
|
|
|
16476
16595
|
const ptr = this.__destroy_into_raw();
|
|
16477
16596
|
wasm.__wbg_noteattachmentscheme_free(ptr, 0);
|
|
16478
16597
|
}
|
|
16479
|
-
/**
|
|
16480
|
-
* Returns the note attachment scheme as a u32.
|
|
16481
|
-
* @returns {number}
|
|
16482
|
-
*/
|
|
16483
|
-
asU32() {
|
|
16484
|
-
const ret = wasm.noteattachmentscheme_asU32(this.__wbg_ptr);
|
|
16485
|
-
return ret >>> 0;
|
|
16486
|
-
}
|
|
16487
16598
|
/**
|
|
16488
16599
|
* Returns true if the attachment scheme is the reserved value that signals an absent scheme.
|
|
16489
16600
|
* @returns {boolean}
|
|
@@ -16493,12 +16604,19 @@ class NoteAttachmentScheme {
|
|
|
16493
16604
|
return ret !== 0;
|
|
16494
16605
|
}
|
|
16495
16606
|
/**
|
|
16496
|
-
* Creates a new `NoteAttachmentScheme` from a u32.
|
|
16607
|
+
* Creates a new `NoteAttachmentScheme` from a u32 value.
|
|
16608
|
+
*
|
|
16609
|
+
* Errors if `scheme` is out of range (the 0.15 surface narrowed the
|
|
16610
|
+
* underlying type from u32 → u16, so values outside `0..=u16::MAX`
|
|
16611
|
+
* are rejected).
|
|
16497
16612
|
* @param {number} scheme
|
|
16498
16613
|
*/
|
|
16499
16614
|
constructor(scheme) {
|
|
16500
16615
|
const ret = wasm.noteattachmentscheme_new(scheme);
|
|
16501
|
-
|
|
16616
|
+
if (ret[2]) {
|
|
16617
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
16618
|
+
}
|
|
16619
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
16502
16620
|
NoteAttachmentSchemeFinalization.register(this, this.__wbg_ptr, this);
|
|
16503
16621
|
return this;
|
|
16504
16622
|
}
|
|
@@ -16638,6 +16756,14 @@ if (Symbol.dispose) NoteConsumptionStatus.prototype[Symbol.dispose] = NoteConsum
|
|
|
16638
16756
|
* Details of a note consisting of assets, script, inputs, and a serial number.
|
|
16639
16757
|
*
|
|
16640
16758
|
* See the {@link Note} type for more details.
|
|
16759
|
+
*
|
|
16760
|
+
* Migration note (miden-client PR #2214): `NoteDetails::id()` and
|
|
16761
|
+
* `NoteDetails::nullifier()` were removed on the 0.15 protocol surface —
|
|
16762
|
+
* the ID now requires a `NoteMetadata` to compute (see `NoteId::new`),
|
|
16763
|
+
* and the nullifier moved onto `InputNoteRecord` where it is optional.
|
|
16764
|
+
* Use `details_commitment()` on a containing record (e.g.
|
|
16765
|
+
* `InputNoteRecord::details_commitment`) for the metadata-independent
|
|
16766
|
+
* identifier.
|
|
16641
16767
|
*/
|
|
16642
16768
|
class NoteDetails {
|
|
16643
16769
|
static __wrap(ptr) {
|
|
@@ -16665,14 +16791,6 @@ class NoteDetails {
|
|
|
16665
16791
|
const ret = wasm.notedetails_assets(this.__wbg_ptr);
|
|
16666
16792
|
return NoteAssets.__wrap(ret);
|
|
16667
16793
|
}
|
|
16668
|
-
/**
|
|
16669
|
-
* Returns the note identifier derived from these details.
|
|
16670
|
-
* @returns {NoteId}
|
|
16671
|
-
*/
|
|
16672
|
-
id() {
|
|
16673
|
-
const ret = wasm.notedetails_id(this.__wbg_ptr);
|
|
16674
|
-
return NoteId.__wrap(ret);
|
|
16675
|
-
}
|
|
16676
16794
|
/**
|
|
16677
16795
|
* Creates a new set of note details from the given assets and recipient.
|
|
16678
16796
|
* @param {NoteAssets} note_assets
|
|
@@ -16686,14 +16804,6 @@ class NoteDetails {
|
|
|
16686
16804
|
NoteDetailsFinalization.register(this, this.__wbg_ptr, this);
|
|
16687
16805
|
return this;
|
|
16688
16806
|
}
|
|
16689
|
-
/**
|
|
16690
|
-
* Returns the note nullifier as a word.
|
|
16691
|
-
* @returns {Word}
|
|
16692
|
-
*/
|
|
16693
|
-
nullifier() {
|
|
16694
|
-
const ret = wasm.notedetails_nullifier(this.__wbg_ptr);
|
|
16695
|
-
return Word.__wrap(ret);
|
|
16696
|
-
}
|
|
16697
16807
|
/**
|
|
16698
16808
|
* Returns the recipient which controls when the note can be consumed.
|
|
16699
16809
|
* @returns {NoteRecipient}
|
|
@@ -16822,18 +16932,13 @@ class NoteDetailsAndTagArray {
|
|
|
16822
16932
|
wasm.notedetailsandtagarray_push(this.__wbg_ptr, element.__wbg_ptr);
|
|
16823
16933
|
}
|
|
16824
16934
|
/**
|
|
16825
|
-
* Replace the element at `index`. Borrows + clones the input
|
|
16826
|
-
* (mirrors `push`), so the caller's JS handle remains valid
|
|
16827
|
-
* after the call. Without this borrow, passing `elem` by
|
|
16828
|
-
* value would move the underlying Rust value out of the
|
|
16829
|
-
* caller's JS handle and any subsequent method on it would
|
|
16830
|
-
* panic with `"null pointer passed to rust"`.
|
|
16831
16935
|
* @param {number} index
|
|
16832
16936
|
* @param {NoteDetailsAndTag} elem
|
|
16833
16937
|
*/
|
|
16834
16938
|
replaceAt(index, elem) {
|
|
16835
16939
|
_assertClass(elem, NoteDetailsAndTag);
|
|
16836
|
-
|
|
16940
|
+
var ptr0 = elem.__destroy_into_raw();
|
|
16941
|
+
const ret = wasm.notedetailsandtagarray_replaceAt(this.__wbg_ptr, index, ptr0);
|
|
16837
16942
|
if (ret[1]) {
|
|
16838
16943
|
throw takeFromExternrefTable0(ret[0]);
|
|
16839
16944
|
}
|
|
@@ -17051,12 +17156,17 @@ class NoteFile {
|
|
|
17051
17156
|
return ret === 0 ? undefined : NoteDetails.__wrap(ret);
|
|
17052
17157
|
}
|
|
17053
17158
|
/**
|
|
17054
|
-
* Returns the note ID
|
|
17055
|
-
*
|
|
17159
|
+
* Returns the note ID when the file carries one.
|
|
17160
|
+
*
|
|
17161
|
+
* Migration note (miden-client PR #2214): `NoteDetails::id()` was
|
|
17162
|
+
* removed (computing the ID now requires `NoteMetadata`), so the
|
|
17163
|
+
* `NoteDetails`-only variant cannot synthesize one without extra
|
|
17164
|
+
* information. Returns `None` in that case.
|
|
17165
|
+
* @returns {NoteId | undefined}
|
|
17056
17166
|
*/
|
|
17057
17167
|
noteId() {
|
|
17058
17168
|
const ret = wasm.notefile_noteId(this.__wbg_ptr);
|
|
17059
|
-
return NoteId.__wrap(ret);
|
|
17169
|
+
return ret === 0 ? undefined : NoteId.__wrap(ret);
|
|
17060
17170
|
}
|
|
17061
17171
|
/**
|
|
17062
17172
|
* Returns the note tag hint when present.
|
|
@@ -17084,6 +17194,10 @@ class NoteFile {
|
|
|
17084
17194
|
}
|
|
17085
17195
|
/**
|
|
17086
17196
|
* Returns the note nullifier when present.
|
|
17197
|
+
*
|
|
17198
|
+
* Migration note (miden-client PR #2214): `NoteDetails::nullifier()`
|
|
17199
|
+
* was removed (the nullifier moved onto `InputNoteRecord` and is
|
|
17200
|
+
* optional there), so the `NoteDetails`-only variant returns `None`.
|
|
17087
17201
|
* @returns {string | undefined}
|
|
17088
17202
|
*/
|
|
17089
17203
|
nullifier() {
|
|
@@ -17159,13 +17273,6 @@ const NoteFilterTypes = Object.freeze({
|
|
|
17159
17273
|
* See `NoteId` and `NoteMetadata` for additional details.
|
|
17160
17274
|
*/
|
|
17161
17275
|
class NoteHeader {
|
|
17162
|
-
static __wrap(ptr) {
|
|
17163
|
-
ptr = ptr >>> 0;
|
|
17164
|
-
const obj = Object.create(NoteHeader.prototype);
|
|
17165
|
-
obj.__wbg_ptr = ptr;
|
|
17166
|
-
NoteHeaderFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
17167
|
-
return obj;
|
|
17168
|
-
}
|
|
17169
17276
|
__destroy_into_raw() {
|
|
17170
17277
|
const ptr = this.__wbg_ptr;
|
|
17171
17278
|
this.__wbg_ptr = 0;
|
|
@@ -17181,7 +17288,7 @@ class NoteHeader {
|
|
|
17181
17288
|
* @returns {NoteId}
|
|
17182
17289
|
*/
|
|
17183
17290
|
id() {
|
|
17184
|
-
const ret = wasm.
|
|
17291
|
+
const ret = wasm.noteheader_id(this.__wbg_ptr);
|
|
17185
17292
|
return NoteId.__wrap(ret);
|
|
17186
17293
|
}
|
|
17187
17294
|
/**
|
|
@@ -17192,14 +17299,6 @@ class NoteHeader {
|
|
|
17192
17299
|
const ret = wasm.noteheader_metadata(this.__wbg_ptr);
|
|
17193
17300
|
return NoteMetadata.__wrap(ret);
|
|
17194
17301
|
}
|
|
17195
|
-
/**
|
|
17196
|
-
* Returns a commitment to the note ID and metadata.
|
|
17197
|
-
* @returns {Word}
|
|
17198
|
-
*/
|
|
17199
|
-
toCommitment() {
|
|
17200
|
-
const ret = wasm.noteheader_toCommitment(this.__wbg_ptr);
|
|
17201
|
-
return Word.__wrap(ret);
|
|
17202
|
-
}
|
|
17203
17302
|
}
|
|
17204
17303
|
if (Symbol.dispose) NoteHeader.prototype[Symbol.dispose] = NoteHeader.prototype.free;
|
|
17205
17304
|
|
|
@@ -17208,16 +17307,14 @@ if (Symbol.dispose) NoteHeader.prototype[Symbol.dispose] = NoteHeader.prototype.
|
|
|
17208
17307
|
*
|
|
17209
17308
|
* Note ID is computed as:
|
|
17210
17309
|
*
|
|
17211
|
-
* > `hash(
|
|
17212
|
-
*
|
|
17213
|
-
* where `recipient` is defined as:
|
|
17214
|
-
*
|
|
17215
|
-
* > `hash(hash(hash(serial_num, ZERO), script_root), input_commitment)`
|
|
17310
|
+
* > `hash(details_commitment, metadata_commitment)`
|
|
17216
17311
|
*
|
|
17217
|
-
*
|
|
17218
|
-
*
|
|
17219
|
-
*
|
|
17220
|
-
*
|
|
17312
|
+
* On the 0.15 protocol surface the upstream `NoteId::new` signature
|
|
17313
|
+
* changed from `(recipient_digest, asset_commitment)` to
|
|
17314
|
+
* `(NoteDetailsCommitment, &NoteMetadata)`. The JS API exposes
|
|
17315
|
+
* `NoteId.fromRaw(word)` for constructing an ID from a pre-computed
|
|
17316
|
+
* 32-byte commitment word (the previous two-Word constructor has no
|
|
17317
|
+
* 0.15 equivalent).
|
|
17221
17318
|
*/
|
|
17222
17319
|
class NoteId {
|
|
17223
17320
|
static __wrap(ptr) {
|
|
@@ -17258,17 +17355,18 @@ class NoteId {
|
|
|
17258
17355
|
return NoteId.__wrap(ret[0]);
|
|
17259
17356
|
}
|
|
17260
17357
|
/**
|
|
17261
|
-
* Builds a note ID from
|
|
17262
|
-
*
|
|
17263
|
-
*
|
|
17358
|
+
* Builds a note ID from its raw commitment word.
|
|
17359
|
+
*
|
|
17360
|
+
* `word` must already encode the final note-ID commitment — the
|
|
17361
|
+
* metadata-mixing that the previous 2-Word constructor did is no
|
|
17362
|
+
* longer part of the protocol surface.
|
|
17363
|
+
* @param {Word} word
|
|
17364
|
+
* @returns {NoteId}
|
|
17264
17365
|
*/
|
|
17265
|
-
|
|
17266
|
-
_assertClass(
|
|
17267
|
-
|
|
17268
|
-
|
|
17269
|
-
this.__wbg_ptr = ret >>> 0;
|
|
17270
|
-
NoteIdFinalization.register(this, this.__wbg_ptr, this);
|
|
17271
|
-
return this;
|
|
17366
|
+
static fromRaw(word) {
|
|
17367
|
+
_assertClass(word, Word);
|
|
17368
|
+
const ret = wasm.accountcode_commitment(word.__wbg_ptr);
|
|
17369
|
+
return NoteId.__wrap(ret);
|
|
17272
17370
|
}
|
|
17273
17371
|
/**
|
|
17274
17372
|
* Returns the canonical hex representation of the note ID.
|
|
@@ -17393,18 +17491,13 @@ class NoteIdAndArgsArray {
|
|
|
17393
17491
|
wasm.noteidandargsarray_push(this.__wbg_ptr, element.__wbg_ptr);
|
|
17394
17492
|
}
|
|
17395
17493
|
/**
|
|
17396
|
-
* Replace the element at `index`. Borrows + clones the input
|
|
17397
|
-
* (mirrors `push`), so the caller's JS handle remains valid
|
|
17398
|
-
* after the call. Without this borrow, passing `elem` by
|
|
17399
|
-
* value would move the underlying Rust value out of the
|
|
17400
|
-
* caller's JS handle and any subsequent method on it would
|
|
17401
|
-
* panic with `"null pointer passed to rust"`.
|
|
17402
17494
|
* @param {number} index
|
|
17403
17495
|
* @param {NoteIdAndArgs} elem
|
|
17404
17496
|
*/
|
|
17405
17497
|
replaceAt(index, elem) {
|
|
17406
17498
|
_assertClass(elem, NoteIdAndArgs);
|
|
17407
|
-
|
|
17499
|
+
var ptr0 = elem.__destroy_into_raw();
|
|
17500
|
+
const ret = wasm.noteidandargsarray_replaceAt(this.__wbg_ptr, index, ptr0);
|
|
17408
17501
|
if (ret[1]) {
|
|
17409
17502
|
throw takeFromExternrefTable0(ret[0]);
|
|
17410
17503
|
}
|
|
@@ -17486,7 +17579,7 @@ class NoteLocation {
|
|
|
17486
17579
|
* @returns {number}
|
|
17487
17580
|
*/
|
|
17488
17581
|
blockNum() {
|
|
17489
|
-
const ret = wasm.
|
|
17582
|
+
const ret = wasm.notelocation_blockNum(this.__wbg_ptr);
|
|
17490
17583
|
return ret >>> 0;
|
|
17491
17584
|
}
|
|
17492
17585
|
}
|
|
@@ -17495,8 +17588,13 @@ if (Symbol.dispose) NoteLocation.prototype[Symbol.dispose] = NoteLocation.protot
|
|
|
17495
17588
|
/**
|
|
17496
17589
|
* Metadata associated with a note.
|
|
17497
17590
|
*
|
|
17498
|
-
*
|
|
17499
|
-
*
|
|
17591
|
+
* 0.15 protocol surface: `NoteMetadata` is now constructed from a
|
|
17592
|
+
* [`PartialNoteMetadata`] (sender / `note_type` / tag) plus a `NoteAttachments`
|
|
17593
|
+
* collection — the previous `with_tag` / `with_attachment` / `attachment`
|
|
17594
|
+
* methods on `NoteMetadata` were moved (`with_tag` lives on
|
|
17595
|
+
* `PartialNoteMetadata`) or removed (`with_attachment` / `attachment`).
|
|
17596
|
+
* The JS constructor narrows back to the common case of an
|
|
17597
|
+
* attachment-less metadata.
|
|
17500
17598
|
*/
|
|
17501
17599
|
class NoteMetadata {
|
|
17502
17600
|
static __wrap(ptr) {
|
|
@@ -17517,15 +17615,7 @@ class NoteMetadata {
|
|
|
17517
17615
|
wasm.__wbg_notemetadata_free(ptr, 0);
|
|
17518
17616
|
}
|
|
17519
17617
|
/**
|
|
17520
|
-
*
|
|
17521
|
-
* @returns {NoteAttachment}
|
|
17522
|
-
*/
|
|
17523
|
-
attachment() {
|
|
17524
|
-
const ret = wasm.notemetadata_attachment(this.__wbg_ptr);
|
|
17525
|
-
return NoteAttachment.__wrap(ret);
|
|
17526
|
-
}
|
|
17527
|
-
/**
|
|
17528
|
-
* Creates metadata for a note.
|
|
17618
|
+
* Creates metadata for a note with no attachments.
|
|
17529
17619
|
* @param {AccountId} sender
|
|
17530
17620
|
* @param {NoteType} note_type
|
|
17531
17621
|
* @param {NoteTag} note_tag
|
|
@@ -17551,7 +17641,7 @@ class NoteMetadata {
|
|
|
17551
17641
|
* @returns {AccountId}
|
|
17552
17642
|
*/
|
|
17553
17643
|
sender() {
|
|
17554
|
-
const ret = wasm.
|
|
17644
|
+
const ret = wasm.notemetadata_sender(this.__wbg_ptr);
|
|
17555
17645
|
return AccountId.__wrap(ret);
|
|
17556
17646
|
}
|
|
17557
17647
|
/**
|
|
@@ -17562,30 +17652,6 @@ class NoteMetadata {
|
|
|
17562
17652
|
const ret = wasm.notemetadata_tag(this.__wbg_ptr);
|
|
17563
17653
|
return NoteTag.__wrap(ret);
|
|
17564
17654
|
}
|
|
17565
|
-
/**
|
|
17566
|
-
* Adds an attachment to this metadata and returns the updated metadata.
|
|
17567
|
-
*
|
|
17568
|
-
* Attachments provide additional context about how notes should be processed.
|
|
17569
|
-
* For example, a `NetworkAccountTarget` attachment indicates that the note
|
|
17570
|
-
* should be consumed by a specific network account.
|
|
17571
|
-
* @param {NoteAttachment} attachment
|
|
17572
|
-
* @returns {NoteMetadata}
|
|
17573
|
-
*/
|
|
17574
|
-
withAttachment(attachment) {
|
|
17575
|
-
_assertClass(attachment, NoteAttachment);
|
|
17576
|
-
const ret = wasm.notemetadata_withAttachment(this.__wbg_ptr, attachment.__wbg_ptr);
|
|
17577
|
-
return NoteMetadata.__wrap(ret);
|
|
17578
|
-
}
|
|
17579
|
-
/**
|
|
17580
|
-
* Sets the tag for this metadata and returns the updated metadata.
|
|
17581
|
-
* @param {NoteTag} tag
|
|
17582
|
-
* @returns {NoteMetadata}
|
|
17583
|
-
*/
|
|
17584
|
-
withTag(tag) {
|
|
17585
|
-
_assertClass(tag, NoteTag);
|
|
17586
|
-
const ret = wasm.notemetadata_withTag(this.__wbg_ptr, tag.__wbg_ptr);
|
|
17587
|
-
return NoteMetadata.__wrap(ret);
|
|
17588
|
-
}
|
|
17589
17655
|
}
|
|
17590
17656
|
if (Symbol.dispose) NoteMetadata.prototype[Symbol.dispose] = NoteMetadata.prototype.free;
|
|
17591
17657
|
|
|
@@ -17730,18 +17796,13 @@ class NoteRecipientArray {
|
|
|
17730
17796
|
wasm.noterecipientarray_push(this.__wbg_ptr, element.__wbg_ptr);
|
|
17731
17797
|
}
|
|
17732
17798
|
/**
|
|
17733
|
-
* Replace the element at `index`. Borrows + clones the input
|
|
17734
|
-
* (mirrors `push`), so the caller's JS handle remains valid
|
|
17735
|
-
* after the call. Without this borrow, passing `elem` by
|
|
17736
|
-
* value would move the underlying Rust value out of the
|
|
17737
|
-
* caller's JS handle and any subsequent method on it would
|
|
17738
|
-
* panic with `"null pointer passed to rust"`.
|
|
17739
17799
|
* @param {number} index
|
|
17740
17800
|
* @param {NoteRecipient} elem
|
|
17741
17801
|
*/
|
|
17742
17802
|
replaceAt(index, elem) {
|
|
17743
17803
|
_assertClass(elem, NoteRecipient);
|
|
17744
|
-
|
|
17804
|
+
var ptr0 = elem.__destroy_into_raw();
|
|
17805
|
+
const ret = wasm.noterecipientarray_replaceAt(this.__wbg_ptr, index, ptr0);
|
|
17745
17806
|
if (ret[1]) {
|
|
17746
17807
|
throw takeFromExternrefTable0(ret[0]);
|
|
17747
17808
|
}
|
|
@@ -17902,7 +17963,8 @@ class NoteStorage {
|
|
|
17902
17963
|
*/
|
|
17903
17964
|
constructor(felt_array) {
|
|
17904
17965
|
_assertClass(felt_array, FeltArray);
|
|
17905
|
-
|
|
17966
|
+
var ptr0 = felt_array.__destroy_into_raw();
|
|
17967
|
+
const ret = wasm.notestorage_new(ptr0);
|
|
17906
17968
|
if (ret[2]) {
|
|
17907
17969
|
throw takeFromExternrefTable0(ret[1]);
|
|
17908
17970
|
}
|
|
@@ -17914,7 +17976,7 @@ class NoteStorage {
|
|
|
17914
17976
|
if (Symbol.dispose) NoteStorage.prototype[Symbol.dispose] = NoteStorage.prototype.free;
|
|
17915
17977
|
|
|
17916
17978
|
/**
|
|
17917
|
-
* Represents a single block's worth of note sync data
|
|
17979
|
+
* Represents a single block's worth of note sync data returned by `syncNotes`.
|
|
17918
17980
|
*/
|
|
17919
17981
|
class NoteSyncBlock {
|
|
17920
17982
|
static __wrap(ptr) {
|
|
@@ -17964,7 +18026,12 @@ class NoteSyncBlock {
|
|
|
17964
18026
|
if (Symbol.dispose) NoteSyncBlock.prototype[Symbol.dispose] = NoteSyncBlock.prototype.free;
|
|
17965
18027
|
|
|
17966
18028
|
/**
|
|
17967
|
-
*
|
|
18029
|
+
* Aggregates the response data from `syncNotes`: the per-block updates plus
|
|
18030
|
+
* the upper bound of the requested range.
|
|
18031
|
+
*
|
|
18032
|
+
* The previous `chain_tip` accessor is gone — the upstream `sync_notes` RPC
|
|
18033
|
+
* no longer returns the current chain tip on this endpoint. Use the
|
|
18034
|
+
* regular state-sync flow (`syncState`) for the latest synced height.
|
|
17968
18035
|
*/
|
|
17969
18036
|
class NoteSyncInfo {
|
|
17970
18037
|
static __wrap(ptr) {
|
|
@@ -17985,7 +18052,9 @@ class NoteSyncInfo {
|
|
|
17985
18052
|
wasm.__wbg_notesyncinfo_free(ptr, 0);
|
|
17986
18053
|
}
|
|
17987
18054
|
/**
|
|
17988
|
-
* Returns the first block header
|
|
18055
|
+
* Returns the first block header with matching notes, if any. Convenience
|
|
18056
|
+
* for callers that only requested a single tag and want the most recent
|
|
18057
|
+
* inclusion block.
|
|
17989
18058
|
* @returns {BlockHeader | undefined}
|
|
17990
18059
|
*/
|
|
17991
18060
|
blockHeader() {
|
|
@@ -17993,15 +18062,16 @@ class NoteSyncInfo {
|
|
|
17993
18062
|
return ret === 0 ? undefined : BlockHeader.__wrap(ret);
|
|
17994
18063
|
}
|
|
17995
18064
|
/**
|
|
17996
|
-
* Returns the
|
|
18065
|
+
* Returns the upper bound of the block range scanned in this call (the
|
|
18066
|
+
* `blockTo` argument passed to `syncNotes`).
|
|
17997
18067
|
* @returns {number}
|
|
17998
18068
|
*/
|
|
17999
18069
|
blockTo() {
|
|
18000
|
-
const ret = wasm.
|
|
18070
|
+
const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
|
|
18001
18071
|
return ret >>> 0;
|
|
18002
18072
|
}
|
|
18003
18073
|
/**
|
|
18004
|
-
* Returns the
|
|
18074
|
+
* Returns the per-block breakdown.
|
|
18005
18075
|
* @returns {NoteSyncBlock[]}
|
|
18006
18076
|
*/
|
|
18007
18077
|
blocks() {
|
|
@@ -18011,15 +18081,7 @@ class NoteSyncInfo {
|
|
|
18011
18081
|
return v1;
|
|
18012
18082
|
}
|
|
18013
18083
|
/**
|
|
18014
|
-
* Returns the
|
|
18015
|
-
* @returns {number}
|
|
18016
|
-
*/
|
|
18017
|
-
chainTip() {
|
|
18018
|
-
const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
|
|
18019
|
-
return ret >>> 0;
|
|
18020
|
-
}
|
|
18021
|
-
/**
|
|
18022
|
-
* Returns the first block MMR path associated with matching notes, if any.
|
|
18084
|
+
* Returns the MMR path of the first block with matching notes, if any.
|
|
18023
18085
|
* @returns {MerklePath | undefined}
|
|
18024
18086
|
*/
|
|
18025
18087
|
mmrPath() {
|
|
@@ -18027,7 +18089,7 @@ class NoteSyncInfo {
|
|
|
18027
18089
|
return ret === 0 ? undefined : MerklePath.__wrap(ret);
|
|
18028
18090
|
}
|
|
18029
18091
|
/**
|
|
18030
|
-
* Returns
|
|
18092
|
+
* Returns every committed note across all matching blocks (flattened).
|
|
18031
18093
|
* @returns {CommittedNote[]}
|
|
18032
18094
|
*/
|
|
18033
18095
|
notes() {
|
|
@@ -18074,7 +18136,7 @@ class NoteTag {
|
|
|
18074
18136
|
* @returns {number}
|
|
18075
18137
|
*/
|
|
18076
18138
|
asU32() {
|
|
18077
|
-
const ret = wasm.
|
|
18139
|
+
const ret = wasm.notelocation_blockNum(this.__wbg_ptr);
|
|
18078
18140
|
return ret >>> 0;
|
|
18079
18141
|
}
|
|
18080
18142
|
/**
|
|
@@ -18082,7 +18144,7 @@ class NoteTag {
|
|
|
18082
18144
|
* @param {number} tag
|
|
18083
18145
|
*/
|
|
18084
18146
|
constructor(tag) {
|
|
18085
|
-
const ret = wasm.
|
|
18147
|
+
const ret = wasm.notetag_new(tag);
|
|
18086
18148
|
this.__wbg_ptr = ret >>> 0;
|
|
18087
18149
|
NoteTagFinalization.register(this, this.__wbg_ptr, this);
|
|
18088
18150
|
return this;
|
|
@@ -18187,8 +18249,7 @@ class OutputNote {
|
|
|
18187
18249
|
* @returns {Note | undefined}
|
|
18188
18250
|
*/
|
|
18189
18251
|
intoFull() {
|
|
18190
|
-
const
|
|
18191
|
-
const ret = wasm.outputnote_intoFull(ptr);
|
|
18252
|
+
const ret = wasm.outputnote_intoFull(this.__wbg_ptr);
|
|
18192
18253
|
return ret === 0 ? undefined : Note.__wrap(ret);
|
|
18193
18254
|
}
|
|
18194
18255
|
/**
|
|
@@ -18196,7 +18257,7 @@ class OutputNote {
|
|
|
18196
18257
|
* @returns {NoteMetadata}
|
|
18197
18258
|
*/
|
|
18198
18259
|
metadata() {
|
|
18199
|
-
const ret = wasm.
|
|
18260
|
+
const ret = wasm.committednote_metadata(this.__wbg_ptr);
|
|
18200
18261
|
return NoteMetadata.__wrap(ret);
|
|
18201
18262
|
}
|
|
18202
18263
|
/**
|
|
@@ -18276,18 +18337,13 @@ class OutputNoteArray {
|
|
|
18276
18337
|
wasm.outputnotearray_push(this.__wbg_ptr, element.__wbg_ptr);
|
|
18277
18338
|
}
|
|
18278
18339
|
/**
|
|
18279
|
-
* Replace the element at `index`. Borrows + clones the input
|
|
18280
|
-
* (mirrors `push`), so the caller's JS handle remains valid
|
|
18281
|
-
* after the call. Without this borrow, passing `elem` by
|
|
18282
|
-
* value would move the underlying Rust value out of the
|
|
18283
|
-
* caller's JS handle and any subsequent method on it would
|
|
18284
|
-
* panic with `"null pointer passed to rust"`.
|
|
18285
18340
|
* @param {number} index
|
|
18286
18341
|
* @param {OutputNote} elem
|
|
18287
18342
|
*/
|
|
18288
18343
|
replaceAt(index, elem) {
|
|
18289
18344
|
_assertClass(elem, OutputNote);
|
|
18290
|
-
|
|
18345
|
+
var ptr0 = elem.__destroy_into_raw();
|
|
18346
|
+
const ret = wasm.outputnotearray_replaceAt(this.__wbg_ptr, index, ptr0);
|
|
18291
18347
|
if (ret[1]) {
|
|
18292
18348
|
throw takeFromExternrefTable0(ret[0]);
|
|
18293
18349
|
}
|
|
@@ -18329,7 +18385,7 @@ class OutputNoteRecord {
|
|
|
18329
18385
|
* @returns {number}
|
|
18330
18386
|
*/
|
|
18331
18387
|
expectedHeight() {
|
|
18332
|
-
const ret = wasm.
|
|
18388
|
+
const ret = wasm.outputnoterecord_expectedHeight(this.__wbg_ptr);
|
|
18333
18389
|
return ret >>> 0;
|
|
18334
18390
|
}
|
|
18335
18391
|
/**
|
|
@@ -18369,7 +18425,7 @@ class OutputNoteRecord {
|
|
|
18369
18425
|
* @returns {NoteMetadata}
|
|
18370
18426
|
*/
|
|
18371
18427
|
metadata() {
|
|
18372
|
-
const ret = wasm.
|
|
18428
|
+
const ret = wasm.committednote_metadata(this.__wbg_ptr);
|
|
18373
18429
|
return NoteMetadata.__wrap(ret);
|
|
18374
18430
|
}
|
|
18375
18431
|
/**
|
|
@@ -18600,7 +18656,7 @@ class PartialNote {
|
|
|
18600
18656
|
* @returns {NoteMetadata}
|
|
18601
18657
|
*/
|
|
18602
18658
|
metadata() {
|
|
18603
|
-
const ret = wasm.
|
|
18659
|
+
const ret = wasm.committednote_metadata(this.__wbg_ptr);
|
|
18604
18660
|
return NoteMetadata.__wrap(ret);
|
|
18605
18661
|
}
|
|
18606
18662
|
/**
|
|
@@ -18635,7 +18691,8 @@ class Poseidon2 {
|
|
|
18635
18691
|
*/
|
|
18636
18692
|
static hashElements(felt_array) {
|
|
18637
18693
|
_assertClass(felt_array, FeltArray);
|
|
18638
|
-
|
|
18694
|
+
var ptr0 = felt_array.__destroy_into_raw();
|
|
18695
|
+
const ret = wasm.poseidon2_hashElements(ptr0);
|
|
18639
18696
|
return Word.__wrap(ret);
|
|
18640
18697
|
}
|
|
18641
18698
|
}
|
|
@@ -18967,20 +19024,43 @@ class RpcClient {
|
|
|
18967
19024
|
}
|
|
18968
19025
|
/**
|
|
18969
19026
|
* Fetches a block header by number. When `block_num` is undefined, returns the latest header.
|
|
19027
|
+
*
|
|
19028
|
+
* @param `block_num` - Optional block number. When `undefined`, returns the latest header.
|
|
19029
|
+
* @param `include_mmr_proof` - When `true`, includes the MMR proof in the response. Defaults
|
|
19030
|
+
* to `false` when `undefined`.
|
|
18970
19031
|
* @param {number | null} [block_num]
|
|
19032
|
+
* @param {boolean | null} [include_mmr_proof]
|
|
18971
19033
|
* @returns {Promise<BlockHeader>}
|
|
18972
19034
|
*/
|
|
18973
|
-
getBlockHeaderByNumber(block_num) {
|
|
18974
|
-
const ret = wasm.rpcclient_getBlockHeaderByNumber(this.__wbg_ptr, isLikeNone(block_num) ? 0x100000001 : (block_num) >>> 0);
|
|
19035
|
+
getBlockHeaderByNumber(block_num, include_mmr_proof) {
|
|
19036
|
+
const ret = wasm.rpcclient_getBlockHeaderByNumber(this.__wbg_ptr, isLikeNone(block_num) ? 0x100000001 : (block_num) >>> 0, isLikeNone(include_mmr_proof) ? 0xFFFFFF : include_mmr_proof ? 1 : 0);
|
|
19037
|
+
return ret;
|
|
19038
|
+
}
|
|
19039
|
+
/**
|
|
19040
|
+
* Fetches the processing status of a network note by its ID.
|
|
19041
|
+
*
|
|
19042
|
+
* Returns information about the note's current status in the network,
|
|
19043
|
+
* including whether it is pending, processed, discarded, or committed,
|
|
19044
|
+
* along with error details and attempt count.
|
|
19045
|
+
*
|
|
19046
|
+
* @param `note_id` - The ID of the note to query.
|
|
19047
|
+
* @returns Promise that resolves to a `NetworkNoteStatusInfo` object.
|
|
19048
|
+
* @param {NoteId} note_id
|
|
19049
|
+
* @returns {Promise<NetworkNoteStatusInfo>}
|
|
19050
|
+
*/
|
|
19051
|
+
getNetworkNoteStatus(note_id) {
|
|
19052
|
+
_assertClass(note_id, NoteId);
|
|
19053
|
+
const ret = wasm.rpcclient_getNetworkNoteStatus(this.__wbg_ptr, note_id.__wbg_ptr);
|
|
18975
19054
|
return ret;
|
|
18976
19055
|
}
|
|
18977
19056
|
/**
|
|
18978
19057
|
* Fetches a note script by its root hash from the connected Miden node.
|
|
18979
19058
|
*
|
|
18980
19059
|
* @param script_root - The root hash of the note script to fetch.
|
|
18981
|
-
* @returns Promise that resolves to the `NoteScript
|
|
19060
|
+
* @returns Promise that resolves to the `NoteScript`, or `undefined` if the node has no
|
|
19061
|
+
* script for that root.
|
|
18982
19062
|
* @param {Word} script_root
|
|
18983
|
-
* @returns {Promise<NoteScript>}
|
|
19063
|
+
* @returns {Promise<NoteScript | undefined>}
|
|
18984
19064
|
*/
|
|
18985
19065
|
getNoteScriptByRoot(script_root) {
|
|
18986
19066
|
_assertClass(script_root, Word);
|
|
@@ -19034,15 +19114,15 @@ class RpcClient {
|
|
|
19034
19114
|
}
|
|
19035
19115
|
/**
|
|
19036
19116
|
* Fetches notes matching the provided tags from the node.
|
|
19037
|
-
* @param {number}
|
|
19038
|
-
* @param {number
|
|
19117
|
+
* @param {number} block_from
|
|
19118
|
+
* @param {number} block_to
|
|
19039
19119
|
* @param {NoteTag[]} note_tags
|
|
19040
19120
|
* @returns {Promise<NoteSyncInfo>}
|
|
19041
19121
|
*/
|
|
19042
|
-
syncNotes(
|
|
19122
|
+
syncNotes(block_from, block_to, note_tags) {
|
|
19043
19123
|
const ptr0 = passArrayJsValueToWasm0(note_tags, wasm.__wbindgen_malloc);
|
|
19044
19124
|
const len0 = WASM_VECTOR_LEN;
|
|
19045
|
-
const ret = wasm.rpcclient_syncNotes(this.__wbg_ptr,
|
|
19125
|
+
const ret = wasm.rpcclient_syncNotes(this.__wbg_ptr, block_from, block_to, ptr0, len0);
|
|
19046
19126
|
return ret;
|
|
19047
19127
|
}
|
|
19048
19128
|
/**
|
|
@@ -19089,7 +19169,8 @@ class Rpo256 {
|
|
|
19089
19169
|
*/
|
|
19090
19170
|
static hashElements(felt_array) {
|
|
19091
19171
|
_assertClass(felt_array, FeltArray);
|
|
19092
|
-
|
|
19172
|
+
var ptr0 = felt_array.__destroy_into_raw();
|
|
19173
|
+
const ret = wasm.rpo256_hashElements(ptr0);
|
|
19093
19174
|
return Word.__wrap(ret);
|
|
19094
19175
|
}
|
|
19095
19176
|
}
|
|
@@ -19119,6 +19200,15 @@ class SerializedInputNoteData {
|
|
|
19119
19200
|
const ptr = this.__destroy_into_raw();
|
|
19120
19201
|
wasm.__wbg_serializedinputnotedata_free(ptr, 0);
|
|
19121
19202
|
}
|
|
19203
|
+
/**
|
|
19204
|
+
* @returns {Uint8Array}
|
|
19205
|
+
*/
|
|
19206
|
+
get attachments() {
|
|
19207
|
+
const ret = wasm.__wbg_get_serializedinputnotedata_attachments(this.__wbg_ptr);
|
|
19208
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
19209
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
19210
|
+
return v1;
|
|
19211
|
+
}
|
|
19122
19212
|
/**
|
|
19123
19213
|
* @returns {number | undefined}
|
|
19124
19214
|
*/
|
|
@@ -19160,6 +19250,21 @@ class SerializedInputNoteData {
|
|
|
19160
19250
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
19161
19251
|
}
|
|
19162
19252
|
}
|
|
19253
|
+
/**
|
|
19254
|
+
* @returns {string}
|
|
19255
|
+
*/
|
|
19256
|
+
get detailsCommitment() {
|
|
19257
|
+
let deferred1_0;
|
|
19258
|
+
let deferred1_1;
|
|
19259
|
+
try {
|
|
19260
|
+
const ret = wasm.__wbg_get_serializedinputnotedata_detailsCommitment(this.__wbg_ptr);
|
|
19261
|
+
deferred1_0 = ret[0];
|
|
19262
|
+
deferred1_1 = ret[1];
|
|
19263
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
19264
|
+
} finally {
|
|
19265
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
19266
|
+
}
|
|
19267
|
+
}
|
|
19163
19268
|
/**
|
|
19164
19269
|
* @returns {Uint8Array}
|
|
19165
19270
|
*/
|
|
@@ -19179,19 +19284,16 @@ class SerializedInputNoteData {
|
|
|
19179
19284
|
return v1;
|
|
19180
19285
|
}
|
|
19181
19286
|
/**
|
|
19182
|
-
* @returns {string}
|
|
19287
|
+
* @returns {string | undefined}
|
|
19183
19288
|
*/
|
|
19184
19289
|
get noteId() {
|
|
19185
|
-
|
|
19186
|
-
let
|
|
19187
|
-
|
|
19188
|
-
|
|
19189
|
-
|
|
19190
|
-
deferred1_1 = ret[1];
|
|
19191
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
19192
|
-
} finally {
|
|
19193
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
19290
|
+
const ret = wasm.__wbg_get_serializedinputnotedata_noteId(this.__wbg_ptr);
|
|
19291
|
+
let v1;
|
|
19292
|
+
if (ret[0] !== 0) {
|
|
19293
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
19294
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
19194
19295
|
}
|
|
19296
|
+
return v1;
|
|
19195
19297
|
}
|
|
19196
19298
|
/**
|
|
19197
19299
|
* @returns {string}
|
|
@@ -19257,6 +19359,14 @@ class SerializedInputNoteData {
|
|
|
19257
19359
|
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
19258
19360
|
return v1;
|
|
19259
19361
|
}
|
|
19362
|
+
/**
|
|
19363
|
+
* @param {Uint8Array} arg0
|
|
19364
|
+
*/
|
|
19365
|
+
set attachments(arg0) {
|
|
19366
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
19367
|
+
const len0 = WASM_VECTOR_LEN;
|
|
19368
|
+
wasm.__wbg_set_serializedinputnotedata_attachments(this.__wbg_ptr, ptr0, len0);
|
|
19369
|
+
}
|
|
19260
19370
|
/**
|
|
19261
19371
|
* @param {number | null} [arg0]
|
|
19262
19372
|
*/
|
|
@@ -19285,6 +19395,14 @@ class SerializedInputNoteData {
|
|
|
19285
19395
|
const len0 = WASM_VECTOR_LEN;
|
|
19286
19396
|
wasm.__wbg_set_serializedinputnotedata_createdAt(this.__wbg_ptr, ptr0, len0);
|
|
19287
19397
|
}
|
|
19398
|
+
/**
|
|
19399
|
+
* @param {string} arg0
|
|
19400
|
+
*/
|
|
19401
|
+
set detailsCommitment(arg0) {
|
|
19402
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
19403
|
+
const len0 = WASM_VECTOR_LEN;
|
|
19404
|
+
wasm.__wbg_set_serializedinputnotedata_detailsCommitment(this.__wbg_ptr, ptr0, len0);
|
|
19405
|
+
}
|
|
19288
19406
|
/**
|
|
19289
19407
|
* @param {Uint8Array} arg0
|
|
19290
19408
|
*/
|
|
@@ -19302,11 +19420,11 @@ class SerializedInputNoteData {
|
|
|
19302
19420
|
wasm.__wbg_set_serializedinputnotedata_noteAssets(this.__wbg_ptr, ptr0, len0);
|
|
19303
19421
|
}
|
|
19304
19422
|
/**
|
|
19305
|
-
* @param {string} arg0
|
|
19423
|
+
* @param {string | null} [arg0]
|
|
19306
19424
|
*/
|
|
19307
19425
|
set noteId(arg0) {
|
|
19308
|
-
|
|
19309
|
-
|
|
19426
|
+
var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
19427
|
+
var len0 = WASM_VECTOR_LEN;
|
|
19310
19428
|
wasm.__wbg_set_serializedinputnotedata_noteId(this.__wbg_ptr, ptr0, len0);
|
|
19311
19429
|
}
|
|
19312
19430
|
/**
|
|
@@ -19382,6 +19500,15 @@ class SerializedOutputNoteData {
|
|
|
19382
19500
|
const ptr = this.__destroy_into_raw();
|
|
19383
19501
|
wasm.__wbg_serializedoutputnotedata_free(ptr, 0);
|
|
19384
19502
|
}
|
|
19503
|
+
/**
|
|
19504
|
+
* @returns {Uint8Array}
|
|
19505
|
+
*/
|
|
19506
|
+
get attachments() {
|
|
19507
|
+
const ret = wasm.__wbg_get_serializedoutputnotedata_attachments(this.__wbg_ptr);
|
|
19508
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
19509
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
19510
|
+
return v1;
|
|
19511
|
+
}
|
|
19385
19512
|
/**
|
|
19386
19513
|
* @returns {number}
|
|
19387
19514
|
*/
|
|
@@ -19465,6 +19592,14 @@ class SerializedOutputNoteData {
|
|
|
19465
19592
|
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
19466
19593
|
return v1;
|
|
19467
19594
|
}
|
|
19595
|
+
/**
|
|
19596
|
+
* @param {Uint8Array} arg0
|
|
19597
|
+
*/
|
|
19598
|
+
set attachments(arg0) {
|
|
19599
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
19600
|
+
const len0 = WASM_VECTOR_LEN;
|
|
19601
|
+
wasm.__wbg_set_serializedoutputnotedata_attachments(this.__wbg_ptr, ptr0, len0);
|
|
19602
|
+
}
|
|
19468
19603
|
/**
|
|
19469
19604
|
* @param {number} arg0
|
|
19470
19605
|
*/
|
|
@@ -19477,7 +19612,7 @@ class SerializedOutputNoteData {
|
|
|
19477
19612
|
set metadata(arg0) {
|
|
19478
19613
|
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
19479
19614
|
const len0 = WASM_VECTOR_LEN;
|
|
19480
|
-
wasm.
|
|
19615
|
+
wasm.__wbg_set_jsstatesyncupdate_blockHasRelevantNotes(this.__wbg_ptr, ptr0, len0);
|
|
19481
19616
|
}
|
|
19482
19617
|
/**
|
|
19483
19618
|
* @param {Uint8Array} arg0
|
|
@@ -19509,7 +19644,7 @@ class SerializedOutputNoteData {
|
|
|
19509
19644
|
set recipientDigest(arg0) {
|
|
19510
19645
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
19511
19646
|
const len0 = WASM_VECTOR_LEN;
|
|
19512
|
-
wasm.
|
|
19647
|
+
wasm.__wbg_set_jsaccountupdate_vaultRoot(this.__wbg_ptr, ptr0, len0);
|
|
19513
19648
|
}
|
|
19514
19649
|
/**
|
|
19515
19650
|
* @param {number} arg0
|
|
@@ -19665,7 +19800,7 @@ class SerializedTransactionData {
|
|
|
19665
19800
|
set status(arg0) {
|
|
19666
19801
|
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
19667
19802
|
const len0 = WASM_VECTOR_LEN;
|
|
19668
|
-
wasm.
|
|
19803
|
+
wasm.__wbg_set_serializedoutputnotedata_attachments(this.__wbg_ptr, ptr0, len0);
|
|
19669
19804
|
}
|
|
19670
19805
|
/**
|
|
19671
19806
|
* @param {Uint8Array | null} [arg0]
|
|
@@ -20056,9 +20191,6 @@ class StorageMap {
|
|
|
20056
20191
|
}
|
|
20057
20192
|
if (Symbol.dispose) StorageMap.prototype[Symbol.dispose] = StorageMap.prototype.free;
|
|
20058
20193
|
|
|
20059
|
-
/**
|
|
20060
|
-
* A key-value entry from a storage map.
|
|
20061
|
-
*/
|
|
20062
20194
|
class StorageMapEntry {
|
|
20063
20195
|
static __wrap(ptr) {
|
|
20064
20196
|
ptr = ptr >>> 0;
|
|
@@ -20067,6 +20199,16 @@ class StorageMapEntry {
|
|
|
20067
20199
|
StorageMapEntryFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
20068
20200
|
return obj;
|
|
20069
20201
|
}
|
|
20202
|
+
toJSON() {
|
|
20203
|
+
return {
|
|
20204
|
+
key: this.key,
|
|
20205
|
+
root: this.root,
|
|
20206
|
+
value: this.value,
|
|
20207
|
+
};
|
|
20208
|
+
}
|
|
20209
|
+
toString() {
|
|
20210
|
+
return JSON.stringify(this);
|
|
20211
|
+
}
|
|
20070
20212
|
__destroy_into_raw() {
|
|
20071
20213
|
const ptr = this.__wbg_ptr;
|
|
20072
20214
|
this.__wbg_ptr = 0;
|
|
@@ -20077,6 +20219,99 @@ class StorageMapEntry {
|
|
|
20077
20219
|
const ptr = this.__destroy_into_raw();
|
|
20078
20220
|
wasm.__wbg_storagemapentry_free(ptr, 0);
|
|
20079
20221
|
}
|
|
20222
|
+
/**
|
|
20223
|
+
* @returns {string}
|
|
20224
|
+
*/
|
|
20225
|
+
get key() {
|
|
20226
|
+
let deferred1_0;
|
|
20227
|
+
let deferred1_1;
|
|
20228
|
+
try {
|
|
20229
|
+
const ret = wasm.__wbg_get_storagemapentry_key(this.__wbg_ptr);
|
|
20230
|
+
deferred1_0 = ret[0];
|
|
20231
|
+
deferred1_1 = ret[1];
|
|
20232
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
20233
|
+
} finally {
|
|
20234
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
20235
|
+
}
|
|
20236
|
+
}
|
|
20237
|
+
/**
|
|
20238
|
+
* @returns {string}
|
|
20239
|
+
*/
|
|
20240
|
+
get root() {
|
|
20241
|
+
let deferred1_0;
|
|
20242
|
+
let deferred1_1;
|
|
20243
|
+
try {
|
|
20244
|
+
const ret = wasm.__wbg_get_storagemapentry_root(this.__wbg_ptr);
|
|
20245
|
+
deferred1_0 = ret[0];
|
|
20246
|
+
deferred1_1 = ret[1];
|
|
20247
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
20248
|
+
} finally {
|
|
20249
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
20250
|
+
}
|
|
20251
|
+
}
|
|
20252
|
+
/**
|
|
20253
|
+
* @returns {string}
|
|
20254
|
+
*/
|
|
20255
|
+
get value() {
|
|
20256
|
+
let deferred1_0;
|
|
20257
|
+
let deferred1_1;
|
|
20258
|
+
try {
|
|
20259
|
+
const ret = wasm.__wbg_get_storagemapentry_value(this.__wbg_ptr);
|
|
20260
|
+
deferred1_0 = ret[0];
|
|
20261
|
+
deferred1_1 = ret[1];
|
|
20262
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
20263
|
+
} finally {
|
|
20264
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
20265
|
+
}
|
|
20266
|
+
}
|
|
20267
|
+
/**
|
|
20268
|
+
* @param {string} arg0
|
|
20269
|
+
*/
|
|
20270
|
+
set key(arg0) {
|
|
20271
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
20272
|
+
const len0 = WASM_VECTOR_LEN;
|
|
20273
|
+
wasm.__wbg_set_jsstoragemapentry_key(this.__wbg_ptr, ptr0, len0);
|
|
20274
|
+
}
|
|
20275
|
+
/**
|
|
20276
|
+
* @param {string} arg0
|
|
20277
|
+
*/
|
|
20278
|
+
set root(arg0) {
|
|
20279
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
20280
|
+
const len0 = WASM_VECTOR_LEN;
|
|
20281
|
+
wasm.__wbg_set_jsaccountupdate_storageRoot(this.__wbg_ptr, ptr0, len0);
|
|
20282
|
+
}
|
|
20283
|
+
/**
|
|
20284
|
+
* @param {string} arg0
|
|
20285
|
+
*/
|
|
20286
|
+
set value(arg0) {
|
|
20287
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
20288
|
+
const len0 = WASM_VECTOR_LEN;
|
|
20289
|
+
wasm.__wbg_set_jsstoragemapentry_value(this.__wbg_ptr, ptr0, len0);
|
|
20290
|
+
}
|
|
20291
|
+
}
|
|
20292
|
+
if (Symbol.dispose) StorageMapEntry.prototype[Symbol.dispose] = StorageMapEntry.prototype.free;
|
|
20293
|
+
|
|
20294
|
+
/**
|
|
20295
|
+
* A key-value entry from a storage map.
|
|
20296
|
+
*/
|
|
20297
|
+
class StorageMapEntryJs {
|
|
20298
|
+
static __wrap(ptr) {
|
|
20299
|
+
ptr = ptr >>> 0;
|
|
20300
|
+
const obj = Object.create(StorageMapEntryJs.prototype);
|
|
20301
|
+
obj.__wbg_ptr = ptr;
|
|
20302
|
+
StorageMapEntryJsFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
20303
|
+
return obj;
|
|
20304
|
+
}
|
|
20305
|
+
__destroy_into_raw() {
|
|
20306
|
+
const ptr = this.__wbg_ptr;
|
|
20307
|
+
this.__wbg_ptr = 0;
|
|
20308
|
+
StorageMapEntryJsFinalization.unregister(this);
|
|
20309
|
+
return ptr;
|
|
20310
|
+
}
|
|
20311
|
+
free() {
|
|
20312
|
+
const ptr = this.__destroy_into_raw();
|
|
20313
|
+
wasm.__wbg_storagemapentryjs_free(ptr, 0);
|
|
20314
|
+
}
|
|
20080
20315
|
/**
|
|
20081
20316
|
* Returns the storage map key.
|
|
20082
20317
|
* @returns {Word}
|
|
@@ -20094,7 +20329,7 @@ class StorageMapEntry {
|
|
|
20094
20329
|
return Word.__wrap(ret);
|
|
20095
20330
|
}
|
|
20096
20331
|
}
|
|
20097
|
-
if (Symbol.dispose)
|
|
20332
|
+
if (Symbol.dispose) StorageMapEntryJs.prototype[Symbol.dispose] = StorageMapEntryJs.prototype.free;
|
|
20098
20333
|
|
|
20099
20334
|
/**
|
|
20100
20335
|
* Information about storage map updates for an account, as returned by the
|
|
@@ -20126,7 +20361,7 @@ class StorageMapInfo {
|
|
|
20126
20361
|
* @returns {number}
|
|
20127
20362
|
*/
|
|
20128
20363
|
blockNumber() {
|
|
20129
|
-
const ret = wasm.
|
|
20364
|
+
const ret = wasm.storagemapinfo_blockNumber(this.__wbg_ptr);
|
|
20130
20365
|
return ret >>> 0;
|
|
20131
20366
|
}
|
|
20132
20367
|
/**
|
|
@@ -20177,7 +20412,7 @@ class StorageMapUpdate {
|
|
|
20177
20412
|
* @returns {number}
|
|
20178
20413
|
*/
|
|
20179
20414
|
blockNum() {
|
|
20180
|
-
const ret = wasm.
|
|
20415
|
+
const ret = wasm.committednote_tag(this.__wbg_ptr);
|
|
20181
20416
|
return ret >>> 0;
|
|
20182
20417
|
}
|
|
20183
20418
|
/**
|
|
@@ -20347,18 +20582,13 @@ class StorageSlotArray {
|
|
|
20347
20582
|
wasm.storageslotarray_push(this.__wbg_ptr, element.__wbg_ptr);
|
|
20348
20583
|
}
|
|
20349
20584
|
/**
|
|
20350
|
-
* Replace the element at `index`. Borrows + clones the input
|
|
20351
|
-
* (mirrors `push`), so the caller's JS handle remains valid
|
|
20352
|
-
* after the call. Without this borrow, passing `elem` by
|
|
20353
|
-
* value would move the underlying Rust value out of the
|
|
20354
|
-
* caller's JS handle and any subsequent method on it would
|
|
20355
|
-
* panic with `"null pointer passed to rust"`.
|
|
20356
20585
|
* @param {number} index
|
|
20357
20586
|
* @param {StorageSlot} elem
|
|
20358
20587
|
*/
|
|
20359
20588
|
replaceAt(index, elem) {
|
|
20360
20589
|
_assertClass(elem, StorageSlot);
|
|
20361
|
-
|
|
20590
|
+
var ptr0 = elem.__destroy_into_raw();
|
|
20591
|
+
const ret = wasm.storageslotarray_replaceAt(this.__wbg_ptr, index, ptr0);
|
|
20362
20592
|
if (ret[1]) {
|
|
20363
20593
|
throw takeFromExternrefTable0(ret[0]);
|
|
20364
20594
|
}
|
|
@@ -21128,9 +21358,11 @@ class TransactionRequestBuilder {
|
|
|
21128
21358
|
* @returns {TransactionRequest}
|
|
21129
21359
|
*/
|
|
21130
21360
|
build() {
|
|
21131
|
-
const
|
|
21132
|
-
|
|
21133
|
-
|
|
21361
|
+
const ret = wasm.transactionrequestbuilder_build(this.__wbg_ptr);
|
|
21362
|
+
if (ret[2]) {
|
|
21363
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
21364
|
+
}
|
|
21365
|
+
return TransactionRequest.__wrap(ret[0]);
|
|
21134
21366
|
}
|
|
21135
21367
|
/**
|
|
21136
21368
|
* Merges an advice map to be available during script execution.
|
|
@@ -21138,16 +21370,15 @@ class TransactionRequestBuilder {
|
|
|
21138
21370
|
* @returns {TransactionRequestBuilder}
|
|
21139
21371
|
*/
|
|
21140
21372
|
extendAdviceMap(advice_map) {
|
|
21141
|
-
const ptr = this.__destroy_into_raw();
|
|
21142
21373
|
_assertClass(advice_map, AdviceMap);
|
|
21143
|
-
const ret = wasm.transactionrequestbuilder_extendAdviceMap(
|
|
21374
|
+
const ret = wasm.transactionrequestbuilder_extendAdviceMap(this.__wbg_ptr, advice_map.__wbg_ptr);
|
|
21144
21375
|
return TransactionRequestBuilder.__wrap(ret);
|
|
21145
21376
|
}
|
|
21146
21377
|
/**
|
|
21147
21378
|
* Creates a new empty transaction request builder.
|
|
21148
21379
|
*/
|
|
21149
21380
|
constructor() {
|
|
21150
|
-
const ret = wasm.
|
|
21381
|
+
const ret = wasm.transactionrequestbuilder_js_new();
|
|
21151
21382
|
this.__wbg_ptr = ret >>> 0;
|
|
21152
21383
|
TransactionRequestBuilderFinalization.register(this, this.__wbg_ptr, this);
|
|
21153
21384
|
return this;
|
|
@@ -21158,9 +21389,8 @@ class TransactionRequestBuilder {
|
|
|
21158
21389
|
* @returns {TransactionRequestBuilder}
|
|
21159
21390
|
*/
|
|
21160
21391
|
withAuthArg(auth_arg) {
|
|
21161
|
-
const ptr = this.__destroy_into_raw();
|
|
21162
21392
|
_assertClass(auth_arg, Word);
|
|
21163
|
-
const ret = wasm.transactionrequestbuilder_withAuthArg(
|
|
21393
|
+
const ret = wasm.transactionrequestbuilder_withAuthArg(this.__wbg_ptr, auth_arg.__wbg_ptr);
|
|
21164
21394
|
return TransactionRequestBuilder.__wrap(ret);
|
|
21165
21395
|
}
|
|
21166
21396
|
/**
|
|
@@ -21169,9 +21399,8 @@ class TransactionRequestBuilder {
|
|
|
21169
21399
|
* @returns {TransactionRequestBuilder}
|
|
21170
21400
|
*/
|
|
21171
21401
|
withCustomScript(script) {
|
|
21172
|
-
const ptr = this.__destroy_into_raw();
|
|
21173
21402
|
_assertClass(script, TransactionScript);
|
|
21174
|
-
const ret = wasm.transactionrequestbuilder_withCustomScript(
|
|
21403
|
+
const ret = wasm.transactionrequestbuilder_withCustomScript(this.__wbg_ptr, script.__wbg_ptr);
|
|
21175
21404
|
return TransactionRequestBuilder.__wrap(ret);
|
|
21176
21405
|
}
|
|
21177
21406
|
/**
|
|
@@ -21180,9 +21409,9 @@ class TransactionRequestBuilder {
|
|
|
21180
21409
|
* @returns {TransactionRequestBuilder}
|
|
21181
21410
|
*/
|
|
21182
21411
|
withExpectedFutureNotes(note_details_and_tag) {
|
|
21183
|
-
const ptr = this.__destroy_into_raw();
|
|
21184
21412
|
_assertClass(note_details_and_tag, NoteDetailsAndTagArray);
|
|
21185
|
-
|
|
21413
|
+
var ptr0 = note_details_and_tag.__destroy_into_raw();
|
|
21414
|
+
const ret = wasm.transactionrequestbuilder_withExpectedFutureNotes(this.__wbg_ptr, ptr0);
|
|
21186
21415
|
return TransactionRequestBuilder.__wrap(ret);
|
|
21187
21416
|
}
|
|
21188
21417
|
/**
|
|
@@ -21191,9 +21420,9 @@ class TransactionRequestBuilder {
|
|
|
21191
21420
|
* @returns {TransactionRequestBuilder}
|
|
21192
21421
|
*/
|
|
21193
21422
|
withExpectedOutputRecipients(recipients) {
|
|
21194
|
-
const ptr = this.__destroy_into_raw();
|
|
21195
21423
|
_assertClass(recipients, NoteRecipientArray);
|
|
21196
|
-
|
|
21424
|
+
var ptr0 = recipients.__destroy_into_raw();
|
|
21425
|
+
const ret = wasm.transactionrequestbuilder_withExpectedOutputRecipients(this.__wbg_ptr, ptr0);
|
|
21197
21426
|
return TransactionRequestBuilder.__wrap(ret);
|
|
21198
21427
|
}
|
|
21199
21428
|
/**
|
|
@@ -21202,8 +21431,7 @@ class TransactionRequestBuilder {
|
|
|
21202
21431
|
* @returns {TransactionRequestBuilder}
|
|
21203
21432
|
*/
|
|
21204
21433
|
withExpirationDelta(expiration_delta) {
|
|
21205
|
-
const
|
|
21206
|
-
const ret = wasm.transactionrequestbuilder_withExpirationDelta(ptr, expiration_delta);
|
|
21434
|
+
const ret = wasm.transactionrequestbuilder_withExpirationDelta(this.__wbg_ptr, expiration_delta);
|
|
21207
21435
|
return TransactionRequestBuilder.__wrap(ret);
|
|
21208
21436
|
}
|
|
21209
21437
|
/**
|
|
@@ -21212,9 +21440,9 @@ class TransactionRequestBuilder {
|
|
|
21212
21440
|
* @returns {TransactionRequestBuilder}
|
|
21213
21441
|
*/
|
|
21214
21442
|
withForeignAccounts(foreign_accounts) {
|
|
21215
|
-
const ptr = this.__destroy_into_raw();
|
|
21216
21443
|
_assertClass(foreign_accounts, ForeignAccountArray);
|
|
21217
|
-
|
|
21444
|
+
var ptr0 = foreign_accounts.__destroy_into_raw();
|
|
21445
|
+
const ret = wasm.transactionrequestbuilder_withForeignAccounts(this.__wbg_ptr, ptr0);
|
|
21218
21446
|
return TransactionRequestBuilder.__wrap(ret);
|
|
21219
21447
|
}
|
|
21220
21448
|
/**
|
|
@@ -21223,9 +21451,9 @@ class TransactionRequestBuilder {
|
|
|
21223
21451
|
* @returns {TransactionRequestBuilder}
|
|
21224
21452
|
*/
|
|
21225
21453
|
withInputNotes(notes) {
|
|
21226
|
-
const ptr = this.__destroy_into_raw();
|
|
21227
21454
|
_assertClass(notes, NoteAndArgsArray);
|
|
21228
|
-
|
|
21455
|
+
var ptr0 = notes.__destroy_into_raw();
|
|
21456
|
+
const ret = wasm.transactionrequestbuilder_withInputNotes(this.__wbg_ptr, ptr0);
|
|
21229
21457
|
return TransactionRequestBuilder.__wrap(ret);
|
|
21230
21458
|
}
|
|
21231
21459
|
/**
|
|
@@ -21234,9 +21462,9 @@ class TransactionRequestBuilder {
|
|
|
21234
21462
|
* @returns {TransactionRequestBuilder}
|
|
21235
21463
|
*/
|
|
21236
21464
|
withOwnOutputNotes(notes) {
|
|
21237
|
-
const ptr = this.__destroy_into_raw();
|
|
21238
21465
|
_assertClass(notes, NoteArray);
|
|
21239
|
-
|
|
21466
|
+
var ptr0 = notes.__destroy_into_raw();
|
|
21467
|
+
const ret = wasm.transactionrequestbuilder_withOwnOutputNotes(this.__wbg_ptr, ptr0);
|
|
21240
21468
|
return TransactionRequestBuilder.__wrap(ret);
|
|
21241
21469
|
}
|
|
21242
21470
|
/**
|
|
@@ -21245,9 +21473,8 @@ class TransactionRequestBuilder {
|
|
|
21245
21473
|
* @returns {TransactionRequestBuilder}
|
|
21246
21474
|
*/
|
|
21247
21475
|
withScriptArg(script_arg) {
|
|
21248
|
-
const ptr = this.__destroy_into_raw();
|
|
21249
21476
|
_assertClass(script_arg, Word);
|
|
21250
|
-
const ret = wasm.transactionrequestbuilder_withScriptArg(
|
|
21477
|
+
const ret = wasm.transactionrequestbuilder_withScriptArg(this.__wbg_ptr, script_arg.__wbg_ptr);
|
|
21251
21478
|
return TransactionRequestBuilder.__wrap(ret);
|
|
21252
21479
|
}
|
|
21253
21480
|
}
|
|
@@ -21422,7 +21649,8 @@ class TransactionScriptInputPair {
|
|
|
21422
21649
|
_assertClass(word, Word);
|
|
21423
21650
|
var ptr0 = word.__destroy_into_raw();
|
|
21424
21651
|
_assertClass(felts, FeltArray);
|
|
21425
|
-
|
|
21652
|
+
var ptr1 = felts.__destroy_into_raw();
|
|
21653
|
+
const ret = wasm.transactionscriptinputpair_new(ptr0, ptr1);
|
|
21426
21654
|
this.__wbg_ptr = ret >>> 0;
|
|
21427
21655
|
TransactionScriptInputPairFinalization.register(this, this.__wbg_ptr, this);
|
|
21428
21656
|
return this;
|
|
@@ -21494,18 +21722,13 @@ class TransactionScriptInputPairArray {
|
|
|
21494
21722
|
wasm.transactionscriptinputpairarray_push(this.__wbg_ptr, element.__wbg_ptr);
|
|
21495
21723
|
}
|
|
21496
21724
|
/**
|
|
21497
|
-
* Replace the element at `index`. Borrows + clones the input
|
|
21498
|
-
* (mirrors `push`), so the caller's JS handle remains valid
|
|
21499
|
-
* after the call. Without this borrow, passing `elem` by
|
|
21500
|
-
* value would move the underlying Rust value out of the
|
|
21501
|
-
* caller's JS handle and any subsequent method on it would
|
|
21502
|
-
* panic with `"null pointer passed to rust"`.
|
|
21503
21725
|
* @param {number} index
|
|
21504
21726
|
* @param {TransactionScriptInputPair} elem
|
|
21505
21727
|
*/
|
|
21506
21728
|
replaceAt(index, elem) {
|
|
21507
21729
|
_assertClass(elem, TransactionScriptInputPair);
|
|
21508
|
-
|
|
21730
|
+
var ptr0 = elem.__destroy_into_raw();
|
|
21731
|
+
const ret = wasm.transactionscriptinputpairarray_replaceAt(this.__wbg_ptr, index, ptr0);
|
|
21509
21732
|
if (ret[1]) {
|
|
21510
21733
|
throw takeFromExternrefTable0(ret[0]);
|
|
21511
21734
|
}
|
|
@@ -21819,15 +22042,23 @@ class WebClient {
|
|
|
21819
22042
|
* const balance = await reader.getBalance(faucetId);
|
|
21820
22043
|
* ```
|
|
21821
22044
|
* @param {AccountId} account_id
|
|
21822
|
-
* @returns {AccountReader}
|
|
22045
|
+
* @returns {Promise<AccountReader>}
|
|
21823
22046
|
*/
|
|
21824
22047
|
accountReader(account_id) {
|
|
21825
22048
|
_assertClass(account_id, AccountId);
|
|
21826
22049
|
const ret = wasm.webclient_accountReader(this.__wbg_ptr, account_id.__wbg_ptr);
|
|
21827
|
-
|
|
21828
|
-
|
|
21829
|
-
|
|
21830
|
-
|
|
22050
|
+
return ret;
|
|
22051
|
+
}
|
|
22052
|
+
/**
|
|
22053
|
+
* @param {AccountId} account_id
|
|
22054
|
+
* @param {AuthSecretKey} secret_key
|
|
22055
|
+
* @returns {Promise<void>}
|
|
22056
|
+
*/
|
|
22057
|
+
addAccountSecretKeyToWebStore(account_id, secret_key) {
|
|
22058
|
+
_assertClass(account_id, AccountId);
|
|
22059
|
+
_assertClass(secret_key, AuthSecretKey);
|
|
22060
|
+
const ret = wasm.webclient_addAccountSecretKeyToWebStore(this.__wbg_ptr, account_id.__wbg_ptr, secret_key.__wbg_ptr);
|
|
22061
|
+
return ret;
|
|
21831
22062
|
}
|
|
21832
22063
|
/**
|
|
21833
22064
|
* @param {string} tag
|
|
@@ -21876,6 +22107,9 @@ class WebClient {
|
|
|
21876
22107
|
* * `store_name`: Optional name for the web store. If `None`, the store name defaults to
|
|
21877
22108
|
* `MidenClientDB_{network_id}`, where `network_id` is derived from the `node_url`.
|
|
21878
22109
|
* Explicitly setting this allows for creating multiple isolated clients.
|
|
22110
|
+
* * `debug_mode`: Optional flag to enable debug mode for transaction execution. When enabled,
|
|
22111
|
+
* the transaction executor records additional information useful for debugging. Defaults to
|
|
22112
|
+
* disabled.
|
|
21879
22113
|
* @param {string | null} [node_url]
|
|
21880
22114
|
* @param {string | null} [node_note_transport_url]
|
|
21881
22115
|
* @param {Uint8Array | null} [seed]
|
|
@@ -21908,6 +22142,8 @@ class WebClient {
|
|
|
21908
22142
|
* * `get_key_cb`: Callback to retrieve the secret key bytes for a given public key.
|
|
21909
22143
|
* * `insert_key_cb`: Callback to persist a secret key.
|
|
21910
22144
|
* * `sign_cb`: Callback to produce serialized signature bytes for the provided inputs.
|
|
22145
|
+
* * `debug_mode`: Optional flag to enable debug mode for transaction execution. Defaults to
|
|
22146
|
+
* disabled.
|
|
21911
22147
|
* @param {string | null} [node_url]
|
|
21912
22148
|
* @param {string | null} [node_note_transport_url]
|
|
21913
22149
|
* @param {Uint8Array | null} [seed]
|
|
@@ -21931,14 +22167,11 @@ class WebClient {
|
|
|
21931
22167
|
return ret;
|
|
21932
22168
|
}
|
|
21933
22169
|
/**
|
|
21934
|
-
* @returns {CodeBuilder}
|
|
22170
|
+
* @returns {Promise<CodeBuilder>}
|
|
21935
22171
|
*/
|
|
21936
22172
|
createCodeBuilder() {
|
|
21937
22173
|
const ret = wasm.webclient_createCodeBuilder(this.__wbg_ptr);
|
|
21938
|
-
|
|
21939
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
21940
|
-
}
|
|
21941
|
-
return CodeBuilder.__wrap(ret[0]);
|
|
22174
|
+
return ret;
|
|
21942
22175
|
}
|
|
21943
22176
|
/**
|
|
21944
22177
|
* Creates a new client with a mock RPC API. Useful for testing purposes and proof-of-concept
|
|
@@ -21946,7 +22179,7 @@ class WebClient {
|
|
|
21946
22179
|
* @param {Uint8Array | null} [seed]
|
|
21947
22180
|
* @param {Uint8Array | null} [serialized_mock_chain]
|
|
21948
22181
|
* @param {Uint8Array | null} [serialized_mock_note_transport_node]
|
|
21949
|
-
* @returns {Promise<
|
|
22182
|
+
* @returns {Promise<string>}
|
|
21950
22183
|
*/
|
|
21951
22184
|
createMockClient(seed, serialized_mock_chain, serialized_mock_note_transport_node) {
|
|
21952
22185
|
var ptr0 = isLikeNone(seed) ? 0 : passArray8ToWasm0(seed, wasm.__wbindgen_malloc);
|
|
@@ -21993,7 +22226,8 @@ class WebClient {
|
|
|
21993
22226
|
_assertClass(tx_script, TransactionScript);
|
|
21994
22227
|
_assertClass(advice_inputs, AdviceInputs);
|
|
21995
22228
|
_assertClass(foreign_accounts, ForeignAccountArray);
|
|
21996
|
-
|
|
22229
|
+
var ptr0 = foreign_accounts.__destroy_into_raw();
|
|
22230
|
+
const ret = wasm.webclient_executeProgram(this.__wbg_ptr, account_id.__wbg_ptr, tx_script.__wbg_ptr, advice_inputs.__wbg_ptr, ptr0);
|
|
21997
22231
|
return ret;
|
|
21998
22232
|
}
|
|
21999
22233
|
/**
|
|
@@ -22020,7 +22254,8 @@ class WebClient {
|
|
|
22020
22254
|
*/
|
|
22021
22255
|
exportAccountFile(account_id) {
|
|
22022
22256
|
_assertClass(account_id, AccountId);
|
|
22023
|
-
|
|
22257
|
+
var ptr0 = account_id.__destroy_into_raw();
|
|
22258
|
+
const ret = wasm.webclient_exportAccountFile(this.__wbg_ptr, ptr0);
|
|
22024
22259
|
return ret;
|
|
22025
22260
|
}
|
|
22026
22261
|
/**
|
|
@@ -22068,6 +22303,30 @@ class WebClient {
|
|
|
22068
22303
|
const ret = wasm.webclient_getAccount(this.__wbg_ptr, account_id.__wbg_ptr);
|
|
22069
22304
|
return ret;
|
|
22070
22305
|
}
|
|
22306
|
+
/**
|
|
22307
|
+
* Retrieves an authentication secret key from the keystore given a public key commitment.
|
|
22308
|
+
*
|
|
22309
|
+
* The public key commitment should correspond to one of the keys tracked by the keystore.
|
|
22310
|
+
* Returns the associated [`AuthSecretKey`] if found, or an error if not found.
|
|
22311
|
+
* @param {Word} pub_key_commitment
|
|
22312
|
+
* @returns {Promise<AuthSecretKey>}
|
|
22313
|
+
*/
|
|
22314
|
+
getAccountAuthByPubKeyCommitment(pub_key_commitment) {
|
|
22315
|
+
_assertClass(pub_key_commitment, Word);
|
|
22316
|
+
const ret = wasm.webclient_getAccountAuthByPubKeyCommitment(this.__wbg_ptr, pub_key_commitment.__wbg_ptr);
|
|
22317
|
+
return ret;
|
|
22318
|
+
}
|
|
22319
|
+
/**
|
|
22320
|
+
* Retrieves the full account data for the account associated with the given public key
|
|
22321
|
+
* commitment, returning `null` if no account is found.
|
|
22322
|
+
* @param {Word} pub_key_commitment
|
|
22323
|
+
* @returns {Promise<Account | undefined>}
|
|
22324
|
+
*/
|
|
22325
|
+
getAccountByKeyCommitment(pub_key_commitment) {
|
|
22326
|
+
_assertClass(pub_key_commitment, Word);
|
|
22327
|
+
const ret = wasm.webclient_getAccountByKeyCommitment(this.__wbg_ptr, pub_key_commitment.__wbg_ptr);
|
|
22328
|
+
return ret;
|
|
22329
|
+
}
|
|
22071
22330
|
/**
|
|
22072
22331
|
* Retrieves the account code for a specific account.
|
|
22073
22332
|
*
|
|
@@ -22165,7 +22424,20 @@ class WebClient {
|
|
|
22165
22424
|
return ret;
|
|
22166
22425
|
}
|
|
22167
22426
|
/**
|
|
22168
|
-
*
|
|
22427
|
+
* Returns all public key commitments associated with the given account ID.
|
|
22428
|
+
*
|
|
22429
|
+
* These commitments can be used with [`getAccountAuthByPubKeyCommitment`]
|
|
22430
|
+
* to retrieve the corresponding secret keys from the keystore.
|
|
22431
|
+
* @param {AccountId} account_id
|
|
22432
|
+
* @returns {Promise<Word[]>}
|
|
22433
|
+
*/
|
|
22434
|
+
getPublicKeyCommitmentsOfAccount(account_id) {
|
|
22435
|
+
_assertClass(account_id, AccountId);
|
|
22436
|
+
const ret = wasm.webclient_getPublicKeyCommitmentsOfAccount(this.__wbg_ptr, account_id.__wbg_ptr);
|
|
22437
|
+
return ret;
|
|
22438
|
+
}
|
|
22439
|
+
/**
|
|
22440
|
+
* Retrieves the setting value for `key`, or `None` if it hasn't been set.
|
|
22169
22441
|
* @param {string} key
|
|
22170
22442
|
* @returns {Promise<any | undefined>}
|
|
22171
22443
|
*/
|
|
@@ -22194,7 +22466,7 @@ class WebClient {
|
|
|
22194
22466
|
}
|
|
22195
22467
|
/**
|
|
22196
22468
|
* @param {AccountId} account_id
|
|
22197
|
-
* @returns {Promise<
|
|
22469
|
+
* @returns {Promise<void>}
|
|
22198
22470
|
*/
|
|
22199
22471
|
importAccountById(account_id) {
|
|
22200
22472
|
_assertClass(account_id, AccountId);
|
|
@@ -22203,7 +22475,7 @@ class WebClient {
|
|
|
22203
22475
|
}
|
|
22204
22476
|
/**
|
|
22205
22477
|
* @param {AccountFile} account_file
|
|
22206
|
-
* @returns {Promise<
|
|
22478
|
+
* @returns {Promise<string>}
|
|
22207
22479
|
*/
|
|
22208
22480
|
importAccountFile(account_file) {
|
|
22209
22481
|
_assertClass(account_file, AccountFile);
|
|
@@ -22212,8 +22484,20 @@ class WebClient {
|
|
|
22212
22484
|
return ret;
|
|
22213
22485
|
}
|
|
22214
22486
|
/**
|
|
22487
|
+
* Imports a note file and returns the imported note's identifier.
|
|
22488
|
+
*
|
|
22489
|
+
* A note file that carries metadata — an explicit `NoteId` or a full note
|
|
22490
|
+
* with proof — resolves to a concrete `NoteId`, which is returned so the
|
|
22491
|
+
* caller can look the note up with [`get_input_note`]. A details-only file
|
|
22492
|
+
* (`NoteDetails`) has no metadata and therefore no `NoteId` yet, so its
|
|
22493
|
+
* metadata-independent details commitment is returned instead.
|
|
22494
|
+
*
|
|
22495
|
+
* Migration note (miden-client PR #2214): `Client::import_notes` now
|
|
22496
|
+
* returns `Vec<NoteDetailsCommitment>` rather than `Vec<NoteId>`, since
|
|
22497
|
+
* metadata-less imports have no note ID; this method recovers the `NoteId`
|
|
22498
|
+
* from the note file when one is available.
|
|
22215
22499
|
* @param {NoteFile} note_file
|
|
22216
|
-
* @returns {Promise<
|
|
22500
|
+
* @returns {Promise<string>}
|
|
22217
22501
|
*/
|
|
22218
22502
|
importNoteFile(note_file) {
|
|
22219
22503
|
_assertClass(note_file, NoteFile);
|
|
@@ -22295,7 +22579,7 @@ class WebClient {
|
|
|
22295
22579
|
return ret;
|
|
22296
22580
|
}
|
|
22297
22581
|
/**
|
|
22298
|
-
* @returns {Promise<
|
|
22582
|
+
* @returns {Promise<string[]>}
|
|
22299
22583
|
*/
|
|
22300
22584
|
listTags() {
|
|
22301
22585
|
const ret = wasm.webclient_listTags(this.__wbg_ptr);
|
|
@@ -22346,19 +22630,27 @@ class WebClient {
|
|
|
22346
22630
|
return TransactionRequest.__wrap(ret[0]);
|
|
22347
22631
|
}
|
|
22348
22632
|
/**
|
|
22633
|
+
* Creates, persists, and returns a new fungible faucet account.
|
|
22634
|
+
*
|
|
22635
|
+
* Only fungible faucets are supported, so passing `non_fungible = true` fails fast with a
|
|
22636
|
+
* clear message. The faucet is registered with mint and burn policies (both `AllowAll`); its
|
|
22637
|
+
* secret key is added to the keystore.
|
|
22349
22638
|
* @param {AccountStorageMode} storage_mode
|
|
22350
22639
|
* @param {boolean} non_fungible
|
|
22640
|
+
* @param {string} token_name
|
|
22351
22641
|
* @param {string} token_symbol
|
|
22352
22642
|
* @param {number} decimals
|
|
22353
22643
|
* @param {bigint} max_supply
|
|
22354
22644
|
* @param {AuthScheme} auth_scheme
|
|
22355
22645
|
* @returns {Promise<Account>}
|
|
22356
22646
|
*/
|
|
22357
|
-
newFaucet(storage_mode, non_fungible, token_symbol, decimals, max_supply, auth_scheme) {
|
|
22647
|
+
newFaucet(storage_mode, non_fungible, token_name, token_symbol, decimals, max_supply, auth_scheme) {
|
|
22358
22648
|
_assertClass(storage_mode, AccountStorageMode);
|
|
22359
|
-
const ptr0 = passStringToWasm0(
|
|
22649
|
+
const ptr0 = passStringToWasm0(token_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
22360
22650
|
const len0 = WASM_VECTOR_LEN;
|
|
22361
|
-
const
|
|
22651
|
+
const ptr1 = passStringToWasm0(token_symbol, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
22652
|
+
const len1 = WASM_VECTOR_LEN;
|
|
22653
|
+
const ret = wasm.webclient_newFaucet(this.__wbg_ptr, storage_mode.__wbg_ptr, non_fungible, ptr0, len0, ptr1, len1, decimals, max_supply, auth_scheme);
|
|
22362
22654
|
return ret;
|
|
22363
22655
|
}
|
|
22364
22656
|
/**
|
|
@@ -22366,17 +22658,61 @@ class WebClient {
|
|
|
22366
22658
|
* @param {AccountId} faucet_id
|
|
22367
22659
|
* @param {NoteType} note_type
|
|
22368
22660
|
* @param {bigint} amount
|
|
22369
|
-
* @returns {TransactionRequest}
|
|
22661
|
+
* @returns {Promise<TransactionRequest>}
|
|
22370
22662
|
*/
|
|
22371
22663
|
newMintTransactionRequest(target_account_id, faucet_id, note_type, amount) {
|
|
22372
22664
|
_assertClass(target_account_id, AccountId);
|
|
22373
22665
|
_assertClass(faucet_id, AccountId);
|
|
22374
22666
|
const ret = wasm.webclient_newMintTransactionRequest(this.__wbg_ptr, target_account_id.__wbg_ptr, faucet_id.__wbg_ptr, note_type, amount);
|
|
22667
|
+
return ret;
|
|
22668
|
+
}
|
|
22669
|
+
/**
|
|
22670
|
+
* @param {Note} pswap_note
|
|
22671
|
+
* @param {AccountId} creator_account_id
|
|
22672
|
+
* @returns {TransactionRequest}
|
|
22673
|
+
*/
|
|
22674
|
+
newPswapCancelTransactionRequest(pswap_note, creator_account_id) {
|
|
22675
|
+
_assertClass(pswap_note, Note);
|
|
22676
|
+
_assertClass(creator_account_id, AccountId);
|
|
22677
|
+
const ret = wasm.webclient_newPswapCancelTransactionRequest(this.__wbg_ptr, pswap_note.__wbg_ptr, creator_account_id.__wbg_ptr);
|
|
22375
22678
|
if (ret[2]) {
|
|
22376
22679
|
throw takeFromExternrefTable0(ret[1]);
|
|
22377
22680
|
}
|
|
22378
22681
|
return TransactionRequest.__wrap(ret[0]);
|
|
22379
22682
|
}
|
|
22683
|
+
/**
|
|
22684
|
+
* @param {Note} pswap_note
|
|
22685
|
+
* @param {AccountId} consumer_account_id
|
|
22686
|
+
* @param {bigint} account_fill_amount
|
|
22687
|
+
* @param {bigint} note_fill_amount
|
|
22688
|
+
* @returns {TransactionRequest}
|
|
22689
|
+
*/
|
|
22690
|
+
newPswapConsumeTransactionRequest(pswap_note, consumer_account_id, account_fill_amount, note_fill_amount) {
|
|
22691
|
+
_assertClass(pswap_note, Note);
|
|
22692
|
+
_assertClass(consumer_account_id, AccountId);
|
|
22693
|
+
const ret = wasm.webclient_newPswapConsumeTransactionRequest(this.__wbg_ptr, pswap_note.__wbg_ptr, consumer_account_id.__wbg_ptr, account_fill_amount, note_fill_amount);
|
|
22694
|
+
if (ret[2]) {
|
|
22695
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
22696
|
+
}
|
|
22697
|
+
return TransactionRequest.__wrap(ret[0]);
|
|
22698
|
+
}
|
|
22699
|
+
/**
|
|
22700
|
+
* @param {AccountId} creator_account_id
|
|
22701
|
+
* @param {AccountId} offered_asset_faucet_id
|
|
22702
|
+
* @param {bigint} offered_asset_amount
|
|
22703
|
+
* @param {AccountId} requested_asset_faucet_id
|
|
22704
|
+
* @param {bigint} requested_asset_amount
|
|
22705
|
+
* @param {NoteType} note_type
|
|
22706
|
+
* @param {NoteType} payback_note_type
|
|
22707
|
+
* @returns {Promise<TransactionRequest>}
|
|
22708
|
+
*/
|
|
22709
|
+
newPswapCreateTransactionRequest(creator_account_id, offered_asset_faucet_id, offered_asset_amount, requested_asset_faucet_id, requested_asset_amount, note_type, payback_note_type) {
|
|
22710
|
+
_assertClass(creator_account_id, AccountId);
|
|
22711
|
+
_assertClass(offered_asset_faucet_id, AccountId);
|
|
22712
|
+
_assertClass(requested_asset_faucet_id, AccountId);
|
|
22713
|
+
const ret = wasm.webclient_newPswapCreateTransactionRequest(this.__wbg_ptr, creator_account_id.__wbg_ptr, offered_asset_faucet_id.__wbg_ptr, offered_asset_amount, requested_asset_faucet_id.__wbg_ptr, requested_asset_amount, note_type, payback_note_type);
|
|
22714
|
+
return ret;
|
|
22715
|
+
}
|
|
22380
22716
|
/**
|
|
22381
22717
|
* @param {AccountId} sender_account_id
|
|
22382
22718
|
* @param {AccountId} target_account_id
|
|
@@ -22385,17 +22721,14 @@ class WebClient {
|
|
|
22385
22721
|
* @param {bigint} amount
|
|
22386
22722
|
* @param {number | null} [recall_height]
|
|
22387
22723
|
* @param {number | null} [timelock_height]
|
|
22388
|
-
* @returns {TransactionRequest}
|
|
22724
|
+
* @returns {Promise<TransactionRequest>}
|
|
22389
22725
|
*/
|
|
22390
22726
|
newSendTransactionRequest(sender_account_id, target_account_id, faucet_id, note_type, amount, recall_height, timelock_height) {
|
|
22391
22727
|
_assertClass(sender_account_id, AccountId);
|
|
22392
22728
|
_assertClass(target_account_id, AccountId);
|
|
22393
22729
|
_assertClass(faucet_id, AccountId);
|
|
22394
22730
|
const ret = wasm.webclient_newSendTransactionRequest(this.__wbg_ptr, sender_account_id.__wbg_ptr, target_account_id.__wbg_ptr, faucet_id.__wbg_ptr, note_type, amount, isLikeNone(recall_height) ? 0x100000001 : (recall_height) >>> 0, isLikeNone(timelock_height) ? 0x100000001 : (timelock_height) >>> 0);
|
|
22395
|
-
|
|
22396
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
22397
|
-
}
|
|
22398
|
-
return TransactionRequest.__wrap(ret[0]);
|
|
22731
|
+
return ret;
|
|
22399
22732
|
}
|
|
22400
22733
|
/**
|
|
22401
22734
|
* @param {AccountId} sender_account_id
|
|
@@ -22405,17 +22738,14 @@ class WebClient {
|
|
|
22405
22738
|
* @param {bigint} requested_asset_amount
|
|
22406
22739
|
* @param {NoteType} note_type
|
|
22407
22740
|
* @param {NoteType} payback_note_type
|
|
22408
|
-
* @returns {TransactionRequest}
|
|
22741
|
+
* @returns {Promise<TransactionRequest>}
|
|
22409
22742
|
*/
|
|
22410
22743
|
newSwapTransactionRequest(sender_account_id, offered_asset_faucet_id, offered_asset_amount, requested_asset_faucet_id, requested_asset_amount, note_type, payback_note_type) {
|
|
22411
22744
|
_assertClass(sender_account_id, AccountId);
|
|
22412
22745
|
_assertClass(offered_asset_faucet_id, AccountId);
|
|
22413
22746
|
_assertClass(requested_asset_faucet_id, AccountId);
|
|
22414
22747
|
const ret = wasm.webclient_newSwapTransactionRequest(this.__wbg_ptr, sender_account_id.__wbg_ptr, offered_asset_faucet_id.__wbg_ptr, offered_asset_amount, requested_asset_faucet_id.__wbg_ptr, requested_asset_amount, note_type, payback_note_type);
|
|
22415
|
-
|
|
22416
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
22417
|
-
}
|
|
22418
|
-
return TransactionRequest.__wrap(ret[0]);
|
|
22748
|
+
return ret;
|
|
22419
22749
|
}
|
|
22420
22750
|
/**
|
|
22421
22751
|
* @param {AccountStorageMode} storage_mode
|
|
@@ -22431,39 +22761,28 @@ class WebClient {
|
|
|
22431
22761
|
const ret = wasm.webclient_newWallet(this.__wbg_ptr, storage_mode.__wbg_ptr, mutable, auth_scheme, ptr0, len0);
|
|
22432
22762
|
return ret;
|
|
22433
22763
|
}
|
|
22434
|
-
proveBlock() {
|
|
22435
|
-
const ret = wasm.webclient_proveBlock(this.__wbg_ptr);
|
|
22436
|
-
if (ret[1]) {
|
|
22437
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
22438
|
-
}
|
|
22439
|
-
}
|
|
22440
22764
|
/**
|
|
22441
|
-
*
|
|
22442
|
-
* @param {TransactionResult} transaction_result
|
|
22443
|
-
* @returns {Promise<ProvenTransaction>}
|
|
22765
|
+
* @returns {Promise<void>}
|
|
22444
22766
|
*/
|
|
22445
|
-
|
|
22446
|
-
|
|
22447
|
-
const ret = wasm.webclient_proveTransaction(this.__wbg_ptr, transaction_result.__wbg_ptr);
|
|
22767
|
+
proveBlock() {
|
|
22768
|
+
const ret = wasm.webclient_proveBlock(this.__wbg_ptr);
|
|
22448
22769
|
return ret;
|
|
22449
22770
|
}
|
|
22450
22771
|
/**
|
|
22451
|
-
* Generates a transaction proof using the provided prover
|
|
22452
|
-
*
|
|
22453
|
-
* Takes the prover by reference so the JS-side handle is NOT consumed
|
|
22454
|
-
* by wasm-bindgen. Taking `TransactionProver` by value would transfer
|
|
22455
|
-
* ownership on each call, invalidating the JS object's internal WASM
|
|
22456
|
-
* handle; after one use, subsequent calls from JS would pass a dangling
|
|
22457
|
-
* handle that wasm-bindgen interprets as `None`, silently falling back
|
|
22458
|
-
* to the local prover.
|
|
22772
|
+
* Generates a transaction proof using either the provided prover or the client's default
|
|
22773
|
+
* prover if none is supplied.
|
|
22459
22774
|
* @param {TransactionResult} transaction_result
|
|
22460
|
-
* @param {TransactionProver} prover
|
|
22775
|
+
* @param {TransactionProver | null} [prover]
|
|
22461
22776
|
* @returns {Promise<ProvenTransaction>}
|
|
22462
22777
|
*/
|
|
22463
|
-
|
|
22778
|
+
proveTransaction(transaction_result, prover) {
|
|
22464
22779
|
_assertClass(transaction_result, TransactionResult);
|
|
22465
|
-
|
|
22466
|
-
|
|
22780
|
+
let ptr0 = 0;
|
|
22781
|
+
if (!isLikeNone(prover)) {
|
|
22782
|
+
_assertClass(prover, TransactionProver);
|
|
22783
|
+
ptr0 = prover.__destroy_into_raw();
|
|
22784
|
+
}
|
|
22785
|
+
const ret = wasm.webclient_proveTransaction(this.__wbg_ptr, transaction_result.__wbg_ptr, ptr0);
|
|
22467
22786
|
return ret;
|
|
22468
22787
|
}
|
|
22469
22788
|
/**
|
|
@@ -22532,29 +22851,19 @@ class WebClient {
|
|
|
22532
22851
|
}
|
|
22533
22852
|
/**
|
|
22534
22853
|
* Returns the inner serialized mock chain if it exists.
|
|
22535
|
-
* @returns {Uint8Array}
|
|
22854
|
+
* @returns {Promise<Uint8Array>}
|
|
22536
22855
|
*/
|
|
22537
22856
|
serializeMockChain() {
|
|
22538
22857
|
const ret = wasm.webclient_serializeMockChain(this.__wbg_ptr);
|
|
22539
|
-
|
|
22540
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
22541
|
-
}
|
|
22542
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
22543
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
22544
|
-
return v1;
|
|
22858
|
+
return ret;
|
|
22545
22859
|
}
|
|
22546
22860
|
/**
|
|
22547
22861
|
* Returns the inner serialized mock note transport node if it exists.
|
|
22548
|
-
* @returns {Uint8Array}
|
|
22862
|
+
* @returns {Promise<Uint8Array>}
|
|
22549
22863
|
*/
|
|
22550
22864
|
serializeMockNoteTransportNode() {
|
|
22551
22865
|
const ret = wasm.webclient_serializeMockNoteTransportNode(this.__wbg_ptr);
|
|
22552
|
-
|
|
22553
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
22554
|
-
}
|
|
22555
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
22556
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
22557
|
-
return v1;
|
|
22866
|
+
return ret;
|
|
22558
22867
|
}
|
|
22559
22868
|
/**
|
|
22560
22869
|
* Sets a setting key-value in the store. It can then be retrieved using `get_setting`.
|
|
@@ -22570,25 +22879,11 @@ class WebClient {
|
|
|
22570
22879
|
}
|
|
22571
22880
|
/**
|
|
22572
22881
|
* Returns the identifier of the underlying store (e.g. `IndexedDB` database name, file path).
|
|
22573
|
-
* @returns {string}
|
|
22882
|
+
* @returns {Promise<string>}
|
|
22574
22883
|
*/
|
|
22575
22884
|
storeIdentifier() {
|
|
22576
|
-
|
|
22577
|
-
|
|
22578
|
-
try {
|
|
22579
|
-
const ret = wasm.webclient_storeIdentifier(this.__wbg_ptr);
|
|
22580
|
-
var ptr1 = ret[0];
|
|
22581
|
-
var len1 = ret[1];
|
|
22582
|
-
if (ret[3]) {
|
|
22583
|
-
ptr1 = 0; len1 = 0;
|
|
22584
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
22585
|
-
}
|
|
22586
|
-
deferred2_0 = ptr1;
|
|
22587
|
-
deferred2_1 = len1;
|
|
22588
|
-
return getStringFromWasm0(ptr1, len1);
|
|
22589
|
-
} finally {
|
|
22590
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
22591
|
-
}
|
|
22885
|
+
const ret = wasm.webclient_storeIdentifier(this.__wbg_ptr);
|
|
22886
|
+
return ret;
|
|
22592
22887
|
}
|
|
22593
22888
|
/**
|
|
22594
22889
|
* Executes a transaction specified by the request against the specified account,
|
|
@@ -22654,11 +22949,11 @@ class WebClient {
|
|
|
22654
22949
|
return ret;
|
|
22655
22950
|
}
|
|
22656
22951
|
/**
|
|
22657
|
-
* @returns {boolean}
|
|
22952
|
+
* @returns {Promise<boolean>}
|
|
22658
22953
|
*/
|
|
22659
22954
|
usesMockChain() {
|
|
22660
22955
|
const ret = wasm.webclient_usesMockChain(this.__wbg_ptr);
|
|
22661
|
-
return ret
|
|
22956
|
+
return ret;
|
|
22662
22957
|
}
|
|
22663
22958
|
}
|
|
22664
22959
|
if (Symbol.dispose) WebClient.prototype[Symbol.dispose] = WebClient.prototype.free;
|
|
@@ -22783,7 +23078,6 @@ class Word {
|
|
|
22783
23078
|
}
|
|
22784
23079
|
/**
|
|
22785
23080
|
* Creates a Word from a hex string.
|
|
22786
|
-
* Fails if the provided string is not a valid hex representation of a Word.
|
|
22787
23081
|
* @param {string} hex
|
|
22788
23082
|
* @returns {Word}
|
|
22789
23083
|
*/
|
|
@@ -22797,14 +23091,21 @@ class Word {
|
|
|
22797
23091
|
return Word.__wrap(ret[0]);
|
|
22798
23092
|
}
|
|
22799
23093
|
/**
|
|
22800
|
-
* Creates a word from four
|
|
23094
|
+
* Creates a word from four numeric values.
|
|
23095
|
+
*
|
|
23096
|
+
* Each input must be a canonical field element, i.e. strictly less than the field modulus.
|
|
23097
|
+
* `Felt::new` (now fallible on the 0.15 surface) errors out on inputs at or beyond the
|
|
23098
|
+
* modulus; the error is surfaced to JS.
|
|
22801
23099
|
* @param {BigUint64Array} u64_vec
|
|
22802
23100
|
*/
|
|
22803
23101
|
constructor(u64_vec) {
|
|
22804
23102
|
const ptr0 = passArray64ToWasm0(u64_vec, wasm.__wbindgen_malloc);
|
|
22805
23103
|
const len0 = WASM_VECTOR_LEN;
|
|
22806
23104
|
const ret = wasm.word_new(ptr0, len0);
|
|
22807
|
-
|
|
23105
|
+
if (ret[2]) {
|
|
23106
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
23107
|
+
}
|
|
23108
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
22808
23109
|
WordFinalization.register(this, this.__wbg_ptr, this);
|
|
22809
23110
|
return this;
|
|
22810
23111
|
}
|
|
@@ -22854,7 +23155,7 @@ class Word {
|
|
|
22854
23155
|
}
|
|
22855
23156
|
}
|
|
22856
23157
|
/**
|
|
22857
|
-
* Returns the word as an array of
|
|
23158
|
+
* Returns the word as an array of numeric values.
|
|
22858
23159
|
* @returns {BigUint64Array}
|
|
22859
23160
|
*/
|
|
22860
23161
|
toU64s() {
|
|
@@ -23004,7 +23305,7 @@ class wbg_rayon_PoolBuilder {
|
|
|
23004
23305
|
* @returns {number}
|
|
23005
23306
|
*/
|
|
23006
23307
|
numThreads() {
|
|
23007
|
-
const ret = wasm.
|
|
23308
|
+
const ret = wasm.storagemapinfo_blockNumber(this.__wbg_ptr);
|
|
23008
23309
|
return ret >>> 0;
|
|
23009
23310
|
}
|
|
23010
23311
|
/**
|
|
@@ -23162,6 +23463,10 @@ function __wbg_get_imports(memory) {
|
|
|
23162
23463
|
const ret = AccountProof.__wrap(arg0);
|
|
23163
23464
|
return ret;
|
|
23164
23465
|
},
|
|
23466
|
+
__wbg_accountreader_new: function(arg0) {
|
|
23467
|
+
const ret = AccountReader.__wrap(arg0);
|
|
23468
|
+
return ret;
|
|
23469
|
+
},
|
|
23165
23470
|
__wbg_accountstatus_new: function(arg0) {
|
|
23166
23471
|
const ret = AccountStatus.__wrap(arg0);
|
|
23167
23472
|
return ret;
|
|
@@ -23170,7 +23475,7 @@ function __wbg_get_imports(memory) {
|
|
|
23170
23475
|
const ret = AccountStorage.__wrap(arg0);
|
|
23171
23476
|
return ret;
|
|
23172
23477
|
},
|
|
23173
|
-
|
|
23478
|
+
__wbg_addNoteTag_40dad1e41d8a6415: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
23174
23479
|
var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
|
|
23175
23480
|
wasm.__wbindgen_free(arg2, arg3 * 1, 1);
|
|
23176
23481
|
let v1;
|
|
@@ -23193,15 +23498,15 @@ function __wbg_get_imports(memory) {
|
|
|
23193
23498
|
__wbg_append_a992ccc37aa62dc4: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
23194
23499
|
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
23195
23500
|
}, arguments); },
|
|
23196
|
-
|
|
23501
|
+
__wbg_applyFullAccountState_0f46ca4819ec19a2: function(arg0, arg1, arg2) {
|
|
23197
23502
|
const ret = applyFullAccountState(getStringFromWasm0(arg0, arg1), JsAccountUpdate.__wrap(arg2));
|
|
23198
23503
|
return ret;
|
|
23199
23504
|
},
|
|
23200
|
-
|
|
23505
|
+
__wbg_applyStateSync_4577b4125b70be6e: function(arg0, arg1, arg2) {
|
|
23201
23506
|
const ret = applyStateSync(getStringFromWasm0(arg0, arg1), JsStateSyncUpdate.__wrap(arg2));
|
|
23202
23507
|
return ret;
|
|
23203
23508
|
},
|
|
23204
|
-
|
|
23509
|
+
__wbg_applyTransactionDelta_956ac5d25a74f4f2: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20) {
|
|
23205
23510
|
let deferred0_0;
|
|
23206
23511
|
let deferred0_1;
|
|
23207
23512
|
let deferred1_0;
|
|
@@ -23318,6 +23623,10 @@ function __wbg_get_imports(memory) {
|
|
|
23318
23623
|
__wbg_close_a79afee31de55b36: function() { return handleError(function (arg0) {
|
|
23319
23624
|
arg0.close();
|
|
23320
23625
|
}, arguments); },
|
|
23626
|
+
__wbg_codebuilder_new: function(arg0) {
|
|
23627
|
+
const ret = CodeBuilder.__wrap(arg0);
|
|
23628
|
+
return ret;
|
|
23629
|
+
},
|
|
23321
23630
|
__wbg_committednote_new: function(arg0) {
|
|
23322
23631
|
const ret = CommittedNote.__wrap(arg0);
|
|
23323
23632
|
return ret;
|
|
@@ -23348,7 +23657,7 @@ function __wbg_get_imports(memory) {
|
|
|
23348
23657
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
23349
23658
|
}
|
|
23350
23659
|
},
|
|
23351
|
-
|
|
23660
|
+
__wbg_exportStore_6122bc835ba1335e: function(arg0, arg1) {
|
|
23352
23661
|
const ret = exportStore(getStringFromWasm0(arg0, arg1));
|
|
23353
23662
|
return ret;
|
|
23354
23663
|
},
|
|
@@ -23380,7 +23689,7 @@ function __wbg_get_imports(memory) {
|
|
|
23380
23689
|
const ret = FetchedNote.__wrap(arg0);
|
|
23381
23690
|
return ret;
|
|
23382
23691
|
},
|
|
23383
|
-
|
|
23692
|
+
__wbg_forceImportStore_fee039594a1dd764: function(arg0, arg1, arg2) {
|
|
23384
23693
|
const ret = forceImportStore(getStringFromWasm0(arg0, arg1), arg2);
|
|
23385
23694
|
return ret;
|
|
23386
23695
|
},
|
|
@@ -23400,7 +23709,7 @@ function __wbg_get_imports(memory) {
|
|
|
23400
23709
|
const ret = FungibleAssetDeltaItem.__wrap(arg0);
|
|
23401
23710
|
return ret;
|
|
23402
23711
|
},
|
|
23403
|
-
|
|
23712
|
+
__wbg_getAccountAddresses_c2905210853e4c1d: function(arg0, arg1, arg2, arg3) {
|
|
23404
23713
|
let deferred0_0;
|
|
23405
23714
|
let deferred0_1;
|
|
23406
23715
|
try {
|
|
@@ -23412,7 +23721,7 @@ function __wbg_get_imports(memory) {
|
|
|
23412
23721
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
23413
23722
|
}
|
|
23414
23723
|
},
|
|
23415
|
-
|
|
23724
|
+
__wbg_getAccountAuthByPubKeyCommitment_aa1c1ea910be8702: function(arg0, arg1, arg2, arg3) {
|
|
23416
23725
|
let deferred0_0;
|
|
23417
23726
|
let deferred0_1;
|
|
23418
23727
|
try {
|
|
@@ -23424,7 +23733,7 @@ function __wbg_get_imports(memory) {
|
|
|
23424
23733
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
23425
23734
|
}
|
|
23426
23735
|
},
|
|
23427
|
-
|
|
23736
|
+
__wbg_getAccountCode_624d99224830e698: function(arg0, arg1, arg2, arg3) {
|
|
23428
23737
|
let deferred0_0;
|
|
23429
23738
|
let deferred0_1;
|
|
23430
23739
|
try {
|
|
@@ -23436,7 +23745,7 @@ function __wbg_get_imports(memory) {
|
|
|
23436
23745
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
23437
23746
|
}
|
|
23438
23747
|
},
|
|
23439
|
-
|
|
23748
|
+
__wbg_getAccountHeaderByCommitment_87400f84a64deb6f: function(arg0, arg1, arg2, arg3) {
|
|
23440
23749
|
let deferred0_0;
|
|
23441
23750
|
let deferred0_1;
|
|
23442
23751
|
try {
|
|
@@ -23448,7 +23757,7 @@ function __wbg_get_imports(memory) {
|
|
|
23448
23757
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
23449
23758
|
}
|
|
23450
23759
|
},
|
|
23451
|
-
|
|
23760
|
+
__wbg_getAccountHeader_1bfe2e4c80c39a5a: function(arg0, arg1, arg2, arg3) {
|
|
23452
23761
|
let deferred0_0;
|
|
23453
23762
|
let deferred0_1;
|
|
23454
23763
|
try {
|
|
@@ -23460,7 +23769,7 @@ function __wbg_get_imports(memory) {
|
|
|
23460
23769
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
23461
23770
|
}
|
|
23462
23771
|
},
|
|
23463
|
-
|
|
23772
|
+
__wbg_getAccountIdByKeyCommitment_119e889c02d0a383: function(arg0, arg1, arg2, arg3) {
|
|
23464
23773
|
let deferred0_0;
|
|
23465
23774
|
let deferred0_1;
|
|
23466
23775
|
try {
|
|
@@ -23472,11 +23781,11 @@ function __wbg_get_imports(memory) {
|
|
|
23472
23781
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
23473
23782
|
}
|
|
23474
23783
|
},
|
|
23475
|
-
|
|
23784
|
+
__wbg_getAccountIds_b7c51b913d5bf21d: function(arg0, arg1) {
|
|
23476
23785
|
const ret = getAccountIds(getStringFromWasm0(arg0, arg1));
|
|
23477
23786
|
return ret;
|
|
23478
23787
|
},
|
|
23479
|
-
|
|
23788
|
+
__wbg_getAccountStorageMaps_ea32cd8cf6fc6297: function(arg0, arg1, arg2, arg3) {
|
|
23480
23789
|
let deferred0_0;
|
|
23481
23790
|
let deferred0_1;
|
|
23482
23791
|
try {
|
|
@@ -23488,7 +23797,7 @@ function __wbg_get_imports(memory) {
|
|
|
23488
23797
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
23489
23798
|
}
|
|
23490
23799
|
},
|
|
23491
|
-
|
|
23800
|
+
__wbg_getAccountStorage_277a00af1ae659dd: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
23492
23801
|
let deferred0_0;
|
|
23493
23802
|
let deferred0_1;
|
|
23494
23803
|
try {
|
|
@@ -23502,7 +23811,7 @@ function __wbg_get_imports(memory) {
|
|
|
23502
23811
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
23503
23812
|
}
|
|
23504
23813
|
},
|
|
23505
|
-
|
|
23814
|
+
__wbg_getAccountVaultAssets_e588f7c19992bf5a: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
23506
23815
|
let deferred0_0;
|
|
23507
23816
|
let deferred0_1;
|
|
23508
23817
|
try {
|
|
@@ -23516,23 +23825,27 @@ function __wbg_get_imports(memory) {
|
|
|
23516
23825
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
23517
23826
|
}
|
|
23518
23827
|
},
|
|
23519
|
-
|
|
23828
|
+
__wbg_getAllAccountHeaders_cc5df55ad899e5ca: function(arg0, arg1) {
|
|
23520
23829
|
const ret = getAllAccountHeaders(getStringFromWasm0(arg0, arg1));
|
|
23521
23830
|
return ret;
|
|
23522
23831
|
},
|
|
23523
|
-
|
|
23832
|
+
__wbg_getBlockHeaders_08a8804e4b3ff442: function(arg0, arg1, arg2, arg3) {
|
|
23524
23833
|
var v0 = getArrayU32FromWasm0(arg2, arg3).slice();
|
|
23525
23834
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
23526
23835
|
const ret = getBlockHeaders(getStringFromWasm0(arg0, arg1), v0);
|
|
23527
23836
|
return ret;
|
|
23528
23837
|
},
|
|
23529
|
-
|
|
23838
|
+
__wbg_getCurrentBlockchainPeaks_f0d990ec54236a85: function(arg0, arg1) {
|
|
23839
|
+
const ret = getCurrentBlockchainPeaks(getStringFromWasm0(arg0, arg1));
|
|
23840
|
+
return ret;
|
|
23841
|
+
},
|
|
23842
|
+
__wbg_getForeignAccountCode_d4d803c5248469e8: function(arg0, arg1, arg2, arg3) {
|
|
23530
23843
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
23531
23844
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
23532
23845
|
const ret = getForeignAccountCode(getStringFromWasm0(arg0, arg1), v0);
|
|
23533
23846
|
return ret;
|
|
23534
23847
|
},
|
|
23535
|
-
|
|
23848
|
+
__wbg_getInputNoteByOffset_a1163c6c190c7bc0: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
|
|
23536
23849
|
let deferred1_0;
|
|
23537
23850
|
let deferred1_1;
|
|
23538
23851
|
try {
|
|
@@ -23546,25 +23859,25 @@ function __wbg_get_imports(memory) {
|
|
|
23546
23859
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
23547
23860
|
}
|
|
23548
23861
|
},
|
|
23549
|
-
|
|
23862
|
+
__wbg_getInputNotesFromIds_c19092f0da179fdf: function(arg0, arg1, arg2, arg3) {
|
|
23550
23863
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
23551
23864
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
23552
23865
|
const ret = getInputNotesFromIds(getStringFromWasm0(arg0, arg1), v0);
|
|
23553
23866
|
return ret;
|
|
23554
23867
|
},
|
|
23555
|
-
|
|
23868
|
+
__wbg_getInputNotesFromNullifiers_ef5e3e241e8f14b9: function(arg0, arg1, arg2, arg3) {
|
|
23556
23869
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
23557
23870
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
23558
23871
|
const ret = getInputNotesFromNullifiers(getStringFromWasm0(arg0, arg1), v0);
|
|
23559
23872
|
return ret;
|
|
23560
23873
|
},
|
|
23561
|
-
|
|
23874
|
+
__wbg_getInputNotes_9a2890b2c05db53e: function(arg0, arg1, arg2, arg3) {
|
|
23562
23875
|
var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
|
|
23563
23876
|
wasm.__wbindgen_free(arg2, arg3 * 1, 1);
|
|
23564
23877
|
const ret = getInputNotes(getStringFromWasm0(arg0, arg1), v0);
|
|
23565
23878
|
return ret;
|
|
23566
23879
|
},
|
|
23567
|
-
|
|
23880
|
+
__wbg_getKeyCommitmentsByAccountId_98d1052aa93e54d1: function(arg0, arg1, arg2, arg3) {
|
|
23568
23881
|
let deferred0_0;
|
|
23569
23882
|
let deferred0_1;
|
|
23570
23883
|
try {
|
|
@@ -23576,7 +23889,7 @@ function __wbg_get_imports(memory) {
|
|
|
23576
23889
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
23577
23890
|
}
|
|
23578
23891
|
},
|
|
23579
|
-
|
|
23892
|
+
__wbg_getNoteScript_f33c8718fc90d2c4: function(arg0, arg1, arg2, arg3) {
|
|
23580
23893
|
let deferred0_0;
|
|
23581
23894
|
let deferred0_1;
|
|
23582
23895
|
try {
|
|
@@ -23588,33 +23901,33 @@ function __wbg_get_imports(memory) {
|
|
|
23588
23901
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
23589
23902
|
}
|
|
23590
23903
|
},
|
|
23591
|
-
|
|
23904
|
+
__wbg_getNoteTags_e2ed88e636d0ad2a: function(arg0, arg1) {
|
|
23592
23905
|
const ret = getNoteTags(getStringFromWasm0(arg0, arg1));
|
|
23593
23906
|
return ret;
|
|
23594
23907
|
},
|
|
23595
|
-
|
|
23908
|
+
__wbg_getOutputNotesFromIds_1cfcb787c56927d6: function(arg0, arg1, arg2, arg3) {
|
|
23596
23909
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
23597
23910
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
23598
23911
|
const ret = getOutputNotesFromIds(getStringFromWasm0(arg0, arg1), v0);
|
|
23599
23912
|
return ret;
|
|
23600
23913
|
},
|
|
23601
|
-
|
|
23914
|
+
__wbg_getOutputNotesFromNullifiers_ab2d0529c918ceb6: function(arg0, arg1, arg2, arg3) {
|
|
23602
23915
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
23603
23916
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
23604
23917
|
const ret = getOutputNotesFromNullifiers(getStringFromWasm0(arg0, arg1), v0);
|
|
23605
23918
|
return ret;
|
|
23606
23919
|
},
|
|
23607
|
-
|
|
23920
|
+
__wbg_getOutputNotes_3ce2621bbaa0b67a: function(arg0, arg1, arg2, arg3) {
|
|
23608
23921
|
var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
|
|
23609
23922
|
wasm.__wbindgen_free(arg2, arg3 * 1, 1);
|
|
23610
23923
|
const ret = getOutputNotes(getStringFromWasm0(arg0, arg1), v0);
|
|
23611
23924
|
return ret;
|
|
23612
23925
|
},
|
|
23613
|
-
|
|
23926
|
+
__wbg_getPartialBlockchainNodesAll_97b2296b6f446165: function(arg0, arg1) {
|
|
23614
23927
|
const ret = getPartialBlockchainNodesAll(getStringFromWasm0(arg0, arg1));
|
|
23615
23928
|
return ret;
|
|
23616
23929
|
},
|
|
23617
|
-
|
|
23930
|
+
__wbg_getPartialBlockchainNodesUpToInOrderIndex_a00a947793bcac3c: function(arg0, arg1, arg2, arg3) {
|
|
23618
23931
|
let deferred0_0;
|
|
23619
23932
|
let deferred0_1;
|
|
23620
23933
|
try {
|
|
@@ -23626,16 +23939,12 @@ function __wbg_get_imports(memory) {
|
|
|
23626
23939
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
23627
23940
|
}
|
|
23628
23941
|
},
|
|
23629
|
-
|
|
23942
|
+
__wbg_getPartialBlockchainNodes_ed95c0aed168e0bd: function(arg0, arg1, arg2, arg3) {
|
|
23630
23943
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
23631
23944
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
23632
23945
|
const ret = getPartialBlockchainNodes(getStringFromWasm0(arg0, arg1), v0);
|
|
23633
23946
|
return ret;
|
|
23634
23947
|
},
|
|
23635
|
-
__wbg_getPartialBlockchainPeaksByBlockNum_5a9240ed1087ee15: function(arg0, arg1, arg2) {
|
|
23636
|
-
const ret = getPartialBlockchainPeaksByBlockNum(getStringFromWasm0(arg0, arg1), arg2 >>> 0);
|
|
23637
|
-
return ret;
|
|
23638
|
-
},
|
|
23639
23948
|
__wbg_getRandomValues_ea728b1d79dae146: function() { return handleError(function (arg0) {
|
|
23640
23949
|
globalThis.crypto.getRandomValues(arg0);
|
|
23641
23950
|
}, arguments); },
|
|
@@ -23643,7 +23952,7 @@ function __wbg_get_imports(memory) {
|
|
|
23643
23952
|
const ret = arg0.getReader();
|
|
23644
23953
|
return ret;
|
|
23645
23954
|
}, arguments); },
|
|
23646
|
-
|
|
23955
|
+
__wbg_getSetting_ae10044e2d623298: function(arg0, arg1, arg2, arg3) {
|
|
23647
23956
|
let deferred0_0;
|
|
23648
23957
|
let deferred0_1;
|
|
23649
23958
|
try {
|
|
@@ -23655,7 +23964,7 @@ function __wbg_get_imports(memory) {
|
|
|
23655
23964
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
23656
23965
|
}
|
|
23657
23966
|
},
|
|
23658
|
-
|
|
23967
|
+
__wbg_getSyncHeight_58fc6088ffc73f66: function(arg0, arg1) {
|
|
23659
23968
|
const ret = getSyncHeight(getStringFromWasm0(arg0, arg1));
|
|
23660
23969
|
return ret;
|
|
23661
23970
|
},
|
|
@@ -23663,15 +23972,15 @@ function __wbg_get_imports(memory) {
|
|
|
23663
23972
|
const ret = arg0.getTime();
|
|
23664
23973
|
return ret;
|
|
23665
23974
|
},
|
|
23666
|
-
|
|
23975
|
+
__wbg_getTrackedBlockHeaderNumbers_5ff16c5dbe739bda: function(arg0, arg1) {
|
|
23667
23976
|
const ret = getTrackedBlockHeaderNumbers(getStringFromWasm0(arg0, arg1));
|
|
23668
23977
|
return ret;
|
|
23669
23978
|
},
|
|
23670
|
-
|
|
23979
|
+
__wbg_getTrackedBlockHeaders_b20d19487c2d6df9: function(arg0, arg1) {
|
|
23671
23980
|
const ret = getTrackedBlockHeaders(getStringFromWasm0(arg0, arg1));
|
|
23672
23981
|
return ret;
|
|
23673
23982
|
},
|
|
23674
|
-
|
|
23983
|
+
__wbg_getTransactions_162de0ea1d0f2668: function(arg0, arg1, arg2, arg3) {
|
|
23675
23984
|
let deferred0_0;
|
|
23676
23985
|
let deferred0_1;
|
|
23677
23986
|
try {
|
|
@@ -23683,7 +23992,7 @@ function __wbg_get_imports(memory) {
|
|
|
23683
23992
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
23684
23993
|
}
|
|
23685
23994
|
},
|
|
23686
|
-
|
|
23995
|
+
__wbg_getUnspentInputNoteNullifiers_252553121097b242: function(arg0, arg1) {
|
|
23687
23996
|
const ret = getUnspentInputNoteNullifiers(getStringFromWasm0(arg0, arg1));
|
|
23688
23997
|
return ret;
|
|
23689
23998
|
},
|
|
@@ -23727,7 +24036,7 @@ function __wbg_get_imports(memory) {
|
|
|
23727
24036
|
const ret = InputNoteRecord.__wrap(arg0);
|
|
23728
24037
|
return ret;
|
|
23729
24038
|
},
|
|
23730
|
-
|
|
24039
|
+
__wbg_insertAccountAddress_a6b2f038c55aee0a: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
23731
24040
|
let deferred0_0;
|
|
23732
24041
|
let deferred0_1;
|
|
23733
24042
|
try {
|
|
@@ -23741,7 +24050,7 @@ function __wbg_get_imports(memory) {
|
|
|
23741
24050
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
23742
24051
|
}
|
|
23743
24052
|
},
|
|
23744
|
-
|
|
24053
|
+
__wbg_insertAccountAuth_adb2bbf98e1c34d4: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
23745
24054
|
let deferred0_0;
|
|
23746
24055
|
let deferred0_1;
|
|
23747
24056
|
let deferred1_0;
|
|
@@ -23758,7 +24067,7 @@ function __wbg_get_imports(memory) {
|
|
|
23758
24067
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
23759
24068
|
}
|
|
23760
24069
|
},
|
|
23761
|
-
|
|
24070
|
+
__wbg_insertAccountKeyMapping_47e616ac5977fb9c: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
23762
24071
|
let deferred0_0;
|
|
23763
24072
|
let deferred0_1;
|
|
23764
24073
|
let deferred1_0;
|
|
@@ -23775,15 +24084,13 @@ function __wbg_get_imports(memory) {
|
|
|
23775
24084
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
23776
24085
|
}
|
|
23777
24086
|
},
|
|
23778
|
-
|
|
24087
|
+
__wbg_insertBlockHeader_23b7b30d0614926f: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
23779
24088
|
var v0 = getArrayU8FromWasm0(arg3, arg4).slice();
|
|
23780
24089
|
wasm.__wbindgen_free(arg3, arg4 * 1, 1);
|
|
23781
|
-
|
|
23782
|
-
wasm.__wbindgen_free(arg5, arg6 * 1, 1);
|
|
23783
|
-
const ret = insertBlockHeader(getStringFromWasm0(arg0, arg1), arg2 >>> 0, v0, v1, arg7 !== 0);
|
|
24090
|
+
const ret = insertBlockHeader(getStringFromWasm0(arg0, arg1), arg2 >>> 0, v0, arg5 !== 0);
|
|
23784
24091
|
return ret;
|
|
23785
24092
|
},
|
|
23786
|
-
|
|
24093
|
+
__wbg_insertPartialBlockchainNodes_403400ec217229f2: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
23787
24094
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
23788
24095
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
23789
24096
|
var v1 = getArrayJsValueFromWasm0(arg4, arg5).slice();
|
|
@@ -23791,7 +24098,7 @@ function __wbg_get_imports(memory) {
|
|
|
23791
24098
|
const ret = insertPartialBlockchainNodes(getStringFromWasm0(arg0, arg1), v0, v1);
|
|
23792
24099
|
return ret;
|
|
23793
24100
|
},
|
|
23794
|
-
|
|
24101
|
+
__wbg_insertSetting_fcdab04463e418b0: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
23795
24102
|
let deferred0_0;
|
|
23796
24103
|
let deferred0_1;
|
|
23797
24104
|
try {
|
|
@@ -23805,7 +24112,7 @@ function __wbg_get_imports(memory) {
|
|
|
23805
24112
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
23806
24113
|
}
|
|
23807
24114
|
},
|
|
23808
|
-
|
|
24115
|
+
__wbg_insertTransactionScript_a97df45bc8841578: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
23809
24116
|
var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
|
|
23810
24117
|
wasm.__wbindgen_free(arg2, arg3 * 1, 1);
|
|
23811
24118
|
let v1;
|
|
@@ -23908,11 +24215,11 @@ function __wbg_get_imports(memory) {
|
|
|
23908
24215
|
const ret = arg0.length;
|
|
23909
24216
|
return ret;
|
|
23910
24217
|
},
|
|
23911
|
-
|
|
24218
|
+
__wbg_listSettingKeys_aa9e036a0e93602e: function(arg0, arg1) {
|
|
23912
24219
|
const ret = listSettingKeys(getStringFromWasm0(arg0, arg1));
|
|
23913
24220
|
return ret;
|
|
23914
24221
|
},
|
|
23915
|
-
|
|
24222
|
+
__wbg_lockAccount_00786cae6f7ea636: function(arg0, arg1, arg2, arg3) {
|
|
23916
24223
|
let deferred0_0;
|
|
23917
24224
|
let deferred0_1;
|
|
23918
24225
|
try {
|
|
@@ -23965,6 +24272,10 @@ function __wbg_get_imports(memory) {
|
|
|
23965
24272
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
23966
24273
|
}
|
|
23967
24274
|
}, arguments); },
|
|
24275
|
+
__wbg_networknotestatusinfo_new: function(arg0) {
|
|
24276
|
+
const ret = NetworkNoteStatusInfo.__wrap(arg0);
|
|
24277
|
+
return ret;
|
|
24278
|
+
},
|
|
23968
24279
|
__wbg_new_0_73afc35eb544e539: function() {
|
|
23969
24280
|
const ret = new Date();
|
|
23970
24281
|
return ret;
|
|
@@ -24004,7 +24315,7 @@ function __wbg_get_imports(memory) {
|
|
|
24004
24315
|
const a = state0.a;
|
|
24005
24316
|
state0.a = 0;
|
|
24006
24317
|
try {
|
|
24007
|
-
return
|
|
24318
|
+
return wasm_bindgen_9615981aab4586b0___convert__closures_____invoke___wasm_bindgen_9615981aab4586b0___JsValue__wasm_bindgen_9615981aab4586b0___JsValue_____(a, state0.b, arg0, arg1);
|
|
24008
24319
|
} finally {
|
|
24009
24320
|
state0.a = a;
|
|
24010
24321
|
}
|
|
@@ -24063,6 +24374,10 @@ function __wbg_get_imports(memory) {
|
|
|
24063
24374
|
const ret = NoteAndArgs.__unwrap(arg0);
|
|
24064
24375
|
return ret;
|
|
24065
24376
|
},
|
|
24377
|
+
__wbg_noteattachment_new: function(arg0) {
|
|
24378
|
+
const ret = NoteAttachment.__wrap(arg0);
|
|
24379
|
+
return ret;
|
|
24380
|
+
},
|
|
24066
24381
|
__wbg_noteconsumability_new: function(arg0) {
|
|
24067
24382
|
const ret = NoteConsumability.__wrap(arg0);
|
|
24068
24383
|
return ret;
|
|
@@ -24119,7 +24434,7 @@ function __wbg_get_imports(memory) {
|
|
|
24119
24434
|
const ret = Array.of(arg0, arg1, arg2);
|
|
24120
24435
|
return ret;
|
|
24121
24436
|
},
|
|
24122
|
-
|
|
24437
|
+
__wbg_openDatabase_8cdde169e05fa396: function(arg0, arg1, arg2, arg3) {
|
|
24123
24438
|
const ret = openDatabase(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
|
|
24124
24439
|
return ret;
|
|
24125
24440
|
},
|
|
@@ -24153,7 +24468,7 @@ function __wbg_get_imports(memory) {
|
|
|
24153
24468
|
const ret = ProvenTransaction.__wrap(arg0);
|
|
24154
24469
|
return ret;
|
|
24155
24470
|
},
|
|
24156
|
-
|
|
24471
|
+
__wbg_pruneAccountHistory_77197f52f4287754: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
24157
24472
|
let deferred0_0;
|
|
24158
24473
|
let deferred0_1;
|
|
24159
24474
|
let deferred1_0;
|
|
@@ -24170,8 +24485,12 @@ function __wbg_get_imports(memory) {
|
|
|
24170
24485
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
24171
24486
|
}
|
|
24172
24487
|
},
|
|
24173
|
-
|
|
24174
|
-
|
|
24488
|
+
__wbg_pruneIrrelevantBlocks_649b0446c426cb86: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
24489
|
+
var v0 = getArrayU32FromWasm0(arg2, arg3).slice();
|
|
24490
|
+
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
24491
|
+
var v1 = getArrayJsValueFromWasm0(arg4, arg5).slice();
|
|
24492
|
+
wasm.__wbindgen_free(arg4, arg5 * 4, 4);
|
|
24493
|
+
const ret = pruneIrrelevantBlocks(getStringFromWasm0(arg0, arg1), v0, v1);
|
|
24175
24494
|
return ret;
|
|
24176
24495
|
},
|
|
24177
24496
|
__wbg_queueMicrotask_0aa0a927f78f5d98: function(arg0) {
|
|
@@ -24188,13 +24507,13 @@ function __wbg_get_imports(memory) {
|
|
|
24188
24507
|
__wbg_releaseLock_aa5846c2494b3032: function(arg0) {
|
|
24189
24508
|
arg0.releaseLock();
|
|
24190
24509
|
},
|
|
24191
|
-
|
|
24510
|
+
__wbg_removeAccountAddress_fc888f883a71bd4f: function(arg0, arg1, arg2, arg3) {
|
|
24192
24511
|
var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
|
|
24193
24512
|
wasm.__wbindgen_free(arg2, arg3 * 1, 1);
|
|
24194
24513
|
const ret = removeAccountAddress(getStringFromWasm0(arg0, arg1), v0);
|
|
24195
24514
|
return ret;
|
|
24196
24515
|
},
|
|
24197
|
-
|
|
24516
|
+
__wbg_removeAccountAuth_8f11e01dd6099b42: function(arg0, arg1, arg2, arg3) {
|
|
24198
24517
|
let deferred0_0;
|
|
24199
24518
|
let deferred0_1;
|
|
24200
24519
|
try {
|
|
@@ -24206,7 +24525,7 @@ function __wbg_get_imports(memory) {
|
|
|
24206
24525
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24207
24526
|
}
|
|
24208
24527
|
},
|
|
24209
|
-
|
|
24528
|
+
__wbg_removeAllMappingsForKey_1fd0c55cb2cd0b61: function(arg0, arg1, arg2, arg3) {
|
|
24210
24529
|
let deferred0_0;
|
|
24211
24530
|
let deferred0_1;
|
|
24212
24531
|
try {
|
|
@@ -24218,7 +24537,7 @@ function __wbg_get_imports(memory) {
|
|
|
24218
24537
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24219
24538
|
}
|
|
24220
24539
|
},
|
|
24221
|
-
|
|
24540
|
+
__wbg_removeNoteTag_77e6e3497d921600: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
24222
24541
|
var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
|
|
24223
24542
|
wasm.__wbindgen_free(arg2, arg3 * 1, 1);
|
|
24224
24543
|
let v1;
|
|
@@ -24234,7 +24553,7 @@ function __wbg_get_imports(memory) {
|
|
|
24234
24553
|
const ret = removeNoteTag(getStringFromWasm0(arg0, arg1), v0, v1, v2);
|
|
24235
24554
|
return ret;
|
|
24236
24555
|
},
|
|
24237
|
-
|
|
24556
|
+
__wbg_removeSetting_39da4a2d256af0e2: function(arg0, arg1, arg2, arg3) {
|
|
24238
24557
|
let deferred0_0;
|
|
24239
24558
|
let deferred0_1;
|
|
24240
24559
|
try {
|
|
@@ -24377,6 +24696,10 @@ function __wbg_get_imports(memory) {
|
|
|
24377
24696
|
const ret = StorageMapEntry.__wrap(arg0);
|
|
24378
24697
|
return ret;
|
|
24379
24698
|
},
|
|
24699
|
+
__wbg_storagemapentryjs_new: function(arg0) {
|
|
24700
|
+
const ret = StorageMapEntryJs.__wrap(arg0);
|
|
24701
|
+
return ret;
|
|
24702
|
+
},
|
|
24380
24703
|
__wbg_storagemapinfo_new: function(arg0) {
|
|
24381
24704
|
const ret = StorageMapInfo.__wrap(arg0);
|
|
24382
24705
|
return ret;
|
|
@@ -24417,6 +24740,10 @@ function __wbg_get_imports(memory) {
|
|
|
24417
24740
|
const ret = TransactionRecord.__wrap(arg0);
|
|
24418
24741
|
return ret;
|
|
24419
24742
|
},
|
|
24743
|
+
__wbg_transactionrequest_new: function(arg0) {
|
|
24744
|
+
const ret = TransactionRequest.__wrap(arg0);
|
|
24745
|
+
return ret;
|
|
24746
|
+
},
|
|
24420
24747
|
__wbg_transactionresult_new: function(arg0) {
|
|
24421
24748
|
const ret = TransactionResult.__wrap(arg0);
|
|
24422
24749
|
return ret;
|
|
@@ -24433,13 +24760,13 @@ function __wbg_get_imports(memory) {
|
|
|
24433
24760
|
const ret = TransactionSummary.__wrap(arg0);
|
|
24434
24761
|
return ret;
|
|
24435
24762
|
},
|
|
24436
|
-
|
|
24763
|
+
__wbg_undoAccountStates_e36a3027b0d94828: function(arg0, arg1, arg2, arg3) {
|
|
24437
24764
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
24438
24765
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
24439
24766
|
const ret = undoAccountStates(getStringFromWasm0(arg0, arg1), v0);
|
|
24440
24767
|
return ret;
|
|
24441
24768
|
},
|
|
24442
|
-
|
|
24769
|
+
__wbg_upsertAccountCode_a57f0b2098ba7190: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
24443
24770
|
let deferred0_0;
|
|
24444
24771
|
let deferred0_1;
|
|
24445
24772
|
try {
|
|
@@ -24453,7 +24780,7 @@ function __wbg_get_imports(memory) {
|
|
|
24453
24780
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24454
24781
|
}
|
|
24455
24782
|
},
|
|
24456
|
-
|
|
24783
|
+
__wbg_upsertAccountRecord_3fb1a14436632f21: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16) {
|
|
24457
24784
|
let deferred0_0;
|
|
24458
24785
|
let deferred0_1;
|
|
24459
24786
|
let deferred1_0;
|
|
@@ -24495,7 +24822,7 @@ function __wbg_get_imports(memory) {
|
|
|
24495
24822
|
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
24496
24823
|
}
|
|
24497
24824
|
},
|
|
24498
|
-
|
|
24825
|
+
__wbg_upsertAccountStorage_cd428602fca677b1: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
24499
24826
|
let deferred0_0;
|
|
24500
24827
|
let deferred0_1;
|
|
24501
24828
|
try {
|
|
@@ -24509,7 +24836,7 @@ function __wbg_get_imports(memory) {
|
|
|
24509
24836
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24510
24837
|
}
|
|
24511
24838
|
},
|
|
24512
|
-
|
|
24839
|
+
__wbg_upsertForeignAccountCode_ea1c872f50b83cf7: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
24513
24840
|
let deferred0_0;
|
|
24514
24841
|
let deferred0_1;
|
|
24515
24842
|
let deferred2_0;
|
|
@@ -24528,49 +24855,56 @@ function __wbg_get_imports(memory) {
|
|
|
24528
24855
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
24529
24856
|
}
|
|
24530
24857
|
},
|
|
24531
|
-
|
|
24858
|
+
__wbg_upsertInputNote_54c9d28ec61fd731: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22, arg23, arg24, arg25, arg26, arg27, arg28) {
|
|
24532
24859
|
let deferred0_0;
|
|
24533
24860
|
let deferred0_1;
|
|
24534
|
-
let deferred4_0;
|
|
24535
|
-
let deferred4_1;
|
|
24536
24861
|
let deferred6_0;
|
|
24537
24862
|
let deferred6_1;
|
|
24538
|
-
let
|
|
24539
|
-
let
|
|
24863
|
+
let deferred8_0;
|
|
24864
|
+
let deferred8_1;
|
|
24865
|
+
let deferred9_0;
|
|
24866
|
+
let deferred9_1;
|
|
24540
24867
|
try {
|
|
24541
24868
|
deferred0_0 = arg2;
|
|
24542
24869
|
deferred0_1 = arg3;
|
|
24543
|
-
|
|
24544
|
-
|
|
24870
|
+
let v1;
|
|
24871
|
+
if (arg4 !== 0) {
|
|
24872
|
+
v1 = getStringFromWasm0(arg4, arg5).slice();
|
|
24873
|
+
wasm.__wbindgen_free(arg4, arg5 * 1, 1);
|
|
24874
|
+
}
|
|
24545
24875
|
var v2 = getArrayU8FromWasm0(arg6, arg7).slice();
|
|
24546
24876
|
wasm.__wbindgen_free(arg6, arg7 * 1, 1);
|
|
24547
24877
|
var v3 = getArrayU8FromWasm0(arg8, arg9).slice();
|
|
24548
24878
|
wasm.__wbindgen_free(arg8, arg9 * 1, 1);
|
|
24549
|
-
|
|
24550
|
-
|
|
24879
|
+
var v4 = getArrayU8FromWasm0(arg10, arg11).slice();
|
|
24880
|
+
wasm.__wbindgen_free(arg10, arg11 * 1, 1);
|
|
24551
24881
|
var v5 = getArrayU8FromWasm0(arg12, arg13).slice();
|
|
24552
24882
|
wasm.__wbindgen_free(arg12, arg13 * 1, 1);
|
|
24553
24883
|
deferred6_0 = arg14;
|
|
24554
24884
|
deferred6_1 = arg15;
|
|
24555
|
-
|
|
24556
|
-
|
|
24557
|
-
|
|
24558
|
-
|
|
24559
|
-
|
|
24560
|
-
|
|
24561
|
-
|
|
24562
|
-
|
|
24885
|
+
var v7 = getArrayU8FromWasm0(arg16, arg17).slice();
|
|
24886
|
+
wasm.__wbindgen_free(arg16, arg17 * 1, 1);
|
|
24887
|
+
deferred8_0 = arg18;
|
|
24888
|
+
deferred8_1 = arg19;
|
|
24889
|
+
deferred9_0 = arg20;
|
|
24890
|
+
deferred9_1 = arg21;
|
|
24891
|
+
var v10 = getArrayU8FromWasm0(arg23, arg24).slice();
|
|
24892
|
+
wasm.__wbindgen_free(arg23, arg24 * 1, 1);
|
|
24893
|
+
let v11;
|
|
24894
|
+
if (arg27 !== 0) {
|
|
24895
|
+
v11 = getStringFromWasm0(arg27, arg28).slice();
|
|
24896
|
+
wasm.__wbindgen_free(arg27, arg28 * 1, 1);
|
|
24563
24897
|
}
|
|
24564
|
-
const ret = upsertInputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), v1, v2, v3, getStringFromWasm0(
|
|
24898
|
+
const ret = upsertInputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), v1, v2, v3, v4, v5, getStringFromWasm0(arg14, arg15), v7, getStringFromWasm0(arg18, arg19), getStringFromWasm0(arg20, arg21), arg22, v10, arg25 === 0x100000001 ? undefined : arg25, arg26 === 0x100000001 ? undefined : arg26, v11);
|
|
24565
24899
|
return ret;
|
|
24566
24900
|
} finally {
|
|
24567
24901
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24568
|
-
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
24569
24902
|
wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
|
|
24570
|
-
wasm.__wbindgen_free(
|
|
24903
|
+
wasm.__wbindgen_free(deferred8_0, deferred8_1, 1);
|
|
24904
|
+
wasm.__wbindgen_free(deferred9_0, deferred9_1, 1);
|
|
24571
24905
|
}
|
|
24572
24906
|
},
|
|
24573
|
-
|
|
24907
|
+
__wbg_upsertNoteScript_77ad6333fd8d09bd: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
24574
24908
|
let deferred0_0;
|
|
24575
24909
|
let deferred0_1;
|
|
24576
24910
|
try {
|
|
@@ -24584,35 +24918,37 @@ function __wbg_get_imports(memory) {
|
|
|
24584
24918
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24585
24919
|
}
|
|
24586
24920
|
},
|
|
24587
|
-
|
|
24921
|
+
__wbg_upsertOutputNote_086a8c1c81f11d3c: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17) {
|
|
24588
24922
|
let deferred0_0;
|
|
24589
24923
|
let deferred0_1;
|
|
24590
|
-
let
|
|
24591
|
-
let
|
|
24924
|
+
let deferred3_0;
|
|
24925
|
+
let deferred3_1;
|
|
24592
24926
|
try {
|
|
24593
24927
|
deferred0_0 = arg2;
|
|
24594
24928
|
deferred0_1 = arg3;
|
|
24595
24929
|
var v1 = getArrayU8FromWasm0(arg4, arg5).slice();
|
|
24596
24930
|
wasm.__wbindgen_free(arg4, arg5 * 1, 1);
|
|
24597
|
-
|
|
24598
|
-
|
|
24599
|
-
|
|
24600
|
-
|
|
24601
|
-
|
|
24602
|
-
|
|
24603
|
-
|
|
24604
|
-
|
|
24931
|
+
var v2 = getArrayU8FromWasm0(arg6, arg7).slice();
|
|
24932
|
+
wasm.__wbindgen_free(arg6, arg7 * 1, 1);
|
|
24933
|
+
deferred3_0 = arg8;
|
|
24934
|
+
deferred3_1 = arg9;
|
|
24935
|
+
var v4 = getArrayU8FromWasm0(arg10, arg11).slice();
|
|
24936
|
+
wasm.__wbindgen_free(arg10, arg11 * 1, 1);
|
|
24937
|
+
let v5;
|
|
24938
|
+
if (arg12 !== 0) {
|
|
24939
|
+
v5 = getStringFromWasm0(arg12, arg13).slice();
|
|
24940
|
+
wasm.__wbindgen_free(arg12, arg13 * 1, 1);
|
|
24605
24941
|
}
|
|
24606
|
-
var
|
|
24607
|
-
wasm.__wbindgen_free(
|
|
24608
|
-
const ret = upsertOutputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), v1, getStringFromWasm0(
|
|
24942
|
+
var v6 = getArrayU8FromWasm0(arg16, arg17).slice();
|
|
24943
|
+
wasm.__wbindgen_free(arg16, arg17 * 1, 1);
|
|
24944
|
+
const ret = upsertOutputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), v1, v2, getStringFromWasm0(arg8, arg9), v4, v5, arg14 >>> 0, arg15, v6);
|
|
24609
24945
|
return ret;
|
|
24610
24946
|
} finally {
|
|
24611
24947
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24612
|
-
wasm.__wbindgen_free(
|
|
24948
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
24613
24949
|
}
|
|
24614
24950
|
},
|
|
24615
|
-
|
|
24951
|
+
__wbg_upsertStorageMapEntries_068d8303824fff58: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
24616
24952
|
let deferred0_0;
|
|
24617
24953
|
let deferred0_1;
|
|
24618
24954
|
try {
|
|
@@ -24626,7 +24962,7 @@ function __wbg_get_imports(memory) {
|
|
|
24626
24962
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24627
24963
|
}
|
|
24628
24964
|
},
|
|
24629
|
-
|
|
24965
|
+
__wbg_upsertTransactionRecord_a285bd5d3fd5a278: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) {
|
|
24630
24966
|
let deferred0_0;
|
|
24631
24967
|
let deferred0_1;
|
|
24632
24968
|
try {
|
|
@@ -24647,7 +24983,7 @@ function __wbg_get_imports(memory) {
|
|
|
24647
24983
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24648
24984
|
}
|
|
24649
24985
|
},
|
|
24650
|
-
|
|
24986
|
+
__wbg_upsertVaultAssets_53ecfc329186db4e: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
24651
24987
|
let deferred0_0;
|
|
24652
24988
|
let deferred0_1;
|
|
24653
24989
|
try {
|
|
@@ -24690,18 +25026,18 @@ function __wbg_get_imports(memory) {
|
|
|
24690
25026
|
return ret;
|
|
24691
25027
|
},
|
|
24692
25028
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
24693
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
24694
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
25029
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 122, function: Function { arguments: [Externref], shim_idx: 123, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
25030
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_9615981aab4586b0___closure__destroy___dyn_core_91ed24bc3d45dfd0___ops__function__FnMut__wasm_bindgen_9615981aab4586b0___JsValue____Output_______, wasm_bindgen_9615981aab4586b0___convert__closures_____invoke___wasm_bindgen_9615981aab4586b0___JsValue_____);
|
|
24695
25031
|
return ret;
|
|
24696
25032
|
},
|
|
24697
25033
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
24698
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
24699
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
25034
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 122, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 123, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
25035
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_9615981aab4586b0___closure__destroy___dyn_core_91ed24bc3d45dfd0___ops__function__FnMut__wasm_bindgen_9615981aab4586b0___JsValue____Output_______, wasm_bindgen_9615981aab4586b0___convert__closures_____invoke___wasm_bindgen_9615981aab4586b0___JsValue_____);
|
|
24700
25036
|
return ret;
|
|
24701
25037
|
},
|
|
24702
25038
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
24703
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
24704
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
25039
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 122, function: Function { arguments: [], shim_idx: 444, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
25040
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_9615981aab4586b0___closure__destroy___dyn_core_91ed24bc3d45dfd0___ops__function__FnMut__wasm_bindgen_9615981aab4586b0___JsValue____Output_______, wasm_bindgen_9615981aab4586b0___convert__closures_____invoke______);
|
|
24705
25041
|
return ret;
|
|
24706
25042
|
},
|
|
24707
25043
|
__wbindgen_cast_0000000000000004: function(arg0) {
|
|
@@ -24812,7 +25148,7 @@ function __wbg_get_imports(memory) {
|
|
|
24812
25148
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
24813
25149
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
24814
25150
|
},
|
|
24815
|
-
memory: memory || new WebAssembly.Memory({initial:
|
|
25151
|
+
memory: memory || new WebAssembly.Memory({initial:59,maximum:65536,shared:true}),
|
|
24816
25152
|
};
|
|
24817
25153
|
return {
|
|
24818
25154
|
__proto__: null,
|
|
@@ -24820,16 +25156,16 @@ function __wbg_get_imports(memory) {
|
|
|
24820
25156
|
};
|
|
24821
25157
|
}
|
|
24822
25158
|
|
|
24823
|
-
function
|
|
24824
|
-
wasm.
|
|
25159
|
+
function wasm_bindgen_9615981aab4586b0___convert__closures_____invoke______(arg0, arg1) {
|
|
25160
|
+
wasm.wasm_bindgen_9615981aab4586b0___convert__closures_____invoke______(arg0, arg1);
|
|
24825
25161
|
}
|
|
24826
25162
|
|
|
24827
|
-
function
|
|
24828
|
-
wasm.
|
|
25163
|
+
function wasm_bindgen_9615981aab4586b0___convert__closures_____invoke___wasm_bindgen_9615981aab4586b0___JsValue_____(arg0, arg1, arg2) {
|
|
25164
|
+
wasm.wasm_bindgen_9615981aab4586b0___convert__closures_____invoke___wasm_bindgen_9615981aab4586b0___JsValue_____(arg0, arg1, arg2);
|
|
24829
25165
|
}
|
|
24830
25166
|
|
|
24831
|
-
function
|
|
24832
|
-
wasm.
|
|
25167
|
+
function wasm_bindgen_9615981aab4586b0___convert__closures_____invoke___wasm_bindgen_9615981aab4586b0___JsValue__wasm_bindgen_9615981aab4586b0___JsValue_____(arg0, arg1, arg2, arg3) {
|
|
25168
|
+
wasm.wasm_bindgen_9615981aab4586b0___convert__closures_____invoke___wasm_bindgen_9615981aab4586b0___JsValue__wasm_bindgen_9615981aab4586b0___JsValue_____(arg0, arg1, arg2, arg3);
|
|
24833
25169
|
}
|
|
24834
25170
|
|
|
24835
25171
|
|
|
@@ -25026,6 +25362,9 @@ const MerklePathFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
25026
25362
|
const NetworkIdFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
25027
25363
|
? { register: () => {}, unregister: () => {} }
|
|
25028
25364
|
: new FinalizationRegistry(ptr => wasm.__wbg_networkid_free(ptr >>> 0, 1));
|
|
25365
|
+
const NetworkNoteStatusInfoFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
25366
|
+
? { register: () => {}, unregister: () => {} }
|
|
25367
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_networknotestatusinfo_free(ptr >>> 0, 1));
|
|
25029
25368
|
const NoteFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
25030
25369
|
? { register: () => {}, unregister: () => {} }
|
|
25031
25370
|
: new FinalizationRegistry(ptr => wasm.__wbg_note_free(ptr >>> 0, 1));
|
|
@@ -25179,6 +25518,9 @@ const StorageMapFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
25179
25518
|
const StorageMapEntryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
25180
25519
|
? { register: () => {}, unregister: () => {} }
|
|
25181
25520
|
: new FinalizationRegistry(ptr => wasm.__wbg_storagemapentry_free(ptr >>> 0, 1));
|
|
25521
|
+
const StorageMapEntryJsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
25522
|
+
? { register: () => {}, unregister: () => {} }
|
|
25523
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_storagemapentryjs_free(ptr >>> 0, 1));
|
|
25182
25524
|
const StorageMapInfoFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
25183
25525
|
? { register: () => {}, unregister: () => {} }
|
|
25184
25526
|
: new FinalizationRegistry(ptr => wasm.__wbg_storagemapinfo_free(ptr >>> 0, 1));
|
|
@@ -25702,6 +26044,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
25702
26044
|
Library: Library,
|
|
25703
26045
|
MerklePath: MerklePath,
|
|
25704
26046
|
NetworkId: NetworkId,
|
|
26047
|
+
NetworkNoteStatusInfo: NetworkNoteStatusInfo,
|
|
25705
26048
|
NetworkType: NetworkType,
|
|
25706
26049
|
Note: Note,
|
|
25707
26050
|
NoteAndArgs: NoteAndArgs,
|
|
@@ -25709,7 +26052,6 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
25709
26052
|
NoteArray: NoteArray,
|
|
25710
26053
|
NoteAssets: NoteAssets,
|
|
25711
26054
|
NoteAttachment: NoteAttachment,
|
|
25712
|
-
NoteAttachmentKind: NoteAttachmentKind,
|
|
25713
26055
|
NoteAttachmentScheme: NoteAttachmentScheme,
|
|
25714
26056
|
NoteConsumability: NoteConsumability,
|
|
25715
26057
|
NoteConsumptionStatus: NoteConsumptionStatus,
|
|
@@ -25760,6 +26102,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
25760
26102
|
SparseMerklePath: SparseMerklePath,
|
|
25761
26103
|
StorageMap: StorageMap,
|
|
25762
26104
|
StorageMapEntry: StorageMapEntry,
|
|
26105
|
+
StorageMapEntryJs: StorageMapEntryJs,
|
|
25763
26106
|
StorageMapInfo: StorageMapInfo,
|
|
25764
26107
|
StorageMapUpdate: StorageMapUpdate,
|
|
25765
26108
|
StorageSlot: StorageSlot,
|
|
@@ -25799,5 +26142,5 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
25799
26142
|
});
|
|
25800
26143
|
|
|
25801
26144
|
const module$1 = new URL("assets/miden_client_web.wasm", import.meta.url);
|
|
25802
|
-
export { Account, AccountArray, AccountBuilder, AccountBuilderResult, AccountCode, AccountComponent, AccountComponentCode, AccountDelta, AccountFile, AccountHeader, AccountId, AccountIdArray, AccountInterface, AccountProof, AccountReader, AccountStatus, AccountStorage, AccountStorageDelta, AccountStorageMode, AccountStorageRequirements, AccountType, AccountVaultDelta, Address, AdviceInputs, AdviceMap, AssetVault, AuthFalcon512RpoMultisigConfig, AuthScheme, AuthSecretKey, BasicFungibleFaucetComponent, BlockHeader, CodeBuilder, CommittedNote, ConsumableNoteRecord, Endpoint, ExecutedTransaction, Felt, FeltArray, FetchedAccount, FetchedNote, FlattenedU8Vec, ForeignAccount, ForeignAccountArray, FungibleAsset, FungibleAssetDelta, FungibleAssetDeltaItem, GetProceduresResultItem, InputNote, InputNoteRecord, InputNoteState, InputNotes, IntoUnderlyingByteSource, IntoUnderlyingSink, IntoUnderlyingSource, JsAccountUpdate, JsStateSyncUpdate, JsStorageMapEntry, JsStorageSlot, JsVaultAsset, Library, MerklePath, NetworkId, NetworkType, Note, NoteAndArgs, NoteAndArgsArray, NoteArray, NoteAssets, NoteAttachment,
|
|
25803
|
-
//# sourceMappingURL=Cargo-
|
|
26145
|
+
export { Account, AccountArray, AccountBuilder, AccountBuilderResult, AccountCode, AccountComponent, AccountComponentCode, AccountDelta, AccountFile, AccountHeader, AccountId, AccountIdArray, AccountInterface, AccountProof, AccountReader, AccountStatus, AccountStorage, AccountStorageDelta, AccountStorageMode, AccountStorageRequirements, AccountType, AccountVaultDelta, Address, AdviceInputs, AdviceMap, AssetVault, AuthFalcon512RpoMultisigConfig, AuthScheme, AuthSecretKey, BasicFungibleFaucetComponent, BlockHeader, CodeBuilder, CommittedNote, ConsumableNoteRecord, Endpoint, ExecutedTransaction, Felt, FeltArray, FetchedAccount, FetchedNote, FlattenedU8Vec, ForeignAccount, ForeignAccountArray, FungibleAsset, FungibleAssetDelta, FungibleAssetDeltaItem, GetProceduresResultItem, InputNote, InputNoteRecord, InputNoteState, InputNotes, IntoUnderlyingByteSource, IntoUnderlyingSink, IntoUnderlyingSource, JsAccountUpdate, JsStateSyncUpdate, JsStorageMapEntry, JsStorageSlot, JsVaultAsset, Library, MerklePath, NetworkId, NetworkNoteStatusInfo, NetworkType, Note, NoteAndArgs, NoteAndArgsArray, NoteArray, NoteAssets, NoteAttachment, NoteAttachmentScheme, NoteConsumability, NoteConsumptionStatus, NoteDetails, NoteDetailsAndTag, NoteDetailsAndTagArray, NoteExecutionHint, NoteExportFormat, NoteFile, NoteFilter, NoteFilterTypes, NoteHeader, NoteId, NoteIdAndArgs, NoteIdAndArgsArray, NoteInclusionProof, NoteLocation, NoteMetadata, NoteRecipient, NoteRecipientArray, NoteScript, NoteStorage, NoteSyncBlock, NoteSyncInfo, NoteTag, NoteType, OutputNote, OutputNoteArray, OutputNoteRecord, OutputNoteState, OutputNotes, Package, PartialNote, Poseidon2, ProcedureThreshold, Program, ProvenTransaction, PublicKey, RpcClient, Rpo256, SerializedInputNoteData, SerializedOutputNoteData, SerializedTransactionData, Signature, SigningInputs, SigningInputsType, SlotAndKeys, SparseMerklePath, StorageMap, StorageMapEntry, StorageMapEntryJs, StorageMapInfo, StorageMapUpdate, StorageSlot, StorageSlotArray, SyncSummary, TestUtils, TokenSymbol, TransactionArgs, TransactionFilter, TransactionId, TransactionProver, TransactionRecord, TransactionRequest, TransactionRequestBuilder, TransactionResult, TransactionScript, TransactionScriptInputPair, TransactionScriptInputPairArray, TransactionStatus, TransactionStoreUpdate, TransactionSummary, WebClient, WebKeystoreApi, Word, createAuthFalcon512RpoMultisig, exportStore2 as exportStore, importStore, initSync, initThreadPool, parallelSumBench, rayonThreadCount, sequentialSumBench, setupLogging, wbg_rayon_PoolBuilder, wbg_rayon_start_worker , __wbg_init, module$1 as __wasm_url };
|
|
26146
|
+
//# sourceMappingURL=Cargo-smJQCGjz.js.map
|