@miden-sdk/miden-sdk 0.15.0-alpha.4 → 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/README.md +139 -9
- package/dist/mt/Cargo-smJQCGjz.js +26146 -0
- package/dist/mt/Cargo-smJQCGjz.js.map +1 -0
- package/dist/{api-types.d.ts → mt/api-types.d.ts} +154 -4
- package/dist/mt/assets/miden_client_web.wasm +0 -0
- package/dist/mt/crates/miden_client_web.d.ts +4791 -0
- package/dist/mt/eager.js +38 -0
- package/dist/mt/eager.js.map +1 -0
- package/dist/{index.d.ts → mt/index.d.ts} +4 -2
- package/dist/mt/index.js +3778 -0
- package/dist/mt/index.js.map +1 -0
- package/dist/{wasm.js → mt/wasm.js} +1 -1
- package/dist/mt/wasm.js.map +1 -0
- package/dist/mt/workerHelpers.js +28 -0
- package/dist/mt/workers/Cargo-smJQCGjz-q4GYXDiD.js +26147 -0
- 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 +26885 -0
- package/dist/mt/workers/web-client-methods-worker.js.map +1 -0
- package/dist/{workers → mt/workers}/web-client-methods-worker.module.js +17 -1
- package/dist/mt/workers/web-client-methods-worker.module.js.map +1 -0
- package/dist/mt/workers/workerHelpers.js +28 -0
- package/dist/{Cargo-CVlXCH_2.js → st/Cargo-CG4XszZo.js} +698 -495
- package/dist/st/Cargo-CG4XszZo.js.map +1 -0
- package/dist/st/api-types.d.ts +1140 -0
- package/dist/{workers → st}/assets/miden_client_web.wasm +0 -0
- package/dist/{crates → st/crates}/miden_client_web.d.ts +342 -196
- package/dist/st/docs-entry.d.ts +38 -0
- package/dist/{eager.js → st/eager.js} +1 -1
- package/dist/st/eager.js.map +1 -0
- package/dist/st/index.d.ts +182 -0
- package/dist/{index.js → st/index.js} +425 -19
- package/dist/st/index.js.map +1 -0
- package/dist/st/wasm.js +23 -0
- package/dist/st/wasm.js.map +1 -0
- package/dist/{workers/Cargo-CVlXCH_2-CWA-5vlh.js → st/workers/Cargo-CG4XszZo-S7EHAZSa.js} +698 -495
- package/dist/st/workers/Cargo-CG4XszZo-S7EHAZSa.js.map +1 -0
- package/dist/{assets → st/workers/assets}/miden_client_web.wasm +0 -0
- package/dist/{workers → st/workers}/web-client-methods-worker.js +715 -496
- package/dist/st/workers/web-client-methods-worker.js.map +1 -0
- package/dist/st/workers/web-client-methods-worker.module.js +575 -0
- package/dist/st/workers/web-client-methods-worker.module.js.map +1 -0
- package/js/client.js +166 -2
- package/js/node/napi-compat.js +15 -0
- package/js/node-index.js +0 -1
- package/js/resources/accounts.js +4 -6
- package/js/resources/transactions.js +134 -0
- package/lazy/package.json +2 -2
- package/mt/lazy/package.json +4 -0
- package/mt/package.json +4 -0
- package/package.json +30 -15
- package/dist/Cargo-CVlXCH_2.js.map +0 -1
- package/dist/eager.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/wasm.js.map +0 -1
- package/dist/workers/Cargo-CVlXCH_2-CWA-5vlh.js.map +0 -1
- package/dist/workers/web-client-methods-worker.js.map +0 -1
- package/dist/workers/web-client-methods-worker.module.js.map +0 -1
- /package/dist/{docs-entry.d.ts → mt/docs-entry.d.ts} +0 -0
|
@@ -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) {
|
|
@@ -9928,13 +9928,20 @@ async function getNoteScript(dbId, scriptRoot) {
|
|
|
9928
9928
|
logWebStoreError(err, "Failed to get note script from root");
|
|
9929
9929
|
}
|
|
9930
9930
|
}
|
|
9931
|
-
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) {
|
|
9932
9932
|
const db = getDatabase(dbId);
|
|
9933
9933
|
const doWork = async (t) => {
|
|
9934
9934
|
try {
|
|
9935
9935
|
const data = {
|
|
9936
|
-
|
|
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,
|
|
9937
9943
|
assets,
|
|
9944
|
+
attachments,
|
|
9938
9945
|
serialNumber,
|
|
9939
9946
|
inputs,
|
|
9940
9947
|
scriptRoot,
|
|
@@ -9957,7 +9964,7 @@ async function upsertInputNote(dbId, noteId, assets, serialNumber, inputs, scrip
|
|
|
9957
9964
|
/* v8 ignore next 3 — requires a mid-transaction Dexie write failure, not modelable with fake-indexeddb */
|
|
9958
9965
|
}
|
|
9959
9966
|
catch (error) {
|
|
9960
|
-
logWebStoreError(error, `Error inserting note: ${
|
|
9967
|
+
logWebStoreError(error, `Error inserting note: ${detailsCommitment}`);
|
|
9961
9968
|
}
|
|
9962
9969
|
};
|
|
9963
9970
|
return db.dexie.transaction("rw", db.inputNotes, db.notesScripts, doWork);
|
|
@@ -10020,13 +10027,14 @@ async function getInputNoteByOffset(dbId, states, consumerAccountId, blockStart,
|
|
|
10020
10027
|
logWebStoreError(err, "Failed to get input note by offset");
|
|
10021
10028
|
}
|
|
10022
10029
|
}
|
|
10023
|
-
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) {
|
|
10024
10031
|
const db = getDatabase(dbId);
|
|
10025
10032
|
const doWork = async (t) => {
|
|
10026
10033
|
try {
|
|
10027
10034
|
const data = {
|
|
10028
10035
|
noteId,
|
|
10029
10036
|
assets,
|
|
10037
|
+
attachments,
|
|
10030
10038
|
recipientDigest,
|
|
10031
10039
|
metadata,
|
|
10032
10040
|
nullifier: nullifier ? nullifier : undefined,
|
|
@@ -10047,6 +10055,7 @@ async function processInputNotes(dbId, notes) {
|
|
|
10047
10055
|
const db = getDatabase(dbId);
|
|
10048
10056
|
return await Promise.all(notes.map(async (note) => {
|
|
10049
10057
|
const assetsBase64 = uint8ArrayToBase64(note.assets);
|
|
10058
|
+
const attachmentsBase64 = uint8ArrayToBase64(note.attachments);
|
|
10050
10059
|
const serialNumberBase64 = uint8ArrayToBase64(note.serialNumber);
|
|
10051
10060
|
const inputsBase64 = uint8ArrayToBase64(note.inputs);
|
|
10052
10061
|
let serializedNoteScriptBase64 = undefined;
|
|
@@ -10059,6 +10068,7 @@ async function processInputNotes(dbId, notes) {
|
|
|
10059
10068
|
const stateBase64 = uint8ArrayToBase64(note.state);
|
|
10060
10069
|
return {
|
|
10061
10070
|
assets: assetsBase64,
|
|
10071
|
+
attachments: attachmentsBase64,
|
|
10062
10072
|
serialNumber: serialNumberBase64,
|
|
10063
10073
|
inputs: inputsBase64,
|
|
10064
10074
|
createdAt: note.serializedCreatedAt,
|
|
@@ -10070,10 +10080,12 @@ async function processInputNotes(dbId, notes) {
|
|
|
10070
10080
|
async function processOutputNotes(notes) {
|
|
10071
10081
|
return await Promise.all(notes.map((note) => {
|
|
10072
10082
|
const assetsBase64 = uint8ArrayToBase64(note.assets);
|
|
10083
|
+
const attachmentsBase64 = uint8ArrayToBase64(note.attachments);
|
|
10073
10084
|
const metadataBase64 = uint8ArrayToBase64(note.metadata);
|
|
10074
10085
|
const stateBase64 = uint8ArrayToBase64(note.state);
|
|
10075
10086
|
return {
|
|
10076
10087
|
assets: assetsBase64,
|
|
10088
|
+
attachments: attachmentsBase64,
|
|
10077
10089
|
recipientDigest: note.recipientDigest,
|
|
10078
10090
|
metadata: metadataBase64,
|
|
10079
10091
|
expectedHeight: note.expectedHeight,
|
|
@@ -10342,9 +10354,8 @@ async function removeNoteTag(dbId, tag, sourceNoteId, sourceAccountId) {
|
|
|
10342
10354
|
}
|
|
10343
10355
|
async function applyStateSync(dbId, stateUpdate) {
|
|
10344
10356
|
const db = getDatabase(dbId);
|
|
10345
|
-
const { blockNum, flattenedNewBlockHeaders,
|
|
10357
|
+
const { blockNum, flattenedNewBlockHeaders, partialBlockchainPeaks, newBlockNums, blockHasRelevantNotes, serializedNodeIds, serializedNodes, committedNoteTagSources, serializedInputNotes, serializedOutputNotes, accountUpdates, transactionUpdates, } = stateUpdate;
|
|
10346
10358
|
const newBlockHeaders = reconstructFlattenedVec(flattenedNewBlockHeaders);
|
|
10347
|
-
const partialBlockchainPeaks = reconstructFlattenedVec(flattenedPartialBlockChainPeaks);
|
|
10348
10359
|
const tablesToAccess = [
|
|
10349
10360
|
db.stateSync,
|
|
10350
10361
|
db.inputNotes,
|
|
@@ -10367,10 +10378,10 @@ async function applyStateSync(dbId, stateUpdate) {
|
|
|
10367
10378
|
return await db.dexie.transaction("rw", tablesToAccess, async (tx) => {
|
|
10368
10379
|
await Promise.all([
|
|
10369
10380
|
Promise.all(serializedInputNotes.map((note) => {
|
|
10370
|
-
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);
|
|
10371
10382
|
})),
|
|
10372
10383
|
Promise.all(serializedOutputNotes.map((note) => {
|
|
10373
|
-
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);
|
|
10374
10385
|
})),
|
|
10375
10386
|
Promise.all(transactionUpdates.map((transactionRecord) => {
|
|
10376
10387
|
let promises = [
|
|
@@ -10396,16 +10407,26 @@ async function applyStateSync(dbId, stateUpdate) {
|
|
|
10396
10407
|
}))),
|
|
10397
10408
|
updateSyncHeight(tx, blockNum),
|
|
10398
10409
|
updatePartialBlockchainNodes(tx, serializedNodeIds, serializedNodes),
|
|
10399
|
-
updateCommittedNoteTags(tx,
|
|
10410
|
+
updateCommittedNoteTags(tx, committedNoteTagSources),
|
|
10400
10411
|
Promise.all(newBlockHeaders.map((newBlockHeader, i) => {
|
|
10401
|
-
|
|
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);
|
|
10402
10420
|
})),
|
|
10403
10421
|
]);
|
|
10404
10422
|
});
|
|
10405
10423
|
}
|
|
10424
|
+
/**
|
|
10425
|
+
* Advances `stateSync.blockNum` only when moving forward. Mirrors SQLite's
|
|
10426
|
+
* `UPDATE blockchain_checkpoint ... WHERE block_num < ?`.
|
|
10427
|
+
*/
|
|
10406
10428
|
async function updateSyncHeight(tx, blockNum) {
|
|
10407
10429
|
try {
|
|
10408
|
-
// Only update if moving forward to prevent race conditions
|
|
10409
10430
|
const current = await tx.stateSync.get(1);
|
|
10410
10431
|
if (!current || current.blockNum < blockNum) {
|
|
10411
10432
|
await tx.stateSync.update(1, {
|
|
@@ -10417,13 +10438,13 @@ async function updateSyncHeight(tx, blockNum) {
|
|
|
10417
10438
|
logWebStoreError(error, "Failed to update sync height");
|
|
10418
10439
|
}
|
|
10419
10440
|
}
|
|
10420
|
-
async function updateBlockHeader(tx, blockNum, blockHeader,
|
|
10441
|
+
async function updateBlockHeader(tx, blockNum, blockHeader, hasClientNotes, partialBlockchainPeaks) {
|
|
10421
10442
|
try {
|
|
10422
10443
|
const data = {
|
|
10423
10444
|
blockNum: blockNum,
|
|
10424
10445
|
header: blockHeader,
|
|
10425
|
-
partialBlockchainPeaks,
|
|
10426
10446
|
hasClientNotes: hasClientNotes.toString(),
|
|
10447
|
+
...(partialBlockchainPeaks !== undefined && { partialBlockchainPeaks }),
|
|
10427
10448
|
};
|
|
10428
10449
|
const existingBlockHeader = await tx.blockHeaders.get(blockNum);
|
|
10429
10450
|
if (!existingBlockHeader) {
|
|
@@ -10454,13 +10475,13 @@ async function updatePartialBlockchainNodes(tx, nodeIndexes, nodes) {
|
|
|
10454
10475
|
logWebStoreError(err, "Failed to update partial blockchain nodes");
|
|
10455
10476
|
}
|
|
10456
10477
|
}
|
|
10457
|
-
async function updateCommittedNoteTags(tx,
|
|
10478
|
+
async function updateCommittedNoteTags(tx, committedNoteTagSources) {
|
|
10458
10479
|
try {
|
|
10459
|
-
for (let i = 0; i <
|
|
10460
|
-
const
|
|
10480
|
+
for (let i = 0; i < committedNoteTagSources.length; i++) {
|
|
10481
|
+
const tagSource = committedNoteTagSources[i];
|
|
10461
10482
|
await tx.tags
|
|
10462
10483
|
.where("sourceNoteId")
|
|
10463
|
-
.equals(
|
|
10484
|
+
.equals(tagSource)
|
|
10464
10485
|
.delete();
|
|
10465
10486
|
}
|
|
10466
10487
|
}
|
|
@@ -10566,21 +10587,13 @@ class Account {
|
|
|
10566
10587
|
return AccountId.__wrap(ret);
|
|
10567
10588
|
}
|
|
10568
10589
|
/**
|
|
10569
|
-
* Returns true if the account
|
|
10590
|
+
* Returns true if the account exposes a fungible-faucet interface.
|
|
10570
10591
|
* @returns {boolean}
|
|
10571
10592
|
*/
|
|
10572
10593
|
isFaucet() {
|
|
10573
10594
|
const ret = wasm.account_isFaucet(this.__wbg_ptr);
|
|
10574
10595
|
return ret !== 0;
|
|
10575
10596
|
}
|
|
10576
|
-
/**
|
|
10577
|
-
* Returns true if this is a network-owned account.
|
|
10578
|
-
* @returns {boolean}
|
|
10579
|
-
*/
|
|
10580
|
-
isNetwork() {
|
|
10581
|
-
const ret = wasm.account_isNetwork(this.__wbg_ptr);
|
|
10582
|
-
return ret !== 0;
|
|
10583
|
-
}
|
|
10584
10597
|
/**
|
|
10585
10598
|
* Returns true if the account has not yet been committed to the chain.
|
|
10586
10599
|
* @returns {boolean}
|
|
@@ -10606,21 +10619,13 @@ class Account {
|
|
|
10606
10619
|
return ret !== 0;
|
|
10607
10620
|
}
|
|
10608
10621
|
/**
|
|
10609
|
-
* Returns true if the account is a regular
|
|
10622
|
+
* Returns true if the account is a regular (non-faucet) account.
|
|
10610
10623
|
* @returns {boolean}
|
|
10611
10624
|
*/
|
|
10612
10625
|
isRegularAccount() {
|
|
10613
10626
|
const ret = wasm.account_isRegularAccount(this.__wbg_ptr);
|
|
10614
10627
|
return ret !== 0;
|
|
10615
10628
|
}
|
|
10616
|
-
/**
|
|
10617
|
-
* Returns true if the account can update its code.
|
|
10618
|
-
* @returns {boolean}
|
|
10619
|
-
*/
|
|
10620
|
-
isUpdatable() {
|
|
10621
|
-
const ret = wasm.account_isUpdatable(this.__wbg_ptr);
|
|
10622
|
-
return ret !== 0;
|
|
10623
|
-
}
|
|
10624
10629
|
/**
|
|
10625
10630
|
* Returns the account nonce, which is incremented on every state update.
|
|
10626
10631
|
* @returns {Felt}
|
|
@@ -10801,6 +10806,11 @@ class AccountBuilder {
|
|
|
10801
10806
|
}
|
|
10802
10807
|
/**
|
|
10803
10808
|
* Sets the storage mode (public/private) for the account.
|
|
10809
|
+
*
|
|
10810
|
+
* The 0.15 protocol surface collapsed `AccountStorageMode` and `AccountType` into a
|
|
10811
|
+
* single 2-way `AccountType` flag: setting the storage mode IS setting the account
|
|
10812
|
+
* type. Calling both `accountType()` and `storageMode()` on the same builder is the
|
|
10813
|
+
* last-write-wins on the underlying flag. Method kept for JS-surface back-compat.
|
|
10804
10814
|
* @param {AccountStorageMode} storage_mode
|
|
10805
10815
|
* @returns {AccountBuilder}
|
|
10806
10816
|
*/
|
|
@@ -11067,6 +11077,11 @@ class AccountComponent {
|
|
|
11067
11077
|
}
|
|
11068
11078
|
/**
|
|
11069
11079
|
* Marks the component as supporting all account types.
|
|
11080
|
+
*
|
|
11081
|
+
* The 0.15 protocol collapsed the per-account-type flag set on
|
|
11082
|
+
* `AccountComponentMetadata::new` — every component now applies to every account type
|
|
11083
|
+
* implicitly, so this method's job is to re-derive the metadata under the new
|
|
11084
|
+
* (name-only) constructor while keeping the JS API surface stable.
|
|
11070
11085
|
* @returns {AccountComponent}
|
|
11071
11086
|
*/
|
|
11072
11087
|
withSupportsAllTypes() {
|
|
@@ -11425,22 +11440,6 @@ class AccountId {
|
|
|
11425
11440
|
}
|
|
11426
11441
|
return AccountId.__wrap(ret[0]);
|
|
11427
11442
|
}
|
|
11428
|
-
/**
|
|
11429
|
-
* Returns true if the ID refers to a faucet.
|
|
11430
|
-
* @returns {boolean}
|
|
11431
|
-
*/
|
|
11432
|
-
isFaucet() {
|
|
11433
|
-
const ret = wasm.accountid_isFaucet(this.__wbg_ptr);
|
|
11434
|
-
return ret !== 0;
|
|
11435
|
-
}
|
|
11436
|
-
/**
|
|
11437
|
-
* Returns true if the ID is reserved for network accounts.
|
|
11438
|
-
* @returns {boolean}
|
|
11439
|
-
*/
|
|
11440
|
-
isNetwork() {
|
|
11441
|
-
const ret = wasm.accountid_isNetwork(this.__wbg_ptr);
|
|
11442
|
-
return ret !== 0;
|
|
11443
|
-
}
|
|
11444
11443
|
/**
|
|
11445
11444
|
* Returns true if the account uses private storage.
|
|
11446
11445
|
* @returns {boolean}
|
|
@@ -11457,14 +11456,6 @@ class AccountId {
|
|
|
11457
11456
|
const ret = wasm.accountid_isPublic(this.__wbg_ptr);
|
|
11458
11457
|
return ret !== 0;
|
|
11459
11458
|
}
|
|
11460
|
-
/**
|
|
11461
|
-
* Returns true if the ID refers to a regular account.
|
|
11462
|
-
* @returns {boolean}
|
|
11463
|
-
*/
|
|
11464
|
-
isRegularAccount() {
|
|
11465
|
-
const ret = wasm.accountid_isRegularAccount(this.__wbg_ptr);
|
|
11466
|
-
return ret !== 0;
|
|
11467
|
-
}
|
|
11468
11459
|
/**
|
|
11469
11460
|
* Returns the prefix field element storing metadata about version, type, and storage mode.
|
|
11470
11461
|
* @returns {Felt}
|
|
@@ -12149,6 +12140,15 @@ if (Symbol.dispose) AccountStorageDelta.prototype[Symbol.dispose] = AccountStora
|
|
|
12149
12140
|
|
|
12150
12141
|
/**
|
|
12151
12142
|
* Storage visibility mode for an account.
|
|
12143
|
+
*
|
|
12144
|
+
* In the 0.15 protocol surface this is the same enum as `AccountType`
|
|
12145
|
+
* (the on-chain identifier no longer carries any faucet-vs-regular or
|
|
12146
|
+
* updatable-vs-immutable distinction), so internally we wrap an
|
|
12147
|
+
* `AccountType`. The standalone `AccountStorageMode` type still exists at
|
|
12148
|
+
* the JS API surface for backwards compatibility with code that wrote
|
|
12149
|
+
* `AccountStorageMode.public()` / `.private()`. The pre-existing `.network()`
|
|
12150
|
+
* constructor was removed — the network storage mode does not exist on the
|
|
12151
|
+
* 0.15 chain.
|
|
12152
12152
|
*/
|
|
12153
12153
|
class AccountStorageMode {
|
|
12154
12154
|
static __wrap(ptr) {
|
|
@@ -12184,14 +12184,6 @@ class AccountStorageMode {
|
|
|
12184
12184
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
12185
12185
|
}
|
|
12186
12186
|
}
|
|
12187
|
-
/**
|
|
12188
|
-
* Creates a network storage mode.
|
|
12189
|
-
* @returns {AccountStorageMode}
|
|
12190
|
-
*/
|
|
12191
|
-
static network() {
|
|
12192
|
-
const ret = wasm.accountstoragemode_network();
|
|
12193
|
-
return AccountStorageMode.__wrap(ret);
|
|
12194
|
-
}
|
|
12195
12187
|
/**
|
|
12196
12188
|
* Creates a private storage mode.
|
|
12197
12189
|
* @returns {AccountStorageMode}
|
|
@@ -12210,6 +12202,9 @@ class AccountStorageMode {
|
|
|
12210
12202
|
}
|
|
12211
12203
|
/**
|
|
12212
12204
|
* Parses a storage mode from its string representation.
|
|
12205
|
+
*
|
|
12206
|
+
* Accepts `"private"` and `"public"`; any other input — including the
|
|
12207
|
+
* previously-supported `"network"` — is rejected.
|
|
12213
12208
|
* @param {string} s
|
|
12214
12209
|
* @returns {AccountStorageMode}
|
|
12215
12210
|
*/
|
|
@@ -12270,13 +12265,17 @@ class AccountStorageRequirements {
|
|
|
12270
12265
|
if (Symbol.dispose) AccountStorageRequirements.prototype[Symbol.dispose] = AccountStorageRequirements.prototype.free;
|
|
12271
12266
|
|
|
12272
12267
|
/**
|
|
12273
|
-
*
|
|
12268
|
+
* Storage mode of an account. The 0.15 protocol collapses the previous
|
|
12269
|
+
* 4-way `{ FungibleFaucet, NonFungibleFaucet, RegularAccountImmutableCode,
|
|
12270
|
+
* RegularAccountUpdatableCode }` distinction into a 2-way storage flag —
|
|
12271
|
+
* faucet-vs-regular and updatable-vs-immutable distinctions are no longer
|
|
12272
|
+
* part of the on-chain `AccountType` and the API loses no information by
|
|
12273
|
+
* narrowing here too.
|
|
12274
|
+
* @enum {0 | 1}
|
|
12274
12275
|
*/
|
|
12275
12276
|
const AccountType = Object.freeze({
|
|
12276
|
-
|
|
12277
|
-
|
|
12278
|
-
RegularAccountImmutableCode: 2, "2": "RegularAccountImmutableCode",
|
|
12279
|
-
RegularAccountUpdatableCode: 3, "3": "RegularAccountUpdatableCode",
|
|
12277
|
+
Private: 0, "0": "Private",
|
|
12278
|
+
Public: 1, "1": "Public",
|
|
12280
12279
|
});
|
|
12281
12280
|
|
|
12282
12281
|
/**
|
|
@@ -12638,6 +12637,17 @@ class AssetVault {
|
|
|
12638
12637
|
}
|
|
12639
12638
|
/**
|
|
12640
12639
|
* Returns the balance for the given fungible faucet, or zero if absent.
|
|
12640
|
+
*
|
|
12641
|
+
* `get_balance` on the 0.15 surface keys by `AssetVaultKey`, not `AccountId`, and
|
|
12642
|
+
* validates the composition. The callback flag is `Disabled` because fungible balance
|
|
12643
|
+
* reads don't run asset callbacks. Returns zero on lookup error (`Err` arms here would
|
|
12644
|
+
* indicate the key was constructed wrong, which can't happen for fungible keys built
|
|
12645
|
+
* this way).
|
|
12646
|
+
*
|
|
12647
|
+
* NOTE: the `AssetVaultKey` encodes the callback flag, so this reports only the balance
|
|
12648
|
+
* of callback-*disabled* fungible assets. Faucets built by this SDK omit transfer policies
|
|
12649
|
+
* and therefore mint callback-disabled assets, so this is exact for them; an asset minted
|
|
12650
|
+
* elsewhere with callbacks enabled would not be counted here.
|
|
12641
12651
|
* @param {AccountId} faucet_id
|
|
12642
12652
|
* @returns {bigint}
|
|
12643
12653
|
*/
|
|
@@ -12874,6 +12884,9 @@ if (Symbol.dispose) AuthSecretKey.prototype[Symbol.dispose] = AuthSecretKey.prot
|
|
|
12874
12884
|
|
|
12875
12885
|
/**
|
|
12876
12886
|
* Provides metadata for a basic fungible faucet account component.
|
|
12887
|
+
*
|
|
12888
|
+
* Reads the on-chain [`FungibleFaucet`] component for the account, which holds the
|
|
12889
|
+
* per-token info (symbol/decimals/maxSupply).
|
|
12877
12890
|
*/
|
|
12878
12891
|
class BasicFungibleFaucetComponent {
|
|
12879
12892
|
static __wrap(ptr) {
|
|
@@ -12920,7 +12933,7 @@ class BasicFungibleFaucetComponent {
|
|
|
12920
12933
|
* @returns {Felt}
|
|
12921
12934
|
*/
|
|
12922
12935
|
maxSupply() {
|
|
12923
|
-
const ret = wasm.
|
|
12936
|
+
const ret = wasm.basicfungiblefaucetcomponent_maxSupply(this.__wbg_ptr);
|
|
12924
12937
|
return Felt.__wrap(ret);
|
|
12925
12938
|
}
|
|
12926
12939
|
/**
|
|
@@ -12994,6 +13007,19 @@ class BlockHeader {
|
|
|
12994
13007
|
const ret = wasm.blockheader_commitment(this.__wbg_ptr);
|
|
12995
13008
|
return Word.__wrap(ret);
|
|
12996
13009
|
}
|
|
13010
|
+
/**
|
|
13011
|
+
* Returns the account ID of the fungible faucet whose assets are accepted as the native
|
|
13012
|
+
* asset of the blockchain (i.e. the asset used for paying transaction verification fees).
|
|
13013
|
+
*
|
|
13014
|
+
* This is stored on-chain as part of the block's fee parameters, which means consumers can
|
|
13015
|
+
* discover the native faucet by reading any block header rather than hardcoding it per
|
|
13016
|
+
* network.
|
|
13017
|
+
* @returns {AccountId}
|
|
13018
|
+
*/
|
|
13019
|
+
feeFaucetId() {
|
|
13020
|
+
const ret = wasm.blockheader_feeFaucetId(this.__wbg_ptr);
|
|
13021
|
+
return AccountId.__wrap(ret);
|
|
13022
|
+
}
|
|
12997
13023
|
/**
|
|
12998
13024
|
* Returns the note commitment root.
|
|
12999
13025
|
* @returns {Word}
|
|
@@ -13234,14 +13260,6 @@ class CommittedNote {
|
|
|
13234
13260
|
const ptr = this.__destroy_into_raw();
|
|
13235
13261
|
wasm.__wbg_committednote_free(ptr, 0);
|
|
13236
13262
|
}
|
|
13237
|
-
/**
|
|
13238
|
-
* Returns the full note metadata when the attachment payload is available.
|
|
13239
|
-
* @returns {NoteMetadata | undefined}
|
|
13240
|
-
*/
|
|
13241
|
-
fullMetadata() {
|
|
13242
|
-
const ret = wasm.committednote_fullMetadata(this.__wbg_ptr);
|
|
13243
|
-
return ret === 0 ? undefined : NoteMetadata.__wrap(ret);
|
|
13244
|
-
}
|
|
13245
13263
|
/**
|
|
13246
13264
|
* Returns the inclusion path for the note in the block's note tree.
|
|
13247
13265
|
* @returns {SparseMerklePath}
|
|
@@ -13260,9 +13278,6 @@ class CommittedNote {
|
|
|
13260
13278
|
}
|
|
13261
13279
|
/**
|
|
13262
13280
|
* Returns the note metadata.
|
|
13263
|
-
*
|
|
13264
|
-
* If only metadata headers are available, the returned metadata contains
|
|
13265
|
-
* the sender, note type, and tag without attachment payload.
|
|
13266
13281
|
* @returns {NoteMetadata}
|
|
13267
13282
|
*/
|
|
13268
13283
|
metadata() {
|
|
@@ -13638,11 +13653,17 @@ class Felt {
|
|
|
13638
13653
|
}
|
|
13639
13654
|
/**
|
|
13640
13655
|
* Creates a new field element.
|
|
13656
|
+
*
|
|
13657
|
+
* Returns an error if `value` is outside the field's representable
|
|
13658
|
+
* range (`Felt::new` is fallible on the 0.15 protocol surface).
|
|
13641
13659
|
* @param {bigint} value
|
|
13642
13660
|
*/
|
|
13643
13661
|
constructor(value) {
|
|
13644
13662
|
const ret = wasm.felt_new(value);
|
|
13645
|
-
|
|
13663
|
+
if (ret[2]) {
|
|
13664
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
13665
|
+
}
|
|
13666
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
13646
13667
|
FeltFinalization.register(this, this.__wbg_ptr, this);
|
|
13647
13668
|
return this;
|
|
13648
13669
|
}
|
|
@@ -13787,14 +13808,6 @@ class FetchedAccount {
|
|
|
13787
13808
|
const ret = wasm.fetchedaccount_commitment(this.__wbg_ptr);
|
|
13788
13809
|
return Word.__wrap(ret);
|
|
13789
13810
|
}
|
|
13790
|
-
/**
|
|
13791
|
-
* Returns true when the account is a network account.
|
|
13792
|
-
* @returns {boolean}
|
|
13793
|
-
*/
|
|
13794
|
-
isNetwork() {
|
|
13795
|
-
const ret = wasm.fetchedaccount_isNetwork(this.__wbg_ptr);
|
|
13796
|
-
return ret !== 0;
|
|
13797
|
-
}
|
|
13798
13811
|
/**
|
|
13799
13812
|
* Returns true when the account is private.
|
|
13800
13813
|
* @returns {boolean}
|
|
@@ -13825,8 +13838,15 @@ if (Symbol.dispose) FetchedAccount.prototype[Symbol.dispose] = FetchedAccount.pr
|
|
|
13825
13838
|
/**
|
|
13826
13839
|
* Wrapper for a note fetched over RPC.
|
|
13827
13840
|
*
|
|
13828
|
-
* It
|
|
13829
|
-
* public notes
|
|
13841
|
+
* It carries the note ID, public metadata, and inclusion proof. The full note body is only
|
|
13842
|
+
* present for public notes; for private notes only the header-shaped fields and inclusion
|
|
13843
|
+
* proof are available — the body lives off-chain.
|
|
13844
|
+
*
|
|
13845
|
+
* 0.15 protocol surface: the on-chain `NoteHeader` now commits to a
|
|
13846
|
+
* `NoteDetailsCommitment` rather than the `NoteId`, so a `NoteHeader` can no longer be
|
|
13847
|
+
* reconstructed from header-shaped fields alone for private notes. We therefore expose
|
|
13848
|
+
* the constituent fields (`noteId`, `metadata`) directly on `FetchedNote` instead of a
|
|
13849
|
+
* `header` getter.
|
|
13830
13850
|
*/
|
|
13831
13851
|
class FetchedNote {
|
|
13832
13852
|
static __wrap(ptr) {
|
|
@@ -13858,12 +13878,18 @@ class FetchedNote {
|
|
|
13858
13878
|
return ret === 0 ? undefined : InputNote.__wrap(ret);
|
|
13859
13879
|
}
|
|
13860
13880
|
/**
|
|
13861
|
-
* The note's
|
|
13862
|
-
*
|
|
13881
|
+
* The note's attachments.
|
|
13882
|
+
*
|
|
13883
|
+
* 0.15 returns attachment content over RPC for both public and private notes, so this is
|
|
13884
|
+
* populated even when the note body itself is private. An empty array means the note
|
|
13885
|
+
* carries no attachments.
|
|
13886
|
+
* @returns {NoteAttachment[]}
|
|
13863
13887
|
*/
|
|
13864
|
-
get
|
|
13865
|
-
const ret = wasm.
|
|
13866
|
-
|
|
13888
|
+
get attachments() {
|
|
13889
|
+
const ret = wasm.fetchednote_attachments(this.__wbg_ptr);
|
|
13890
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
13891
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
13892
|
+
return v1;
|
|
13867
13893
|
}
|
|
13868
13894
|
/**
|
|
13869
13895
|
* The note's inclusion proof.
|
|
@@ -14211,6 +14237,10 @@ class FungibleAssetDelta {
|
|
|
14211
14237
|
}
|
|
14212
14238
|
/**
|
|
14213
14239
|
* Returns the delta amount for a given faucet, if present.
|
|
14240
|
+
*
|
|
14241
|
+
* The vault key here is the one used by the fungible-delta tree, which the upstream
|
|
14242
|
+
* surface keys with `AssetCallbackFlag::Disabled` — fungible balance deltas don't run
|
|
14243
|
+
* asset callbacks. `new_fungible` on the 0.15 surface is infallible.
|
|
14214
14244
|
* @param {AccountId} faucet_id
|
|
14215
14245
|
* @returns {bigint | undefined}
|
|
14216
14246
|
*/
|
|
@@ -14385,7 +14415,12 @@ class InputNote {
|
|
|
14385
14415
|
return InputNote.__wrap(ret);
|
|
14386
14416
|
}
|
|
14387
14417
|
/**
|
|
14388
|
-
* Returns the commitment to the note ID
|
|
14418
|
+
* Returns the commitment to the note (its ID).
|
|
14419
|
+
*
|
|
14420
|
+
* Migration note (miden-client PR #2214): `Note::commitment()` was
|
|
14421
|
+
* removed on the 0.15 surface — the note ID *is* the commitment (it
|
|
14422
|
+
* hashes details + metadata). Return the underlying `NoteId` as a
|
|
14423
|
+
* `Word` so the JS API contract is unchanged.
|
|
14389
14424
|
* @returns {Word}
|
|
14390
14425
|
*/
|
|
14391
14426
|
commitment() {
|
|
@@ -14471,6 +14506,22 @@ class InputNoteRecord {
|
|
|
14471
14506
|
const ptr = this.__destroy_into_raw();
|
|
14472
14507
|
wasm.__wbg_inputnoterecord_free(ptr, 0);
|
|
14473
14508
|
}
|
|
14509
|
+
/**
|
|
14510
|
+
* Returns the note's attachments.
|
|
14511
|
+
*
|
|
14512
|
+
* On the 0.15 surface the full attachment content (the packed words) lives
|
|
14513
|
+
* on the note record itself rather than on `NoteMetadata` (which only
|
|
14514
|
+
* carries the attachment headers). This exposes that content so JS callers
|
|
14515
|
+
* can decode payloads packed via the `createNoteAttachment` helper. An
|
|
14516
|
+
* empty array means the note carries no attachments.
|
|
14517
|
+
* @returns {NoteAttachment[]}
|
|
14518
|
+
*/
|
|
14519
|
+
attachments() {
|
|
14520
|
+
const ret = wasm.inputnoterecord_attachments(this.__wbg_ptr);
|
|
14521
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
14522
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
14523
|
+
return v1;
|
|
14524
|
+
}
|
|
14474
14525
|
/**
|
|
14475
14526
|
* Returns the note commitment (id + metadata), if available.
|
|
14476
14527
|
* @returns {Word | undefined}
|
|
@@ -14501,12 +14552,16 @@ class InputNoteRecord {
|
|
|
14501
14552
|
return NoteDetails.__wrap(ret);
|
|
14502
14553
|
}
|
|
14503
14554
|
/**
|
|
14504
|
-
* Returns the note ID.
|
|
14505
|
-
*
|
|
14555
|
+
* Returns the note ID when available.
|
|
14556
|
+
*
|
|
14557
|
+
* Migration note (miden-client PR #2214): `InputNoteRecord::id()`
|
|
14558
|
+
* returns `Option<NoteId>` — partial / metadata-less notes have no
|
|
14559
|
+
* metadata-bearing ID yet.
|
|
14560
|
+
* @returns {NoteId | undefined}
|
|
14506
14561
|
*/
|
|
14507
14562
|
id() {
|
|
14508
14563
|
const ret = wasm.inputnoterecord_id(this.__wbg_ptr);
|
|
14509
|
-
return NoteId.__wrap(ret);
|
|
14564
|
+
return ret === 0 ? undefined : NoteId.__wrap(ret);
|
|
14510
14565
|
}
|
|
14511
14566
|
/**
|
|
14512
14567
|
* Returns the inclusion proof when the note is authenticated.
|
|
@@ -14549,20 +14604,20 @@ class InputNoteRecord {
|
|
|
14549
14604
|
return ret === 0 ? undefined : NoteMetadata.__wrap(ret);
|
|
14550
14605
|
}
|
|
14551
14606
|
/**
|
|
14552
|
-
* Returns the nullifier for this note.
|
|
14553
|
-
*
|
|
14607
|
+
* Returns the nullifier for this note when available.
|
|
14608
|
+
*
|
|
14609
|
+
* Migration note (miden-client PR #2214): `InputNoteRecord::nullifier()`
|
|
14610
|
+
* returns `Option<Nullifier>` — partial notes have no nullifier yet.
|
|
14611
|
+
* @returns {string | undefined}
|
|
14554
14612
|
*/
|
|
14555
14613
|
nullifier() {
|
|
14556
|
-
|
|
14557
|
-
let
|
|
14558
|
-
|
|
14559
|
-
|
|
14560
|
-
|
|
14561
|
-
deferred1_1 = ret[1];
|
|
14562
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
14563
|
-
} finally {
|
|
14564
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
14614
|
+
const ret = wasm.inputnoterecord_nullifier(this.__wbg_ptr);
|
|
14615
|
+
let v1;
|
|
14616
|
+
if (ret[0] !== 0) {
|
|
14617
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
14618
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
14565
14619
|
}
|
|
14620
|
+
return v1;
|
|
14566
14621
|
}
|
|
14567
14622
|
/**
|
|
14568
14623
|
* Returns the current processing state for this note.
|
|
@@ -14792,6 +14847,21 @@ if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderly
|
|
|
14792
14847
|
|
|
14793
14848
|
/**
|
|
14794
14849
|
* Represents an update to a single account's state.
|
|
14850
|
+
*
|
|
14851
|
+
* `inspectable` is intentionally omitted (see #2183). When `inspectable` is
|
|
14852
|
+
* set on a struct with public fields, wasm-bindgen auto-generates a
|
|
14853
|
+
* `toJSON()` method that reads every field-getter — each of which calls
|
|
14854
|
+
* back into WASM via `__wbg_get_<class>_<field>(this.__wbg_ptr)`. Under
|
|
14855
|
+
* Next.js 16.2 dev-mode the patched `console.*` runs every non-primitive
|
|
14856
|
+
* argument through `safe-stable-stringify`, which invokes `toJSON()`
|
|
14857
|
+
* automatically. If the underlying pointer has been freed (or another
|
|
14858
|
+
* WASM call is in flight) the resulting `"null pointer passed to rust"`
|
|
14859
|
+
* trap propagates out of the user's `console.log` and crashes the
|
|
14860
|
+
* caller. Without `inspectable`, no `toJSON()` is emitted; JSON.stringify
|
|
14861
|
+
* falls back to `{}` (the wasm-bindgen wrapper has no own enumerable
|
|
14862
|
+
* data — it's all behind the `__wbg_ptr`), and the re-entry never
|
|
14863
|
+
* happens. Field access via the named getters still works exactly as
|
|
14864
|
+
* before; only the auto-stringification path is muted.
|
|
14795
14865
|
*/
|
|
14796
14866
|
class JsAccountUpdate {
|
|
14797
14867
|
static __wrap(ptr) {
|
|
@@ -14807,24 +14877,6 @@ class JsAccountUpdate {
|
|
|
14807
14877
|
}
|
|
14808
14878
|
return jsValue.__destroy_into_raw();
|
|
14809
14879
|
}
|
|
14810
|
-
toJSON() {
|
|
14811
|
-
return {
|
|
14812
|
-
accountCommitment: this.accountCommitment,
|
|
14813
|
-
accountId: this.accountId,
|
|
14814
|
-
accountSeed: this.accountSeed,
|
|
14815
|
-
assets: this.assets,
|
|
14816
|
-
codeRoot: this.codeRoot,
|
|
14817
|
-
committed: this.committed,
|
|
14818
|
-
nonce: this.nonce,
|
|
14819
|
-
storageMapEntries: this.storageMapEntries,
|
|
14820
|
-
storageRoot: this.storageRoot,
|
|
14821
|
-
storageSlots: this.storageSlots,
|
|
14822
|
-
vaultRoot: this.vaultRoot,
|
|
14823
|
-
};
|
|
14824
|
-
}
|
|
14825
|
-
toString() {
|
|
14826
|
-
return JSON.stringify(this);
|
|
14827
|
-
}
|
|
14828
14880
|
__destroy_into_raw() {
|
|
14829
14881
|
const ptr = this.__wbg_ptr;
|
|
14830
14882
|
this.__wbg_ptr = 0;
|
|
@@ -15136,11 +15188,12 @@ class JsStateSyncUpdate {
|
|
|
15136
15188
|
return ret >>> 0;
|
|
15137
15189
|
}
|
|
15138
15190
|
/**
|
|
15139
|
-
*
|
|
15191
|
+
* Details-commitment hex of committed notes whose tracking tags
|
|
15192
|
+
* (`NoteTagSource::Note`) should be removed from the client's local state.
|
|
15140
15193
|
* @returns {string[]}
|
|
15141
15194
|
*/
|
|
15142
|
-
get
|
|
15143
|
-
const ret = wasm.
|
|
15195
|
+
get committedNoteTagSources() {
|
|
15196
|
+
const ret = wasm.__wbg_get_jsstatesyncupdate_committedNoteTagSources(this.__wbg_ptr);
|
|
15144
15197
|
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
15145
15198
|
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
15146
15199
|
return v1;
|
|
@@ -15153,15 +15206,6 @@ class JsStateSyncUpdate {
|
|
|
15153
15206
|
const ret = wasm.__wbg_get_jsstatesyncupdate_flattenedNewBlockHeaders(this.__wbg_ptr);
|
|
15154
15207
|
return FlattenedU8Vec.__wrap(ret);
|
|
15155
15208
|
}
|
|
15156
|
-
/**
|
|
15157
|
-
* Flattened byte array containing partial blockchain peaks used for merkle tree
|
|
15158
|
-
* verification.
|
|
15159
|
-
* @returns {FlattenedU8Vec}
|
|
15160
|
-
*/
|
|
15161
|
-
get flattenedPartialBlockChainPeaks() {
|
|
15162
|
-
const ret = wasm.__wbg_get_jsstatesyncupdate_flattenedPartialBlockChainPeaks(this.__wbg_ptr);
|
|
15163
|
-
return FlattenedU8Vec.__wrap(ret);
|
|
15164
|
-
}
|
|
15165
15209
|
/**
|
|
15166
15210
|
* The block numbers corresponding to each header in `flattened_new_block_headers`.
|
|
15167
15211
|
* This vec should have the same length as the number of headers, with each index
|
|
@@ -15174,6 +15218,18 @@ class JsStateSyncUpdate {
|
|
|
15174
15218
|
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
15175
15219
|
return v1;
|
|
15176
15220
|
}
|
|
15221
|
+
/**
|
|
15222
|
+
* Serialized MMR peaks at the new sync height (single set for the whole update).
|
|
15223
|
+
* Written onto the chain-tip block's `blockHeaders` row (the one whose
|
|
15224
|
+
* `blockNum` matches `block_num`) and read back by `getCurrentBlockchainPeaks`.
|
|
15225
|
+
* @returns {Uint8Array}
|
|
15226
|
+
*/
|
|
15227
|
+
get partialBlockchainPeaks() {
|
|
15228
|
+
const ret = wasm.__wbg_get_jsstatesyncupdate_partialBlockchainPeaks(this.__wbg_ptr);
|
|
15229
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
15230
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
15231
|
+
return v1;
|
|
15232
|
+
}
|
|
15177
15233
|
/**
|
|
15178
15234
|
* Input notes for this state update in serialized form.
|
|
15179
15235
|
* @returns {SerializedInputNoteData[]}
|
|
@@ -15252,13 +15308,14 @@ class JsStateSyncUpdate {
|
|
|
15252
15308
|
wasm.__wbg_set_jsstatesyncupdate_blockNum(this.__wbg_ptr, arg0);
|
|
15253
15309
|
}
|
|
15254
15310
|
/**
|
|
15255
|
-
*
|
|
15311
|
+
* Details-commitment hex of committed notes whose tracking tags
|
|
15312
|
+
* (`NoteTagSource::Note`) should be removed from the client's local state.
|
|
15256
15313
|
* @param {string[]} arg0
|
|
15257
15314
|
*/
|
|
15258
|
-
set
|
|
15315
|
+
set committedNoteTagSources(arg0) {
|
|
15259
15316
|
const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
15260
15317
|
const len0 = WASM_VECTOR_LEN;
|
|
15261
|
-
wasm.
|
|
15318
|
+
wasm.__wbg_set_jsstatesyncupdate_committedNoteTagSources(this.__wbg_ptr, ptr0, len0);
|
|
15262
15319
|
}
|
|
15263
15320
|
/**
|
|
15264
15321
|
* The new block headers for this state update, serialized into a flattened byte array.
|
|
@@ -15269,16 +15326,6 @@ class JsStateSyncUpdate {
|
|
|
15269
15326
|
var ptr0 = arg0.__destroy_into_raw();
|
|
15270
15327
|
wasm.__wbg_set_jsstatesyncupdate_flattenedNewBlockHeaders(this.__wbg_ptr, ptr0);
|
|
15271
15328
|
}
|
|
15272
|
-
/**
|
|
15273
|
-
* Flattened byte array containing partial blockchain peaks used for merkle tree
|
|
15274
|
-
* verification.
|
|
15275
|
-
* @param {FlattenedU8Vec} arg0
|
|
15276
|
-
*/
|
|
15277
|
-
set flattenedPartialBlockChainPeaks(arg0) {
|
|
15278
|
-
_assertClass(arg0, FlattenedU8Vec);
|
|
15279
|
-
var ptr0 = arg0.__destroy_into_raw();
|
|
15280
|
-
wasm.__wbg_set_jsstatesyncupdate_flattenedPartialBlockChainPeaks(this.__wbg_ptr, ptr0);
|
|
15281
|
-
}
|
|
15282
15329
|
/**
|
|
15283
15330
|
* The block numbers corresponding to each header in `flattened_new_block_headers`.
|
|
15284
15331
|
* This vec should have the same length as the number of headers, with each index
|
|
@@ -15290,6 +15337,17 @@ class JsStateSyncUpdate {
|
|
|
15290
15337
|
const len0 = WASM_VECTOR_LEN;
|
|
15291
15338
|
wasm.__wbg_set_jsstatesyncupdate_newBlockNums(this.__wbg_ptr, ptr0, len0);
|
|
15292
15339
|
}
|
|
15340
|
+
/**
|
|
15341
|
+
* Serialized MMR peaks at the new sync height (single set for the whole update).
|
|
15342
|
+
* Written onto the chain-tip block's `blockHeaders` row (the one whose
|
|
15343
|
+
* `blockNum` matches `block_num`) and read back by `getCurrentBlockchainPeaks`.
|
|
15344
|
+
* @param {Uint8Array} arg0
|
|
15345
|
+
*/
|
|
15346
|
+
set partialBlockchainPeaks(arg0) {
|
|
15347
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
15348
|
+
const len0 = WASM_VECTOR_LEN;
|
|
15349
|
+
wasm.__wbg_set_jsstatesyncupdate_partialBlockchainPeaks(this.__wbg_ptr, ptr0, len0);
|
|
15350
|
+
}
|
|
15293
15351
|
/**
|
|
15294
15352
|
* Input notes for this state update in serialized form.
|
|
15295
15353
|
* @param {SerializedInputNoteData[]} arg0
|
|
@@ -15340,6 +15398,9 @@ if (Symbol.dispose) JsStateSyncUpdate.prototype[Symbol.dispose] = JsStateSyncUpd
|
|
|
15340
15398
|
|
|
15341
15399
|
/**
|
|
15342
15400
|
* A JavaScript representation of a storage map entry in an account.
|
|
15401
|
+
*
|
|
15402
|
+
* `inspectable` is intentionally omitted — see the note on
|
|
15403
|
+
* `JsAccountUpdate` for the full rationale (#2183).
|
|
15343
15404
|
*/
|
|
15344
15405
|
class JsStorageMapEntry {
|
|
15345
15406
|
static __wrap(ptr) {
|
|
@@ -15355,16 +15416,6 @@ class JsStorageMapEntry {
|
|
|
15355
15416
|
}
|
|
15356
15417
|
return jsValue.__destroy_into_raw();
|
|
15357
15418
|
}
|
|
15358
|
-
toJSON() {
|
|
15359
|
-
return {
|
|
15360
|
-
key: this.key,
|
|
15361
|
-
slotName: this.slotName,
|
|
15362
|
-
value: this.value,
|
|
15363
|
-
};
|
|
15364
|
-
}
|
|
15365
|
-
toString() {
|
|
15366
|
-
return JSON.stringify(this);
|
|
15367
|
-
}
|
|
15368
15419
|
__destroy_into_raw() {
|
|
15369
15420
|
const ptr = this.__wbg_ptr;
|
|
15370
15421
|
this.__wbg_ptr = 0;
|
|
@@ -15455,6 +15506,9 @@ if (Symbol.dispose) JsStorageMapEntry.prototype[Symbol.dispose] = JsStorageMapEn
|
|
|
15455
15506
|
|
|
15456
15507
|
/**
|
|
15457
15508
|
* A JavaScript representation of a storage slot in an account.
|
|
15509
|
+
*
|
|
15510
|
+
* `inspectable` is intentionally omitted — see the note on
|
|
15511
|
+
* `JsAccountUpdate` for the full rationale (#2183).
|
|
15458
15512
|
*/
|
|
15459
15513
|
class JsStorageSlot {
|
|
15460
15514
|
static __wrap(ptr) {
|
|
@@ -15470,16 +15524,6 @@ class JsStorageSlot {
|
|
|
15470
15524
|
}
|
|
15471
15525
|
return jsValue.__destroy_into_raw();
|
|
15472
15526
|
}
|
|
15473
|
-
toJSON() {
|
|
15474
|
-
return {
|
|
15475
|
-
slotName: this.slotName,
|
|
15476
|
-
slotType: this.slotType,
|
|
15477
|
-
slotValue: this.slotValue,
|
|
15478
|
-
};
|
|
15479
|
-
}
|
|
15480
|
-
toString() {
|
|
15481
|
-
return JSON.stringify(this);
|
|
15482
|
-
}
|
|
15483
15527
|
__destroy_into_raw() {
|
|
15484
15528
|
const ptr = this.__wbg_ptr;
|
|
15485
15529
|
this.__wbg_ptr = 0;
|
|
@@ -15560,6 +15604,9 @@ if (Symbol.dispose) JsStorageSlot.prototype[Symbol.dispose] = JsStorageSlot.prot
|
|
|
15560
15604
|
|
|
15561
15605
|
/**
|
|
15562
15606
|
* An object that contains a serialized vault asset.
|
|
15607
|
+
*
|
|
15608
|
+
* `inspectable` is intentionally omitted — see the note on
|
|
15609
|
+
* `JsAccountUpdate` for the full rationale (#2183).
|
|
15563
15610
|
*/
|
|
15564
15611
|
class JsVaultAsset {
|
|
15565
15612
|
static __wrap(ptr) {
|
|
@@ -15575,15 +15622,6 @@ class JsVaultAsset {
|
|
|
15575
15622
|
}
|
|
15576
15623
|
return jsValue.__destroy_into_raw();
|
|
15577
15624
|
}
|
|
15578
|
-
toJSON() {
|
|
15579
|
-
return {
|
|
15580
|
-
asset: this.asset,
|
|
15581
|
-
vaultKey: this.vaultKey,
|
|
15582
|
-
};
|
|
15583
|
-
}
|
|
15584
|
-
toString() {
|
|
15585
|
-
return JSON.stringify(this);
|
|
15586
|
-
}
|
|
15587
15625
|
__destroy_into_raw() {
|
|
15588
15626
|
const ptr = this.__wbg_ptr;
|
|
15589
15627
|
this.__wbg_ptr = 0;
|
|
@@ -15931,7 +15969,12 @@ class Note {
|
|
|
15931
15969
|
return NoteAssets.__wrap(ret);
|
|
15932
15970
|
}
|
|
15933
15971
|
/**
|
|
15934
|
-
* Returns the commitment to the note ID
|
|
15972
|
+
* Returns the commitment to the note (its ID).
|
|
15973
|
+
*
|
|
15974
|
+
* Migration note (miden-client PR #2214): `Note::commitment()` was
|
|
15975
|
+
* removed on the 0.15 surface — the note ID is the commitment. Return
|
|
15976
|
+
* the underlying `NoteId` as a `Word` so the JS API contract is
|
|
15977
|
+
* unchanged.
|
|
15935
15978
|
* @returns {Word}
|
|
15936
15979
|
*/
|
|
15937
15980
|
commitment() {
|
|
@@ -15997,7 +16040,7 @@ class Note {
|
|
|
15997
16040
|
* @returns {NoteId}
|
|
15998
16041
|
*/
|
|
15999
16042
|
id() {
|
|
16000
|
-
const ret = wasm.
|
|
16043
|
+
const ret = wasm.note_commitment(this.__wbg_ptr);
|
|
16001
16044
|
return NoteId.__wrap(ret);
|
|
16002
16045
|
}
|
|
16003
16046
|
/**
|
|
@@ -16005,11 +16048,15 @@ class Note {
|
|
|
16005
16048
|
* @returns {NoteMetadata}
|
|
16006
16049
|
*/
|
|
16007
16050
|
metadata() {
|
|
16008
|
-
const ret = wasm.
|
|
16051
|
+
const ret = wasm.committednote_metadata(this.__wbg_ptr);
|
|
16009
16052
|
return NoteMetadata.__wrap(ret);
|
|
16010
16053
|
}
|
|
16011
16054
|
/**
|
|
16012
16055
|
* Creates a new note from the provided assets, metadata, and recipient.
|
|
16056
|
+
*
|
|
16057
|
+
* Migration note (miden-client PR #2214): `Note::new` now takes a
|
|
16058
|
+
* `PartialNoteMetadata` (not `NoteMetadata`). Extract the partial
|
|
16059
|
+
* fields from the JS-side `NoteMetadata` and reconstruct.
|
|
16013
16060
|
* @param {NoteAssets} note_assets
|
|
16014
16061
|
* @param {NoteMetadata} note_metadata
|
|
16015
16062
|
* @param {NoteRecipient} note_recipient
|
|
@@ -16306,9 +16353,13 @@ if (Symbol.dispose) NoteAssets.prototype[Symbol.dispose] = NoteAssets.prototype.
|
|
|
16306
16353
|
/**
|
|
16307
16354
|
* An attachment to a note.
|
|
16308
16355
|
*
|
|
16309
|
-
*
|
|
16310
|
-
*
|
|
16311
|
-
*
|
|
16356
|
+
* 0.15 protocol surface: an attachment is a `(scheme, content)` pair where
|
|
16357
|
+
* `content` is a flat `Vec<Word>` of 1..=256 words. The previous
|
|
16358
|
+
* `NoteAttachmentKind { Word, Array }` dispatch and the per-variant
|
|
16359
|
+
* `asWord` / `asArray` / `newWord` / `newArray` getters/constructors no
|
|
16360
|
+
* longer exist — content is always word-vector-shaped now. Use
|
|
16361
|
+
* `fromWord(scheme, word)` for the common single-word case or
|
|
16362
|
+
* `fromWords(scheme, words)` for multi-word content.
|
|
16312
16363
|
*/
|
|
16313
16364
|
class NoteAttachment {
|
|
16314
16365
|
static __wrap(ptr) {
|
|
@@ -16328,30 +16379,6 @@ class NoteAttachment {
|
|
|
16328
16379
|
const ptr = this.__destroy_into_raw();
|
|
16329
16380
|
wasm.__wbg_noteattachment_free(ptr, 0);
|
|
16330
16381
|
}
|
|
16331
|
-
/**
|
|
16332
|
-
* Returns the content as an array of Felts if the attachment kind is Array, otherwise None.
|
|
16333
|
-
* @returns {FeltArray | undefined}
|
|
16334
|
-
*/
|
|
16335
|
-
asArray() {
|
|
16336
|
-
const ret = wasm.noteattachment_asArray(this.__wbg_ptr);
|
|
16337
|
-
return ret === 0 ? undefined : FeltArray.__wrap(ret);
|
|
16338
|
-
}
|
|
16339
|
-
/**
|
|
16340
|
-
* Returns the content as a Word if the attachment kind is Word, otherwise None.
|
|
16341
|
-
* @returns {Word | undefined}
|
|
16342
|
-
*/
|
|
16343
|
-
asWord() {
|
|
16344
|
-
const ret = wasm.noteattachment_asWord(this.__wbg_ptr);
|
|
16345
|
-
return ret === 0 ? undefined : Word.__wrap(ret);
|
|
16346
|
-
}
|
|
16347
|
-
/**
|
|
16348
|
-
* Returns the attachment kind.
|
|
16349
|
-
* @returns {NoteAttachmentKind}
|
|
16350
|
-
*/
|
|
16351
|
-
attachmentKind() {
|
|
16352
|
-
const ret = wasm.noteattachment_attachmentKind(this.__wbg_ptr);
|
|
16353
|
-
return ret;
|
|
16354
|
-
}
|
|
16355
16382
|
/**
|
|
16356
16383
|
* Returns the attachment scheme.
|
|
16357
16384
|
* @returns {NoteAttachmentScheme}
|
|
@@ -16361,81 +16388,90 @@ class NoteAttachment {
|
|
|
16361
16388
|
return NoteAttachmentScheme.__wrap(ret);
|
|
16362
16389
|
}
|
|
16363
16390
|
/**
|
|
16364
|
-
* Creates a
|
|
16391
|
+
* Creates a new note attachment from a single word.
|
|
16392
|
+
* @param {NoteAttachmentScheme} scheme
|
|
16393
|
+
* @param {Word} word
|
|
16394
|
+
* @returns {NoteAttachment}
|
|
16365
16395
|
*/
|
|
16366
|
-
|
|
16367
|
-
|
|
16368
|
-
|
|
16369
|
-
|
|
16370
|
-
return
|
|
16396
|
+
static fromWord(scheme, word) {
|
|
16397
|
+
_assertClass(scheme, NoteAttachmentScheme);
|
|
16398
|
+
_assertClass(word, Word);
|
|
16399
|
+
const ret = wasm.noteattachment_fromWord(scheme.__wbg_ptr, word.__wbg_ptr);
|
|
16400
|
+
return NoteAttachment.__wrap(ret);
|
|
16371
16401
|
}
|
|
16372
16402
|
/**
|
|
16373
|
-
* Creates a new note attachment
|
|
16403
|
+
* Creates a new note attachment from a vector of words.
|
|
16404
|
+
*
|
|
16405
|
+
* # Errors
|
|
16406
|
+
* Returns an error if `words` is empty or exceeds `NoteAttachment::MAX_NUM_WORDS`.
|
|
16374
16407
|
* @param {NoteAttachmentScheme} scheme
|
|
16375
|
-
* @param {
|
|
16408
|
+
* @param {Word[]} words
|
|
16376
16409
|
* @returns {NoteAttachment}
|
|
16377
16410
|
*/
|
|
16378
|
-
static
|
|
16411
|
+
static fromWords(scheme, words) {
|
|
16379
16412
|
_assertClass(scheme, NoteAttachmentScheme);
|
|
16380
|
-
|
|
16381
|
-
|
|
16382
|
-
const ret = wasm.
|
|
16413
|
+
const ptr0 = passArrayJsValueToWasm0(words, wasm.__wbindgen_malloc);
|
|
16414
|
+
const len0 = WASM_VECTOR_LEN;
|
|
16415
|
+
const ret = wasm.noteattachment_fromWords(scheme.__wbg_ptr, ptr0, len0);
|
|
16383
16416
|
if (ret[2]) {
|
|
16384
16417
|
throw takeFromExternrefTable0(ret[1]);
|
|
16385
16418
|
}
|
|
16386
16419
|
return NoteAttachment.__wrap(ret[0]);
|
|
16387
16420
|
}
|
|
16388
16421
|
/**
|
|
16389
|
-
* Creates a
|
|
16422
|
+
* Creates a note attachment from an optional list of packed values.
|
|
16390
16423
|
*
|
|
16391
|
-
*
|
|
16392
|
-
*
|
|
16393
|
-
*
|
|
16394
|
-
*
|
|
16395
|
-
*
|
|
16396
|
-
*
|
|
16397
|
-
*
|
|
16424
|
+
* Mirrors the encoding the JS-side `createNoteAttachment` helper performs
|
|
16425
|
+
* and preserves the `new NoteAttachment()` / `new NoteAttachment([...])`
|
|
16426
|
+
* ergonomics the package's own JS wrappers (`js/standalone.js`,
|
|
16427
|
+
* `js/resources/transactions.js`) rely on. The 0.15 surface has no truly
|
|
16428
|
+
* empty attachment (content is 1..=256 words), so the empty case is
|
|
16429
|
+
* represented as a single zero [`Word`] with the `none` scheme:
|
|
16430
|
+
* - no args / empty list → single zero-`Word`, `none` scheme.
|
|
16431
|
+
* - any number of values → padded to a whole number of `Word`s, `none` scheme.
|
|
16398
16432
|
*
|
|
16399
16433
|
* # Errors
|
|
16400
|
-
* Returns an error if
|
|
16401
|
-
*
|
|
16402
|
-
* @param {
|
|
16403
|
-
* @returns {NoteAttachment}
|
|
16434
|
+
* Returns an error if a value is not a canonical field element, or if the
|
|
16435
|
+
* packed word count exceeds `NoteAttachment::MAX_NUM_WORDS`.
|
|
16436
|
+
* @param {BigUint64Array | null} [values]
|
|
16404
16437
|
*/
|
|
16405
|
-
|
|
16406
|
-
|
|
16407
|
-
|
|
16408
|
-
const ret = wasm.
|
|
16438
|
+
constructor(values) {
|
|
16439
|
+
var ptr0 = isLikeNone(values) ? 0 : passArray64ToWasm0(values, wasm.__wbindgen_malloc);
|
|
16440
|
+
var len0 = WASM_VECTOR_LEN;
|
|
16441
|
+
const ret = wasm.noteattachment_new(ptr0, len0);
|
|
16409
16442
|
if (ret[2]) {
|
|
16410
16443
|
throw takeFromExternrefTable0(ret[1]);
|
|
16411
16444
|
}
|
|
16412
|
-
|
|
16445
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
16446
|
+
NoteAttachmentFinalization.register(this, this.__wbg_ptr, this);
|
|
16447
|
+
return this;
|
|
16413
16448
|
}
|
|
16414
16449
|
/**
|
|
16415
|
-
*
|
|
16416
|
-
* @
|
|
16417
|
-
* @param {Word} word
|
|
16418
|
-
* @returns {NoteAttachment}
|
|
16450
|
+
* Returns the number of words in this attachment.
|
|
16451
|
+
* @returns {number}
|
|
16419
16452
|
*/
|
|
16420
|
-
|
|
16421
|
-
|
|
16422
|
-
|
|
16423
|
-
|
|
16424
|
-
|
|
16453
|
+
numWords() {
|
|
16454
|
+
const ret = wasm.noteattachment_numWords(this.__wbg_ptr);
|
|
16455
|
+
return ret;
|
|
16456
|
+
}
|
|
16457
|
+
/**
|
|
16458
|
+
* Returns the attachment content as its constituent words.
|
|
16459
|
+
*
|
|
16460
|
+
* The content is always word-vector-shaped on the 0.15 surface, so this is
|
|
16461
|
+
* the inverse of `fromWord` / `fromWords`: it yields the same `Word`s the
|
|
16462
|
+
* attachment was built from (in order), letting JS callers decode the
|
|
16463
|
+
* packed values back out.
|
|
16464
|
+
* @returns {Word[]}
|
|
16465
|
+
*/
|
|
16466
|
+
toWords() {
|
|
16467
|
+
const ret = wasm.noteattachment_toWords(this.__wbg_ptr);
|
|
16468
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
16469
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
16470
|
+
return v1;
|
|
16425
16471
|
}
|
|
16426
16472
|
}
|
|
16427
16473
|
if (Symbol.dispose) NoteAttachment.prototype[Symbol.dispose] = NoteAttachment.prototype.free;
|
|
16428
16474
|
|
|
16429
|
-
/**
|
|
16430
|
-
* Defines the payload shape of a note attachment.
|
|
16431
|
-
* @enum {0 | 1 | 2}
|
|
16432
|
-
*/
|
|
16433
|
-
const NoteAttachmentKind = Object.freeze({
|
|
16434
|
-
None: 0, "0": "None",
|
|
16435
|
-
Word: 1, "1": "Word",
|
|
16436
|
-
Array: 2, "2": "Array",
|
|
16437
|
-
});
|
|
16438
|
-
|
|
16439
16475
|
/**
|
|
16440
16476
|
* Describes the type of a note attachment.
|
|
16441
16477
|
*
|
|
@@ -16460,14 +16496,6 @@ class NoteAttachmentScheme {
|
|
|
16460
16496
|
const ptr = this.__destroy_into_raw();
|
|
16461
16497
|
wasm.__wbg_noteattachmentscheme_free(ptr, 0);
|
|
16462
16498
|
}
|
|
16463
|
-
/**
|
|
16464
|
-
* Returns the note attachment scheme as a u32.
|
|
16465
|
-
* @returns {number}
|
|
16466
|
-
*/
|
|
16467
|
-
asU32() {
|
|
16468
|
-
const ret = wasm.noteattachmentscheme_asU32(this.__wbg_ptr);
|
|
16469
|
-
return ret >>> 0;
|
|
16470
|
-
}
|
|
16471
16499
|
/**
|
|
16472
16500
|
* Returns true if the attachment scheme is the reserved value that signals an absent scheme.
|
|
16473
16501
|
* @returns {boolean}
|
|
@@ -16477,12 +16505,19 @@ class NoteAttachmentScheme {
|
|
|
16477
16505
|
return ret !== 0;
|
|
16478
16506
|
}
|
|
16479
16507
|
/**
|
|
16480
|
-
* Creates a new `NoteAttachmentScheme` from a u32.
|
|
16508
|
+
* Creates a new `NoteAttachmentScheme` from a u32 value.
|
|
16509
|
+
*
|
|
16510
|
+
* Errors if `scheme` is out of range (the 0.15 surface narrowed the
|
|
16511
|
+
* underlying type from u32 → u16, so values outside `0..=u16::MAX`
|
|
16512
|
+
* are rejected).
|
|
16481
16513
|
* @param {number} scheme
|
|
16482
16514
|
*/
|
|
16483
16515
|
constructor(scheme) {
|
|
16484
16516
|
const ret = wasm.noteattachmentscheme_new(scheme);
|
|
16485
|
-
|
|
16517
|
+
if (ret[2]) {
|
|
16518
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
16519
|
+
}
|
|
16520
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
16486
16521
|
NoteAttachmentSchemeFinalization.register(this, this.__wbg_ptr, this);
|
|
16487
16522
|
return this;
|
|
16488
16523
|
}
|
|
@@ -16622,6 +16657,14 @@ if (Symbol.dispose) NoteConsumptionStatus.prototype[Symbol.dispose] = NoteConsum
|
|
|
16622
16657
|
* Details of a note consisting of assets, script, inputs, and a serial number.
|
|
16623
16658
|
*
|
|
16624
16659
|
* See the {@link Note} type for more details.
|
|
16660
|
+
*
|
|
16661
|
+
* Migration note (miden-client PR #2214): `NoteDetails::id()` and
|
|
16662
|
+
* `NoteDetails::nullifier()` were removed on the 0.15 protocol surface —
|
|
16663
|
+
* the ID now requires a `NoteMetadata` to compute (see `NoteId::new`),
|
|
16664
|
+
* and the nullifier moved onto `InputNoteRecord` where it is optional.
|
|
16665
|
+
* Use `details_commitment()` on a containing record (e.g.
|
|
16666
|
+
* `InputNoteRecord::details_commitment`) for the metadata-independent
|
|
16667
|
+
* identifier.
|
|
16625
16668
|
*/
|
|
16626
16669
|
class NoteDetails {
|
|
16627
16670
|
static __wrap(ptr) {
|
|
@@ -16649,14 +16692,6 @@ class NoteDetails {
|
|
|
16649
16692
|
const ret = wasm.notedetails_assets(this.__wbg_ptr);
|
|
16650
16693
|
return NoteAssets.__wrap(ret);
|
|
16651
16694
|
}
|
|
16652
|
-
/**
|
|
16653
|
-
* Returns the note identifier derived from these details.
|
|
16654
|
-
* @returns {NoteId}
|
|
16655
|
-
*/
|
|
16656
|
-
id() {
|
|
16657
|
-
const ret = wasm.notedetails_id(this.__wbg_ptr);
|
|
16658
|
-
return NoteId.__wrap(ret);
|
|
16659
|
-
}
|
|
16660
16695
|
/**
|
|
16661
16696
|
* Creates a new set of note details from the given assets and recipient.
|
|
16662
16697
|
* @param {NoteAssets} note_assets
|
|
@@ -16670,14 +16705,6 @@ class NoteDetails {
|
|
|
16670
16705
|
NoteDetailsFinalization.register(this, this.__wbg_ptr, this);
|
|
16671
16706
|
return this;
|
|
16672
16707
|
}
|
|
16673
|
-
/**
|
|
16674
|
-
* Returns the note nullifier as a word.
|
|
16675
|
-
* @returns {Word}
|
|
16676
|
-
*/
|
|
16677
|
-
nullifier() {
|
|
16678
|
-
const ret = wasm.notedetails_nullifier(this.__wbg_ptr);
|
|
16679
|
-
return Word.__wrap(ret);
|
|
16680
|
-
}
|
|
16681
16708
|
/**
|
|
16682
16709
|
* Returns the recipient which controls when the note can be consumed.
|
|
16683
16710
|
* @returns {NoteRecipient}
|
|
@@ -17030,12 +17057,17 @@ class NoteFile {
|
|
|
17030
17057
|
return ret === 0 ? undefined : NoteDetails.__wrap(ret);
|
|
17031
17058
|
}
|
|
17032
17059
|
/**
|
|
17033
|
-
* Returns the note ID
|
|
17034
|
-
*
|
|
17060
|
+
* Returns the note ID when the file carries one.
|
|
17061
|
+
*
|
|
17062
|
+
* Migration note (miden-client PR #2214): `NoteDetails::id()` was
|
|
17063
|
+
* removed (computing the ID now requires `NoteMetadata`), so the
|
|
17064
|
+
* `NoteDetails`-only variant cannot synthesize one without extra
|
|
17065
|
+
* information. Returns `None` in that case.
|
|
17066
|
+
* @returns {NoteId | undefined}
|
|
17035
17067
|
*/
|
|
17036
17068
|
noteId() {
|
|
17037
17069
|
const ret = wasm.notefile_noteId(this.__wbg_ptr);
|
|
17038
|
-
return NoteId.__wrap(ret);
|
|
17070
|
+
return ret === 0 ? undefined : NoteId.__wrap(ret);
|
|
17039
17071
|
}
|
|
17040
17072
|
/**
|
|
17041
17073
|
* Returns the note tag hint when present.
|
|
@@ -17063,6 +17095,10 @@ class NoteFile {
|
|
|
17063
17095
|
}
|
|
17064
17096
|
/**
|
|
17065
17097
|
* Returns the note nullifier when present.
|
|
17098
|
+
*
|
|
17099
|
+
* Migration note (miden-client PR #2214): `NoteDetails::nullifier()`
|
|
17100
|
+
* was removed (the nullifier moved onto `InputNoteRecord` and is
|
|
17101
|
+
* optional there), so the `NoteDetails`-only variant returns `None`.
|
|
17066
17102
|
* @returns {string | undefined}
|
|
17067
17103
|
*/
|
|
17068
17104
|
nullifier() {
|
|
@@ -17138,13 +17174,6 @@ const NoteFilterTypes = Object.freeze({
|
|
|
17138
17174
|
* See `NoteId` and `NoteMetadata` for additional details.
|
|
17139
17175
|
*/
|
|
17140
17176
|
class NoteHeader {
|
|
17141
|
-
static __wrap(ptr) {
|
|
17142
|
-
ptr = ptr >>> 0;
|
|
17143
|
-
const obj = Object.create(NoteHeader.prototype);
|
|
17144
|
-
obj.__wbg_ptr = ptr;
|
|
17145
|
-
NoteHeaderFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
17146
|
-
return obj;
|
|
17147
|
-
}
|
|
17148
17177
|
__destroy_into_raw() {
|
|
17149
17178
|
const ptr = this.__wbg_ptr;
|
|
17150
17179
|
this.__wbg_ptr = 0;
|
|
@@ -17160,7 +17189,7 @@ class NoteHeader {
|
|
|
17160
17189
|
* @returns {NoteId}
|
|
17161
17190
|
*/
|
|
17162
17191
|
id() {
|
|
17163
|
-
const ret = wasm.
|
|
17192
|
+
const ret = wasm.noteheader_id(this.__wbg_ptr);
|
|
17164
17193
|
return NoteId.__wrap(ret);
|
|
17165
17194
|
}
|
|
17166
17195
|
/**
|
|
@@ -17171,14 +17200,6 @@ class NoteHeader {
|
|
|
17171
17200
|
const ret = wasm.noteheader_metadata(this.__wbg_ptr);
|
|
17172
17201
|
return NoteMetadata.__wrap(ret);
|
|
17173
17202
|
}
|
|
17174
|
-
/**
|
|
17175
|
-
* Returns a commitment to the note ID and metadata.
|
|
17176
|
-
* @returns {Word}
|
|
17177
|
-
*/
|
|
17178
|
-
toCommitment() {
|
|
17179
|
-
const ret = wasm.noteheader_toCommitment(this.__wbg_ptr);
|
|
17180
|
-
return Word.__wrap(ret);
|
|
17181
|
-
}
|
|
17182
17203
|
}
|
|
17183
17204
|
if (Symbol.dispose) NoteHeader.prototype[Symbol.dispose] = NoteHeader.prototype.free;
|
|
17184
17205
|
|
|
@@ -17187,16 +17208,14 @@ if (Symbol.dispose) NoteHeader.prototype[Symbol.dispose] = NoteHeader.prototype.
|
|
|
17187
17208
|
*
|
|
17188
17209
|
* Note ID is computed as:
|
|
17189
17210
|
*
|
|
17190
|
-
* > `hash(
|
|
17191
|
-
*
|
|
17192
|
-
* where `recipient` is defined as:
|
|
17211
|
+
* > `hash(details_commitment, metadata_commitment)`
|
|
17193
17212
|
*
|
|
17194
|
-
*
|
|
17195
|
-
*
|
|
17196
|
-
*
|
|
17197
|
-
*
|
|
17198
|
-
* -
|
|
17199
|
-
*
|
|
17213
|
+
* On the 0.15 protocol surface the upstream `NoteId::new` signature
|
|
17214
|
+
* changed from `(recipient_digest, asset_commitment)` to
|
|
17215
|
+
* `(NoteDetailsCommitment, &NoteMetadata)`. The JS API exposes
|
|
17216
|
+
* `NoteId.fromRaw(word)` for constructing an ID from a pre-computed
|
|
17217
|
+
* 32-byte commitment word (the previous two-Word constructor has no
|
|
17218
|
+
* 0.15 equivalent).
|
|
17200
17219
|
*/
|
|
17201
17220
|
class NoteId {
|
|
17202
17221
|
static __wrap(ptr) {
|
|
@@ -17237,17 +17256,18 @@ class NoteId {
|
|
|
17237
17256
|
return NoteId.__wrap(ret[0]);
|
|
17238
17257
|
}
|
|
17239
17258
|
/**
|
|
17240
|
-
* Builds a note ID from
|
|
17241
|
-
*
|
|
17242
|
-
*
|
|
17259
|
+
* Builds a note ID from its raw commitment word.
|
|
17260
|
+
*
|
|
17261
|
+
* `word` must already encode the final note-ID commitment — the
|
|
17262
|
+
* metadata-mixing that the previous 2-Word constructor did is no
|
|
17263
|
+
* longer part of the protocol surface.
|
|
17264
|
+
* @param {Word} word
|
|
17265
|
+
* @returns {NoteId}
|
|
17243
17266
|
*/
|
|
17244
|
-
|
|
17245
|
-
_assertClass(
|
|
17246
|
-
|
|
17247
|
-
|
|
17248
|
-
this.__wbg_ptr = ret >>> 0;
|
|
17249
|
-
NoteIdFinalization.register(this, this.__wbg_ptr, this);
|
|
17250
|
-
return this;
|
|
17267
|
+
static fromRaw(word) {
|
|
17268
|
+
_assertClass(word, Word);
|
|
17269
|
+
const ret = wasm.accountcode_commitment(word.__wbg_ptr);
|
|
17270
|
+
return NoteId.__wrap(ret);
|
|
17251
17271
|
}
|
|
17252
17272
|
/**
|
|
17253
17273
|
* Returns the canonical hex representation of the note ID.
|
|
@@ -17460,7 +17480,7 @@ class NoteLocation {
|
|
|
17460
17480
|
* @returns {number}
|
|
17461
17481
|
*/
|
|
17462
17482
|
blockNum() {
|
|
17463
|
-
const ret = wasm.
|
|
17483
|
+
const ret = wasm.notelocation_blockNum(this.__wbg_ptr);
|
|
17464
17484
|
return ret >>> 0;
|
|
17465
17485
|
}
|
|
17466
17486
|
}
|
|
@@ -17469,8 +17489,13 @@ if (Symbol.dispose) NoteLocation.prototype[Symbol.dispose] = NoteLocation.protot
|
|
|
17469
17489
|
/**
|
|
17470
17490
|
* Metadata associated with a note.
|
|
17471
17491
|
*
|
|
17472
|
-
*
|
|
17473
|
-
*
|
|
17492
|
+
* 0.15 protocol surface: `NoteMetadata` is now constructed from a
|
|
17493
|
+
* [`PartialNoteMetadata`] (sender / `note_type` / tag) plus a `NoteAttachments`
|
|
17494
|
+
* collection — the previous `with_tag` / `with_attachment` / `attachment`
|
|
17495
|
+
* methods on `NoteMetadata` were moved (`with_tag` lives on
|
|
17496
|
+
* `PartialNoteMetadata`) or removed (`with_attachment` / `attachment`).
|
|
17497
|
+
* The JS constructor narrows back to the common case of an
|
|
17498
|
+
* attachment-less metadata.
|
|
17474
17499
|
*/
|
|
17475
17500
|
class NoteMetadata {
|
|
17476
17501
|
static __wrap(ptr) {
|
|
@@ -17491,15 +17516,7 @@ class NoteMetadata {
|
|
|
17491
17516
|
wasm.__wbg_notemetadata_free(ptr, 0);
|
|
17492
17517
|
}
|
|
17493
17518
|
/**
|
|
17494
|
-
*
|
|
17495
|
-
* @returns {NoteAttachment}
|
|
17496
|
-
*/
|
|
17497
|
-
attachment() {
|
|
17498
|
-
const ret = wasm.notemetadata_attachment(this.__wbg_ptr);
|
|
17499
|
-
return NoteAttachment.__wrap(ret);
|
|
17500
|
-
}
|
|
17501
|
-
/**
|
|
17502
|
-
* Creates metadata for a note.
|
|
17519
|
+
* Creates metadata for a note with no attachments.
|
|
17503
17520
|
* @param {AccountId} sender
|
|
17504
17521
|
* @param {NoteType} note_type
|
|
17505
17522
|
* @param {NoteTag} note_tag
|
|
@@ -17525,7 +17542,7 @@ class NoteMetadata {
|
|
|
17525
17542
|
* @returns {AccountId}
|
|
17526
17543
|
*/
|
|
17527
17544
|
sender() {
|
|
17528
|
-
const ret = wasm.
|
|
17545
|
+
const ret = wasm.notemetadata_sender(this.__wbg_ptr);
|
|
17529
17546
|
return AccountId.__wrap(ret);
|
|
17530
17547
|
}
|
|
17531
17548
|
/**
|
|
@@ -17536,30 +17553,6 @@ class NoteMetadata {
|
|
|
17536
17553
|
const ret = wasm.notemetadata_tag(this.__wbg_ptr);
|
|
17537
17554
|
return NoteTag.__wrap(ret);
|
|
17538
17555
|
}
|
|
17539
|
-
/**
|
|
17540
|
-
* Adds an attachment to this metadata and returns the updated metadata.
|
|
17541
|
-
*
|
|
17542
|
-
* Attachments provide additional context about how notes should be processed.
|
|
17543
|
-
* For example, a `NetworkAccountTarget` attachment indicates that the note
|
|
17544
|
-
* should be consumed by a specific network account.
|
|
17545
|
-
* @param {NoteAttachment} attachment
|
|
17546
|
-
* @returns {NoteMetadata}
|
|
17547
|
-
*/
|
|
17548
|
-
withAttachment(attachment) {
|
|
17549
|
-
_assertClass(attachment, NoteAttachment);
|
|
17550
|
-
const ret = wasm.notemetadata_withAttachment(this.__wbg_ptr, attachment.__wbg_ptr);
|
|
17551
|
-
return NoteMetadata.__wrap(ret);
|
|
17552
|
-
}
|
|
17553
|
-
/**
|
|
17554
|
-
* Sets the tag for this metadata and returns the updated metadata.
|
|
17555
|
-
* @param {NoteTag} tag
|
|
17556
|
-
* @returns {NoteMetadata}
|
|
17557
|
-
*/
|
|
17558
|
-
withTag(tag) {
|
|
17559
|
-
_assertClass(tag, NoteTag);
|
|
17560
|
-
const ret = wasm.notemetadata_withTag(this.__wbg_ptr, tag.__wbg_ptr);
|
|
17561
|
-
return NoteMetadata.__wrap(ret);
|
|
17562
|
-
}
|
|
17563
17556
|
}
|
|
17564
17557
|
if (Symbol.dispose) NoteMetadata.prototype[Symbol.dispose] = NoteMetadata.prototype.free;
|
|
17565
17558
|
|
|
@@ -17884,7 +17877,7 @@ class NoteStorage {
|
|
|
17884
17877
|
if (Symbol.dispose) NoteStorage.prototype[Symbol.dispose] = NoteStorage.prototype.free;
|
|
17885
17878
|
|
|
17886
17879
|
/**
|
|
17887
|
-
* Represents a single block's worth of note sync data
|
|
17880
|
+
* Represents a single block's worth of note sync data returned by `syncNotes`.
|
|
17888
17881
|
*/
|
|
17889
17882
|
class NoteSyncBlock {
|
|
17890
17883
|
static __wrap(ptr) {
|
|
@@ -17934,7 +17927,12 @@ class NoteSyncBlock {
|
|
|
17934
17927
|
if (Symbol.dispose) NoteSyncBlock.prototype[Symbol.dispose] = NoteSyncBlock.prototype.free;
|
|
17935
17928
|
|
|
17936
17929
|
/**
|
|
17937
|
-
*
|
|
17930
|
+
* Aggregates the response data from `syncNotes`: the per-block updates plus
|
|
17931
|
+
* the upper bound of the requested range.
|
|
17932
|
+
*
|
|
17933
|
+
* The previous `chain_tip` accessor is gone — the upstream `sync_notes` RPC
|
|
17934
|
+
* no longer returns the current chain tip on this endpoint. Use the
|
|
17935
|
+
* regular state-sync flow (`syncState`) for the latest synced height.
|
|
17938
17936
|
*/
|
|
17939
17937
|
class NoteSyncInfo {
|
|
17940
17938
|
static __wrap(ptr) {
|
|
@@ -17955,7 +17953,9 @@ class NoteSyncInfo {
|
|
|
17955
17953
|
wasm.__wbg_notesyncinfo_free(ptr, 0);
|
|
17956
17954
|
}
|
|
17957
17955
|
/**
|
|
17958
|
-
* Returns the first block header
|
|
17956
|
+
* Returns the first block header with matching notes, if any. Convenience
|
|
17957
|
+
* for callers that only requested a single tag and want the most recent
|
|
17958
|
+
* inclusion block.
|
|
17959
17959
|
* @returns {BlockHeader | undefined}
|
|
17960
17960
|
*/
|
|
17961
17961
|
blockHeader() {
|
|
@@ -17963,15 +17963,16 @@ class NoteSyncInfo {
|
|
|
17963
17963
|
return ret === 0 ? undefined : BlockHeader.__wrap(ret);
|
|
17964
17964
|
}
|
|
17965
17965
|
/**
|
|
17966
|
-
* Returns the
|
|
17966
|
+
* Returns the upper bound of the block range scanned in this call (the
|
|
17967
|
+
* `blockTo` argument passed to `syncNotes`).
|
|
17967
17968
|
* @returns {number}
|
|
17968
17969
|
*/
|
|
17969
17970
|
blockTo() {
|
|
17970
|
-
const ret = wasm.
|
|
17971
|
+
const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
|
|
17971
17972
|
return ret >>> 0;
|
|
17972
17973
|
}
|
|
17973
17974
|
/**
|
|
17974
|
-
* Returns the
|
|
17975
|
+
* Returns the per-block breakdown.
|
|
17975
17976
|
* @returns {NoteSyncBlock[]}
|
|
17976
17977
|
*/
|
|
17977
17978
|
blocks() {
|
|
@@ -17981,15 +17982,7 @@ class NoteSyncInfo {
|
|
|
17981
17982
|
return v1;
|
|
17982
17983
|
}
|
|
17983
17984
|
/**
|
|
17984
|
-
* Returns the
|
|
17985
|
-
* @returns {number}
|
|
17986
|
-
*/
|
|
17987
|
-
chainTip() {
|
|
17988
|
-
const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
|
|
17989
|
-
return ret >>> 0;
|
|
17990
|
-
}
|
|
17991
|
-
/**
|
|
17992
|
-
* Returns the first block MMR path associated with matching notes, if any.
|
|
17985
|
+
* Returns the MMR path of the first block with matching notes, if any.
|
|
17993
17986
|
* @returns {MerklePath | undefined}
|
|
17994
17987
|
*/
|
|
17995
17988
|
mmrPath() {
|
|
@@ -17997,7 +17990,7 @@ class NoteSyncInfo {
|
|
|
17997
17990
|
return ret === 0 ? undefined : MerklePath.__wrap(ret);
|
|
17998
17991
|
}
|
|
17999
17992
|
/**
|
|
18000
|
-
* Returns
|
|
17993
|
+
* Returns every committed note across all matching blocks (flattened).
|
|
18001
17994
|
* @returns {CommittedNote[]}
|
|
18002
17995
|
*/
|
|
18003
17996
|
notes() {
|
|
@@ -18044,7 +18037,7 @@ class NoteTag {
|
|
|
18044
18037
|
* @returns {number}
|
|
18045
18038
|
*/
|
|
18046
18039
|
asU32() {
|
|
18047
|
-
const ret = wasm.
|
|
18040
|
+
const ret = wasm.notelocation_blockNum(this.__wbg_ptr);
|
|
18048
18041
|
return ret >>> 0;
|
|
18049
18042
|
}
|
|
18050
18043
|
/**
|
|
@@ -18052,7 +18045,7 @@ class NoteTag {
|
|
|
18052
18045
|
* @param {number} tag
|
|
18053
18046
|
*/
|
|
18054
18047
|
constructor(tag) {
|
|
18055
|
-
const ret = wasm.
|
|
18048
|
+
const ret = wasm.notetag_new(tag);
|
|
18056
18049
|
this.__wbg_ptr = ret >>> 0;
|
|
18057
18050
|
NoteTagFinalization.register(this, this.__wbg_ptr, this);
|
|
18058
18051
|
return this;
|
|
@@ -18165,7 +18158,7 @@ class OutputNote {
|
|
|
18165
18158
|
* @returns {NoteMetadata}
|
|
18166
18159
|
*/
|
|
18167
18160
|
metadata() {
|
|
18168
|
-
const ret = wasm.
|
|
18161
|
+
const ret = wasm.committednote_metadata(this.__wbg_ptr);
|
|
18169
18162
|
return NoteMetadata.__wrap(ret);
|
|
18170
18163
|
}
|
|
18171
18164
|
/**
|
|
@@ -18293,7 +18286,7 @@ class OutputNoteRecord {
|
|
|
18293
18286
|
* @returns {number}
|
|
18294
18287
|
*/
|
|
18295
18288
|
expectedHeight() {
|
|
18296
|
-
const ret = wasm.
|
|
18289
|
+
const ret = wasm.outputnoterecord_expectedHeight(this.__wbg_ptr);
|
|
18297
18290
|
return ret >>> 0;
|
|
18298
18291
|
}
|
|
18299
18292
|
/**
|
|
@@ -18333,7 +18326,7 @@ class OutputNoteRecord {
|
|
|
18333
18326
|
* @returns {NoteMetadata}
|
|
18334
18327
|
*/
|
|
18335
18328
|
metadata() {
|
|
18336
|
-
const ret = wasm.
|
|
18329
|
+
const ret = wasm.committednote_metadata(this.__wbg_ptr);
|
|
18337
18330
|
return NoteMetadata.__wrap(ret);
|
|
18338
18331
|
}
|
|
18339
18332
|
/**
|
|
@@ -18564,7 +18557,7 @@ class PartialNote {
|
|
|
18564
18557
|
* @returns {NoteMetadata}
|
|
18565
18558
|
*/
|
|
18566
18559
|
metadata() {
|
|
18567
|
-
const ret = wasm.
|
|
18560
|
+
const ret = wasm.committednote_metadata(this.__wbg_ptr);
|
|
18568
18561
|
return NoteMetadata.__wrap(ret);
|
|
18569
18562
|
}
|
|
18570
18563
|
/**
|
|
@@ -18965,9 +18958,10 @@ class RpcClient {
|
|
|
18965
18958
|
* Fetches a note script by its root hash from the connected Miden node.
|
|
18966
18959
|
*
|
|
18967
18960
|
* @param script_root - The root hash of the note script to fetch.
|
|
18968
|
-
* @returns Promise that resolves to the `NoteScript
|
|
18961
|
+
* @returns Promise that resolves to the `NoteScript`, or `undefined` if the node has no
|
|
18962
|
+
* script for that root.
|
|
18969
18963
|
* @param {Word} script_root
|
|
18970
|
-
* @returns {Promise<NoteScript>}
|
|
18964
|
+
* @returns {Promise<NoteScript | undefined>}
|
|
18971
18965
|
*/
|
|
18972
18966
|
getNoteScriptByRoot(script_root) {
|
|
18973
18967
|
_assertClass(script_root, Word);
|
|
@@ -19021,15 +19015,15 @@ class RpcClient {
|
|
|
19021
19015
|
}
|
|
19022
19016
|
/**
|
|
19023
19017
|
* Fetches notes matching the provided tags from the node.
|
|
19024
|
-
* @param {number}
|
|
19025
|
-
* @param {number
|
|
19018
|
+
* @param {number} block_from
|
|
19019
|
+
* @param {number} block_to
|
|
19026
19020
|
* @param {NoteTag[]} note_tags
|
|
19027
19021
|
* @returns {Promise<NoteSyncInfo>}
|
|
19028
19022
|
*/
|
|
19029
|
-
syncNotes(
|
|
19023
|
+
syncNotes(block_from, block_to, note_tags) {
|
|
19030
19024
|
const ptr0 = passArrayJsValueToWasm0(note_tags, wasm.__wbindgen_malloc);
|
|
19031
19025
|
const len0 = WASM_VECTOR_LEN;
|
|
19032
|
-
const ret = wasm.rpcclient_syncNotes(this.__wbg_ptr,
|
|
19026
|
+
const ret = wasm.rpcclient_syncNotes(this.__wbg_ptr, block_from, block_to, ptr0, len0);
|
|
19033
19027
|
return ret;
|
|
19034
19028
|
}
|
|
19035
19029
|
/**
|
|
@@ -19107,6 +19101,15 @@ class SerializedInputNoteData {
|
|
|
19107
19101
|
const ptr = this.__destroy_into_raw();
|
|
19108
19102
|
wasm.__wbg_serializedinputnotedata_free(ptr, 0);
|
|
19109
19103
|
}
|
|
19104
|
+
/**
|
|
19105
|
+
* @returns {Uint8Array}
|
|
19106
|
+
*/
|
|
19107
|
+
get attachments() {
|
|
19108
|
+
const ret = wasm.__wbg_get_serializedinputnotedata_attachments(this.__wbg_ptr);
|
|
19109
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
19110
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
19111
|
+
return v1;
|
|
19112
|
+
}
|
|
19110
19113
|
/**
|
|
19111
19114
|
* @returns {number | undefined}
|
|
19112
19115
|
*/
|
|
@@ -19148,6 +19151,21 @@ class SerializedInputNoteData {
|
|
|
19148
19151
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
19149
19152
|
}
|
|
19150
19153
|
}
|
|
19154
|
+
/**
|
|
19155
|
+
* @returns {string}
|
|
19156
|
+
*/
|
|
19157
|
+
get detailsCommitment() {
|
|
19158
|
+
let deferred1_0;
|
|
19159
|
+
let deferred1_1;
|
|
19160
|
+
try {
|
|
19161
|
+
const ret = wasm.__wbg_get_serializedinputnotedata_detailsCommitment(this.__wbg_ptr);
|
|
19162
|
+
deferred1_0 = ret[0];
|
|
19163
|
+
deferred1_1 = ret[1];
|
|
19164
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
19165
|
+
} finally {
|
|
19166
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
19167
|
+
}
|
|
19168
|
+
}
|
|
19151
19169
|
/**
|
|
19152
19170
|
* @returns {Uint8Array}
|
|
19153
19171
|
*/
|
|
@@ -19167,19 +19185,16 @@ class SerializedInputNoteData {
|
|
|
19167
19185
|
return v1;
|
|
19168
19186
|
}
|
|
19169
19187
|
/**
|
|
19170
|
-
* @returns {string}
|
|
19188
|
+
* @returns {string | undefined}
|
|
19171
19189
|
*/
|
|
19172
19190
|
get noteId() {
|
|
19173
|
-
|
|
19174
|
-
let
|
|
19175
|
-
|
|
19176
|
-
|
|
19177
|
-
|
|
19178
|
-
deferred1_1 = ret[1];
|
|
19179
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
19180
|
-
} finally {
|
|
19181
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
19191
|
+
const ret = wasm.__wbg_get_serializedinputnotedata_noteId(this.__wbg_ptr);
|
|
19192
|
+
let v1;
|
|
19193
|
+
if (ret[0] !== 0) {
|
|
19194
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
19195
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
19182
19196
|
}
|
|
19197
|
+
return v1;
|
|
19183
19198
|
}
|
|
19184
19199
|
/**
|
|
19185
19200
|
* @returns {string}
|
|
@@ -19245,6 +19260,14 @@ class SerializedInputNoteData {
|
|
|
19245
19260
|
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
19246
19261
|
return v1;
|
|
19247
19262
|
}
|
|
19263
|
+
/**
|
|
19264
|
+
* @param {Uint8Array} arg0
|
|
19265
|
+
*/
|
|
19266
|
+
set attachments(arg0) {
|
|
19267
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
19268
|
+
const len0 = WASM_VECTOR_LEN;
|
|
19269
|
+
wasm.__wbg_set_serializedinputnotedata_attachments(this.__wbg_ptr, ptr0, len0);
|
|
19270
|
+
}
|
|
19248
19271
|
/**
|
|
19249
19272
|
* @param {number | null} [arg0]
|
|
19250
19273
|
*/
|
|
@@ -19273,6 +19296,14 @@ class SerializedInputNoteData {
|
|
|
19273
19296
|
const len0 = WASM_VECTOR_LEN;
|
|
19274
19297
|
wasm.__wbg_set_serializedinputnotedata_createdAt(this.__wbg_ptr, ptr0, len0);
|
|
19275
19298
|
}
|
|
19299
|
+
/**
|
|
19300
|
+
* @param {string} arg0
|
|
19301
|
+
*/
|
|
19302
|
+
set detailsCommitment(arg0) {
|
|
19303
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
19304
|
+
const len0 = WASM_VECTOR_LEN;
|
|
19305
|
+
wasm.__wbg_set_serializedinputnotedata_detailsCommitment(this.__wbg_ptr, ptr0, len0);
|
|
19306
|
+
}
|
|
19276
19307
|
/**
|
|
19277
19308
|
* @param {Uint8Array} arg0
|
|
19278
19309
|
*/
|
|
@@ -19290,11 +19321,11 @@ class SerializedInputNoteData {
|
|
|
19290
19321
|
wasm.__wbg_set_serializedinputnotedata_noteAssets(this.__wbg_ptr, ptr0, len0);
|
|
19291
19322
|
}
|
|
19292
19323
|
/**
|
|
19293
|
-
* @param {string} arg0
|
|
19324
|
+
* @param {string | null} [arg0]
|
|
19294
19325
|
*/
|
|
19295
19326
|
set noteId(arg0) {
|
|
19296
|
-
|
|
19297
|
-
|
|
19327
|
+
var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
19328
|
+
var len0 = WASM_VECTOR_LEN;
|
|
19298
19329
|
wasm.__wbg_set_serializedinputnotedata_noteId(this.__wbg_ptr, ptr0, len0);
|
|
19299
19330
|
}
|
|
19300
19331
|
/**
|
|
@@ -19370,6 +19401,15 @@ class SerializedOutputNoteData {
|
|
|
19370
19401
|
const ptr = this.__destroy_into_raw();
|
|
19371
19402
|
wasm.__wbg_serializedoutputnotedata_free(ptr, 0);
|
|
19372
19403
|
}
|
|
19404
|
+
/**
|
|
19405
|
+
* @returns {Uint8Array}
|
|
19406
|
+
*/
|
|
19407
|
+
get attachments() {
|
|
19408
|
+
const ret = wasm.__wbg_get_serializedoutputnotedata_attachments(this.__wbg_ptr);
|
|
19409
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
19410
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
19411
|
+
return v1;
|
|
19412
|
+
}
|
|
19373
19413
|
/**
|
|
19374
19414
|
* @returns {number}
|
|
19375
19415
|
*/
|
|
@@ -19453,6 +19493,14 @@ class SerializedOutputNoteData {
|
|
|
19453
19493
|
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
19454
19494
|
return v1;
|
|
19455
19495
|
}
|
|
19496
|
+
/**
|
|
19497
|
+
* @param {Uint8Array} arg0
|
|
19498
|
+
*/
|
|
19499
|
+
set attachments(arg0) {
|
|
19500
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
19501
|
+
const len0 = WASM_VECTOR_LEN;
|
|
19502
|
+
wasm.__wbg_set_serializedoutputnotedata_attachments(this.__wbg_ptr, ptr0, len0);
|
|
19503
|
+
}
|
|
19456
19504
|
/**
|
|
19457
19505
|
* @param {number} arg0
|
|
19458
19506
|
*/
|
|
@@ -19465,7 +19513,7 @@ class SerializedOutputNoteData {
|
|
|
19465
19513
|
set metadata(arg0) {
|
|
19466
19514
|
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
19467
19515
|
const len0 = WASM_VECTOR_LEN;
|
|
19468
|
-
wasm.
|
|
19516
|
+
wasm.__wbg_set_jsstatesyncupdate_blockHasRelevantNotes(this.__wbg_ptr, ptr0, len0);
|
|
19469
19517
|
}
|
|
19470
19518
|
/**
|
|
19471
19519
|
* @param {Uint8Array} arg0
|
|
@@ -19497,7 +19545,7 @@ class SerializedOutputNoteData {
|
|
|
19497
19545
|
set recipientDigest(arg0) {
|
|
19498
19546
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
19499
19547
|
const len0 = WASM_VECTOR_LEN;
|
|
19500
|
-
wasm.
|
|
19548
|
+
wasm.__wbg_set_jsaccountupdate_vaultRoot(this.__wbg_ptr, ptr0, len0);
|
|
19501
19549
|
}
|
|
19502
19550
|
/**
|
|
19503
19551
|
* @param {number} arg0
|
|
@@ -19653,7 +19701,7 @@ class SerializedTransactionData {
|
|
|
19653
19701
|
set status(arg0) {
|
|
19654
19702
|
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
19655
19703
|
const len0 = WASM_VECTOR_LEN;
|
|
19656
|
-
wasm.
|
|
19704
|
+
wasm.__wbg_set_serializedoutputnotedata_attachments(this.__wbg_ptr, ptr0, len0);
|
|
19657
19705
|
}
|
|
19658
19706
|
/**
|
|
19659
19707
|
* @param {Uint8Array | null} [arg0]
|
|
@@ -20214,7 +20262,7 @@ class StorageMapInfo {
|
|
|
20214
20262
|
* @returns {number}
|
|
20215
20263
|
*/
|
|
20216
20264
|
blockNumber() {
|
|
20217
|
-
const ret = wasm.
|
|
20265
|
+
const ret = wasm.storagemapinfo_blockNumber(this.__wbg_ptr);
|
|
20218
20266
|
return ret >>> 0;
|
|
20219
20267
|
}
|
|
20220
20268
|
/**
|
|
@@ -20265,7 +20313,7 @@ class StorageMapUpdate {
|
|
|
20265
20313
|
* @returns {number}
|
|
20266
20314
|
*/
|
|
20267
20315
|
blockNum() {
|
|
20268
|
-
const ret = wasm.
|
|
20316
|
+
const ret = wasm.committednote_tag(this.__wbg_ptr);
|
|
20269
20317
|
return ret >>> 0;
|
|
20270
20318
|
}
|
|
20271
20319
|
/**
|
|
@@ -20901,6 +20949,33 @@ class TransactionProver {
|
|
|
20901
20949
|
}
|
|
20902
20950
|
return v1;
|
|
20903
20951
|
}
|
|
20952
|
+
/**
|
|
20953
|
+
* Creates a prover that delegates `prove()` to a JavaScript callback.
|
|
20954
|
+
*
|
|
20955
|
+
* The callback receives the serialized [`TransactionInputs`] as a
|
|
20956
|
+
* `Uint8Array` and must return a `Promise<Uint8Array>` resolving to a
|
|
20957
|
+
* serialized [`ProvenTransaction`] (same encoding the gRPC remote
|
|
20958
|
+
* prover uses: `tx_inputs.to_bytes()` in, `ProvenTransaction::read_from_bytes`
|
|
20959
|
+
* out).
|
|
20960
|
+
*
|
|
20961
|
+
* Use case: routing prove to a native iOS / Android plugin
|
|
20962
|
+
* (`@miden/native-prover`) so mobile builds skip WASM prove entirely
|
|
20963
|
+
* — `WKWebView` can't be made cross-origin-isolated reliably and the
|
|
20964
|
+
* MT WASM bundle can't instantiate without `SharedArrayBuffer`, so the
|
|
20965
|
+
* host wraps a native Rust prover (built with the same `miden_tx`
|
|
20966
|
+
* crate) and exposes a JS-shaped callback over the Capacitor bridge.
|
|
20967
|
+
*
|
|
20968
|
+
* The SDK does NOT serialize the prover for persistence across
|
|
20969
|
+
* reloads (unlike `newRemoteProver`), since the callback is a
|
|
20970
|
+
* runtime JS reference. Hosts must recreate the prover on every
|
|
20971
|
+
* page load.
|
|
20972
|
+
* @param {Function} callback
|
|
20973
|
+
* @returns {TransactionProver}
|
|
20974
|
+
*/
|
|
20975
|
+
static newCallbackProver(callback) {
|
|
20976
|
+
const ret = wasm.transactionprover_newCallbackProver(callback);
|
|
20977
|
+
return TransactionProver.__wrap(ret);
|
|
20978
|
+
}
|
|
20904
20979
|
/**
|
|
20905
20980
|
* Creates a prover that uses the local proving backend.
|
|
20906
20981
|
* @returns {TransactionProver}
|
|
@@ -22310,8 +22385,20 @@ class WebClient {
|
|
|
22310
22385
|
return ret;
|
|
22311
22386
|
}
|
|
22312
22387
|
/**
|
|
22388
|
+
* Imports a note file and returns the imported note's identifier.
|
|
22389
|
+
*
|
|
22390
|
+
* A note file that carries metadata — an explicit `NoteId` or a full note
|
|
22391
|
+
* with proof — resolves to a concrete `NoteId`, which is returned so the
|
|
22392
|
+
* caller can look the note up with [`get_input_note`]. A details-only file
|
|
22393
|
+
* (`NoteDetails`) has no metadata and therefore no `NoteId` yet, so its
|
|
22394
|
+
* metadata-independent details commitment is returned instead.
|
|
22395
|
+
*
|
|
22396
|
+
* Migration note (miden-client PR #2214): `Client::import_notes` now
|
|
22397
|
+
* returns `Vec<NoteDetailsCommitment>` rather than `Vec<NoteId>`, since
|
|
22398
|
+
* metadata-less imports have no note ID; this method recovers the `NoteId`
|
|
22399
|
+
* from the note file when one is available.
|
|
22313
22400
|
* @param {NoteFile} note_file
|
|
22314
|
-
* @returns {Promise<
|
|
22401
|
+
* @returns {Promise<string>}
|
|
22315
22402
|
*/
|
|
22316
22403
|
importNoteFile(note_file) {
|
|
22317
22404
|
_assertClass(note_file, NoteFile);
|
|
@@ -22355,6 +22442,35 @@ class WebClient {
|
|
|
22355
22442
|
}
|
|
22356
22443
|
return WebKeystoreApi.__wrap(ret[0]);
|
|
22357
22444
|
}
|
|
22445
|
+
/**
|
|
22446
|
+
* Returns the raw JS value that the most recent sign-callback invocation
|
|
22447
|
+
* threw, or `null` if the last sign call succeeded (or no call has
|
|
22448
|
+
* happened yet).
|
|
22449
|
+
*
|
|
22450
|
+
* Combined with the serialized-call discipline enforced at the JS
|
|
22451
|
+
* `WebClient` wrapper, this lets a caller that caught a failed
|
|
22452
|
+
* `executeTransaction` / `submitNewTransaction` recover the original
|
|
22453
|
+
* JS error the signing callback threw — preserving any structured
|
|
22454
|
+
* metadata (e.g. a `reason: 'locked'` property) that the kernel-level
|
|
22455
|
+
* `auth::request` diagnostic would otherwise have erased.
|
|
22456
|
+
*
|
|
22457
|
+
* # Usage (TS)
|
|
22458
|
+
* ```ts
|
|
22459
|
+
* try {
|
|
22460
|
+
* await client.submitNewTransaction(acc, req);
|
|
22461
|
+
* } catch (e) {
|
|
22462
|
+
* const authErr = client.lastAuthError();
|
|
22463
|
+
* if (authErr && authErr.reason === 'locked') {
|
|
22464
|
+
* // wait for unlock, then retry
|
|
22465
|
+
* }
|
|
22466
|
+
* }
|
|
22467
|
+
* ```
|
|
22468
|
+
* @returns {any}
|
|
22469
|
+
*/
|
|
22470
|
+
lastAuthError() {
|
|
22471
|
+
const ret = wasm.webclient_lastAuthError(this.__wbg_ptr);
|
|
22472
|
+
return ret;
|
|
22473
|
+
}
|
|
22358
22474
|
/**
|
|
22359
22475
|
* Returns all the existing setting keys from the store.
|
|
22360
22476
|
* @returns {Promise<string[]>}
|
|
@@ -22415,19 +22531,27 @@ class WebClient {
|
|
|
22415
22531
|
return TransactionRequest.__wrap(ret[0]);
|
|
22416
22532
|
}
|
|
22417
22533
|
/**
|
|
22534
|
+
* Creates, persists, and returns a new fungible faucet account.
|
|
22535
|
+
*
|
|
22536
|
+
* Only fungible faucets are supported, so passing `non_fungible = true` fails fast with a
|
|
22537
|
+
* clear message. The faucet is registered with mint and burn policies (both `AllowAll`); its
|
|
22538
|
+
* secret key is added to the keystore.
|
|
22418
22539
|
* @param {AccountStorageMode} storage_mode
|
|
22419
22540
|
* @param {boolean} non_fungible
|
|
22541
|
+
* @param {string} token_name
|
|
22420
22542
|
* @param {string} token_symbol
|
|
22421
22543
|
* @param {number} decimals
|
|
22422
22544
|
* @param {bigint} max_supply
|
|
22423
22545
|
* @param {AuthScheme} auth_scheme
|
|
22424
22546
|
* @returns {Promise<Account>}
|
|
22425
22547
|
*/
|
|
22426
|
-
newFaucet(storage_mode, non_fungible, token_symbol, decimals, max_supply, auth_scheme) {
|
|
22548
|
+
newFaucet(storage_mode, non_fungible, token_name, token_symbol, decimals, max_supply, auth_scheme) {
|
|
22427
22549
|
_assertClass(storage_mode, AccountStorageMode);
|
|
22428
|
-
const ptr0 = passStringToWasm0(
|
|
22550
|
+
const ptr0 = passStringToWasm0(token_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
22429
22551
|
const len0 = WASM_VECTOR_LEN;
|
|
22430
|
-
const
|
|
22552
|
+
const ptr1 = passStringToWasm0(token_symbol, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
22553
|
+
const len1 = WASM_VECTOR_LEN;
|
|
22554
|
+
const ret = wasm.webclient_newFaucet(this.__wbg_ptr, storage_mode.__wbg_ptr, non_fungible, ptr0, len0, ptr1, len1, decimals, max_supply, auth_scheme);
|
|
22431
22555
|
return ret;
|
|
22432
22556
|
}
|
|
22433
22557
|
/**
|
|
@@ -22443,6 +22567,53 @@ class WebClient {
|
|
|
22443
22567
|
const ret = wasm.webclient_newMintTransactionRequest(this.__wbg_ptr, target_account_id.__wbg_ptr, faucet_id.__wbg_ptr, note_type, amount);
|
|
22444
22568
|
return ret;
|
|
22445
22569
|
}
|
|
22570
|
+
/**
|
|
22571
|
+
* @param {Note} pswap_note
|
|
22572
|
+
* @param {AccountId} creator_account_id
|
|
22573
|
+
* @returns {TransactionRequest}
|
|
22574
|
+
*/
|
|
22575
|
+
newPswapCancelTransactionRequest(pswap_note, creator_account_id) {
|
|
22576
|
+
_assertClass(pswap_note, Note);
|
|
22577
|
+
_assertClass(creator_account_id, AccountId);
|
|
22578
|
+
const ret = wasm.webclient_newPswapCancelTransactionRequest(this.__wbg_ptr, pswap_note.__wbg_ptr, creator_account_id.__wbg_ptr);
|
|
22579
|
+
if (ret[2]) {
|
|
22580
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
22581
|
+
}
|
|
22582
|
+
return TransactionRequest.__wrap(ret[0]);
|
|
22583
|
+
}
|
|
22584
|
+
/**
|
|
22585
|
+
* @param {Note} pswap_note
|
|
22586
|
+
* @param {AccountId} consumer_account_id
|
|
22587
|
+
* @param {bigint} account_fill_amount
|
|
22588
|
+
* @param {bigint} note_fill_amount
|
|
22589
|
+
* @returns {TransactionRequest}
|
|
22590
|
+
*/
|
|
22591
|
+
newPswapConsumeTransactionRequest(pswap_note, consumer_account_id, account_fill_amount, note_fill_amount) {
|
|
22592
|
+
_assertClass(pswap_note, Note);
|
|
22593
|
+
_assertClass(consumer_account_id, AccountId);
|
|
22594
|
+
const ret = wasm.webclient_newPswapConsumeTransactionRequest(this.__wbg_ptr, pswap_note.__wbg_ptr, consumer_account_id.__wbg_ptr, account_fill_amount, note_fill_amount);
|
|
22595
|
+
if (ret[2]) {
|
|
22596
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
22597
|
+
}
|
|
22598
|
+
return TransactionRequest.__wrap(ret[0]);
|
|
22599
|
+
}
|
|
22600
|
+
/**
|
|
22601
|
+
* @param {AccountId} creator_account_id
|
|
22602
|
+
* @param {AccountId} offered_asset_faucet_id
|
|
22603
|
+
* @param {bigint} offered_asset_amount
|
|
22604
|
+
* @param {AccountId} requested_asset_faucet_id
|
|
22605
|
+
* @param {bigint} requested_asset_amount
|
|
22606
|
+
* @param {NoteType} note_type
|
|
22607
|
+
* @param {NoteType} payback_note_type
|
|
22608
|
+
* @returns {Promise<TransactionRequest>}
|
|
22609
|
+
*/
|
|
22610
|
+
newPswapCreateTransactionRequest(creator_account_id, offered_asset_faucet_id, offered_asset_amount, requested_asset_faucet_id, requested_asset_amount, note_type, payback_note_type) {
|
|
22611
|
+
_assertClass(creator_account_id, AccountId);
|
|
22612
|
+
_assertClass(offered_asset_faucet_id, AccountId);
|
|
22613
|
+
_assertClass(requested_asset_faucet_id, AccountId);
|
|
22614
|
+
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);
|
|
22615
|
+
return ret;
|
|
22616
|
+
}
|
|
22446
22617
|
/**
|
|
22447
22618
|
* @param {AccountId} sender_account_id
|
|
22448
22619
|
* @param {AccountId} target_account_id
|
|
@@ -22822,13 +22993,20 @@ class Word {
|
|
|
22822
22993
|
}
|
|
22823
22994
|
/**
|
|
22824
22995
|
* Creates a word from four numeric values.
|
|
22996
|
+
*
|
|
22997
|
+
* Each input must be a canonical field element, i.e. strictly less than the field modulus.
|
|
22998
|
+
* `Felt::new` (now fallible on the 0.15 surface) errors out on inputs at or beyond the
|
|
22999
|
+
* modulus; the error is surfaced to JS.
|
|
22825
23000
|
* @param {BigUint64Array} u64_vec
|
|
22826
23001
|
*/
|
|
22827
23002
|
constructor(u64_vec) {
|
|
22828
23003
|
const ptr0 = passArray64ToWasm0(u64_vec, wasm.__wbindgen_malloc);
|
|
22829
23004
|
const len0 = WASM_VECTOR_LEN;
|
|
22830
23005
|
const ret = wasm.word_new(ptr0, len0);
|
|
22831
|
-
|
|
23006
|
+
if (ret[2]) {
|
|
23007
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
23008
|
+
}
|
|
23009
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
22832
23010
|
WordFinalization.register(this, this.__wbg_ptr, this);
|
|
22833
23011
|
return this;
|
|
22834
23012
|
}
|
|
@@ -22936,6 +23114,20 @@ function importStore(store_name, store_dump) {
|
|
|
22936
23114
|
return ret;
|
|
22937
23115
|
}
|
|
22938
23116
|
|
|
23117
|
+
/**
|
|
23118
|
+
* Single-threaded version of `parallel_sum_bench` for direct comparison.
|
|
23119
|
+
* Same workload, plain `iter()` — bypasses rayon entirely. Needs to live
|
|
23120
|
+
* on the WASM side rather than be reimplemented in JS so the workload is
|
|
23121
|
+
* bit-for-bit identical to `parallel_sum_bench` (same libm, same FP
|
|
23122
|
+
* determinism, same constant-folding resistance).
|
|
23123
|
+
* @param {bigint} n
|
|
23124
|
+
* @returns {bigint}
|
|
23125
|
+
*/
|
|
23126
|
+
function sequentialSumBench(n) {
|
|
23127
|
+
const ret = wasm.sequentialSumBench(n);
|
|
23128
|
+
return BigInt.asUintN(64, ret);
|
|
23129
|
+
}
|
|
23130
|
+
|
|
22939
23131
|
/**
|
|
22940
23132
|
* Initializes the `tracing` subscriber that routes Rust log output to the
|
|
22941
23133
|
* browser console via `console.log` / `console.warn` / `console.error`.
|
|
@@ -23442,6 +23634,10 @@ function __wbg_get_imports() {
|
|
|
23442
23634
|
const ret = getBlockHeaders(getStringFromWasm0(arg0, arg1), v0);
|
|
23443
23635
|
return ret;
|
|
23444
23636
|
},
|
|
23637
|
+
__wbg_getCurrentBlockchainPeaks_f0d990ec54236a85: function(arg0, arg1) {
|
|
23638
|
+
const ret = getCurrentBlockchainPeaks(getStringFromWasm0(arg0, arg1));
|
|
23639
|
+
return ret;
|
|
23640
|
+
},
|
|
23445
23641
|
__wbg_getForeignAccountCode_d4d803c5248469e8: function(arg0, arg1, arg2, arg3) {
|
|
23446
23642
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
23447
23643
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
@@ -23548,10 +23744,6 @@ function __wbg_get_imports() {
|
|
|
23548
23744
|
const ret = getPartialBlockchainNodes(getStringFromWasm0(arg0, arg1), v0);
|
|
23549
23745
|
return ret;
|
|
23550
23746
|
},
|
|
23551
|
-
__wbg_getPartialBlockchainPeaksByBlockNum_18d5c35d4c5bfbb9: function(arg0, arg1, arg2) {
|
|
23552
|
-
const ret = getPartialBlockchainPeaksByBlockNum(getStringFromWasm0(arg0, arg1), arg2 >>> 0);
|
|
23553
|
-
return ret;
|
|
23554
|
-
},
|
|
23555
23747
|
__wbg_getRandomValues_1c61fac11405ffdc: function() { return handleError(function (arg0, arg1) {
|
|
23556
23748
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
23557
23749
|
}, arguments); },
|
|
@@ -23691,12 +23883,10 @@ function __wbg_get_imports() {
|
|
|
23691
23883
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
23692
23884
|
}
|
|
23693
23885
|
},
|
|
23694
|
-
|
|
23886
|
+
__wbg_insertBlockHeader_23b7b30d0614926f: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
23695
23887
|
var v0 = getArrayU8FromWasm0(arg3, arg4).slice();
|
|
23696
23888
|
wasm.__wbindgen_free(arg3, arg4 * 1, 1);
|
|
23697
|
-
|
|
23698
|
-
wasm.__wbindgen_free(arg5, arg6 * 1, 1);
|
|
23699
|
-
const ret = insertBlockHeader(getStringFromWasm0(arg0, arg1), arg2 >>> 0, v0, v1, arg7 !== 0);
|
|
23889
|
+
const ret = insertBlockHeader(getStringFromWasm0(arg0, arg1), arg2 >>> 0, v0, arg5 !== 0);
|
|
23700
23890
|
return ret;
|
|
23701
23891
|
},
|
|
23702
23892
|
__wbg_insertPartialBlockchainNodes_403400ec217229f2: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
@@ -23906,7 +24096,7 @@ function __wbg_get_imports() {
|
|
|
23906
24096
|
const a = state0.a;
|
|
23907
24097
|
state0.a = 0;
|
|
23908
24098
|
try {
|
|
23909
|
-
return
|
|
24099
|
+
return wasm_bindgen__convert__closures_____invoke__h7a3c25b2fe6d77ec(a, state0.b, arg0, arg1);
|
|
23910
24100
|
} finally {
|
|
23911
24101
|
state0.a = a;
|
|
23912
24102
|
}
|
|
@@ -23961,6 +24151,10 @@ function __wbg_get_imports() {
|
|
|
23961
24151
|
const ret = NoteAndArgs.__unwrap(arg0);
|
|
23962
24152
|
return ret;
|
|
23963
24153
|
},
|
|
24154
|
+
__wbg_noteattachment_new: function(arg0) {
|
|
24155
|
+
const ret = NoteAttachment.__wrap(arg0);
|
|
24156
|
+
return ret;
|
|
24157
|
+
},
|
|
23964
24158
|
__wbg_noteconsumability_new: function(arg0) {
|
|
23965
24159
|
const ret = NoteConsumability.__wrap(arg0);
|
|
23966
24160
|
return ret;
|
|
@@ -24424,46 +24618,53 @@ function __wbg_get_imports() {
|
|
|
24424
24618
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
24425
24619
|
}
|
|
24426
24620
|
},
|
|
24427
|
-
|
|
24621
|
+
__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) {
|
|
24428
24622
|
let deferred0_0;
|
|
24429
24623
|
let deferred0_1;
|
|
24430
|
-
let deferred4_0;
|
|
24431
|
-
let deferred4_1;
|
|
24432
24624
|
let deferred6_0;
|
|
24433
24625
|
let deferred6_1;
|
|
24434
|
-
let
|
|
24435
|
-
let
|
|
24626
|
+
let deferred8_0;
|
|
24627
|
+
let deferred8_1;
|
|
24628
|
+
let deferred9_0;
|
|
24629
|
+
let deferred9_1;
|
|
24436
24630
|
try {
|
|
24437
24631
|
deferred0_0 = arg2;
|
|
24438
24632
|
deferred0_1 = arg3;
|
|
24439
|
-
|
|
24440
|
-
|
|
24633
|
+
let v1;
|
|
24634
|
+
if (arg4 !== 0) {
|
|
24635
|
+
v1 = getStringFromWasm0(arg4, arg5).slice();
|
|
24636
|
+
wasm.__wbindgen_free(arg4, arg5 * 1, 1);
|
|
24637
|
+
}
|
|
24441
24638
|
var v2 = getArrayU8FromWasm0(arg6, arg7).slice();
|
|
24442
24639
|
wasm.__wbindgen_free(arg6, arg7 * 1, 1);
|
|
24443
24640
|
var v3 = getArrayU8FromWasm0(arg8, arg9).slice();
|
|
24444
24641
|
wasm.__wbindgen_free(arg8, arg9 * 1, 1);
|
|
24445
|
-
|
|
24446
|
-
|
|
24642
|
+
var v4 = getArrayU8FromWasm0(arg10, arg11).slice();
|
|
24643
|
+
wasm.__wbindgen_free(arg10, arg11 * 1, 1);
|
|
24447
24644
|
var v5 = getArrayU8FromWasm0(arg12, arg13).slice();
|
|
24448
24645
|
wasm.__wbindgen_free(arg12, arg13 * 1, 1);
|
|
24449
24646
|
deferred6_0 = arg14;
|
|
24450
24647
|
deferred6_1 = arg15;
|
|
24451
|
-
|
|
24452
|
-
|
|
24453
|
-
|
|
24454
|
-
|
|
24455
|
-
|
|
24456
|
-
|
|
24457
|
-
|
|
24458
|
-
|
|
24648
|
+
var v7 = getArrayU8FromWasm0(arg16, arg17).slice();
|
|
24649
|
+
wasm.__wbindgen_free(arg16, arg17 * 1, 1);
|
|
24650
|
+
deferred8_0 = arg18;
|
|
24651
|
+
deferred8_1 = arg19;
|
|
24652
|
+
deferred9_0 = arg20;
|
|
24653
|
+
deferred9_1 = arg21;
|
|
24654
|
+
var v10 = getArrayU8FromWasm0(arg23, arg24).slice();
|
|
24655
|
+
wasm.__wbindgen_free(arg23, arg24 * 1, 1);
|
|
24656
|
+
let v11;
|
|
24657
|
+
if (arg27 !== 0) {
|
|
24658
|
+
v11 = getStringFromWasm0(arg27, arg28).slice();
|
|
24659
|
+
wasm.__wbindgen_free(arg27, arg28 * 1, 1);
|
|
24459
24660
|
}
|
|
24460
|
-
const ret = upsertInputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), v1, v2, v3, getStringFromWasm0(
|
|
24661
|
+
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);
|
|
24461
24662
|
return ret;
|
|
24462
24663
|
} finally {
|
|
24463
24664
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24464
|
-
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
24465
24665
|
wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
|
|
24466
|
-
wasm.__wbindgen_free(
|
|
24666
|
+
wasm.__wbindgen_free(deferred8_0, deferred8_1, 1);
|
|
24667
|
+
wasm.__wbindgen_free(deferred9_0, deferred9_1, 1);
|
|
24467
24668
|
}
|
|
24468
24669
|
},
|
|
24469
24670
|
__wbg_upsertNoteScript_77ad6333fd8d09bd: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
@@ -24480,32 +24681,34 @@ function __wbg_get_imports() {
|
|
|
24480
24681
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24481
24682
|
}
|
|
24482
24683
|
},
|
|
24483
|
-
|
|
24684
|
+
__wbg_upsertOutputNote_086a8c1c81f11d3c: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17) {
|
|
24484
24685
|
let deferred0_0;
|
|
24485
24686
|
let deferred0_1;
|
|
24486
|
-
let
|
|
24487
|
-
let
|
|
24687
|
+
let deferred3_0;
|
|
24688
|
+
let deferred3_1;
|
|
24488
24689
|
try {
|
|
24489
24690
|
deferred0_0 = arg2;
|
|
24490
24691
|
deferred0_1 = arg3;
|
|
24491
24692
|
var v1 = getArrayU8FromWasm0(arg4, arg5).slice();
|
|
24492
24693
|
wasm.__wbindgen_free(arg4, arg5 * 1, 1);
|
|
24493
|
-
|
|
24494
|
-
|
|
24495
|
-
|
|
24496
|
-
|
|
24497
|
-
|
|
24498
|
-
|
|
24499
|
-
|
|
24500
|
-
|
|
24694
|
+
var v2 = getArrayU8FromWasm0(arg6, arg7).slice();
|
|
24695
|
+
wasm.__wbindgen_free(arg6, arg7 * 1, 1);
|
|
24696
|
+
deferred3_0 = arg8;
|
|
24697
|
+
deferred3_1 = arg9;
|
|
24698
|
+
var v4 = getArrayU8FromWasm0(arg10, arg11).slice();
|
|
24699
|
+
wasm.__wbindgen_free(arg10, arg11 * 1, 1);
|
|
24700
|
+
let v5;
|
|
24701
|
+
if (arg12 !== 0) {
|
|
24702
|
+
v5 = getStringFromWasm0(arg12, arg13).slice();
|
|
24703
|
+
wasm.__wbindgen_free(arg12, arg13 * 1, 1);
|
|
24501
24704
|
}
|
|
24502
|
-
var
|
|
24503
|
-
wasm.__wbindgen_free(
|
|
24504
|
-
const ret = upsertOutputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), v1, getStringFromWasm0(
|
|
24705
|
+
var v6 = getArrayU8FromWasm0(arg16, arg17).slice();
|
|
24706
|
+
wasm.__wbindgen_free(arg16, arg17 * 1, 1);
|
|
24707
|
+
const ret = upsertOutputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), v1, v2, getStringFromWasm0(arg8, arg9), v4, v5, arg14 >>> 0, arg15, v6);
|
|
24505
24708
|
return ret;
|
|
24506
24709
|
} finally {
|
|
24507
24710
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24508
|
-
wasm.__wbindgen_free(
|
|
24711
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
24509
24712
|
}
|
|
24510
24713
|
},
|
|
24511
24714
|
__wbg_upsertStorageMapEntries_068d8303824fff58: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
@@ -24574,13 +24777,13 @@ function __wbg_get_imports() {
|
|
|
24574
24777
|
return ret;
|
|
24575
24778
|
},
|
|
24576
24779
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
24577
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
24578
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
24780
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 441, function: Function { arguments: [Externref], shim_idx: 793, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
24781
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3f095fc116138c37, wasm_bindgen__convert__closures_____invoke__h5b85ca27a15b53fc);
|
|
24579
24782
|
return ret;
|
|
24580
24783
|
},
|
|
24581
24784
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
24582
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
24583
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
24785
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 441, function: Function { arguments: [], shim_idx: 442, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
24786
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3f095fc116138c37, wasm_bindgen__convert__closures_____invoke__h8c482c344300c6d3);
|
|
24584
24787
|
return ret;
|
|
24585
24788
|
},
|
|
24586
24789
|
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
@@ -24684,16 +24887,16 @@ function __wbg_get_imports() {
|
|
|
24684
24887
|
};
|
|
24685
24888
|
}
|
|
24686
24889
|
|
|
24687
|
-
function
|
|
24688
|
-
wasm.
|
|
24890
|
+
function wasm_bindgen__convert__closures_____invoke__h8c482c344300c6d3(arg0, arg1) {
|
|
24891
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h8c482c344300c6d3(arg0, arg1);
|
|
24689
24892
|
}
|
|
24690
24893
|
|
|
24691
|
-
function
|
|
24692
|
-
wasm.
|
|
24894
|
+
function wasm_bindgen__convert__closures_____invoke__h5b85ca27a15b53fc(arg0, arg1, arg2) {
|
|
24895
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h5b85ca27a15b53fc(arg0, arg1, arg2);
|
|
24693
24896
|
}
|
|
24694
24897
|
|
|
24695
|
-
function
|
|
24696
|
-
wasm.
|
|
24898
|
+
function wasm_bindgen__convert__closures_____invoke__h7a3c25b2fe6d77ec(arg0, arg1, arg2, arg3) {
|
|
24899
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h7a3c25b2fe6d77ec(arg0, arg1, arg2, arg3);
|
|
24697
24900
|
}
|
|
24698
24901
|
|
|
24699
24902
|
|
|
@@ -25502,5 +25705,5 @@ async function __wbg_init(module_or_path) {
|
|
|
25502
25705
|
|
|
25503
25706
|
const module$1 = new URL("assets/miden_client_web.wasm", import.meta.url);
|
|
25504
25707
|
|
|
25505
|
-
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,
|
|
25506
|
-
//# sourceMappingURL=Cargo-
|
|
25708
|
+
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, module$1 as __wasm_url, __wbg_init, createAuthFalcon512RpoMultisig, exportStore2 as exportStore, importStore, initSync, sequentialSumBench, setupLogging };
|
|
25709
|
+
//# sourceMappingURL=Cargo-CG4XszZo-S7EHAZSa.js.map
|