@miden-sdk/miden-sdk 0.14.11 → 0.15.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mt/{Cargo-CZopJ--X.js → Cargo-smJQCGjz.js} +1111 -768
- package/dist/mt/Cargo-smJQCGjz.js.map +1 -0
- package/dist/mt/api-types.d.ts +122 -33
- package/dist/mt/assets/miden_client_web.wasm +0 -0
- package/dist/mt/crates/miden_client_web.d.ts +376 -303
- package/dist/mt/docs-entry.d.ts +3 -0
- package/dist/mt/eager.js +7 -4
- package/dist/mt/eager.js.map +1 -1
- package/dist/mt/index.d.ts +103 -10
- package/dist/mt/index.js +669 -312
- package/dist/mt/index.js.map +1 -1
- package/dist/mt/wasm.js +1 -1
- package/dist/mt/workerHelpers.js +1 -1
- package/dist/mt/workers/{Cargo-CZopJ--X-SsyOTzpb.js → Cargo-smJQCGjz-q4GYXDiD.js} +1111 -768
- package/dist/mt/workers/Cargo-smJQCGjz-q4GYXDiD.js.map +1 -0
- package/dist/mt/workers/assets/miden_client_web.wasm +0 -0
- package/dist/mt/workers/web-client-methods-worker.js +1140 -792
- package/dist/mt/workers/web-client-methods-worker.js.map +1 -1
- package/dist/mt/workers/web-client-methods-worker.module.js +23 -19
- package/dist/mt/workers/web-client-methods-worker.module.js.map +1 -1
- package/dist/mt/workers/workerHelpers.js +1 -1
- package/dist/st/{Cargo-DC6jSekr.js → Cargo-CG4XszZo.js} +1105 -763
- package/dist/st/Cargo-CG4XszZo.js.map +1 -0
- package/dist/st/api-types.d.ts +122 -33
- package/dist/st/assets/miden_client_web.wasm +0 -0
- package/dist/st/crates/miden_client_web.d.ts +376 -303
- package/dist/st/docs-entry.d.ts +3 -0
- package/dist/st/eager.js +7 -4
- package/dist/st/eager.js.map +1 -1
- package/dist/st/index.d.ts +103 -10
- package/dist/st/index.js +669 -312
- package/dist/st/index.js.map +1 -1
- package/dist/st/wasm.js +1 -1
- package/dist/st/workers/{Cargo-DC6jSekr-BG7C7m56.js → Cargo-CG4XszZo-S7EHAZSa.js} +1105 -763
- package/dist/st/workers/Cargo-CG4XszZo-S7EHAZSa.js.map +1 -0
- package/dist/st/workers/assets/miden_client_web.wasm +0 -0
- package/dist/st/workers/web-client-methods-worker.js +1134 -787
- package/dist/st/workers/web-client-methods-worker.js.map +1 -1
- package/dist/st/workers/web-client-methods-worker.module.js +23 -19
- package/dist/st/workers/web-client-methods-worker.module.js.map +1 -1
- package/js/client.js +491 -0
- package/js/node/client-factory.js +117 -0
- package/js/node/loader.js +138 -0
- package/js/node/napi-compat.js +253 -0
- package/js/node-index.js +194 -0
- package/js/resources/accounts.js +222 -0
- package/js/resources/compiler.js +74 -0
- package/js/resources/keystore.js +54 -0
- package/js/resources/notes.js +124 -0
- package/js/resources/settings.js +30 -0
- package/js/resources/tags.js +31 -0
- package/js/resources/transactions.js +667 -0
- package/js/standalone.js +109 -0
- package/js/utils.js +232 -0
- package/package.json +17 -2
- package/dist/mt/Cargo-CZopJ--X.js.map +0 -1
- package/dist/mt/workers/Cargo-CZopJ--X-SsyOTzpb.js.map +0 -1
- package/dist/st/Cargo-DC6jSekr.js.map +0 -1
- package/dist/st/workers/Cargo-DC6jSekr-BG7C7m56.js.map +0 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
async function loadWasm() {
|
|
6
6
|
let wasmModule;
|
|
7
7
|
if (!undefined || (undefined && !undefined.SSR)) {
|
|
8
|
-
wasmModule = await Promise.resolve().then(function () { return
|
|
8
|
+
wasmModule = await Promise.resolve().then(function () { return CargoSmJQCGjz; });
|
|
9
9
|
// The Cargo glue's __wbg_init TLA is stripped by the rollup build to
|
|
10
10
|
// prevent blocking WKWebView module evaluation. Call it explicitly here
|
|
11
11
|
// with the WASM URL that the Cargo glue pre-resolves (relative to its
|
|
@@ -251,14 +251,12 @@ const methodHandlers = {
|
|
|
251
251
|
|
|
252
252
|
const prover = proverPayload
|
|
253
253
|
? wasm.TransactionProver.deserialize(proverPayload)
|
|
254
|
-
:
|
|
255
|
-
|
|
256
|
-
const proven =
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
)
|
|
261
|
-
: await wasmWebClient.proveTransaction(transactionResult);
|
|
254
|
+
: undefined;
|
|
255
|
+
|
|
256
|
+
const proven = await wasmWebClient.proveTransaction(
|
|
257
|
+
transactionResult,
|
|
258
|
+
prover
|
|
259
|
+
);
|
|
262
260
|
const serializedProven = proven.serialize();
|
|
263
261
|
return serializedProven.buffer;
|
|
264
262
|
},
|
|
@@ -311,7 +309,7 @@ const methodHandlers = {
|
|
|
311
309
|
// Deserialize the prover from the serialized payload
|
|
312
310
|
const prover = proverPayload
|
|
313
311
|
? wasm.TransactionProver.deserialize(proverPayload)
|
|
314
|
-
:
|
|
312
|
+
: undefined;
|
|
315
313
|
|
|
316
314
|
const result = await wasmWebClient.executeTransaction(
|
|
317
315
|
accountId,
|
|
@@ -320,9 +318,7 @@ const methodHandlers = {
|
|
|
320
318
|
|
|
321
319
|
const transactionId = result.id().toHex();
|
|
322
320
|
|
|
323
|
-
const proven = prover
|
|
324
|
-
? await wasmWebClient.proveTransactionWithProver(result, prover)
|
|
325
|
-
: await wasmWebClient.proveTransaction(result);
|
|
321
|
+
const proven = await wasmWebClient.proveTransaction(result, prover);
|
|
326
322
|
const submissionHeight = await wasmWebClient.submitProvenTransaction(
|
|
327
323
|
proven,
|
|
328
324
|
result
|
|
@@ -375,14 +371,18 @@ methodHandlers[MethodName.SUBMIT_NEW_TRANSACTION_MOCK] = async (args) => {
|
|
|
375
371
|
|
|
376
372
|
const result = await methodHandlers[MethodName.SUBMIT_NEW_TRANSACTION](args);
|
|
377
373
|
|
|
374
|
+
const updatedMockChain = (await wasmWebClient.serializeMockChain()).buffer;
|
|
375
|
+
const updatedMockNoteTransportNode = (
|
|
376
|
+
await wasmWebClient.serializeMockNoteTransportNode()
|
|
377
|
+
).buffer;
|
|
378
|
+
|
|
378
379
|
return {
|
|
379
380
|
transactionId: result.transactionId,
|
|
380
381
|
submissionHeight: result.submissionHeight,
|
|
381
382
|
serializedTransactionResult: result.serializedTransactionResult,
|
|
382
383
|
serializedTransactionUpdate: result.serializedTransactionUpdate,
|
|
383
|
-
serializedMockChain:
|
|
384
|
-
serializedMockNoteTransportNode:
|
|
385
|
-
wasmWebClient.serializeMockNoteTransportNode().buffer,
|
|
384
|
+
serializedMockChain: updatedMockChain,
|
|
385
|
+
serializedMockNoteTransportNode: updatedMockNoteTransportNode,
|
|
386
386
|
};
|
|
387
387
|
};
|
|
388
388
|
|
|
@@ -407,14 +407,18 @@ methodHandlers[MethodName.SUBMIT_NEW_TRANSACTION_WITH_PROVER_MOCK] = async (
|
|
|
407
407
|
const result =
|
|
408
408
|
await methodHandlers[MethodName.SUBMIT_NEW_TRANSACTION_WITH_PROVER](args);
|
|
409
409
|
|
|
410
|
+
const updatedMockChain = (await wasmWebClient.serializeMockChain()).buffer;
|
|
411
|
+
const updatedMockNoteTransportNode = (
|
|
412
|
+
await wasmWebClient.serializeMockNoteTransportNode()
|
|
413
|
+
).buffer;
|
|
414
|
+
|
|
410
415
|
return {
|
|
411
416
|
transactionId: result.transactionId,
|
|
412
417
|
submissionHeight: result.submissionHeight,
|
|
413
418
|
serializedTransactionResult: result.serializedTransactionResult,
|
|
414
419
|
serializedTransactionUpdate: result.serializedTransactionUpdate,
|
|
415
|
-
serializedMockChain:
|
|
416
|
-
serializedMockNoteTransportNode:
|
|
417
|
-
wasmWebClient.serializeMockNoteTransportNode().buffer,
|
|
420
|
+
serializedMockChain: updatedMockChain,
|
|
421
|
+
serializedMockNoteTransportNode: updatedMockNoteTransportNode,
|
|
418
422
|
};
|
|
419
423
|
};
|
|
420
424
|
|
|
@@ -8852,7 +8856,7 @@ const V1_STORES = {
|
|
|
8852
8856
|
[Table.Addresses]: indexes("address", "id"),
|
|
8853
8857
|
[Table.Transactions]: indexes("id", "statusVariant"),
|
|
8854
8858
|
[Table.TransactionScripts]: indexes("scriptRoot"),
|
|
8855
|
-
[Table.InputNotes]: indexes("noteId", "nullifier", "stateDiscriminant", "[consumedBlockHeight+consumedTxOrder+noteId]"),
|
|
8859
|
+
[Table.InputNotes]: indexes("detailsCommitment", "noteId", "nullifier", "stateDiscriminant", "[consumedBlockHeight+consumedTxOrder+noteId]"),
|
|
8856
8860
|
[Table.OutputNotes]: indexes("noteId", "recipientDigest", "stateDiscriminant", "nullifier"),
|
|
8857
8861
|
[Table.NotesScripts]: indexes("scriptRoot"),
|
|
8858
8862
|
[Table.StateSync]: indexes("id"),
|
|
@@ -10044,13 +10048,12 @@ async function getAccountIdByKeyCommitment(dbId, pubKeyCommitmentHex) {
|
|
|
10044
10048
|
}
|
|
10045
10049
|
}
|
|
10046
10050
|
|
|
10047
|
-
async function insertBlockHeader(dbId, blockNum, header,
|
|
10051
|
+
async function insertBlockHeader(dbId, blockNum, header, hasClientNotes) {
|
|
10048
10052
|
try {
|
|
10049
10053
|
const db = getDatabase(dbId);
|
|
10050
10054
|
const data = {
|
|
10051
10055
|
blockNum: blockNum,
|
|
10052
10056
|
header,
|
|
10053
|
-
partialBlockchainPeaks,
|
|
10054
10057
|
hasClientNotes: hasClientNotes.toString(),
|
|
10055
10058
|
};
|
|
10056
10059
|
// Mirror SQLite's `insert_block_header_tx`: do an INSERT OR IGNORE on the
|
|
@@ -10058,12 +10061,8 @@ async function insertBlockHeader(dbId, blockNum, header, partialBlockchainPeaks,
|
|
|
10058
10061
|
// says so. Two callers hit this:
|
|
10059
10062
|
// - Genesis flow — no existing row; the add succeeds.
|
|
10060
10063
|
// - `get_and_store_authenticated_block` for a past block — a row
|
|
10061
|
-
// written by `applyStateSync` typically already exists.
|
|
10062
|
-
//
|
|
10063
|
-
// block_num) with peaks from the caller's current `PartialMmr`
|
|
10064
|
-
// forest (popcount == current sync height). Later reads of those
|
|
10065
|
-
// peaks trip `MmrPeaks::new`'s InvalidPeaks validation and wedge
|
|
10066
|
-
// sync for the rest of the session.
|
|
10064
|
+
// written by `applyStateSync` typically already exists. We keep that
|
|
10065
|
+
// row untouched.
|
|
10067
10066
|
//
|
|
10068
10067
|
// The `has_client_notes` upgrade is load-bearing: `get_tracked_block_
|
|
10069
10068
|
// header_numbers` filters by this flag to seed `tracked_leaves`, which
|
|
@@ -10116,11 +10115,9 @@ async function getBlockHeaders(dbId, blockNumbers) {
|
|
|
10116
10115
|
}
|
|
10117
10116
|
else {
|
|
10118
10117
|
const headerBase64 = uint8ArrayToBase64(result.header);
|
|
10119
|
-
const partialBlockchainPeaksBase64 = uint8ArrayToBase64(result.partialBlockchainPeaks);
|
|
10120
10118
|
return {
|
|
10121
10119
|
blockNum: result.blockNum,
|
|
10122
10120
|
header: headerBase64,
|
|
10123
|
-
partialBlockchainPeaks: partialBlockchainPeaksBase64,
|
|
10124
10121
|
hasClientNotes: result.hasClientNotes === "true",
|
|
10125
10122
|
};
|
|
10126
10123
|
}
|
|
@@ -10140,11 +10137,9 @@ async function getTrackedBlockHeaders(dbId) {
|
|
|
10140
10137
|
.toArray();
|
|
10141
10138
|
const processedRecords = await Promise.all(allMatchingRecords.map((record) => {
|
|
10142
10139
|
const headerBase64 = uint8ArrayToBase64(record.header);
|
|
10143
|
-
const partialBlockchainPeaksBase64 = uint8ArrayToBase64(record.partialBlockchainPeaks);
|
|
10144
10140
|
return {
|
|
10145
10141
|
blockNum: record.blockNum,
|
|
10146
10142
|
header: headerBase64,
|
|
10147
|
-
partialBlockchainPeaks: partialBlockchainPeaksBase64,
|
|
10148
10143
|
hasClientNotes: record.hasClientNotes === "true",
|
|
10149
10144
|
};
|
|
10150
10145
|
}));
|
|
@@ -10167,22 +10162,31 @@ async function getTrackedBlockHeaderNumbers(dbId) {
|
|
|
10167
10162
|
logWebStoreError(err, "Failed to get tracked block header numbers");
|
|
10168
10163
|
}
|
|
10169
10164
|
}
|
|
10170
|
-
|
|
10165
|
+
/**
|
|
10166
|
+
* Returns the blockchain peaks at the current sync height. Peaks live on the
|
|
10167
|
+
* `blockHeaders` row at `stateSync.blockNum` — the block that was the chain
|
|
10168
|
+
* tip when its sync ran. Returns `{ blockNum, peaks: undefined }` if the
|
|
10169
|
+
* stateSync row is missing or if that block was inserted via backfill
|
|
10170
|
+
* (which leaves `partialBlockchainPeaks` unset).
|
|
10171
|
+
*/
|
|
10172
|
+
async function getCurrentBlockchainPeaks(dbId) {
|
|
10171
10173
|
try {
|
|
10172
10174
|
const db = getDatabase(dbId);
|
|
10173
|
-
const
|
|
10174
|
-
if (
|
|
10175
|
-
return {
|
|
10176
|
-
|
|
10177
|
-
|
|
10175
|
+
const stateSyncRow = await db.stateSync.get(1);
|
|
10176
|
+
if (stateSyncRow == undefined) {
|
|
10177
|
+
return { blockNum: 0, peaks: undefined };
|
|
10178
|
+
}
|
|
10179
|
+
const header = await db.blockHeaders.get(stateSyncRow.blockNum);
|
|
10180
|
+
if (header == undefined || header.partialBlockchainPeaks == undefined) {
|
|
10181
|
+
return { blockNum: stateSyncRow.blockNum, peaks: undefined };
|
|
10178
10182
|
}
|
|
10179
|
-
const partialBlockchainPeaksBase64 = uint8ArrayToBase64(blockHeader.partialBlockchainPeaks);
|
|
10180
10183
|
return {
|
|
10181
|
-
|
|
10184
|
+
blockNum: stateSyncRow.blockNum,
|
|
10185
|
+
peaks: uint8ArrayToBase64(header.partialBlockchainPeaks),
|
|
10182
10186
|
};
|
|
10183
10187
|
}
|
|
10184
10188
|
catch (err) {
|
|
10185
|
-
logWebStoreError(err, "Failed to get
|
|
10189
|
+
logWebStoreError(err, "Failed to get current blockchain peaks");
|
|
10186
10190
|
}
|
|
10187
10191
|
}
|
|
10188
10192
|
async function getPartialBlockchainNodesAll(dbId) {
|
|
@@ -10222,19 +10226,34 @@ async function getPartialBlockchainNodesUpToInOrderIndex(dbId, maxInOrderIndex)
|
|
|
10222
10226
|
logWebStoreError(err, "Failed to get partial blockchain nodes up to index");
|
|
10223
10227
|
}
|
|
10224
10228
|
}
|
|
10225
|
-
async function pruneIrrelevantBlocks(dbId) {
|
|
10229
|
+
async function pruneIrrelevantBlocks(dbId, blocksToUntrack, nodeIdsToRemove) {
|
|
10226
10230
|
try {
|
|
10227
10231
|
const db = getDatabase(dbId);
|
|
10232
|
+
const numericNodeIds = nodeIdsToRemove.map(Number);
|
|
10228
10233
|
const syncHeight = await db.stateSync.get(1);
|
|
10229
10234
|
if (syncHeight == undefined) {
|
|
10230
10235
|
throw Error("SyncHeight is undefined -- is the state sync table empty?");
|
|
10231
10236
|
}
|
|
10232
|
-
|
|
10233
|
-
.
|
|
10234
|
-
.
|
|
10235
|
-
|
|
10236
|
-
|
|
10237
|
-
|
|
10237
|
+
await db.dexie.transaction("rw", db.blockHeaders, db.partialBlockchainNodes, async () => {
|
|
10238
|
+
// 1. Delete stale MMR authentication nodes.
|
|
10239
|
+
if (numericNodeIds.length > 0) {
|
|
10240
|
+
await db.partialBlockchainNodes.bulkDelete(numericNodeIds);
|
|
10241
|
+
}
|
|
10242
|
+
// 2. Mark untracked blocks as irrelevant.
|
|
10243
|
+
if (blocksToUntrack.length > 0) {
|
|
10244
|
+
await db.blockHeaders
|
|
10245
|
+
.where("blockNum")
|
|
10246
|
+
.anyOf(blocksToUntrack)
|
|
10247
|
+
.modify({ hasClientNotes: "false" });
|
|
10248
|
+
}
|
|
10249
|
+
// 3. Delete irrelevant block headers.
|
|
10250
|
+
const allMatchingRecords = await db.blockHeaders
|
|
10251
|
+
.where("hasClientNotes")
|
|
10252
|
+
.equals("false")
|
|
10253
|
+
.and((record) => record.blockNum !== 0 && record.blockNum !== syncHeight.blockNum)
|
|
10254
|
+
.toArray();
|
|
10255
|
+
await db.blockHeaders.bulkDelete(allMatchingRecords.map((r) => r.blockNum));
|
|
10256
|
+
});
|
|
10238
10257
|
}
|
|
10239
10258
|
catch (err) {
|
|
10240
10259
|
logWebStoreError(err, "Failed to prune irrelevant blocks");
|
|
@@ -10485,13 +10504,20 @@ async function getNoteScript(dbId, scriptRoot) {
|
|
|
10485
10504
|
logWebStoreError(err, "Failed to get note script from root");
|
|
10486
10505
|
}
|
|
10487
10506
|
}
|
|
10488
|
-
async function upsertInputNote(dbId, noteId, assets, serialNumber, inputs, scriptRoot, serializedNoteScript, nullifier, serializedCreatedAt, stateDiscriminant, state, consumedBlockHeight, consumedTxOrder, consumerAccountId, tx) {
|
|
10507
|
+
async function upsertInputNote(dbId, detailsCommitment, noteId, assets, attachments, serialNumber, inputs, scriptRoot, serializedNoteScript, nullifier, serializedCreatedAt, stateDiscriminant, state, consumedBlockHeight, consumedTxOrder, consumerAccountId, tx) {
|
|
10489
10508
|
const db = getDatabase(dbId);
|
|
10490
10509
|
const doWork = async (t) => {
|
|
10491
10510
|
try {
|
|
10492
10511
|
const data = {
|
|
10493
|
-
|
|
10512
|
+
// The details commitment is the primary key. It is always present, even
|
|
10513
|
+
// for partial notes lacking a noteId, so a partial note that later gains
|
|
10514
|
+
// its noteId updates the same row instead of inserting a duplicate.
|
|
10515
|
+
detailsCommitment,
|
|
10516
|
+
// Convert null -> undefined so Dexie omits the noteId secondary index
|
|
10517
|
+
// for partial notes that don't have one yet.
|
|
10518
|
+
noteId: noteId ?? undefined,
|
|
10494
10519
|
assets,
|
|
10520
|
+
attachments,
|
|
10495
10521
|
serialNumber,
|
|
10496
10522
|
inputs,
|
|
10497
10523
|
scriptRoot,
|
|
@@ -10514,7 +10540,7 @@ async function upsertInputNote(dbId, noteId, assets, serialNumber, inputs, scrip
|
|
|
10514
10540
|
/* v8 ignore next 3 — requires a mid-transaction Dexie write failure, not modelable with fake-indexeddb */
|
|
10515
10541
|
}
|
|
10516
10542
|
catch (error) {
|
|
10517
|
-
logWebStoreError(error, `Error inserting note: ${
|
|
10543
|
+
logWebStoreError(error, `Error inserting note: ${detailsCommitment}`);
|
|
10518
10544
|
}
|
|
10519
10545
|
};
|
|
10520
10546
|
return db.dexie.transaction("rw", db.inputNotes, db.notesScripts, doWork);
|
|
@@ -10577,13 +10603,14 @@ async function getInputNoteByOffset(dbId, states, consumerAccountId, blockStart,
|
|
|
10577
10603
|
logWebStoreError(err, "Failed to get input note by offset");
|
|
10578
10604
|
}
|
|
10579
10605
|
}
|
|
10580
|
-
async function upsertOutputNote(dbId, noteId, assets, recipientDigest, metadata, nullifier, expectedHeight, stateDiscriminant, state, tx) {
|
|
10606
|
+
async function upsertOutputNote(dbId, noteId, assets, attachments, recipientDigest, metadata, nullifier, expectedHeight, stateDiscriminant, state, tx) {
|
|
10581
10607
|
const db = getDatabase(dbId);
|
|
10582
10608
|
const doWork = async (t) => {
|
|
10583
10609
|
try {
|
|
10584
10610
|
const data = {
|
|
10585
10611
|
noteId,
|
|
10586
10612
|
assets,
|
|
10613
|
+
attachments,
|
|
10587
10614
|
recipientDigest,
|
|
10588
10615
|
metadata,
|
|
10589
10616
|
nullifier: nullifier ? nullifier : undefined,
|
|
@@ -10604,6 +10631,7 @@ async function processInputNotes(dbId, notes) {
|
|
|
10604
10631
|
const db = getDatabase(dbId);
|
|
10605
10632
|
return await Promise.all(notes.map(async (note) => {
|
|
10606
10633
|
const assetsBase64 = uint8ArrayToBase64(note.assets);
|
|
10634
|
+
const attachmentsBase64 = uint8ArrayToBase64(note.attachments);
|
|
10607
10635
|
const serialNumberBase64 = uint8ArrayToBase64(note.serialNumber);
|
|
10608
10636
|
const inputsBase64 = uint8ArrayToBase64(note.inputs);
|
|
10609
10637
|
let serializedNoteScriptBase64 = undefined;
|
|
@@ -10616,6 +10644,7 @@ async function processInputNotes(dbId, notes) {
|
|
|
10616
10644
|
const stateBase64 = uint8ArrayToBase64(note.state);
|
|
10617
10645
|
return {
|
|
10618
10646
|
assets: assetsBase64,
|
|
10647
|
+
attachments: attachmentsBase64,
|
|
10619
10648
|
serialNumber: serialNumberBase64,
|
|
10620
10649
|
inputs: inputsBase64,
|
|
10621
10650
|
createdAt: note.serializedCreatedAt,
|
|
@@ -10627,10 +10656,12 @@ async function processInputNotes(dbId, notes) {
|
|
|
10627
10656
|
async function processOutputNotes(notes) {
|
|
10628
10657
|
return await Promise.all(notes.map((note) => {
|
|
10629
10658
|
const assetsBase64 = uint8ArrayToBase64(note.assets);
|
|
10659
|
+
const attachmentsBase64 = uint8ArrayToBase64(note.attachments);
|
|
10630
10660
|
const metadataBase64 = uint8ArrayToBase64(note.metadata);
|
|
10631
10661
|
const stateBase64 = uint8ArrayToBase64(note.state);
|
|
10632
10662
|
return {
|
|
10633
10663
|
assets: assetsBase64,
|
|
10664
|
+
attachments: attachmentsBase64,
|
|
10634
10665
|
recipientDigest: note.recipientDigest,
|
|
10635
10666
|
metadata: metadataBase64,
|
|
10636
10667
|
expectedHeight: note.expectedHeight,
|
|
@@ -10899,9 +10930,8 @@ async function removeNoteTag(dbId, tag, sourceNoteId, sourceAccountId) {
|
|
|
10899
10930
|
}
|
|
10900
10931
|
async function applyStateSync(dbId, stateUpdate) {
|
|
10901
10932
|
const db = getDatabase(dbId);
|
|
10902
|
-
const { blockNum, flattenedNewBlockHeaders,
|
|
10933
|
+
const { blockNum, flattenedNewBlockHeaders, partialBlockchainPeaks, newBlockNums, blockHasRelevantNotes, serializedNodeIds, serializedNodes, committedNoteTagSources, serializedInputNotes, serializedOutputNotes, accountUpdates, transactionUpdates, } = stateUpdate;
|
|
10903
10934
|
const newBlockHeaders = reconstructFlattenedVec(flattenedNewBlockHeaders);
|
|
10904
|
-
const partialBlockchainPeaks = reconstructFlattenedVec(flattenedPartialBlockChainPeaks);
|
|
10905
10935
|
const tablesToAccess = [
|
|
10906
10936
|
db.stateSync,
|
|
10907
10937
|
db.inputNotes,
|
|
@@ -10924,10 +10954,10 @@ async function applyStateSync(dbId, stateUpdate) {
|
|
|
10924
10954
|
return await db.dexie.transaction("rw", tablesToAccess, async (tx) => {
|
|
10925
10955
|
await Promise.all([
|
|
10926
10956
|
Promise.all(serializedInputNotes.map((note) => {
|
|
10927
|
-
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);
|
|
10957
|
+
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);
|
|
10928
10958
|
})),
|
|
10929
10959
|
Promise.all(serializedOutputNotes.map((note) => {
|
|
10930
|
-
return upsertOutputNote(dbId, note.noteId, note.noteAssets, note.recipientDigest, note.metadata, note.nullifier, note.expectedHeight, note.stateDiscriminant, note.state);
|
|
10960
|
+
return upsertOutputNote(dbId, note.noteId, note.noteAssets, note.attachments, note.recipientDigest, note.metadata, note.nullifier, note.expectedHeight, note.stateDiscriminant, note.state);
|
|
10931
10961
|
})),
|
|
10932
10962
|
Promise.all(transactionUpdates.map((transactionRecord) => {
|
|
10933
10963
|
let promises = [
|
|
@@ -10953,16 +10983,26 @@ async function applyStateSync(dbId, stateUpdate) {
|
|
|
10953
10983
|
}))),
|
|
10954
10984
|
updateSyncHeight(tx, blockNum),
|
|
10955
10985
|
updatePartialBlockchainNodes(tx, serializedNodeIds, serializedNodes),
|
|
10956
|
-
updateCommittedNoteTags(tx,
|
|
10986
|
+
updateCommittedNoteTags(tx, committedNoteTagSources),
|
|
10957
10987
|
Promise.all(newBlockHeaders.map((newBlockHeader, i) => {
|
|
10958
|
-
|
|
10988
|
+
// Peaks are attached only to the chain-tip block (the one whose
|
|
10989
|
+
// blockNum matches the new sync height). That row is always
|
|
10990
|
+
// present in this iteration because `partial_blockchain_updates`
|
|
10991
|
+
// includes the chain tip header by construction.
|
|
10992
|
+
// TODO: potentially move this to be under the sync state info table
|
|
10993
|
+
// as currently done in SQLite
|
|
10994
|
+
const peaks = newBlockNums[i] === blockNum ? partialBlockchainPeaks : undefined;
|
|
10995
|
+
return updateBlockHeader(tx, newBlockNums[i], newBlockHeader, blockHasRelevantNotes[i] == 1, peaks);
|
|
10959
10996
|
})),
|
|
10960
10997
|
]);
|
|
10961
10998
|
});
|
|
10962
10999
|
}
|
|
11000
|
+
/**
|
|
11001
|
+
* Advances `stateSync.blockNum` only when moving forward. Mirrors SQLite's
|
|
11002
|
+
* `UPDATE blockchain_checkpoint ... WHERE block_num < ?`.
|
|
11003
|
+
*/
|
|
10963
11004
|
async function updateSyncHeight(tx, blockNum) {
|
|
10964
11005
|
try {
|
|
10965
|
-
// Only update if moving forward to prevent race conditions
|
|
10966
11006
|
const current = await tx.stateSync.get(1);
|
|
10967
11007
|
if (!current || current.blockNum < blockNum) {
|
|
10968
11008
|
await tx.stateSync.update(1, {
|
|
@@ -10974,13 +11014,13 @@ async function updateSyncHeight(tx, blockNum) {
|
|
|
10974
11014
|
logWebStoreError(error, "Failed to update sync height");
|
|
10975
11015
|
}
|
|
10976
11016
|
}
|
|
10977
|
-
async function updateBlockHeader(tx, blockNum, blockHeader,
|
|
11017
|
+
async function updateBlockHeader(tx, blockNum, blockHeader, hasClientNotes, partialBlockchainPeaks) {
|
|
10978
11018
|
try {
|
|
10979
11019
|
const data = {
|
|
10980
11020
|
blockNum: blockNum,
|
|
10981
11021
|
header: blockHeader,
|
|
10982
|
-
partialBlockchainPeaks,
|
|
10983
11022
|
hasClientNotes: hasClientNotes.toString(),
|
|
11023
|
+
...(partialBlockchainPeaks !== undefined && { partialBlockchainPeaks }),
|
|
10984
11024
|
};
|
|
10985
11025
|
const existingBlockHeader = await tx.blockHeaders.get(blockNum);
|
|
10986
11026
|
if (!existingBlockHeader) {
|
|
@@ -11011,13 +11051,13 @@ async function updatePartialBlockchainNodes(tx, nodeIndexes, nodes) {
|
|
|
11011
11051
|
logWebStoreError(err, "Failed to update partial blockchain nodes");
|
|
11012
11052
|
}
|
|
11013
11053
|
}
|
|
11014
|
-
async function updateCommittedNoteTags(tx,
|
|
11054
|
+
async function updateCommittedNoteTags(tx, committedNoteTagSources) {
|
|
11015
11055
|
try {
|
|
11016
|
-
for (let i = 0; i <
|
|
11017
|
-
const
|
|
11056
|
+
for (let i = 0; i < committedNoteTagSources.length; i++) {
|
|
11057
|
+
const tagSource = committedNoteTagSources[i];
|
|
11018
11058
|
await tx.tags
|
|
11019
11059
|
.where("sourceNoteId")
|
|
11020
|
-
.equals(
|
|
11060
|
+
.equals(tagSource)
|
|
11021
11061
|
.delete();
|
|
11022
11062
|
}
|
|
11023
11063
|
}
|
|
@@ -11222,21 +11262,13 @@ class Account {
|
|
|
11222
11262
|
return AccountId.__wrap(ret);
|
|
11223
11263
|
}
|
|
11224
11264
|
/**
|
|
11225
|
-
* Returns true if the account
|
|
11265
|
+
* Returns true if the account exposes a fungible-faucet interface.
|
|
11226
11266
|
* @returns {boolean}
|
|
11227
11267
|
*/
|
|
11228
11268
|
isFaucet() {
|
|
11229
11269
|
const ret = wasm.account_isFaucet(this.__wbg_ptr);
|
|
11230
11270
|
return ret !== 0;
|
|
11231
11271
|
}
|
|
11232
|
-
/**
|
|
11233
|
-
* Returns true if this is a network-owned account.
|
|
11234
|
-
* @returns {boolean}
|
|
11235
|
-
*/
|
|
11236
|
-
isNetwork() {
|
|
11237
|
-
const ret = wasm.account_isNetwork(this.__wbg_ptr);
|
|
11238
|
-
return ret !== 0;
|
|
11239
|
-
}
|
|
11240
11272
|
/**
|
|
11241
11273
|
* Returns true if the account has not yet been committed to the chain.
|
|
11242
11274
|
* @returns {boolean}
|
|
@@ -11262,21 +11294,13 @@ class Account {
|
|
|
11262
11294
|
return ret !== 0;
|
|
11263
11295
|
}
|
|
11264
11296
|
/**
|
|
11265
|
-
* Returns true if the account is a regular
|
|
11297
|
+
* Returns true if the account is a regular (non-faucet) account.
|
|
11266
11298
|
* @returns {boolean}
|
|
11267
11299
|
*/
|
|
11268
11300
|
isRegularAccount() {
|
|
11269
11301
|
const ret = wasm.account_isRegularAccount(this.__wbg_ptr);
|
|
11270
11302
|
return ret !== 0;
|
|
11271
11303
|
}
|
|
11272
|
-
/**
|
|
11273
|
-
* Returns true if the account can update its code.
|
|
11274
|
-
* @returns {boolean}
|
|
11275
|
-
*/
|
|
11276
|
-
isUpdatable() {
|
|
11277
|
-
const ret = wasm.account_isUpdatable(this.__wbg_ptr);
|
|
11278
|
-
return ret !== 0;
|
|
11279
|
-
}
|
|
11280
11304
|
/**
|
|
11281
11305
|
* Returns the account nonce, which is incremented on every state update.
|
|
11282
11306
|
* @returns {Felt}
|
|
@@ -11376,18 +11400,13 @@ class AccountArray {
|
|
|
11376
11400
|
wasm.accountarray_push(this.__wbg_ptr, element.__wbg_ptr);
|
|
11377
11401
|
}
|
|
11378
11402
|
/**
|
|
11379
|
-
* Replace the element at `index`. Borrows + clones the input
|
|
11380
|
-
* (mirrors `push`), so the caller's JS handle remains valid
|
|
11381
|
-
* after the call. Without this borrow, passing `elem` by
|
|
11382
|
-
* value would move the underlying Rust value out of the
|
|
11383
|
-
* caller's JS handle and any subsequent method on it would
|
|
11384
|
-
* panic with `"null pointer passed to rust"`.
|
|
11385
11403
|
* @param {number} index
|
|
11386
11404
|
* @param {Account} elem
|
|
11387
11405
|
*/
|
|
11388
11406
|
replaceAt(index, elem) {
|
|
11389
11407
|
_assertClass(elem, Account);
|
|
11390
|
-
|
|
11408
|
+
var ptr0 = elem.__destroy_into_raw();
|
|
11409
|
+
const ret = wasm.accountarray_replaceAt(this.__wbg_ptr, index, ptr0);
|
|
11391
11410
|
if (ret[1]) {
|
|
11392
11411
|
throw takeFromExternrefTable0(ret[0]);
|
|
11393
11412
|
}
|
|
@@ -11415,28 +11434,31 @@ class AccountBuilder {
|
|
|
11415
11434
|
}
|
|
11416
11435
|
/**
|
|
11417
11436
|
* Sets the account type (regular, faucet, etc.).
|
|
11418
|
-
*
|
|
11419
|
-
* Accepts either a numeric WASM enum value (0–3) or a string name
|
|
11420
|
-
* (`"FungibleFaucet"`, `"NonFungibleFaucet"`,
|
|
11421
|
-
* `"RegularAccountImmutableCode"`, `"RegularAccountUpdatableCode"`).
|
|
11422
|
-
* @param {any} account_type
|
|
11437
|
+
* @param {AccountType} account_type
|
|
11423
11438
|
* @returns {AccountBuilder}
|
|
11424
11439
|
*/
|
|
11425
11440
|
accountType(account_type) {
|
|
11426
|
-
const
|
|
11427
|
-
|
|
11441
|
+
const ret = wasm.accountbuilder_accountType(this.__wbg_ptr, account_type);
|
|
11442
|
+
return AccountBuilder.__wrap(ret);
|
|
11443
|
+
}
|
|
11444
|
+
/**
|
|
11445
|
+
* Builds the account (including merged storage schema commitment metadata) and returns it
|
|
11446
|
+
* together with the derived seed.
|
|
11447
|
+
* @returns {AccountBuilderResult}
|
|
11448
|
+
*/
|
|
11449
|
+
build() {
|
|
11450
|
+
const ret = wasm.accountbuilder_build(this.__wbg_ptr);
|
|
11428
11451
|
if (ret[2]) {
|
|
11429
11452
|
throw takeFromExternrefTable0(ret[1]);
|
|
11430
11453
|
}
|
|
11431
|
-
return
|
|
11454
|
+
return AccountBuilderResult.__wrap(ret[0]);
|
|
11432
11455
|
}
|
|
11433
11456
|
/**
|
|
11434
|
-
* Builds the account
|
|
11457
|
+
* Builds the account without adding the schema commitment component (legacy behavior).
|
|
11435
11458
|
* @returns {AccountBuilderResult}
|
|
11436
11459
|
*/
|
|
11437
|
-
|
|
11438
|
-
const
|
|
11439
|
-
const ret = wasm.accountbuilder_build(ptr);
|
|
11460
|
+
buildWithoutSchemaCommitment() {
|
|
11461
|
+
const ret = wasm.accountbuilder_buildWithoutSchemaCommitment(this.__wbg_ptr);
|
|
11440
11462
|
if (ret[2]) {
|
|
11441
11463
|
throw takeFromExternrefTable0(ret[1]);
|
|
11442
11464
|
}
|
|
@@ -11459,13 +11481,17 @@ class AccountBuilder {
|
|
|
11459
11481
|
}
|
|
11460
11482
|
/**
|
|
11461
11483
|
* Sets the storage mode (public/private) for the account.
|
|
11484
|
+
*
|
|
11485
|
+
* The 0.15 protocol surface collapsed `AccountStorageMode` and `AccountType` into a
|
|
11486
|
+
* single 2-way `AccountType` flag: setting the storage mode IS setting the account
|
|
11487
|
+
* type. Calling both `accountType()` and `storageMode()` on the same builder is the
|
|
11488
|
+
* last-write-wins on the underlying flag. Method kept for JS-surface back-compat.
|
|
11462
11489
|
* @param {AccountStorageMode} storage_mode
|
|
11463
11490
|
* @returns {AccountBuilder}
|
|
11464
11491
|
*/
|
|
11465
11492
|
storageMode(storage_mode) {
|
|
11466
|
-
const ptr = this.__destroy_into_raw();
|
|
11467
11493
|
_assertClass(storage_mode, AccountStorageMode);
|
|
11468
|
-
const ret = wasm.accountbuilder_storageMode(
|
|
11494
|
+
const ret = wasm.accountbuilder_storageMode(this.__wbg_ptr, storage_mode.__wbg_ptr);
|
|
11469
11495
|
return AccountBuilder.__wrap(ret);
|
|
11470
11496
|
}
|
|
11471
11497
|
/**
|
|
@@ -11474,17 +11500,15 @@ class AccountBuilder {
|
|
|
11474
11500
|
* @returns {AccountBuilder}
|
|
11475
11501
|
*/
|
|
11476
11502
|
withAuthComponent(account_component) {
|
|
11477
|
-
const ptr = this.__destroy_into_raw();
|
|
11478
11503
|
_assertClass(account_component, AccountComponent);
|
|
11479
|
-
const ret = wasm.accountbuilder_withAuthComponent(
|
|
11504
|
+
const ret = wasm.accountbuilder_withAuthComponent(this.__wbg_ptr, account_component.__wbg_ptr);
|
|
11480
11505
|
return AccountBuilder.__wrap(ret);
|
|
11481
11506
|
}
|
|
11482
11507
|
/**
|
|
11483
11508
|
* @returns {AccountBuilder}
|
|
11484
11509
|
*/
|
|
11485
11510
|
withBasicWalletComponent() {
|
|
11486
|
-
const
|
|
11487
|
-
const ret = wasm.accountbuilder_withBasicWalletComponent(ptr);
|
|
11511
|
+
const ret = wasm.accountbuilder_withBasicWalletComponent(this.__wbg_ptr);
|
|
11488
11512
|
return AccountBuilder.__wrap(ret);
|
|
11489
11513
|
}
|
|
11490
11514
|
/**
|
|
@@ -11493,9 +11517,8 @@ class AccountBuilder {
|
|
|
11493
11517
|
* @returns {AccountBuilder}
|
|
11494
11518
|
*/
|
|
11495
11519
|
withComponent(account_component) {
|
|
11496
|
-
const ptr = this.__destroy_into_raw();
|
|
11497
11520
|
_assertClass(account_component, AccountComponent);
|
|
11498
|
-
const ret = wasm.accountbuilder_withComponent(
|
|
11521
|
+
const ret = wasm.accountbuilder_withComponent(this.__wbg_ptr, account_component.__wbg_ptr);
|
|
11499
11522
|
return AccountBuilder.__wrap(ret);
|
|
11500
11523
|
}
|
|
11501
11524
|
/**
|
|
@@ -11503,8 +11526,7 @@ class AccountBuilder {
|
|
|
11503
11526
|
* @returns {AccountBuilder}
|
|
11504
11527
|
*/
|
|
11505
11528
|
withNoAuthComponent() {
|
|
11506
|
-
const
|
|
11507
|
-
const ret = wasm.accountbuilder_withNoAuthComponent(ptr);
|
|
11529
|
+
const ret = wasm.accountbuilder_withNoAuthComponent(this.__wbg_ptr);
|
|
11508
11530
|
return AccountBuilder.__wrap(ret);
|
|
11509
11531
|
}
|
|
11510
11532
|
}
|
|
@@ -11682,7 +11704,8 @@ class AccountComponent {
|
|
|
11682
11704
|
static fromPackage(_package, storage_slots) {
|
|
11683
11705
|
_assertClass(_package, Package);
|
|
11684
11706
|
_assertClass(storage_slots, StorageSlotArray);
|
|
11685
|
-
|
|
11707
|
+
var ptr0 = storage_slots.__destroy_into_raw();
|
|
11708
|
+
const ret = wasm.accountcomponent_fromPackage(_package.__wbg_ptr, ptr0);
|
|
11686
11709
|
if (ret[2]) {
|
|
11687
11710
|
throw takeFromExternrefTable0(ret[1]);
|
|
11688
11711
|
}
|
|
@@ -11729,11 +11752,15 @@ class AccountComponent {
|
|
|
11729
11752
|
}
|
|
11730
11753
|
/**
|
|
11731
11754
|
* Marks the component as supporting all account types.
|
|
11755
|
+
*
|
|
11756
|
+
* The 0.15 protocol collapsed the per-account-type flag set on
|
|
11757
|
+
* `AccountComponentMetadata::new` — every component now applies to every account type
|
|
11758
|
+
* implicitly, so this method's job is to re-derive the metadata under the new
|
|
11759
|
+
* (name-only) constructor while keeping the JS API surface stable.
|
|
11732
11760
|
* @returns {AccountComponent}
|
|
11733
11761
|
*/
|
|
11734
11762
|
withSupportsAllTypes() {
|
|
11735
|
-
const
|
|
11736
|
-
const ret = wasm.accountcomponent_withSupportsAllTypes(ptr);
|
|
11763
|
+
const ret = wasm.accountcomponent_withSupportsAllTypes(this.__wbg_ptr);
|
|
11737
11764
|
return AccountComponent.__wrap(ret);
|
|
11738
11765
|
}
|
|
11739
11766
|
}
|
|
@@ -12088,22 +12115,6 @@ class AccountId {
|
|
|
12088
12115
|
}
|
|
12089
12116
|
return AccountId.__wrap(ret[0]);
|
|
12090
12117
|
}
|
|
12091
|
-
/**
|
|
12092
|
-
* Returns true if the ID refers to a faucet.
|
|
12093
|
-
* @returns {boolean}
|
|
12094
|
-
*/
|
|
12095
|
-
isFaucet() {
|
|
12096
|
-
const ret = wasm.accountid_isFaucet(this.__wbg_ptr);
|
|
12097
|
-
return ret !== 0;
|
|
12098
|
-
}
|
|
12099
|
-
/**
|
|
12100
|
-
* Returns true if the ID is reserved for network accounts.
|
|
12101
|
-
* @returns {boolean}
|
|
12102
|
-
*/
|
|
12103
|
-
isNetwork() {
|
|
12104
|
-
const ret = wasm.accountid_isNetwork(this.__wbg_ptr);
|
|
12105
|
-
return ret !== 0;
|
|
12106
|
-
}
|
|
12107
12118
|
/**
|
|
12108
12119
|
* Returns true if the account uses private storage.
|
|
12109
12120
|
* @returns {boolean}
|
|
@@ -12120,14 +12131,6 @@ class AccountId {
|
|
|
12120
12131
|
const ret = wasm.accountid_isPublic(this.__wbg_ptr);
|
|
12121
12132
|
return ret !== 0;
|
|
12122
12133
|
}
|
|
12123
|
-
/**
|
|
12124
|
-
* Returns true if the ID refers to a regular account.
|
|
12125
|
-
* @returns {boolean}
|
|
12126
|
-
*/
|
|
12127
|
-
isRegularAccount() {
|
|
12128
|
-
const ret = wasm.accountid_isRegularAccount(this.__wbg_ptr);
|
|
12129
|
-
return ret !== 0;
|
|
12130
|
-
}
|
|
12131
12134
|
/**
|
|
12132
12135
|
* Returns the prefix field element storing metadata about version, type, and storage mode.
|
|
12133
12136
|
* @returns {Felt}
|
|
@@ -12245,18 +12248,13 @@ class AccountIdArray {
|
|
|
12245
12248
|
wasm.accountidarray_push(this.__wbg_ptr, element.__wbg_ptr);
|
|
12246
12249
|
}
|
|
12247
12250
|
/**
|
|
12248
|
-
* Replace the element at `index`. Borrows + clones the input
|
|
12249
|
-
* (mirrors `push`), so the caller's JS handle remains valid
|
|
12250
|
-
* after the call. Without this borrow, passing `elem` by
|
|
12251
|
-
* value would move the underlying Rust value out of the
|
|
12252
|
-
* caller's JS handle and any subsequent method on it would
|
|
12253
|
-
* panic with `"null pointer passed to rust"`.
|
|
12254
12251
|
* @param {number} index
|
|
12255
12252
|
* @param {AccountId} elem
|
|
12256
12253
|
*/
|
|
12257
12254
|
replaceAt(index, elem) {
|
|
12258
12255
|
_assertClass(elem, AccountId);
|
|
12259
|
-
|
|
12256
|
+
var ptr0 = elem.__destroy_into_raw();
|
|
12257
|
+
const ret = wasm.accountidarray_replaceAt(this.__wbg_ptr, index, ptr0);
|
|
12260
12258
|
if (ret[1]) {
|
|
12261
12259
|
throw takeFromExternrefTable0(ret[0]);
|
|
12262
12260
|
}
|
|
@@ -12347,7 +12345,7 @@ class AccountProof {
|
|
|
12347
12345
|
*
|
|
12348
12346
|
* Each entry contains a `key` and `value` as `Word` objects.
|
|
12349
12347
|
* @param {string} slot_name
|
|
12350
|
-
* @returns {
|
|
12348
|
+
* @returns {StorageMapEntryJs[] | undefined}
|
|
12351
12349
|
*/
|
|
12352
12350
|
getStorageMapEntries(slot_name) {
|
|
12353
12351
|
const ptr0 = passStringToWasm0(slot_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -12425,6 +12423,22 @@ class AccountProof {
|
|
|
12425
12423
|
const ret = wasm.accountproof_numStorageSlots(this.__wbg_ptr);
|
|
12426
12424
|
return ret === 0xFFFFFF ? undefined : ret;
|
|
12427
12425
|
}
|
|
12426
|
+
/**
|
|
12427
|
+
* Returns the fungible assets in the account's vault, if vault details were included
|
|
12428
|
+
* in the proof response.
|
|
12429
|
+
*
|
|
12430
|
+
* Returns `undefined` if the account is private or vault data was not requested.
|
|
12431
|
+
* @returns {FungibleAsset[] | undefined}
|
|
12432
|
+
*/
|
|
12433
|
+
vaultFungibleAssets() {
|
|
12434
|
+
const ret = wasm.accountproof_vaultFungibleAssets(this.__wbg_ptr);
|
|
12435
|
+
let v1;
|
|
12436
|
+
if (ret[0] !== 0) {
|
|
12437
|
+
v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
12438
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
12439
|
+
}
|
|
12440
|
+
return v1;
|
|
12441
|
+
}
|
|
12428
12442
|
}
|
|
12429
12443
|
if (Symbol.dispose) AccountProof.prototype[Symbol.dispose] = AccountProof.prototype.free;
|
|
12430
12444
|
|
|
@@ -12692,7 +12706,7 @@ class AccountStorage {
|
|
|
12692
12706
|
* Returns `undefined` if the slot isn't a map or doesn't exist.
|
|
12693
12707
|
* Returns `[]` if the map exists but is empty.
|
|
12694
12708
|
* @param {string} slot_name
|
|
12695
|
-
* @returns {
|
|
12709
|
+
* @returns {StorageMapEntry[] | undefined}
|
|
12696
12710
|
*/
|
|
12697
12711
|
getMapEntries(slot_name) {
|
|
12698
12712
|
const ptr0 = passStringToWasm0(slot_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -12801,6 +12815,15 @@ if (Symbol.dispose) AccountStorageDelta.prototype[Symbol.dispose] = AccountStora
|
|
|
12801
12815
|
|
|
12802
12816
|
/**
|
|
12803
12817
|
* Storage visibility mode for an account.
|
|
12818
|
+
*
|
|
12819
|
+
* In the 0.15 protocol surface this is the same enum as `AccountType`
|
|
12820
|
+
* (the on-chain identifier no longer carries any faucet-vs-regular or
|
|
12821
|
+
* updatable-vs-immutable distinction), so internally we wrap an
|
|
12822
|
+
* `AccountType`. The standalone `AccountStorageMode` type still exists at
|
|
12823
|
+
* the JS API surface for backwards compatibility with code that wrote
|
|
12824
|
+
* `AccountStorageMode.public()` / `.private()`. The pre-existing `.network()`
|
|
12825
|
+
* constructor was removed — the network storage mode does not exist on the
|
|
12826
|
+
* 0.15 chain.
|
|
12804
12827
|
*/
|
|
12805
12828
|
class AccountStorageMode {
|
|
12806
12829
|
static __wrap(ptr) {
|
|
@@ -12836,14 +12859,6 @@ class AccountStorageMode {
|
|
|
12836
12859
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
12837
12860
|
}
|
|
12838
12861
|
}
|
|
12839
|
-
/**
|
|
12840
|
-
* Creates a network storage mode.
|
|
12841
|
-
* @returns {AccountStorageMode}
|
|
12842
|
-
*/
|
|
12843
|
-
static network() {
|
|
12844
|
-
const ret = wasm.accountstoragemode_network();
|
|
12845
|
-
return AccountStorageMode.__wrap(ret);
|
|
12846
|
-
}
|
|
12847
12862
|
/**
|
|
12848
12863
|
* Creates a private storage mode.
|
|
12849
12864
|
* @returns {AccountStorageMode}
|
|
@@ -12862,6 +12877,9 @@ class AccountStorageMode {
|
|
|
12862
12877
|
}
|
|
12863
12878
|
/**
|
|
12864
12879
|
* Parses a storage mode from its string representation.
|
|
12880
|
+
*
|
|
12881
|
+
* Accepts `"private"` and `"public"`; any other input — including the
|
|
12882
|
+
* previously-supported `"network"` — is rejected.
|
|
12865
12883
|
* @param {string} s
|
|
12866
12884
|
* @returns {AccountStorageMode}
|
|
12867
12885
|
*/
|
|
@@ -12922,13 +12940,17 @@ class AccountStorageRequirements {
|
|
|
12922
12940
|
if (Symbol.dispose) AccountStorageRequirements.prototype[Symbol.dispose] = AccountStorageRequirements.prototype.free;
|
|
12923
12941
|
|
|
12924
12942
|
/**
|
|
12925
|
-
*
|
|
12943
|
+
* Storage mode of an account. The 0.15 protocol collapses the previous
|
|
12944
|
+
* 4-way `{ FungibleFaucet, NonFungibleFaucet, RegularAccountImmutableCode,
|
|
12945
|
+
* RegularAccountUpdatableCode }` distinction into a 2-way storage flag —
|
|
12946
|
+
* faucet-vs-regular and updatable-vs-immutable distinctions are no longer
|
|
12947
|
+
* part of the on-chain `AccountType` and the API loses no information by
|
|
12948
|
+
* narrowing here too.
|
|
12949
|
+
* @enum {0 | 1}
|
|
12926
12950
|
*/
|
|
12927
12951
|
const AccountType = Object.freeze({
|
|
12928
|
-
|
|
12929
|
-
|
|
12930
|
-
RegularAccountImmutableCode: 2, "2": "RegularAccountImmutableCode",
|
|
12931
|
-
RegularAccountUpdatableCode: 3, "3": "RegularAccountUpdatableCode",
|
|
12952
|
+
Private: 0, "0": "Private",
|
|
12953
|
+
Public: 1, "1": "Public",
|
|
12932
12954
|
});
|
|
12933
12955
|
|
|
12934
12956
|
/**
|
|
@@ -13226,13 +13248,14 @@ class AdviceMap {
|
|
|
13226
13248
|
insert(key, value) {
|
|
13227
13249
|
_assertClass(key, Word);
|
|
13228
13250
|
_assertClass(value, FeltArray);
|
|
13229
|
-
|
|
13230
|
-
|
|
13251
|
+
var ptr0 = value.__destroy_into_raw();
|
|
13252
|
+
const ret = wasm.advicemap_insert(this.__wbg_ptr, key.__wbg_ptr, ptr0);
|
|
13253
|
+
let v2;
|
|
13231
13254
|
if (ret[0] !== 0) {
|
|
13232
|
-
|
|
13255
|
+
v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
13233
13256
|
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
13234
13257
|
}
|
|
13235
|
-
return
|
|
13258
|
+
return v2;
|
|
13236
13259
|
}
|
|
13237
13260
|
/**
|
|
13238
13261
|
* Creates an empty advice map.
|
|
@@ -13289,6 +13312,17 @@ class AssetVault {
|
|
|
13289
13312
|
}
|
|
13290
13313
|
/**
|
|
13291
13314
|
* Returns the balance for the given fungible faucet, or zero if absent.
|
|
13315
|
+
*
|
|
13316
|
+
* `get_balance` on the 0.15 surface keys by `AssetVaultKey`, not `AccountId`, and
|
|
13317
|
+
* validates the composition. The callback flag is `Disabled` because fungible balance
|
|
13318
|
+
* reads don't run asset callbacks. Returns zero on lookup error (`Err` arms here would
|
|
13319
|
+
* indicate the key was constructed wrong, which can't happen for fungible keys built
|
|
13320
|
+
* this way).
|
|
13321
|
+
*
|
|
13322
|
+
* NOTE: the `AssetVaultKey` encodes the callback flag, so this reports only the balance
|
|
13323
|
+
* of callback-*disabled* fungible assets. Faucets built by this SDK omit transfer policies
|
|
13324
|
+
* and therefore mint callback-disabled assets, so this is exact for them; an asset minted
|
|
13325
|
+
* elsewhere with callbacks enabled would not be counted here.
|
|
13292
13326
|
* @param {AccountId} faucet_id
|
|
13293
13327
|
* @returns {bigint}
|
|
13294
13328
|
*/
|
|
@@ -13381,10 +13415,9 @@ class AuthFalcon512RpoMultisigConfig {
|
|
|
13381
13415
|
* @returns {AuthFalcon512RpoMultisigConfig}
|
|
13382
13416
|
*/
|
|
13383
13417
|
withProcThresholds(proc_thresholds) {
|
|
13384
|
-
const ptr = this.__destroy_into_raw();
|
|
13385
13418
|
const ptr0 = passArrayJsValueToWasm0(proc_thresholds, wasm.__wbindgen_malloc);
|
|
13386
13419
|
const len0 = WASM_VECTOR_LEN;
|
|
13387
|
-
const ret = wasm.authfalcon512rpomultisigconfig_withProcThresholds(
|
|
13420
|
+
const ret = wasm.authfalcon512rpomultisigconfig_withProcThresholds(this.__wbg_ptr, ptr0, len0);
|
|
13388
13421
|
if (ret[2]) {
|
|
13389
13422
|
throw takeFromExternrefTable0(ret[1]);
|
|
13390
13423
|
}
|
|
@@ -13526,6 +13559,9 @@ if (Symbol.dispose) AuthSecretKey.prototype[Symbol.dispose] = AuthSecretKey.prot
|
|
|
13526
13559
|
|
|
13527
13560
|
/**
|
|
13528
13561
|
* Provides metadata for a basic fungible faucet account component.
|
|
13562
|
+
*
|
|
13563
|
+
* Reads the on-chain [`FungibleFaucet`] component for the account, which holds the
|
|
13564
|
+
* per-token info (symbol/decimals/maxSupply).
|
|
13529
13565
|
*/
|
|
13530
13566
|
class BasicFungibleFaucetComponent {
|
|
13531
13567
|
static __wrap(ptr) {
|
|
@@ -13572,7 +13608,7 @@ class BasicFungibleFaucetComponent {
|
|
|
13572
13608
|
* @returns {Felt}
|
|
13573
13609
|
*/
|
|
13574
13610
|
maxSupply() {
|
|
13575
|
-
const ret = wasm.
|
|
13611
|
+
const ret = wasm.basicfungiblefaucetcomponent_maxSupply(this.__wbg_ptr);
|
|
13576
13612
|
return Felt.__wrap(ret);
|
|
13577
13613
|
}
|
|
13578
13614
|
/**
|
|
@@ -13655,8 +13691,8 @@ class BlockHeader {
|
|
|
13655
13691
|
* network.
|
|
13656
13692
|
* @returns {AccountId}
|
|
13657
13693
|
*/
|
|
13658
|
-
|
|
13659
|
-
const ret = wasm.
|
|
13694
|
+
feeFaucetId() {
|
|
13695
|
+
const ret = wasm.blockheader_feeFaucetId(this.__wbg_ptr);
|
|
13660
13696
|
return AccountId.__wrap(ret);
|
|
13661
13697
|
}
|
|
13662
13698
|
/**
|
|
@@ -13899,14 +13935,6 @@ class CommittedNote {
|
|
|
13899
13935
|
const ptr = this.__destroy_into_raw();
|
|
13900
13936
|
wasm.__wbg_committednote_free(ptr, 0);
|
|
13901
13937
|
}
|
|
13902
|
-
/**
|
|
13903
|
-
* Returns the full note metadata when the attachment payload is available.
|
|
13904
|
-
* @returns {NoteMetadata | undefined}
|
|
13905
|
-
*/
|
|
13906
|
-
fullMetadata() {
|
|
13907
|
-
const ret = wasm.committednote_fullMetadata(this.__wbg_ptr);
|
|
13908
|
-
return ret === 0 ? undefined : NoteMetadata.__wrap(ret);
|
|
13909
|
-
}
|
|
13910
13938
|
/**
|
|
13911
13939
|
* Returns the inclusion path for the note in the block's note tree.
|
|
13912
13940
|
* @returns {SparseMerklePath}
|
|
@@ -13925,9 +13953,6 @@ class CommittedNote {
|
|
|
13925
13953
|
}
|
|
13926
13954
|
/**
|
|
13927
13955
|
* Returns the note metadata.
|
|
13928
|
-
*
|
|
13929
|
-
* If only metadata headers are available, the returned metadata contains
|
|
13930
|
-
* the sender, note type, and tag without attachment payload.
|
|
13931
13956
|
* @returns {NoteMetadata}
|
|
13932
13957
|
*/
|
|
13933
13958
|
metadata() {
|
|
@@ -14302,12 +14327,18 @@ class Felt {
|
|
|
14302
14327
|
return BigInt.asUintN(64, ret);
|
|
14303
14328
|
}
|
|
14304
14329
|
/**
|
|
14305
|
-
* Creates a new field element
|
|
14330
|
+
* Creates a new field element.
|
|
14331
|
+
*
|
|
14332
|
+
* Returns an error if `value` is outside the field's representable
|
|
14333
|
+
* range (`Felt::new` is fallible on the 0.15 protocol surface).
|
|
14306
14334
|
* @param {bigint} value
|
|
14307
14335
|
*/
|
|
14308
14336
|
constructor(value) {
|
|
14309
14337
|
const ret = wasm.felt_new(value);
|
|
14310
|
-
|
|
14338
|
+
if (ret[2]) {
|
|
14339
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
14340
|
+
}
|
|
14341
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
14311
14342
|
FeltFinalization.register(this, this.__wbg_ptr, this);
|
|
14312
14343
|
return this;
|
|
14313
14344
|
}
|
|
@@ -14393,18 +14424,13 @@ class FeltArray {
|
|
|
14393
14424
|
wasm.feltarray_push(this.__wbg_ptr, element.__wbg_ptr);
|
|
14394
14425
|
}
|
|
14395
14426
|
/**
|
|
14396
|
-
* Replace the element at `index`. Borrows + clones the input
|
|
14397
|
-
* (mirrors `push`), so the caller's JS handle remains valid
|
|
14398
|
-
* after the call. Without this borrow, passing `elem` by
|
|
14399
|
-
* value would move the underlying Rust value out of the
|
|
14400
|
-
* caller's JS handle and any subsequent method on it would
|
|
14401
|
-
* panic with `"null pointer passed to rust"`.
|
|
14402
14427
|
* @param {number} index
|
|
14403
14428
|
* @param {Felt} elem
|
|
14404
14429
|
*/
|
|
14405
14430
|
replaceAt(index, elem) {
|
|
14406
14431
|
_assertClass(elem, Felt);
|
|
14407
|
-
|
|
14432
|
+
var ptr0 = elem.__destroy_into_raw();
|
|
14433
|
+
const ret = wasm.feltarray_replaceAt(this.__wbg_ptr, index, ptr0);
|
|
14408
14434
|
if (ret[1]) {
|
|
14409
14435
|
throw takeFromExternrefTable0(ret[0]);
|
|
14410
14436
|
}
|
|
@@ -14457,14 +14483,6 @@ class FetchedAccount {
|
|
|
14457
14483
|
const ret = wasm.fetchedaccount_commitment(this.__wbg_ptr);
|
|
14458
14484
|
return Word.__wrap(ret);
|
|
14459
14485
|
}
|
|
14460
|
-
/**
|
|
14461
|
-
* Returns true when the account is a network account.
|
|
14462
|
-
* @returns {boolean}
|
|
14463
|
-
*/
|
|
14464
|
-
isNetwork() {
|
|
14465
|
-
const ret = wasm.fetchedaccount_isNetwork(this.__wbg_ptr);
|
|
14466
|
-
return ret !== 0;
|
|
14467
|
-
}
|
|
14468
14486
|
/**
|
|
14469
14487
|
* Returns true when the account is private.
|
|
14470
14488
|
* @returns {boolean}
|
|
@@ -14495,8 +14513,15 @@ if (Symbol.dispose) FetchedAccount.prototype[Symbol.dispose] = FetchedAccount.pr
|
|
|
14495
14513
|
/**
|
|
14496
14514
|
* Wrapper for a note fetched over RPC.
|
|
14497
14515
|
*
|
|
14498
|
-
* It
|
|
14499
|
-
* public notes
|
|
14516
|
+
* It carries the note ID, public metadata, and inclusion proof. The full note body is only
|
|
14517
|
+
* present for public notes; for private notes only the header-shaped fields and inclusion
|
|
14518
|
+
* proof are available — the body lives off-chain.
|
|
14519
|
+
*
|
|
14520
|
+
* 0.15 protocol surface: the on-chain `NoteHeader` now commits to a
|
|
14521
|
+
* `NoteDetailsCommitment` rather than the `NoteId`, so a `NoteHeader` can no longer be
|
|
14522
|
+
* reconstructed from header-shaped fields alone for private notes. We therefore expose
|
|
14523
|
+
* the constituent fields (`noteId`, `metadata`) directly on `FetchedNote` instead of a
|
|
14524
|
+
* `header` getter.
|
|
14500
14525
|
*/
|
|
14501
14526
|
class FetchedNote {
|
|
14502
14527
|
static __wrap(ptr) {
|
|
@@ -14528,12 +14553,18 @@ class FetchedNote {
|
|
|
14528
14553
|
return ret === 0 ? undefined : InputNote.__wrap(ret);
|
|
14529
14554
|
}
|
|
14530
14555
|
/**
|
|
14531
|
-
* The note's
|
|
14532
|
-
*
|
|
14556
|
+
* The note's attachments.
|
|
14557
|
+
*
|
|
14558
|
+
* 0.15 returns attachment content over RPC for both public and private notes, so this is
|
|
14559
|
+
* populated even when the note body itself is private. An empty array means the note
|
|
14560
|
+
* carries no attachments.
|
|
14561
|
+
* @returns {NoteAttachment[]}
|
|
14533
14562
|
*/
|
|
14534
|
-
get
|
|
14535
|
-
const ret = wasm.
|
|
14536
|
-
|
|
14563
|
+
get attachments() {
|
|
14564
|
+
const ret = wasm.fetchednote_attachments(this.__wbg_ptr);
|
|
14565
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
14566
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
14567
|
+
return v1;
|
|
14537
14568
|
}
|
|
14538
14569
|
/**
|
|
14539
14570
|
* The note's inclusion proof.
|
|
@@ -14772,18 +14803,13 @@ class ForeignAccountArray {
|
|
|
14772
14803
|
wasm.foreignaccountarray_push(this.__wbg_ptr, element.__wbg_ptr);
|
|
14773
14804
|
}
|
|
14774
14805
|
/**
|
|
14775
|
-
* Replace the element at `index`. Borrows + clones the input
|
|
14776
|
-
* (mirrors `push`), so the caller's JS handle remains valid
|
|
14777
|
-
* after the call. Without this borrow, passing `elem` by
|
|
14778
|
-
* value would move the underlying Rust value out of the
|
|
14779
|
-
* caller's JS handle and any subsequent method on it would
|
|
14780
|
-
* panic with `"null pointer passed to rust"`.
|
|
14781
14806
|
* @param {number} index
|
|
14782
14807
|
* @param {ForeignAccount} elem
|
|
14783
14808
|
*/
|
|
14784
14809
|
replaceAt(index, elem) {
|
|
14785
14810
|
_assertClass(elem, ForeignAccount);
|
|
14786
|
-
|
|
14811
|
+
var ptr0 = elem.__destroy_into_raw();
|
|
14812
|
+
const ret = wasm.foreignaccountarray_replaceAt(this.__wbg_ptr, index, ptr0);
|
|
14787
14813
|
if (ret[1]) {
|
|
14788
14814
|
throw takeFromExternrefTable0(ret[0]);
|
|
14789
14815
|
}
|
|
@@ -14853,7 +14879,10 @@ class FungibleAsset {
|
|
|
14853
14879
|
constructor(faucet_id, amount) {
|
|
14854
14880
|
_assertClass(faucet_id, AccountId);
|
|
14855
14881
|
const ret = wasm.fungibleasset_new(faucet_id.__wbg_ptr, amount);
|
|
14856
|
-
|
|
14882
|
+
if (ret[2]) {
|
|
14883
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
14884
|
+
}
|
|
14885
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
14857
14886
|
FungibleAssetFinalization.register(this, this.__wbg_ptr, this);
|
|
14858
14887
|
return this;
|
|
14859
14888
|
}
|
|
@@ -14883,6 +14912,10 @@ class FungibleAssetDelta {
|
|
|
14883
14912
|
}
|
|
14884
14913
|
/**
|
|
14885
14914
|
* Returns the delta amount for a given faucet, if present.
|
|
14915
|
+
*
|
|
14916
|
+
* The vault key here is the one used by the fungible-delta tree, which the upstream
|
|
14917
|
+
* surface keys with `AssetCallbackFlag::Disabled` — fungible balance deltas don't run
|
|
14918
|
+
* asset callbacks. `new_fungible` on the 0.15 surface is infallible.
|
|
14886
14919
|
* @param {AccountId} faucet_id
|
|
14887
14920
|
* @returns {bigint | undefined}
|
|
14888
14921
|
*/
|
|
@@ -15057,7 +15090,12 @@ class InputNote {
|
|
|
15057
15090
|
return InputNote.__wrap(ret);
|
|
15058
15091
|
}
|
|
15059
15092
|
/**
|
|
15060
|
-
* Returns the commitment to the note ID
|
|
15093
|
+
* Returns the commitment to the note (its ID).
|
|
15094
|
+
*
|
|
15095
|
+
* Migration note (miden-client PR #2214): `Note::commitment()` was
|
|
15096
|
+
* removed on the 0.15 surface — the note ID *is* the commitment (it
|
|
15097
|
+
* hashes details + metadata). Return the underlying `NoteId` as a
|
|
15098
|
+
* `Word` so the JS API contract is unchanged.
|
|
15061
15099
|
* @returns {Word}
|
|
15062
15100
|
*/
|
|
15063
15101
|
commitment() {
|
|
@@ -15143,6 +15181,22 @@ class InputNoteRecord {
|
|
|
15143
15181
|
const ptr = this.__destroy_into_raw();
|
|
15144
15182
|
wasm.__wbg_inputnoterecord_free(ptr, 0);
|
|
15145
15183
|
}
|
|
15184
|
+
/**
|
|
15185
|
+
* Returns the note's attachments.
|
|
15186
|
+
*
|
|
15187
|
+
* On the 0.15 surface the full attachment content (the packed words) lives
|
|
15188
|
+
* on the note record itself rather than on `NoteMetadata` (which only
|
|
15189
|
+
* carries the attachment headers). This exposes that content so JS callers
|
|
15190
|
+
* can decode payloads packed via the `createNoteAttachment` helper. An
|
|
15191
|
+
* empty array means the note carries no attachments.
|
|
15192
|
+
* @returns {NoteAttachment[]}
|
|
15193
|
+
*/
|
|
15194
|
+
attachments() {
|
|
15195
|
+
const ret = wasm.inputnoterecord_attachments(this.__wbg_ptr);
|
|
15196
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
15197
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
15198
|
+
return v1;
|
|
15199
|
+
}
|
|
15146
15200
|
/**
|
|
15147
15201
|
* Returns the note commitment (id + metadata), if available.
|
|
15148
15202
|
* @returns {Word | undefined}
|
|
@@ -15173,12 +15227,16 @@ class InputNoteRecord {
|
|
|
15173
15227
|
return NoteDetails.__wrap(ret);
|
|
15174
15228
|
}
|
|
15175
15229
|
/**
|
|
15176
|
-
* Returns the note ID.
|
|
15177
|
-
*
|
|
15230
|
+
* Returns the note ID when available.
|
|
15231
|
+
*
|
|
15232
|
+
* Migration note (miden-client PR #2214): `InputNoteRecord::id()`
|
|
15233
|
+
* returns `Option<NoteId>` — partial / metadata-less notes have no
|
|
15234
|
+
* metadata-bearing ID yet.
|
|
15235
|
+
* @returns {NoteId | undefined}
|
|
15178
15236
|
*/
|
|
15179
15237
|
id() {
|
|
15180
15238
|
const ret = wasm.inputnoterecord_id(this.__wbg_ptr);
|
|
15181
|
-
return NoteId.__wrap(ret);
|
|
15239
|
+
return ret === 0 ? undefined : NoteId.__wrap(ret);
|
|
15182
15240
|
}
|
|
15183
15241
|
/**
|
|
15184
15242
|
* Returns the inclusion proof when the note is authenticated.
|
|
@@ -15221,20 +15279,20 @@ class InputNoteRecord {
|
|
|
15221
15279
|
return ret === 0 ? undefined : NoteMetadata.__wrap(ret);
|
|
15222
15280
|
}
|
|
15223
15281
|
/**
|
|
15224
|
-
* Returns the nullifier for this note.
|
|
15225
|
-
*
|
|
15282
|
+
* Returns the nullifier for this note when available.
|
|
15283
|
+
*
|
|
15284
|
+
* Migration note (miden-client PR #2214): `InputNoteRecord::nullifier()`
|
|
15285
|
+
* returns `Option<Nullifier>` — partial notes have no nullifier yet.
|
|
15286
|
+
* @returns {string | undefined}
|
|
15226
15287
|
*/
|
|
15227
15288
|
nullifier() {
|
|
15228
|
-
|
|
15229
|
-
let
|
|
15230
|
-
|
|
15231
|
-
|
|
15232
|
-
|
|
15233
|
-
deferred1_1 = ret[1];
|
|
15234
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
15235
|
-
} finally {
|
|
15236
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
15289
|
+
const ret = wasm.inputnoterecord_nullifier(this.__wbg_ptr);
|
|
15290
|
+
let v1;
|
|
15291
|
+
if (ret[0] !== 0) {
|
|
15292
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
15293
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
15237
15294
|
}
|
|
15295
|
+
return v1;
|
|
15238
15296
|
}
|
|
15239
15297
|
/**
|
|
15240
15298
|
* Returns the current processing state for this note.
|
|
@@ -15805,11 +15863,12 @@ class JsStateSyncUpdate {
|
|
|
15805
15863
|
return ret >>> 0;
|
|
15806
15864
|
}
|
|
15807
15865
|
/**
|
|
15808
|
-
*
|
|
15866
|
+
* Details-commitment hex of committed notes whose tracking tags
|
|
15867
|
+
* (`NoteTagSource::Note`) should be removed from the client's local state.
|
|
15809
15868
|
* @returns {string[]}
|
|
15810
15869
|
*/
|
|
15811
|
-
get
|
|
15812
|
-
const ret = wasm.
|
|
15870
|
+
get committedNoteTagSources() {
|
|
15871
|
+
const ret = wasm.__wbg_get_jsstatesyncupdate_committedNoteTagSources(this.__wbg_ptr);
|
|
15813
15872
|
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
15814
15873
|
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
15815
15874
|
return v1;
|
|
@@ -15822,15 +15881,6 @@ class JsStateSyncUpdate {
|
|
|
15822
15881
|
const ret = wasm.__wbg_get_jsstatesyncupdate_flattenedNewBlockHeaders(this.__wbg_ptr);
|
|
15823
15882
|
return FlattenedU8Vec.__wrap(ret);
|
|
15824
15883
|
}
|
|
15825
|
-
/**
|
|
15826
|
-
* Flattened byte array containing partial blockchain peaks used for merkle tree
|
|
15827
|
-
* verification.
|
|
15828
|
-
* @returns {FlattenedU8Vec}
|
|
15829
|
-
*/
|
|
15830
|
-
get flattenedPartialBlockChainPeaks() {
|
|
15831
|
-
const ret = wasm.__wbg_get_jsstatesyncupdate_flattenedPartialBlockChainPeaks(this.__wbg_ptr);
|
|
15832
|
-
return FlattenedU8Vec.__wrap(ret);
|
|
15833
|
-
}
|
|
15834
15884
|
/**
|
|
15835
15885
|
* The block numbers corresponding to each header in `flattened_new_block_headers`.
|
|
15836
15886
|
* This vec should have the same length as the number of headers, with each index
|
|
@@ -15843,6 +15893,18 @@ class JsStateSyncUpdate {
|
|
|
15843
15893
|
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
15844
15894
|
return v1;
|
|
15845
15895
|
}
|
|
15896
|
+
/**
|
|
15897
|
+
* Serialized MMR peaks at the new sync height (single set for the whole update).
|
|
15898
|
+
* Written onto the chain-tip block's `blockHeaders` row (the one whose
|
|
15899
|
+
* `blockNum` matches `block_num`) and read back by `getCurrentBlockchainPeaks`.
|
|
15900
|
+
* @returns {Uint8Array}
|
|
15901
|
+
*/
|
|
15902
|
+
get partialBlockchainPeaks() {
|
|
15903
|
+
const ret = wasm.__wbg_get_jsstatesyncupdate_partialBlockchainPeaks(this.__wbg_ptr);
|
|
15904
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
15905
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
15906
|
+
return v1;
|
|
15907
|
+
}
|
|
15846
15908
|
/**
|
|
15847
15909
|
* Input notes for this state update in serialized form.
|
|
15848
15910
|
* @returns {SerializedInputNoteData[]}
|
|
@@ -15921,13 +15983,14 @@ class JsStateSyncUpdate {
|
|
|
15921
15983
|
wasm.__wbg_set_jsstatesyncupdate_blockNum(this.__wbg_ptr, arg0);
|
|
15922
15984
|
}
|
|
15923
15985
|
/**
|
|
15924
|
-
*
|
|
15986
|
+
* Details-commitment hex of committed notes whose tracking tags
|
|
15987
|
+
* (`NoteTagSource::Note`) should be removed from the client's local state.
|
|
15925
15988
|
* @param {string[]} arg0
|
|
15926
15989
|
*/
|
|
15927
|
-
set
|
|
15990
|
+
set committedNoteTagSources(arg0) {
|
|
15928
15991
|
const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
15929
15992
|
const len0 = WASM_VECTOR_LEN;
|
|
15930
|
-
wasm.
|
|
15993
|
+
wasm.__wbg_set_jsstatesyncupdate_committedNoteTagSources(this.__wbg_ptr, ptr0, len0);
|
|
15931
15994
|
}
|
|
15932
15995
|
/**
|
|
15933
15996
|
* The new block headers for this state update, serialized into a flattened byte array.
|
|
@@ -15938,16 +16001,6 @@ class JsStateSyncUpdate {
|
|
|
15938
16001
|
var ptr0 = arg0.__destroy_into_raw();
|
|
15939
16002
|
wasm.__wbg_set_jsstatesyncupdate_flattenedNewBlockHeaders(this.__wbg_ptr, ptr0);
|
|
15940
16003
|
}
|
|
15941
|
-
/**
|
|
15942
|
-
* Flattened byte array containing partial blockchain peaks used for merkle tree
|
|
15943
|
-
* verification.
|
|
15944
|
-
* @param {FlattenedU8Vec} arg0
|
|
15945
|
-
*/
|
|
15946
|
-
set flattenedPartialBlockChainPeaks(arg0) {
|
|
15947
|
-
_assertClass(arg0, FlattenedU8Vec);
|
|
15948
|
-
var ptr0 = arg0.__destroy_into_raw();
|
|
15949
|
-
wasm.__wbg_set_jsstatesyncupdate_flattenedPartialBlockChainPeaks(this.__wbg_ptr, ptr0);
|
|
15950
|
-
}
|
|
15951
16004
|
/**
|
|
15952
16005
|
* The block numbers corresponding to each header in `flattened_new_block_headers`.
|
|
15953
16006
|
* This vec should have the same length as the number of headers, with each index
|
|
@@ -15959,6 +16012,17 @@ class JsStateSyncUpdate {
|
|
|
15959
16012
|
const len0 = WASM_VECTOR_LEN;
|
|
15960
16013
|
wasm.__wbg_set_jsstatesyncupdate_newBlockNums(this.__wbg_ptr, ptr0, len0);
|
|
15961
16014
|
}
|
|
16015
|
+
/**
|
|
16016
|
+
* Serialized MMR peaks at the new sync height (single set for the whole update).
|
|
16017
|
+
* Written onto the chain-tip block's `blockHeaders` row (the one whose
|
|
16018
|
+
* `blockNum` matches `block_num`) and read back by `getCurrentBlockchainPeaks`.
|
|
16019
|
+
* @param {Uint8Array} arg0
|
|
16020
|
+
*/
|
|
16021
|
+
set partialBlockchainPeaks(arg0) {
|
|
16022
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
16023
|
+
const len0 = WASM_VECTOR_LEN;
|
|
16024
|
+
wasm.__wbg_set_jsstatesyncupdate_partialBlockchainPeaks(this.__wbg_ptr, ptr0, len0);
|
|
16025
|
+
}
|
|
15962
16026
|
/**
|
|
15963
16027
|
* Input notes for this state update in serialized form.
|
|
15964
16028
|
* @param {SerializedInputNoteData[]} arg0
|
|
@@ -16447,6 +16511,76 @@ class NetworkId {
|
|
|
16447
16511
|
}
|
|
16448
16512
|
if (Symbol.dispose) NetworkId.prototype[Symbol.dispose] = NetworkId.prototype.free;
|
|
16449
16513
|
|
|
16514
|
+
/**
|
|
16515
|
+
* Status of a network note in the node.
|
|
16516
|
+
*/
|
|
16517
|
+
class NetworkNoteStatusInfo {
|
|
16518
|
+
static __wrap(ptr) {
|
|
16519
|
+
ptr = ptr >>> 0;
|
|
16520
|
+
const obj = Object.create(NetworkNoteStatusInfo.prototype);
|
|
16521
|
+
obj.__wbg_ptr = ptr;
|
|
16522
|
+
NetworkNoteStatusInfoFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
16523
|
+
return obj;
|
|
16524
|
+
}
|
|
16525
|
+
__destroy_into_raw() {
|
|
16526
|
+
const ptr = this.__wbg_ptr;
|
|
16527
|
+
this.__wbg_ptr = 0;
|
|
16528
|
+
NetworkNoteStatusInfoFinalization.unregister(this);
|
|
16529
|
+
return ptr;
|
|
16530
|
+
}
|
|
16531
|
+
free() {
|
|
16532
|
+
const ptr = this.__destroy_into_raw();
|
|
16533
|
+
wasm.__wbg_networknotestatusinfo_free(ptr, 0);
|
|
16534
|
+
}
|
|
16535
|
+
/**
|
|
16536
|
+
* Returns the number of processing attempts.
|
|
16537
|
+
* @returns {number}
|
|
16538
|
+
*/
|
|
16539
|
+
get attemptCount() {
|
|
16540
|
+
const ret = wasm.networknotestatusinfo_attemptCount(this.__wbg_ptr);
|
|
16541
|
+
return ret >>> 0;
|
|
16542
|
+
}
|
|
16543
|
+
/**
|
|
16544
|
+
* Returns the block number of the last processing attempt, if any.
|
|
16545
|
+
* @returns {number | undefined}
|
|
16546
|
+
*/
|
|
16547
|
+
get lastAttemptBlockNum() {
|
|
16548
|
+
const ret = wasm.networknotestatusinfo_lastAttemptBlockNum(this.__wbg_ptr);
|
|
16549
|
+
return ret === 0x100000001 ? undefined : ret;
|
|
16550
|
+
}
|
|
16551
|
+
/**
|
|
16552
|
+
* Returns the last error message, if any.
|
|
16553
|
+
* @returns {string | undefined}
|
|
16554
|
+
*/
|
|
16555
|
+
get lastError() {
|
|
16556
|
+
const ret = wasm.networknotestatusinfo_lastError(this.__wbg_ptr);
|
|
16557
|
+
let v1;
|
|
16558
|
+
if (ret[0] !== 0) {
|
|
16559
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
16560
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
16561
|
+
}
|
|
16562
|
+
return v1;
|
|
16563
|
+
}
|
|
16564
|
+
/**
|
|
16565
|
+
* Returns the status as a string: `"Pending"`, `"NullifierInflight"`, `"Discarded"`, or
|
|
16566
|
+
* `"NullifierCommitted"`.
|
|
16567
|
+
* @returns {string}
|
|
16568
|
+
*/
|
|
16569
|
+
get status() {
|
|
16570
|
+
let deferred1_0;
|
|
16571
|
+
let deferred1_1;
|
|
16572
|
+
try {
|
|
16573
|
+
const ret = wasm.networknotestatusinfo_status(this.__wbg_ptr);
|
|
16574
|
+
deferred1_0 = ret[0];
|
|
16575
|
+
deferred1_1 = ret[1];
|
|
16576
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
16577
|
+
} finally {
|
|
16578
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
16579
|
+
}
|
|
16580
|
+
}
|
|
16581
|
+
}
|
|
16582
|
+
if (Symbol.dispose) NetworkNoteStatusInfo.prototype[Symbol.dispose] = NetworkNoteStatusInfo.prototype.free;
|
|
16583
|
+
|
|
16450
16584
|
/**
|
|
16451
16585
|
* The type of a Miden network.
|
|
16452
16586
|
* @enum {0 | 1 | 2 | 3}
|
|
@@ -16510,7 +16644,12 @@ class Note {
|
|
|
16510
16644
|
return NoteAssets.__wrap(ret);
|
|
16511
16645
|
}
|
|
16512
16646
|
/**
|
|
16513
|
-
* Returns the commitment to the note ID
|
|
16647
|
+
* Returns the commitment to the note (its ID).
|
|
16648
|
+
*
|
|
16649
|
+
* Migration note (miden-client PR #2214): `Note::commitment()` was
|
|
16650
|
+
* removed on the 0.15 surface — the note ID is the commitment. Return
|
|
16651
|
+
* the underlying `NoteId` as a `Word` so the JS API contract is
|
|
16652
|
+
* unchanged.
|
|
16514
16653
|
* @returns {Word}
|
|
16515
16654
|
*/
|
|
16516
16655
|
commitment() {
|
|
@@ -16576,7 +16715,7 @@ class Note {
|
|
|
16576
16715
|
* @returns {NoteId}
|
|
16577
16716
|
*/
|
|
16578
16717
|
id() {
|
|
16579
|
-
const ret = wasm.
|
|
16718
|
+
const ret = wasm.note_commitment(this.__wbg_ptr);
|
|
16580
16719
|
return NoteId.__wrap(ret);
|
|
16581
16720
|
}
|
|
16582
16721
|
/**
|
|
@@ -16584,11 +16723,15 @@ class Note {
|
|
|
16584
16723
|
* @returns {NoteMetadata}
|
|
16585
16724
|
*/
|
|
16586
16725
|
metadata() {
|
|
16587
|
-
const ret = wasm.
|
|
16726
|
+
const ret = wasm.committednote_metadata(this.__wbg_ptr);
|
|
16588
16727
|
return NoteMetadata.__wrap(ret);
|
|
16589
16728
|
}
|
|
16590
16729
|
/**
|
|
16591
16730
|
* Creates a new note from the provided assets, metadata, and recipient.
|
|
16731
|
+
*
|
|
16732
|
+
* Migration note (miden-client PR #2214): `Note::new` now takes a
|
|
16733
|
+
* `PartialNoteMetadata` (not `NoteMetadata`). Extract the partial
|
|
16734
|
+
* fields from the JS-side `NoteMetadata` and reconstruct.
|
|
16592
16735
|
* @param {NoteAssets} note_assets
|
|
16593
16736
|
* @param {NoteMetadata} note_metadata
|
|
16594
16737
|
* @param {NoteRecipient} note_recipient
|
|
@@ -16737,18 +16880,13 @@ class NoteAndArgsArray {
|
|
|
16737
16880
|
wasm.noteandargsarray_push(this.__wbg_ptr, element.__wbg_ptr);
|
|
16738
16881
|
}
|
|
16739
16882
|
/**
|
|
16740
|
-
* Replace the element at `index`. Borrows + clones the input
|
|
16741
|
-
* (mirrors `push`), so the caller's JS handle remains valid
|
|
16742
|
-
* after the call. Without this borrow, passing `elem` by
|
|
16743
|
-
* value would move the underlying Rust value out of the
|
|
16744
|
-
* caller's JS handle and any subsequent method on it would
|
|
16745
|
-
* panic with `"null pointer passed to rust"`.
|
|
16746
16883
|
* @param {number} index
|
|
16747
16884
|
* @param {NoteAndArgs} elem
|
|
16748
16885
|
*/
|
|
16749
16886
|
replaceAt(index, elem) {
|
|
16750
16887
|
_assertClass(elem, NoteAndArgs);
|
|
16751
|
-
|
|
16888
|
+
var ptr0 = elem.__destroy_into_raw();
|
|
16889
|
+
const ret = wasm.noteandargsarray_replaceAt(this.__wbg_ptr, index, ptr0);
|
|
16752
16890
|
if (ret[1]) {
|
|
16753
16891
|
throw takeFromExternrefTable0(ret[0]);
|
|
16754
16892
|
}
|
|
@@ -16812,18 +16950,13 @@ class NoteArray {
|
|
|
16812
16950
|
wasm.notearray_push(this.__wbg_ptr, element.__wbg_ptr);
|
|
16813
16951
|
}
|
|
16814
16952
|
/**
|
|
16815
|
-
* Replace the element at `index`. Borrows + clones the input
|
|
16816
|
-
* (mirrors `push`), so the caller's JS handle remains valid
|
|
16817
|
-
* after the call. Without this borrow, passing `elem` by
|
|
16818
|
-
* value would move the underlying Rust value out of the
|
|
16819
|
-
* caller's JS handle and any subsequent method on it would
|
|
16820
|
-
* panic with `"null pointer passed to rust"`.
|
|
16821
16953
|
* @param {number} index
|
|
16822
16954
|
* @param {Note} elem
|
|
16823
16955
|
*/
|
|
16824
16956
|
replaceAt(index, elem) {
|
|
16825
16957
|
_assertClass(elem, Note);
|
|
16826
|
-
|
|
16958
|
+
var ptr0 = elem.__destroy_into_raw();
|
|
16959
|
+
const ret = wasm.notearray_replaceAt(this.__wbg_ptr, index, ptr0);
|
|
16827
16960
|
if (ret[1]) {
|
|
16828
16961
|
throw takeFromExternrefTable0(ret[0]);
|
|
16829
16962
|
}
|
|
@@ -16895,9 +17028,13 @@ if (Symbol.dispose) NoteAssets.prototype[Symbol.dispose] = NoteAssets.prototype.
|
|
|
16895
17028
|
/**
|
|
16896
17029
|
* An attachment to a note.
|
|
16897
17030
|
*
|
|
16898
|
-
*
|
|
16899
|
-
*
|
|
16900
|
-
*
|
|
17031
|
+
* 0.15 protocol surface: an attachment is a `(scheme, content)` pair where
|
|
17032
|
+
* `content` is a flat `Vec<Word>` of 1..=256 words. The previous
|
|
17033
|
+
* `NoteAttachmentKind { Word, Array }` dispatch and the per-variant
|
|
17034
|
+
* `asWord` / `asArray` / `newWord` / `newArray` getters/constructors no
|
|
17035
|
+
* longer exist — content is always word-vector-shaped now. Use
|
|
17036
|
+
* `fromWord(scheme, word)` for the common single-word case or
|
|
17037
|
+
* `fromWords(scheme, words)` for multi-word content.
|
|
16901
17038
|
*/
|
|
16902
17039
|
class NoteAttachment {
|
|
16903
17040
|
static __wrap(ptr) {
|
|
@@ -16917,30 +17054,6 @@ class NoteAttachment {
|
|
|
16917
17054
|
const ptr = this.__destroy_into_raw();
|
|
16918
17055
|
wasm.__wbg_noteattachment_free(ptr, 0);
|
|
16919
17056
|
}
|
|
16920
|
-
/**
|
|
16921
|
-
* Returns the content as an array of Felts if the attachment kind is Array, otherwise None.
|
|
16922
|
-
* @returns {FeltArray | undefined}
|
|
16923
|
-
*/
|
|
16924
|
-
asArray() {
|
|
16925
|
-
const ret = wasm.noteattachment_asArray(this.__wbg_ptr);
|
|
16926
|
-
return ret === 0 ? undefined : FeltArray.__wrap(ret);
|
|
16927
|
-
}
|
|
16928
|
-
/**
|
|
16929
|
-
* Returns the content as a Word if the attachment kind is Word, otherwise None.
|
|
16930
|
-
* @returns {Word | undefined}
|
|
16931
|
-
*/
|
|
16932
|
-
asWord() {
|
|
16933
|
-
const ret = wasm.noteattachment_asWord(this.__wbg_ptr);
|
|
16934
|
-
return ret === 0 ? undefined : Word.__wrap(ret);
|
|
16935
|
-
}
|
|
16936
|
-
/**
|
|
16937
|
-
* Returns the attachment kind.
|
|
16938
|
-
* @returns {NoteAttachmentKind}
|
|
16939
|
-
*/
|
|
16940
|
-
attachmentKind() {
|
|
16941
|
-
const ret = wasm.noteattachment_attachmentKind(this.__wbg_ptr);
|
|
16942
|
-
return ret;
|
|
16943
|
-
}
|
|
16944
17057
|
/**
|
|
16945
17058
|
* Returns the attachment scheme.
|
|
16946
17059
|
* @returns {NoteAttachmentScheme}
|
|
@@ -16950,80 +17063,90 @@ class NoteAttachment {
|
|
|
16950
17063
|
return NoteAttachmentScheme.__wrap(ret);
|
|
16951
17064
|
}
|
|
16952
17065
|
/**
|
|
16953
|
-
* Creates a
|
|
16954
|
-
*/
|
|
16955
|
-
constructor() {
|
|
16956
|
-
const ret = wasm.noteattachment_new();
|
|
16957
|
-
this.__wbg_ptr = ret >>> 0;
|
|
16958
|
-
NoteAttachmentFinalization.register(this, this.__wbg_ptr, this);
|
|
16959
|
-
return this;
|
|
16960
|
-
}
|
|
16961
|
-
/**
|
|
16962
|
-
* Creates a new note attachment with Array content from the provided elements.
|
|
17066
|
+
* Creates a new note attachment from a single word.
|
|
16963
17067
|
* @param {NoteAttachmentScheme} scheme
|
|
16964
|
-
* @param {
|
|
17068
|
+
* @param {Word} word
|
|
16965
17069
|
* @returns {NoteAttachment}
|
|
16966
17070
|
*/
|
|
16967
|
-
static
|
|
17071
|
+
static fromWord(scheme, word) {
|
|
16968
17072
|
_assertClass(scheme, NoteAttachmentScheme);
|
|
16969
|
-
_assertClass(
|
|
16970
|
-
const ret = wasm.
|
|
16971
|
-
|
|
16972
|
-
|
|
17073
|
+
_assertClass(word, Word);
|
|
17074
|
+
const ret = wasm.noteattachment_fromWord(scheme.__wbg_ptr, word.__wbg_ptr);
|
|
17075
|
+
return NoteAttachment.__wrap(ret);
|
|
17076
|
+
}
|
|
17077
|
+
/**
|
|
17078
|
+
* Creates a new note attachment from a vector of words.
|
|
17079
|
+
*
|
|
17080
|
+
* # Errors
|
|
17081
|
+
* Returns an error if `words` is empty or exceeds `NoteAttachment::MAX_NUM_WORDS`.
|
|
17082
|
+
* @param {NoteAttachmentScheme} scheme
|
|
17083
|
+
* @param {Word[]} words
|
|
17084
|
+
* @returns {NoteAttachment}
|
|
17085
|
+
*/
|
|
17086
|
+
static fromWords(scheme, words) {
|
|
17087
|
+
_assertClass(scheme, NoteAttachmentScheme);
|
|
17088
|
+
const ptr0 = passArrayJsValueToWasm0(words, wasm.__wbindgen_malloc);
|
|
17089
|
+
const len0 = WASM_VECTOR_LEN;
|
|
17090
|
+
const ret = wasm.noteattachment_fromWords(scheme.__wbg_ptr, ptr0, len0);
|
|
17091
|
+
if (ret[2]) {
|
|
17092
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
16973
17093
|
}
|
|
16974
17094
|
return NoteAttachment.__wrap(ret[0]);
|
|
16975
17095
|
}
|
|
16976
17096
|
/**
|
|
16977
|
-
* Creates a
|
|
16978
|
-
*
|
|
16979
|
-
* This attachment indicates that the note should be consumed by a specific network account.
|
|
16980
|
-
* Network accounts are accounts whose storage mode is `Network`, meaning the network (nodes)
|
|
16981
|
-
* can execute transactions on behalf of the account.
|
|
17097
|
+
* Creates a note attachment from an optional list of packed values.
|
|
16982
17098
|
*
|
|
16983
|
-
*
|
|
16984
|
-
*
|
|
16985
|
-
*
|
|
17099
|
+
* Mirrors the encoding the JS-side `createNoteAttachment` helper performs
|
|
17100
|
+
* and preserves the `new NoteAttachment()` / `new NoteAttachment([...])`
|
|
17101
|
+
* ergonomics the package's own JS wrappers (`js/standalone.js`,
|
|
17102
|
+
* `js/resources/transactions.js`) rely on. The 0.15 surface has no truly
|
|
17103
|
+
* empty attachment (content is 1..=256 words), so the empty case is
|
|
17104
|
+
* represented as a single zero [`Word`] with the `none` scheme:
|
|
17105
|
+
* - no args / empty list → single zero-`Word`, `none` scheme.
|
|
17106
|
+
* - any number of values → padded to a whole number of `Word`s, `none` scheme.
|
|
16986
17107
|
*
|
|
16987
17108
|
* # Errors
|
|
16988
|
-
* Returns an error if
|
|
16989
|
-
*
|
|
16990
|
-
* @param {
|
|
16991
|
-
* @returns {NoteAttachment}
|
|
17109
|
+
* Returns an error if a value is not a canonical field element, or if the
|
|
17110
|
+
* packed word count exceeds `NoteAttachment::MAX_NUM_WORDS`.
|
|
17111
|
+
* @param {BigUint64Array | null} [values]
|
|
16992
17112
|
*/
|
|
16993
|
-
|
|
16994
|
-
|
|
16995
|
-
|
|
16996
|
-
const ret = wasm.
|
|
17113
|
+
constructor(values) {
|
|
17114
|
+
var ptr0 = isLikeNone(values) ? 0 : passArray64ToWasm0(values, wasm.__wbindgen_malloc);
|
|
17115
|
+
var len0 = WASM_VECTOR_LEN;
|
|
17116
|
+
const ret = wasm.noteattachment_new(ptr0, len0);
|
|
16997
17117
|
if (ret[2]) {
|
|
16998
17118
|
throw takeFromExternrefTable0(ret[1]);
|
|
16999
17119
|
}
|
|
17000
|
-
|
|
17120
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
17121
|
+
NoteAttachmentFinalization.register(this, this.__wbg_ptr, this);
|
|
17122
|
+
return this;
|
|
17001
17123
|
}
|
|
17002
17124
|
/**
|
|
17003
|
-
*
|
|
17004
|
-
* @
|
|
17005
|
-
* @param {Word} word
|
|
17006
|
-
* @returns {NoteAttachment}
|
|
17125
|
+
* Returns the number of words in this attachment.
|
|
17126
|
+
* @returns {number}
|
|
17007
17127
|
*/
|
|
17008
|
-
|
|
17009
|
-
|
|
17010
|
-
|
|
17011
|
-
|
|
17012
|
-
|
|
17128
|
+
numWords() {
|
|
17129
|
+
const ret = wasm.noteattachment_numWords(this.__wbg_ptr);
|
|
17130
|
+
return ret;
|
|
17131
|
+
}
|
|
17132
|
+
/**
|
|
17133
|
+
* Returns the attachment content as its constituent words.
|
|
17134
|
+
*
|
|
17135
|
+
* The content is always word-vector-shaped on the 0.15 surface, so this is
|
|
17136
|
+
* the inverse of `fromWord` / `fromWords`: it yields the same `Word`s the
|
|
17137
|
+
* attachment was built from (in order), letting JS callers decode the
|
|
17138
|
+
* packed values back out.
|
|
17139
|
+
* @returns {Word[]}
|
|
17140
|
+
*/
|
|
17141
|
+
toWords() {
|
|
17142
|
+
const ret = wasm.noteattachment_toWords(this.__wbg_ptr);
|
|
17143
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
17144
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
17145
|
+
return v1;
|
|
17013
17146
|
}
|
|
17014
17147
|
}
|
|
17015
17148
|
if (Symbol.dispose) NoteAttachment.prototype[Symbol.dispose] = NoteAttachment.prototype.free;
|
|
17016
17149
|
|
|
17017
|
-
/**
|
|
17018
|
-
* Defines the payload shape of a note attachment.
|
|
17019
|
-
* @enum {0 | 1 | 2}
|
|
17020
|
-
*/
|
|
17021
|
-
const NoteAttachmentKind = Object.freeze({
|
|
17022
|
-
None: 0, "0": "None",
|
|
17023
|
-
Word: 1, "1": "Word",
|
|
17024
|
-
Array: 2, "2": "Array",
|
|
17025
|
-
});
|
|
17026
|
-
|
|
17027
17150
|
/**
|
|
17028
17151
|
* Describes the type of a note attachment.
|
|
17029
17152
|
*
|
|
@@ -17048,14 +17171,6 @@ class NoteAttachmentScheme {
|
|
|
17048
17171
|
const ptr = this.__destroy_into_raw();
|
|
17049
17172
|
wasm.__wbg_noteattachmentscheme_free(ptr, 0);
|
|
17050
17173
|
}
|
|
17051
|
-
/**
|
|
17052
|
-
* Returns the note attachment scheme as a u32.
|
|
17053
|
-
* @returns {number}
|
|
17054
|
-
*/
|
|
17055
|
-
asU32() {
|
|
17056
|
-
const ret = wasm.noteattachmentscheme_asU32(this.__wbg_ptr);
|
|
17057
|
-
return ret >>> 0;
|
|
17058
|
-
}
|
|
17059
17174
|
/**
|
|
17060
17175
|
* Returns true if the attachment scheme is the reserved value that signals an absent scheme.
|
|
17061
17176
|
* @returns {boolean}
|
|
@@ -17065,12 +17180,19 @@ class NoteAttachmentScheme {
|
|
|
17065
17180
|
return ret !== 0;
|
|
17066
17181
|
}
|
|
17067
17182
|
/**
|
|
17068
|
-
* Creates a new `NoteAttachmentScheme` from a u32.
|
|
17183
|
+
* Creates a new `NoteAttachmentScheme` from a u32 value.
|
|
17184
|
+
*
|
|
17185
|
+
* Errors if `scheme` is out of range (the 0.15 surface narrowed the
|
|
17186
|
+
* underlying type from u32 → u16, so values outside `0..=u16::MAX`
|
|
17187
|
+
* are rejected).
|
|
17069
17188
|
* @param {number} scheme
|
|
17070
17189
|
*/
|
|
17071
17190
|
constructor(scheme) {
|
|
17072
17191
|
const ret = wasm.noteattachmentscheme_new(scheme);
|
|
17073
|
-
|
|
17192
|
+
if (ret[2]) {
|
|
17193
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
17194
|
+
}
|
|
17195
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
17074
17196
|
NoteAttachmentSchemeFinalization.register(this, this.__wbg_ptr, this);
|
|
17075
17197
|
return this;
|
|
17076
17198
|
}
|
|
@@ -17210,6 +17332,14 @@ if (Symbol.dispose) NoteConsumptionStatus.prototype[Symbol.dispose] = NoteConsum
|
|
|
17210
17332
|
* Details of a note consisting of assets, script, inputs, and a serial number.
|
|
17211
17333
|
*
|
|
17212
17334
|
* See the {@link Note} type for more details.
|
|
17335
|
+
*
|
|
17336
|
+
* Migration note (miden-client PR #2214): `NoteDetails::id()` and
|
|
17337
|
+
* `NoteDetails::nullifier()` were removed on the 0.15 protocol surface —
|
|
17338
|
+
* the ID now requires a `NoteMetadata` to compute (see `NoteId::new`),
|
|
17339
|
+
* and the nullifier moved onto `InputNoteRecord` where it is optional.
|
|
17340
|
+
* Use `details_commitment()` on a containing record (e.g.
|
|
17341
|
+
* `InputNoteRecord::details_commitment`) for the metadata-independent
|
|
17342
|
+
* identifier.
|
|
17213
17343
|
*/
|
|
17214
17344
|
class NoteDetails {
|
|
17215
17345
|
static __wrap(ptr) {
|
|
@@ -17237,14 +17367,6 @@ class NoteDetails {
|
|
|
17237
17367
|
const ret = wasm.notedetails_assets(this.__wbg_ptr);
|
|
17238
17368
|
return NoteAssets.__wrap(ret);
|
|
17239
17369
|
}
|
|
17240
|
-
/**
|
|
17241
|
-
* Returns the note identifier derived from these details.
|
|
17242
|
-
* @returns {NoteId}
|
|
17243
|
-
*/
|
|
17244
|
-
id() {
|
|
17245
|
-
const ret = wasm.notedetails_id(this.__wbg_ptr);
|
|
17246
|
-
return NoteId.__wrap(ret);
|
|
17247
|
-
}
|
|
17248
17370
|
/**
|
|
17249
17371
|
* Creates a new set of note details from the given assets and recipient.
|
|
17250
17372
|
* @param {NoteAssets} note_assets
|
|
@@ -17258,14 +17380,6 @@ class NoteDetails {
|
|
|
17258
17380
|
NoteDetailsFinalization.register(this, this.__wbg_ptr, this);
|
|
17259
17381
|
return this;
|
|
17260
17382
|
}
|
|
17261
|
-
/**
|
|
17262
|
-
* Returns the note nullifier as a word.
|
|
17263
|
-
* @returns {Word}
|
|
17264
|
-
*/
|
|
17265
|
-
nullifier() {
|
|
17266
|
-
const ret = wasm.notedetails_nullifier(this.__wbg_ptr);
|
|
17267
|
-
return Word.__wrap(ret);
|
|
17268
|
-
}
|
|
17269
17383
|
/**
|
|
17270
17384
|
* Returns the recipient which controls when the note can be consumed.
|
|
17271
17385
|
* @returns {NoteRecipient}
|
|
@@ -17394,18 +17508,13 @@ class NoteDetailsAndTagArray {
|
|
|
17394
17508
|
wasm.notedetailsandtagarray_push(this.__wbg_ptr, element.__wbg_ptr);
|
|
17395
17509
|
}
|
|
17396
17510
|
/**
|
|
17397
|
-
* Replace the element at `index`. Borrows + clones the input
|
|
17398
|
-
* (mirrors `push`), so the caller's JS handle remains valid
|
|
17399
|
-
* after the call. Without this borrow, passing `elem` by
|
|
17400
|
-
* value would move the underlying Rust value out of the
|
|
17401
|
-
* caller's JS handle and any subsequent method on it would
|
|
17402
|
-
* panic with `"null pointer passed to rust"`.
|
|
17403
17511
|
* @param {number} index
|
|
17404
17512
|
* @param {NoteDetailsAndTag} elem
|
|
17405
17513
|
*/
|
|
17406
17514
|
replaceAt(index, elem) {
|
|
17407
17515
|
_assertClass(elem, NoteDetailsAndTag);
|
|
17408
|
-
|
|
17516
|
+
var ptr0 = elem.__destroy_into_raw();
|
|
17517
|
+
const ret = wasm.notedetailsandtagarray_replaceAt(this.__wbg_ptr, index, ptr0);
|
|
17409
17518
|
if (ret[1]) {
|
|
17410
17519
|
throw takeFromExternrefTable0(ret[0]);
|
|
17411
17520
|
}
|
|
@@ -17623,12 +17732,17 @@ class NoteFile {
|
|
|
17623
17732
|
return ret === 0 ? undefined : NoteDetails.__wrap(ret);
|
|
17624
17733
|
}
|
|
17625
17734
|
/**
|
|
17626
|
-
* Returns the note ID
|
|
17627
|
-
*
|
|
17735
|
+
* Returns the note ID when the file carries one.
|
|
17736
|
+
*
|
|
17737
|
+
* Migration note (miden-client PR #2214): `NoteDetails::id()` was
|
|
17738
|
+
* removed (computing the ID now requires `NoteMetadata`), so the
|
|
17739
|
+
* `NoteDetails`-only variant cannot synthesize one without extra
|
|
17740
|
+
* information. Returns `None` in that case.
|
|
17741
|
+
* @returns {NoteId | undefined}
|
|
17628
17742
|
*/
|
|
17629
17743
|
noteId() {
|
|
17630
17744
|
const ret = wasm.notefile_noteId(this.__wbg_ptr);
|
|
17631
|
-
return NoteId.__wrap(ret);
|
|
17745
|
+
return ret === 0 ? undefined : NoteId.__wrap(ret);
|
|
17632
17746
|
}
|
|
17633
17747
|
/**
|
|
17634
17748
|
* Returns the note tag hint when present.
|
|
@@ -17656,6 +17770,10 @@ class NoteFile {
|
|
|
17656
17770
|
}
|
|
17657
17771
|
/**
|
|
17658
17772
|
* Returns the note nullifier when present.
|
|
17773
|
+
*
|
|
17774
|
+
* Migration note (miden-client PR #2214): `NoteDetails::nullifier()`
|
|
17775
|
+
* was removed (the nullifier moved onto `InputNoteRecord` and is
|
|
17776
|
+
* optional there), so the `NoteDetails`-only variant returns `None`.
|
|
17659
17777
|
* @returns {string | undefined}
|
|
17660
17778
|
*/
|
|
17661
17779
|
nullifier() {
|
|
@@ -17731,13 +17849,6 @@ const NoteFilterTypes = Object.freeze({
|
|
|
17731
17849
|
* See `NoteId` and `NoteMetadata` for additional details.
|
|
17732
17850
|
*/
|
|
17733
17851
|
class NoteHeader {
|
|
17734
|
-
static __wrap(ptr) {
|
|
17735
|
-
ptr = ptr >>> 0;
|
|
17736
|
-
const obj = Object.create(NoteHeader.prototype);
|
|
17737
|
-
obj.__wbg_ptr = ptr;
|
|
17738
|
-
NoteHeaderFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
17739
|
-
return obj;
|
|
17740
|
-
}
|
|
17741
17852
|
__destroy_into_raw() {
|
|
17742
17853
|
const ptr = this.__wbg_ptr;
|
|
17743
17854
|
this.__wbg_ptr = 0;
|
|
@@ -17753,7 +17864,7 @@ class NoteHeader {
|
|
|
17753
17864
|
* @returns {NoteId}
|
|
17754
17865
|
*/
|
|
17755
17866
|
id() {
|
|
17756
|
-
const ret = wasm.
|
|
17867
|
+
const ret = wasm.noteheader_id(this.__wbg_ptr);
|
|
17757
17868
|
return NoteId.__wrap(ret);
|
|
17758
17869
|
}
|
|
17759
17870
|
/**
|
|
@@ -17764,14 +17875,6 @@ class NoteHeader {
|
|
|
17764
17875
|
const ret = wasm.noteheader_metadata(this.__wbg_ptr);
|
|
17765
17876
|
return NoteMetadata.__wrap(ret);
|
|
17766
17877
|
}
|
|
17767
|
-
/**
|
|
17768
|
-
* Returns a commitment to the note ID and metadata.
|
|
17769
|
-
* @returns {Word}
|
|
17770
|
-
*/
|
|
17771
|
-
toCommitment() {
|
|
17772
|
-
const ret = wasm.noteheader_toCommitment(this.__wbg_ptr);
|
|
17773
|
-
return Word.__wrap(ret);
|
|
17774
|
-
}
|
|
17775
17878
|
}
|
|
17776
17879
|
if (Symbol.dispose) NoteHeader.prototype[Symbol.dispose] = NoteHeader.prototype.free;
|
|
17777
17880
|
|
|
@@ -17780,16 +17883,14 @@ if (Symbol.dispose) NoteHeader.prototype[Symbol.dispose] = NoteHeader.prototype.
|
|
|
17780
17883
|
*
|
|
17781
17884
|
* Note ID is computed as:
|
|
17782
17885
|
*
|
|
17783
|
-
* > `hash(
|
|
17886
|
+
* > `hash(details_commitment, metadata_commitment)`
|
|
17784
17887
|
*
|
|
17785
|
-
*
|
|
17786
|
-
*
|
|
17787
|
-
*
|
|
17788
|
-
*
|
|
17789
|
-
*
|
|
17790
|
-
*
|
|
17791
|
-
* - To compute a note ID, we do not need to know the note's `serial_num`. Knowing the hash of the
|
|
17792
|
-
* `serial_num` (as well as script root, input commitment, and note assets) is sufficient.
|
|
17888
|
+
* On the 0.15 protocol surface the upstream `NoteId::new` signature
|
|
17889
|
+
* changed from `(recipient_digest, asset_commitment)` to
|
|
17890
|
+
* `(NoteDetailsCommitment, &NoteMetadata)`. The JS API exposes
|
|
17891
|
+
* `NoteId.fromRaw(word)` for constructing an ID from a pre-computed
|
|
17892
|
+
* 32-byte commitment word (the previous two-Word constructor has no
|
|
17893
|
+
* 0.15 equivalent).
|
|
17793
17894
|
*/
|
|
17794
17895
|
class NoteId {
|
|
17795
17896
|
static __wrap(ptr) {
|
|
@@ -17830,17 +17931,18 @@ class NoteId {
|
|
|
17830
17931
|
return NoteId.__wrap(ret[0]);
|
|
17831
17932
|
}
|
|
17832
17933
|
/**
|
|
17833
|
-
* Builds a note ID from
|
|
17834
|
-
*
|
|
17835
|
-
*
|
|
17934
|
+
* Builds a note ID from its raw commitment word.
|
|
17935
|
+
*
|
|
17936
|
+
* `word` must already encode the final note-ID commitment — the
|
|
17937
|
+
* metadata-mixing that the previous 2-Word constructor did is no
|
|
17938
|
+
* longer part of the protocol surface.
|
|
17939
|
+
* @param {Word} word
|
|
17940
|
+
* @returns {NoteId}
|
|
17836
17941
|
*/
|
|
17837
|
-
|
|
17838
|
-
_assertClass(
|
|
17839
|
-
|
|
17840
|
-
|
|
17841
|
-
this.__wbg_ptr = ret >>> 0;
|
|
17842
|
-
NoteIdFinalization.register(this, this.__wbg_ptr, this);
|
|
17843
|
-
return this;
|
|
17942
|
+
static fromRaw(word) {
|
|
17943
|
+
_assertClass(word, Word);
|
|
17944
|
+
const ret = wasm.accountcode_commitment(word.__wbg_ptr);
|
|
17945
|
+
return NoteId.__wrap(ret);
|
|
17844
17946
|
}
|
|
17845
17947
|
/**
|
|
17846
17948
|
* Returns the canonical hex representation of the note ID.
|
|
@@ -17965,18 +18067,13 @@ class NoteIdAndArgsArray {
|
|
|
17965
18067
|
wasm.noteidandargsarray_push(this.__wbg_ptr, element.__wbg_ptr);
|
|
17966
18068
|
}
|
|
17967
18069
|
/**
|
|
17968
|
-
* Replace the element at `index`. Borrows + clones the input
|
|
17969
|
-
* (mirrors `push`), so the caller's JS handle remains valid
|
|
17970
|
-
* after the call. Without this borrow, passing `elem` by
|
|
17971
|
-
* value would move the underlying Rust value out of the
|
|
17972
|
-
* caller's JS handle and any subsequent method on it would
|
|
17973
|
-
* panic with `"null pointer passed to rust"`.
|
|
17974
18070
|
* @param {number} index
|
|
17975
18071
|
* @param {NoteIdAndArgs} elem
|
|
17976
18072
|
*/
|
|
17977
18073
|
replaceAt(index, elem) {
|
|
17978
18074
|
_assertClass(elem, NoteIdAndArgs);
|
|
17979
|
-
|
|
18075
|
+
var ptr0 = elem.__destroy_into_raw();
|
|
18076
|
+
const ret = wasm.noteidandargsarray_replaceAt(this.__wbg_ptr, index, ptr0);
|
|
17980
18077
|
if (ret[1]) {
|
|
17981
18078
|
throw takeFromExternrefTable0(ret[0]);
|
|
17982
18079
|
}
|
|
@@ -18058,7 +18155,7 @@ class NoteLocation {
|
|
|
18058
18155
|
* @returns {number}
|
|
18059
18156
|
*/
|
|
18060
18157
|
blockNum() {
|
|
18061
|
-
const ret = wasm.
|
|
18158
|
+
const ret = wasm.notelocation_blockNum(this.__wbg_ptr);
|
|
18062
18159
|
return ret >>> 0;
|
|
18063
18160
|
}
|
|
18064
18161
|
}
|
|
@@ -18067,8 +18164,13 @@ if (Symbol.dispose) NoteLocation.prototype[Symbol.dispose] = NoteLocation.protot
|
|
|
18067
18164
|
/**
|
|
18068
18165
|
* Metadata associated with a note.
|
|
18069
18166
|
*
|
|
18070
|
-
*
|
|
18071
|
-
*
|
|
18167
|
+
* 0.15 protocol surface: `NoteMetadata` is now constructed from a
|
|
18168
|
+
* [`PartialNoteMetadata`] (sender / `note_type` / tag) plus a `NoteAttachments`
|
|
18169
|
+
* collection — the previous `with_tag` / `with_attachment` / `attachment`
|
|
18170
|
+
* methods on `NoteMetadata` were moved (`with_tag` lives on
|
|
18171
|
+
* `PartialNoteMetadata`) or removed (`with_attachment` / `attachment`).
|
|
18172
|
+
* The JS constructor narrows back to the common case of an
|
|
18173
|
+
* attachment-less metadata.
|
|
18072
18174
|
*/
|
|
18073
18175
|
class NoteMetadata {
|
|
18074
18176
|
static __wrap(ptr) {
|
|
@@ -18089,15 +18191,7 @@ class NoteMetadata {
|
|
|
18089
18191
|
wasm.__wbg_notemetadata_free(ptr, 0);
|
|
18090
18192
|
}
|
|
18091
18193
|
/**
|
|
18092
|
-
*
|
|
18093
|
-
* @returns {NoteAttachment}
|
|
18094
|
-
*/
|
|
18095
|
-
attachment() {
|
|
18096
|
-
const ret = wasm.notemetadata_attachment(this.__wbg_ptr);
|
|
18097
|
-
return NoteAttachment.__wrap(ret);
|
|
18098
|
-
}
|
|
18099
|
-
/**
|
|
18100
|
-
* Creates metadata for a note.
|
|
18194
|
+
* Creates metadata for a note with no attachments.
|
|
18101
18195
|
* @param {AccountId} sender
|
|
18102
18196
|
* @param {NoteType} note_type
|
|
18103
18197
|
* @param {NoteTag} note_tag
|
|
@@ -18123,7 +18217,7 @@ class NoteMetadata {
|
|
|
18123
18217
|
* @returns {AccountId}
|
|
18124
18218
|
*/
|
|
18125
18219
|
sender() {
|
|
18126
|
-
const ret = wasm.
|
|
18220
|
+
const ret = wasm.notemetadata_sender(this.__wbg_ptr);
|
|
18127
18221
|
return AccountId.__wrap(ret);
|
|
18128
18222
|
}
|
|
18129
18223
|
/**
|
|
@@ -18134,30 +18228,6 @@ class NoteMetadata {
|
|
|
18134
18228
|
const ret = wasm.notemetadata_tag(this.__wbg_ptr);
|
|
18135
18229
|
return NoteTag.__wrap(ret);
|
|
18136
18230
|
}
|
|
18137
|
-
/**
|
|
18138
|
-
* Adds an attachment to this metadata and returns the updated metadata.
|
|
18139
|
-
*
|
|
18140
|
-
* Attachments provide additional context about how notes should be processed.
|
|
18141
|
-
* For example, a `NetworkAccountTarget` attachment indicates that the note
|
|
18142
|
-
* should be consumed by a specific network account.
|
|
18143
|
-
* @param {NoteAttachment} attachment
|
|
18144
|
-
* @returns {NoteMetadata}
|
|
18145
|
-
*/
|
|
18146
|
-
withAttachment(attachment) {
|
|
18147
|
-
_assertClass(attachment, NoteAttachment);
|
|
18148
|
-
const ret = wasm.notemetadata_withAttachment(this.__wbg_ptr, attachment.__wbg_ptr);
|
|
18149
|
-
return NoteMetadata.__wrap(ret);
|
|
18150
|
-
}
|
|
18151
|
-
/**
|
|
18152
|
-
* Sets the tag for this metadata and returns the updated metadata.
|
|
18153
|
-
* @param {NoteTag} tag
|
|
18154
|
-
* @returns {NoteMetadata}
|
|
18155
|
-
*/
|
|
18156
|
-
withTag(tag) {
|
|
18157
|
-
_assertClass(tag, NoteTag);
|
|
18158
|
-
const ret = wasm.notemetadata_withTag(this.__wbg_ptr, tag.__wbg_ptr);
|
|
18159
|
-
return NoteMetadata.__wrap(ret);
|
|
18160
|
-
}
|
|
18161
18231
|
}
|
|
18162
18232
|
if (Symbol.dispose) NoteMetadata.prototype[Symbol.dispose] = NoteMetadata.prototype.free;
|
|
18163
18233
|
|
|
@@ -18302,18 +18372,13 @@ class NoteRecipientArray {
|
|
|
18302
18372
|
wasm.noterecipientarray_push(this.__wbg_ptr, element.__wbg_ptr);
|
|
18303
18373
|
}
|
|
18304
18374
|
/**
|
|
18305
|
-
* Replace the element at `index`. Borrows + clones the input
|
|
18306
|
-
* (mirrors `push`), so the caller's JS handle remains valid
|
|
18307
|
-
* after the call. Without this borrow, passing `elem` by
|
|
18308
|
-
* value would move the underlying Rust value out of the
|
|
18309
|
-
* caller's JS handle and any subsequent method on it would
|
|
18310
|
-
* panic with `"null pointer passed to rust"`.
|
|
18311
18375
|
* @param {number} index
|
|
18312
18376
|
* @param {NoteRecipient} elem
|
|
18313
18377
|
*/
|
|
18314
18378
|
replaceAt(index, elem) {
|
|
18315
18379
|
_assertClass(elem, NoteRecipient);
|
|
18316
|
-
|
|
18380
|
+
var ptr0 = elem.__destroy_into_raw();
|
|
18381
|
+
const ret = wasm.noterecipientarray_replaceAt(this.__wbg_ptr, index, ptr0);
|
|
18317
18382
|
if (ret[1]) {
|
|
18318
18383
|
throw takeFromExternrefTable0(ret[0]);
|
|
18319
18384
|
}
|
|
@@ -18474,7 +18539,8 @@ class NoteStorage {
|
|
|
18474
18539
|
*/
|
|
18475
18540
|
constructor(felt_array) {
|
|
18476
18541
|
_assertClass(felt_array, FeltArray);
|
|
18477
|
-
|
|
18542
|
+
var ptr0 = felt_array.__destroy_into_raw();
|
|
18543
|
+
const ret = wasm.notestorage_new(ptr0);
|
|
18478
18544
|
if (ret[2]) {
|
|
18479
18545
|
throw takeFromExternrefTable0(ret[1]);
|
|
18480
18546
|
}
|
|
@@ -18486,7 +18552,7 @@ class NoteStorage {
|
|
|
18486
18552
|
if (Symbol.dispose) NoteStorage.prototype[Symbol.dispose] = NoteStorage.prototype.free;
|
|
18487
18553
|
|
|
18488
18554
|
/**
|
|
18489
|
-
* Represents a single block's worth of note sync data
|
|
18555
|
+
* Represents a single block's worth of note sync data returned by `syncNotes`.
|
|
18490
18556
|
*/
|
|
18491
18557
|
class NoteSyncBlock {
|
|
18492
18558
|
static __wrap(ptr) {
|
|
@@ -18536,7 +18602,12 @@ class NoteSyncBlock {
|
|
|
18536
18602
|
if (Symbol.dispose) NoteSyncBlock.prototype[Symbol.dispose] = NoteSyncBlock.prototype.free;
|
|
18537
18603
|
|
|
18538
18604
|
/**
|
|
18539
|
-
*
|
|
18605
|
+
* Aggregates the response data from `syncNotes`: the per-block updates plus
|
|
18606
|
+
* the upper bound of the requested range.
|
|
18607
|
+
*
|
|
18608
|
+
* The previous `chain_tip` accessor is gone — the upstream `sync_notes` RPC
|
|
18609
|
+
* no longer returns the current chain tip on this endpoint. Use the
|
|
18610
|
+
* regular state-sync flow (`syncState`) for the latest synced height.
|
|
18540
18611
|
*/
|
|
18541
18612
|
class NoteSyncInfo {
|
|
18542
18613
|
static __wrap(ptr) {
|
|
@@ -18557,7 +18628,9 @@ class NoteSyncInfo {
|
|
|
18557
18628
|
wasm.__wbg_notesyncinfo_free(ptr, 0);
|
|
18558
18629
|
}
|
|
18559
18630
|
/**
|
|
18560
|
-
* Returns the first block header
|
|
18631
|
+
* Returns the first block header with matching notes, if any. Convenience
|
|
18632
|
+
* for callers that only requested a single tag and want the most recent
|
|
18633
|
+
* inclusion block.
|
|
18561
18634
|
* @returns {BlockHeader | undefined}
|
|
18562
18635
|
*/
|
|
18563
18636
|
blockHeader() {
|
|
@@ -18565,15 +18638,16 @@ class NoteSyncInfo {
|
|
|
18565
18638
|
return ret === 0 ? undefined : BlockHeader.__wrap(ret);
|
|
18566
18639
|
}
|
|
18567
18640
|
/**
|
|
18568
|
-
* Returns the
|
|
18641
|
+
* Returns the upper bound of the block range scanned in this call (the
|
|
18642
|
+
* `blockTo` argument passed to `syncNotes`).
|
|
18569
18643
|
* @returns {number}
|
|
18570
18644
|
*/
|
|
18571
18645
|
blockTo() {
|
|
18572
|
-
const ret = wasm.
|
|
18646
|
+
const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
|
|
18573
18647
|
return ret >>> 0;
|
|
18574
18648
|
}
|
|
18575
18649
|
/**
|
|
18576
|
-
* Returns the
|
|
18650
|
+
* Returns the per-block breakdown.
|
|
18577
18651
|
* @returns {NoteSyncBlock[]}
|
|
18578
18652
|
*/
|
|
18579
18653
|
blocks() {
|
|
@@ -18583,15 +18657,7 @@ class NoteSyncInfo {
|
|
|
18583
18657
|
return v1;
|
|
18584
18658
|
}
|
|
18585
18659
|
/**
|
|
18586
|
-
* Returns the
|
|
18587
|
-
* @returns {number}
|
|
18588
|
-
*/
|
|
18589
|
-
chainTip() {
|
|
18590
|
-
const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
|
|
18591
|
-
return ret >>> 0;
|
|
18592
|
-
}
|
|
18593
|
-
/**
|
|
18594
|
-
* Returns the first block MMR path associated with matching notes, if any.
|
|
18660
|
+
* Returns the MMR path of the first block with matching notes, if any.
|
|
18595
18661
|
* @returns {MerklePath | undefined}
|
|
18596
18662
|
*/
|
|
18597
18663
|
mmrPath() {
|
|
@@ -18599,7 +18665,7 @@ class NoteSyncInfo {
|
|
|
18599
18665
|
return ret === 0 ? undefined : MerklePath.__wrap(ret);
|
|
18600
18666
|
}
|
|
18601
18667
|
/**
|
|
18602
|
-
* Returns
|
|
18668
|
+
* Returns every committed note across all matching blocks (flattened).
|
|
18603
18669
|
* @returns {CommittedNote[]}
|
|
18604
18670
|
*/
|
|
18605
18671
|
notes() {
|
|
@@ -18646,7 +18712,7 @@ class NoteTag {
|
|
|
18646
18712
|
* @returns {number}
|
|
18647
18713
|
*/
|
|
18648
18714
|
asU32() {
|
|
18649
|
-
const ret = wasm.
|
|
18715
|
+
const ret = wasm.notelocation_blockNum(this.__wbg_ptr);
|
|
18650
18716
|
return ret >>> 0;
|
|
18651
18717
|
}
|
|
18652
18718
|
/**
|
|
@@ -18654,7 +18720,7 @@ class NoteTag {
|
|
|
18654
18720
|
* @param {number} tag
|
|
18655
18721
|
*/
|
|
18656
18722
|
constructor(tag) {
|
|
18657
|
-
const ret = wasm.
|
|
18723
|
+
const ret = wasm.notetag_new(tag);
|
|
18658
18724
|
this.__wbg_ptr = ret >>> 0;
|
|
18659
18725
|
NoteTagFinalization.register(this, this.__wbg_ptr, this);
|
|
18660
18726
|
return this;
|
|
@@ -18759,8 +18825,7 @@ class OutputNote {
|
|
|
18759
18825
|
* @returns {Note | undefined}
|
|
18760
18826
|
*/
|
|
18761
18827
|
intoFull() {
|
|
18762
|
-
const
|
|
18763
|
-
const ret = wasm.outputnote_intoFull(ptr);
|
|
18828
|
+
const ret = wasm.outputnote_intoFull(this.__wbg_ptr);
|
|
18764
18829
|
return ret === 0 ? undefined : Note.__wrap(ret);
|
|
18765
18830
|
}
|
|
18766
18831
|
/**
|
|
@@ -18768,7 +18833,7 @@ class OutputNote {
|
|
|
18768
18833
|
* @returns {NoteMetadata}
|
|
18769
18834
|
*/
|
|
18770
18835
|
metadata() {
|
|
18771
|
-
const ret = wasm.
|
|
18836
|
+
const ret = wasm.committednote_metadata(this.__wbg_ptr);
|
|
18772
18837
|
return NoteMetadata.__wrap(ret);
|
|
18773
18838
|
}
|
|
18774
18839
|
/**
|
|
@@ -18848,18 +18913,13 @@ class OutputNoteArray {
|
|
|
18848
18913
|
wasm.outputnotearray_push(this.__wbg_ptr, element.__wbg_ptr);
|
|
18849
18914
|
}
|
|
18850
18915
|
/**
|
|
18851
|
-
* Replace the element at `index`. Borrows + clones the input
|
|
18852
|
-
* (mirrors `push`), so the caller's JS handle remains valid
|
|
18853
|
-
* after the call. Without this borrow, passing `elem` by
|
|
18854
|
-
* value would move the underlying Rust value out of the
|
|
18855
|
-
* caller's JS handle and any subsequent method on it would
|
|
18856
|
-
* panic with `"null pointer passed to rust"`.
|
|
18857
18916
|
* @param {number} index
|
|
18858
18917
|
* @param {OutputNote} elem
|
|
18859
18918
|
*/
|
|
18860
18919
|
replaceAt(index, elem) {
|
|
18861
18920
|
_assertClass(elem, OutputNote);
|
|
18862
|
-
|
|
18921
|
+
var ptr0 = elem.__destroy_into_raw();
|
|
18922
|
+
const ret = wasm.outputnotearray_replaceAt(this.__wbg_ptr, index, ptr0);
|
|
18863
18923
|
if (ret[1]) {
|
|
18864
18924
|
throw takeFromExternrefTable0(ret[0]);
|
|
18865
18925
|
}
|
|
@@ -18901,7 +18961,7 @@ class OutputNoteRecord {
|
|
|
18901
18961
|
* @returns {number}
|
|
18902
18962
|
*/
|
|
18903
18963
|
expectedHeight() {
|
|
18904
|
-
const ret = wasm.
|
|
18964
|
+
const ret = wasm.outputnoterecord_expectedHeight(this.__wbg_ptr);
|
|
18905
18965
|
return ret >>> 0;
|
|
18906
18966
|
}
|
|
18907
18967
|
/**
|
|
@@ -18941,7 +19001,7 @@ class OutputNoteRecord {
|
|
|
18941
19001
|
* @returns {NoteMetadata}
|
|
18942
19002
|
*/
|
|
18943
19003
|
metadata() {
|
|
18944
|
-
const ret = wasm.
|
|
19004
|
+
const ret = wasm.committednote_metadata(this.__wbg_ptr);
|
|
18945
19005
|
return NoteMetadata.__wrap(ret);
|
|
18946
19006
|
}
|
|
18947
19007
|
/**
|
|
@@ -19172,7 +19232,7 @@ class PartialNote {
|
|
|
19172
19232
|
* @returns {NoteMetadata}
|
|
19173
19233
|
*/
|
|
19174
19234
|
metadata() {
|
|
19175
|
-
const ret = wasm.
|
|
19235
|
+
const ret = wasm.committednote_metadata(this.__wbg_ptr);
|
|
19176
19236
|
return NoteMetadata.__wrap(ret);
|
|
19177
19237
|
}
|
|
19178
19238
|
/**
|
|
@@ -19207,7 +19267,8 @@ class Poseidon2 {
|
|
|
19207
19267
|
*/
|
|
19208
19268
|
static hashElements(felt_array) {
|
|
19209
19269
|
_assertClass(felt_array, FeltArray);
|
|
19210
|
-
|
|
19270
|
+
var ptr0 = felt_array.__destroy_into_raw();
|
|
19271
|
+
const ret = wasm.poseidon2_hashElements(ptr0);
|
|
19211
19272
|
return Word.__wrap(ret);
|
|
19212
19273
|
}
|
|
19213
19274
|
}
|
|
@@ -19539,20 +19600,43 @@ class RpcClient {
|
|
|
19539
19600
|
}
|
|
19540
19601
|
/**
|
|
19541
19602
|
* Fetches a block header by number. When `block_num` is undefined, returns the latest header.
|
|
19603
|
+
*
|
|
19604
|
+
* @param `block_num` - Optional block number. When `undefined`, returns the latest header.
|
|
19605
|
+
* @param `include_mmr_proof` - When `true`, includes the MMR proof in the response. Defaults
|
|
19606
|
+
* to `false` when `undefined`.
|
|
19542
19607
|
* @param {number | null} [block_num]
|
|
19608
|
+
* @param {boolean | null} [include_mmr_proof]
|
|
19543
19609
|
* @returns {Promise<BlockHeader>}
|
|
19544
19610
|
*/
|
|
19545
|
-
getBlockHeaderByNumber(block_num) {
|
|
19546
|
-
const ret = wasm.rpcclient_getBlockHeaderByNumber(this.__wbg_ptr, isLikeNone(block_num) ? 0x100000001 : (block_num) >>> 0);
|
|
19611
|
+
getBlockHeaderByNumber(block_num, include_mmr_proof) {
|
|
19612
|
+
const ret = wasm.rpcclient_getBlockHeaderByNumber(this.__wbg_ptr, isLikeNone(block_num) ? 0x100000001 : (block_num) >>> 0, isLikeNone(include_mmr_proof) ? 0xFFFFFF : include_mmr_proof ? 1 : 0);
|
|
19613
|
+
return ret;
|
|
19614
|
+
}
|
|
19615
|
+
/**
|
|
19616
|
+
* Fetches the processing status of a network note by its ID.
|
|
19617
|
+
*
|
|
19618
|
+
* Returns information about the note's current status in the network,
|
|
19619
|
+
* including whether it is pending, processed, discarded, or committed,
|
|
19620
|
+
* along with error details and attempt count.
|
|
19621
|
+
*
|
|
19622
|
+
* @param `note_id` - The ID of the note to query.
|
|
19623
|
+
* @returns Promise that resolves to a `NetworkNoteStatusInfo` object.
|
|
19624
|
+
* @param {NoteId} note_id
|
|
19625
|
+
* @returns {Promise<NetworkNoteStatusInfo>}
|
|
19626
|
+
*/
|
|
19627
|
+
getNetworkNoteStatus(note_id) {
|
|
19628
|
+
_assertClass(note_id, NoteId);
|
|
19629
|
+
const ret = wasm.rpcclient_getNetworkNoteStatus(this.__wbg_ptr, note_id.__wbg_ptr);
|
|
19547
19630
|
return ret;
|
|
19548
19631
|
}
|
|
19549
19632
|
/**
|
|
19550
19633
|
* Fetches a note script by its root hash from the connected Miden node.
|
|
19551
19634
|
*
|
|
19552
19635
|
* @param script_root - The root hash of the note script to fetch.
|
|
19553
|
-
* @returns Promise that resolves to the `NoteScript
|
|
19636
|
+
* @returns Promise that resolves to the `NoteScript`, or `undefined` if the node has no
|
|
19637
|
+
* script for that root.
|
|
19554
19638
|
* @param {Word} script_root
|
|
19555
|
-
* @returns {Promise<NoteScript>}
|
|
19639
|
+
* @returns {Promise<NoteScript | undefined>}
|
|
19556
19640
|
*/
|
|
19557
19641
|
getNoteScriptByRoot(script_root) {
|
|
19558
19642
|
_assertClass(script_root, Word);
|
|
@@ -19606,15 +19690,15 @@ class RpcClient {
|
|
|
19606
19690
|
}
|
|
19607
19691
|
/**
|
|
19608
19692
|
* Fetches notes matching the provided tags from the node.
|
|
19609
|
-
* @param {number}
|
|
19610
|
-
* @param {number
|
|
19693
|
+
* @param {number} block_from
|
|
19694
|
+
* @param {number} block_to
|
|
19611
19695
|
* @param {NoteTag[]} note_tags
|
|
19612
19696
|
* @returns {Promise<NoteSyncInfo>}
|
|
19613
19697
|
*/
|
|
19614
|
-
syncNotes(
|
|
19698
|
+
syncNotes(block_from, block_to, note_tags) {
|
|
19615
19699
|
const ptr0 = passArrayJsValueToWasm0(note_tags, wasm.__wbindgen_malloc);
|
|
19616
19700
|
const len0 = WASM_VECTOR_LEN;
|
|
19617
|
-
const ret = wasm.rpcclient_syncNotes(this.__wbg_ptr,
|
|
19701
|
+
const ret = wasm.rpcclient_syncNotes(this.__wbg_ptr, block_from, block_to, ptr0, len0);
|
|
19618
19702
|
return ret;
|
|
19619
19703
|
}
|
|
19620
19704
|
/**
|
|
@@ -19661,7 +19745,8 @@ class Rpo256 {
|
|
|
19661
19745
|
*/
|
|
19662
19746
|
static hashElements(felt_array) {
|
|
19663
19747
|
_assertClass(felt_array, FeltArray);
|
|
19664
|
-
|
|
19748
|
+
var ptr0 = felt_array.__destroy_into_raw();
|
|
19749
|
+
const ret = wasm.rpo256_hashElements(ptr0);
|
|
19665
19750
|
return Word.__wrap(ret);
|
|
19666
19751
|
}
|
|
19667
19752
|
}
|
|
@@ -19691,6 +19776,15 @@ class SerializedInputNoteData {
|
|
|
19691
19776
|
const ptr = this.__destroy_into_raw();
|
|
19692
19777
|
wasm.__wbg_serializedinputnotedata_free(ptr, 0);
|
|
19693
19778
|
}
|
|
19779
|
+
/**
|
|
19780
|
+
* @returns {Uint8Array}
|
|
19781
|
+
*/
|
|
19782
|
+
get attachments() {
|
|
19783
|
+
const ret = wasm.__wbg_get_serializedinputnotedata_attachments(this.__wbg_ptr);
|
|
19784
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
19785
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
19786
|
+
return v1;
|
|
19787
|
+
}
|
|
19694
19788
|
/**
|
|
19695
19789
|
* @returns {number | undefined}
|
|
19696
19790
|
*/
|
|
@@ -19732,6 +19826,21 @@ class SerializedInputNoteData {
|
|
|
19732
19826
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
19733
19827
|
}
|
|
19734
19828
|
}
|
|
19829
|
+
/**
|
|
19830
|
+
* @returns {string}
|
|
19831
|
+
*/
|
|
19832
|
+
get detailsCommitment() {
|
|
19833
|
+
let deferred1_0;
|
|
19834
|
+
let deferred1_1;
|
|
19835
|
+
try {
|
|
19836
|
+
const ret = wasm.__wbg_get_serializedinputnotedata_detailsCommitment(this.__wbg_ptr);
|
|
19837
|
+
deferred1_0 = ret[0];
|
|
19838
|
+
deferred1_1 = ret[1];
|
|
19839
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
19840
|
+
} finally {
|
|
19841
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
19842
|
+
}
|
|
19843
|
+
}
|
|
19735
19844
|
/**
|
|
19736
19845
|
* @returns {Uint8Array}
|
|
19737
19846
|
*/
|
|
@@ -19751,19 +19860,16 @@ class SerializedInputNoteData {
|
|
|
19751
19860
|
return v1;
|
|
19752
19861
|
}
|
|
19753
19862
|
/**
|
|
19754
|
-
* @returns {string}
|
|
19863
|
+
* @returns {string | undefined}
|
|
19755
19864
|
*/
|
|
19756
19865
|
get noteId() {
|
|
19757
|
-
|
|
19758
|
-
let
|
|
19759
|
-
|
|
19760
|
-
|
|
19761
|
-
|
|
19762
|
-
deferred1_1 = ret[1];
|
|
19763
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
19764
|
-
} finally {
|
|
19765
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
19866
|
+
const ret = wasm.__wbg_get_serializedinputnotedata_noteId(this.__wbg_ptr);
|
|
19867
|
+
let v1;
|
|
19868
|
+
if (ret[0] !== 0) {
|
|
19869
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
19870
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
19766
19871
|
}
|
|
19872
|
+
return v1;
|
|
19767
19873
|
}
|
|
19768
19874
|
/**
|
|
19769
19875
|
* @returns {string}
|
|
@@ -19829,6 +19935,14 @@ class SerializedInputNoteData {
|
|
|
19829
19935
|
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
19830
19936
|
return v1;
|
|
19831
19937
|
}
|
|
19938
|
+
/**
|
|
19939
|
+
* @param {Uint8Array} arg0
|
|
19940
|
+
*/
|
|
19941
|
+
set attachments(arg0) {
|
|
19942
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
19943
|
+
const len0 = WASM_VECTOR_LEN;
|
|
19944
|
+
wasm.__wbg_set_serializedinputnotedata_attachments(this.__wbg_ptr, ptr0, len0);
|
|
19945
|
+
}
|
|
19832
19946
|
/**
|
|
19833
19947
|
* @param {number | null} [arg0]
|
|
19834
19948
|
*/
|
|
@@ -19857,6 +19971,14 @@ class SerializedInputNoteData {
|
|
|
19857
19971
|
const len0 = WASM_VECTOR_LEN;
|
|
19858
19972
|
wasm.__wbg_set_serializedinputnotedata_createdAt(this.__wbg_ptr, ptr0, len0);
|
|
19859
19973
|
}
|
|
19974
|
+
/**
|
|
19975
|
+
* @param {string} arg0
|
|
19976
|
+
*/
|
|
19977
|
+
set detailsCommitment(arg0) {
|
|
19978
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
19979
|
+
const len0 = WASM_VECTOR_LEN;
|
|
19980
|
+
wasm.__wbg_set_serializedinputnotedata_detailsCommitment(this.__wbg_ptr, ptr0, len0);
|
|
19981
|
+
}
|
|
19860
19982
|
/**
|
|
19861
19983
|
* @param {Uint8Array} arg0
|
|
19862
19984
|
*/
|
|
@@ -19874,11 +19996,11 @@ class SerializedInputNoteData {
|
|
|
19874
19996
|
wasm.__wbg_set_serializedinputnotedata_noteAssets(this.__wbg_ptr, ptr0, len0);
|
|
19875
19997
|
}
|
|
19876
19998
|
/**
|
|
19877
|
-
* @param {string} arg0
|
|
19999
|
+
* @param {string | null} [arg0]
|
|
19878
20000
|
*/
|
|
19879
20001
|
set noteId(arg0) {
|
|
19880
|
-
|
|
19881
|
-
|
|
20002
|
+
var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
20003
|
+
var len0 = WASM_VECTOR_LEN;
|
|
19882
20004
|
wasm.__wbg_set_serializedinputnotedata_noteId(this.__wbg_ptr, ptr0, len0);
|
|
19883
20005
|
}
|
|
19884
20006
|
/**
|
|
@@ -19954,6 +20076,15 @@ class SerializedOutputNoteData {
|
|
|
19954
20076
|
const ptr = this.__destroy_into_raw();
|
|
19955
20077
|
wasm.__wbg_serializedoutputnotedata_free(ptr, 0);
|
|
19956
20078
|
}
|
|
20079
|
+
/**
|
|
20080
|
+
* @returns {Uint8Array}
|
|
20081
|
+
*/
|
|
20082
|
+
get attachments() {
|
|
20083
|
+
const ret = wasm.__wbg_get_serializedoutputnotedata_attachments(this.__wbg_ptr);
|
|
20084
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
20085
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
20086
|
+
return v1;
|
|
20087
|
+
}
|
|
19957
20088
|
/**
|
|
19958
20089
|
* @returns {number}
|
|
19959
20090
|
*/
|
|
@@ -20037,6 +20168,14 @@ class SerializedOutputNoteData {
|
|
|
20037
20168
|
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
20038
20169
|
return v1;
|
|
20039
20170
|
}
|
|
20171
|
+
/**
|
|
20172
|
+
* @param {Uint8Array} arg0
|
|
20173
|
+
*/
|
|
20174
|
+
set attachments(arg0) {
|
|
20175
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
20176
|
+
const len0 = WASM_VECTOR_LEN;
|
|
20177
|
+
wasm.__wbg_set_serializedoutputnotedata_attachments(this.__wbg_ptr, ptr0, len0);
|
|
20178
|
+
}
|
|
20040
20179
|
/**
|
|
20041
20180
|
* @param {number} arg0
|
|
20042
20181
|
*/
|
|
@@ -20049,7 +20188,7 @@ class SerializedOutputNoteData {
|
|
|
20049
20188
|
set metadata(arg0) {
|
|
20050
20189
|
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
20051
20190
|
const len0 = WASM_VECTOR_LEN;
|
|
20052
|
-
wasm.
|
|
20191
|
+
wasm.__wbg_set_jsstatesyncupdate_blockHasRelevantNotes(this.__wbg_ptr, ptr0, len0);
|
|
20053
20192
|
}
|
|
20054
20193
|
/**
|
|
20055
20194
|
* @param {Uint8Array} arg0
|
|
@@ -20081,7 +20220,7 @@ class SerializedOutputNoteData {
|
|
|
20081
20220
|
set recipientDigest(arg0) {
|
|
20082
20221
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
20083
20222
|
const len0 = WASM_VECTOR_LEN;
|
|
20084
|
-
wasm.
|
|
20223
|
+
wasm.__wbg_set_jsaccountupdate_vaultRoot(this.__wbg_ptr, ptr0, len0);
|
|
20085
20224
|
}
|
|
20086
20225
|
/**
|
|
20087
20226
|
* @param {number} arg0
|
|
@@ -20237,7 +20376,7 @@ class SerializedTransactionData {
|
|
|
20237
20376
|
set status(arg0) {
|
|
20238
20377
|
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
20239
20378
|
const len0 = WASM_VECTOR_LEN;
|
|
20240
|
-
wasm.
|
|
20379
|
+
wasm.__wbg_set_serializedoutputnotedata_attachments(this.__wbg_ptr, ptr0, len0);
|
|
20241
20380
|
}
|
|
20242
20381
|
/**
|
|
20243
20382
|
* @param {Uint8Array | null} [arg0]
|
|
@@ -20628,9 +20767,6 @@ class StorageMap {
|
|
|
20628
20767
|
}
|
|
20629
20768
|
if (Symbol.dispose) StorageMap.prototype[Symbol.dispose] = StorageMap.prototype.free;
|
|
20630
20769
|
|
|
20631
|
-
/**
|
|
20632
|
-
* A key-value entry from a storage map.
|
|
20633
|
-
*/
|
|
20634
20770
|
class StorageMapEntry {
|
|
20635
20771
|
static __wrap(ptr) {
|
|
20636
20772
|
ptr = ptr >>> 0;
|
|
@@ -20639,6 +20775,16 @@ class StorageMapEntry {
|
|
|
20639
20775
|
StorageMapEntryFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
20640
20776
|
return obj;
|
|
20641
20777
|
}
|
|
20778
|
+
toJSON() {
|
|
20779
|
+
return {
|
|
20780
|
+
key: this.key,
|
|
20781
|
+
root: this.root,
|
|
20782
|
+
value: this.value,
|
|
20783
|
+
};
|
|
20784
|
+
}
|
|
20785
|
+
toString() {
|
|
20786
|
+
return JSON.stringify(this);
|
|
20787
|
+
}
|
|
20642
20788
|
__destroy_into_raw() {
|
|
20643
20789
|
const ptr = this.__wbg_ptr;
|
|
20644
20790
|
this.__wbg_ptr = 0;
|
|
@@ -20649,6 +20795,99 @@ class StorageMapEntry {
|
|
|
20649
20795
|
const ptr = this.__destroy_into_raw();
|
|
20650
20796
|
wasm.__wbg_storagemapentry_free(ptr, 0);
|
|
20651
20797
|
}
|
|
20798
|
+
/**
|
|
20799
|
+
* @returns {string}
|
|
20800
|
+
*/
|
|
20801
|
+
get key() {
|
|
20802
|
+
let deferred1_0;
|
|
20803
|
+
let deferred1_1;
|
|
20804
|
+
try {
|
|
20805
|
+
const ret = wasm.__wbg_get_storagemapentry_key(this.__wbg_ptr);
|
|
20806
|
+
deferred1_0 = ret[0];
|
|
20807
|
+
deferred1_1 = ret[1];
|
|
20808
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
20809
|
+
} finally {
|
|
20810
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
20811
|
+
}
|
|
20812
|
+
}
|
|
20813
|
+
/**
|
|
20814
|
+
* @returns {string}
|
|
20815
|
+
*/
|
|
20816
|
+
get root() {
|
|
20817
|
+
let deferred1_0;
|
|
20818
|
+
let deferred1_1;
|
|
20819
|
+
try {
|
|
20820
|
+
const ret = wasm.__wbg_get_storagemapentry_root(this.__wbg_ptr);
|
|
20821
|
+
deferred1_0 = ret[0];
|
|
20822
|
+
deferred1_1 = ret[1];
|
|
20823
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
20824
|
+
} finally {
|
|
20825
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
20826
|
+
}
|
|
20827
|
+
}
|
|
20828
|
+
/**
|
|
20829
|
+
* @returns {string}
|
|
20830
|
+
*/
|
|
20831
|
+
get value() {
|
|
20832
|
+
let deferred1_0;
|
|
20833
|
+
let deferred1_1;
|
|
20834
|
+
try {
|
|
20835
|
+
const ret = wasm.__wbg_get_storagemapentry_value(this.__wbg_ptr);
|
|
20836
|
+
deferred1_0 = ret[0];
|
|
20837
|
+
deferred1_1 = ret[1];
|
|
20838
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
20839
|
+
} finally {
|
|
20840
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
20841
|
+
}
|
|
20842
|
+
}
|
|
20843
|
+
/**
|
|
20844
|
+
* @param {string} arg0
|
|
20845
|
+
*/
|
|
20846
|
+
set key(arg0) {
|
|
20847
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
20848
|
+
const len0 = WASM_VECTOR_LEN;
|
|
20849
|
+
wasm.__wbg_set_jsstoragemapentry_key(this.__wbg_ptr, ptr0, len0);
|
|
20850
|
+
}
|
|
20851
|
+
/**
|
|
20852
|
+
* @param {string} arg0
|
|
20853
|
+
*/
|
|
20854
|
+
set root(arg0) {
|
|
20855
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
20856
|
+
const len0 = WASM_VECTOR_LEN;
|
|
20857
|
+
wasm.__wbg_set_jsaccountupdate_storageRoot(this.__wbg_ptr, ptr0, len0);
|
|
20858
|
+
}
|
|
20859
|
+
/**
|
|
20860
|
+
* @param {string} arg0
|
|
20861
|
+
*/
|
|
20862
|
+
set value(arg0) {
|
|
20863
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
20864
|
+
const len0 = WASM_VECTOR_LEN;
|
|
20865
|
+
wasm.__wbg_set_jsstoragemapentry_value(this.__wbg_ptr, ptr0, len0);
|
|
20866
|
+
}
|
|
20867
|
+
}
|
|
20868
|
+
if (Symbol.dispose) StorageMapEntry.prototype[Symbol.dispose] = StorageMapEntry.prototype.free;
|
|
20869
|
+
|
|
20870
|
+
/**
|
|
20871
|
+
* A key-value entry from a storage map.
|
|
20872
|
+
*/
|
|
20873
|
+
class StorageMapEntryJs {
|
|
20874
|
+
static __wrap(ptr) {
|
|
20875
|
+
ptr = ptr >>> 0;
|
|
20876
|
+
const obj = Object.create(StorageMapEntryJs.prototype);
|
|
20877
|
+
obj.__wbg_ptr = ptr;
|
|
20878
|
+
StorageMapEntryJsFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
20879
|
+
return obj;
|
|
20880
|
+
}
|
|
20881
|
+
__destroy_into_raw() {
|
|
20882
|
+
const ptr = this.__wbg_ptr;
|
|
20883
|
+
this.__wbg_ptr = 0;
|
|
20884
|
+
StorageMapEntryJsFinalization.unregister(this);
|
|
20885
|
+
return ptr;
|
|
20886
|
+
}
|
|
20887
|
+
free() {
|
|
20888
|
+
const ptr = this.__destroy_into_raw();
|
|
20889
|
+
wasm.__wbg_storagemapentryjs_free(ptr, 0);
|
|
20890
|
+
}
|
|
20652
20891
|
/**
|
|
20653
20892
|
* Returns the storage map key.
|
|
20654
20893
|
* @returns {Word}
|
|
@@ -20666,7 +20905,7 @@ class StorageMapEntry {
|
|
|
20666
20905
|
return Word.__wrap(ret);
|
|
20667
20906
|
}
|
|
20668
20907
|
}
|
|
20669
|
-
if (Symbol.dispose)
|
|
20908
|
+
if (Symbol.dispose) StorageMapEntryJs.prototype[Symbol.dispose] = StorageMapEntryJs.prototype.free;
|
|
20670
20909
|
|
|
20671
20910
|
/**
|
|
20672
20911
|
* Information about storage map updates for an account, as returned by the
|
|
@@ -20698,7 +20937,7 @@ class StorageMapInfo {
|
|
|
20698
20937
|
* @returns {number}
|
|
20699
20938
|
*/
|
|
20700
20939
|
blockNumber() {
|
|
20701
|
-
const ret = wasm.
|
|
20940
|
+
const ret = wasm.storagemapinfo_blockNumber(this.__wbg_ptr);
|
|
20702
20941
|
return ret >>> 0;
|
|
20703
20942
|
}
|
|
20704
20943
|
/**
|
|
@@ -20749,7 +20988,7 @@ class StorageMapUpdate {
|
|
|
20749
20988
|
* @returns {number}
|
|
20750
20989
|
*/
|
|
20751
20990
|
blockNum() {
|
|
20752
|
-
const ret = wasm.
|
|
20991
|
+
const ret = wasm.committednote_tag(this.__wbg_ptr);
|
|
20753
20992
|
return ret >>> 0;
|
|
20754
20993
|
}
|
|
20755
20994
|
/**
|
|
@@ -20919,18 +21158,13 @@ class StorageSlotArray {
|
|
|
20919
21158
|
wasm.storageslotarray_push(this.__wbg_ptr, element.__wbg_ptr);
|
|
20920
21159
|
}
|
|
20921
21160
|
/**
|
|
20922
|
-
* Replace the element at `index`. Borrows + clones the input
|
|
20923
|
-
* (mirrors `push`), so the caller's JS handle remains valid
|
|
20924
|
-
* after the call. Without this borrow, passing `elem` by
|
|
20925
|
-
* value would move the underlying Rust value out of the
|
|
20926
|
-
* caller's JS handle and any subsequent method on it would
|
|
20927
|
-
* panic with `"null pointer passed to rust"`.
|
|
20928
21161
|
* @param {number} index
|
|
20929
21162
|
* @param {StorageSlot} elem
|
|
20930
21163
|
*/
|
|
20931
21164
|
replaceAt(index, elem) {
|
|
20932
21165
|
_assertClass(elem, StorageSlot);
|
|
20933
|
-
|
|
21166
|
+
var ptr0 = elem.__destroy_into_raw();
|
|
21167
|
+
const ret = wasm.storageslotarray_replaceAt(this.__wbg_ptr, index, ptr0);
|
|
20934
21168
|
if (ret[1]) {
|
|
20935
21169
|
throw takeFromExternrefTable0(ret[0]);
|
|
20936
21170
|
}
|
|
@@ -21700,9 +21934,11 @@ class TransactionRequestBuilder {
|
|
|
21700
21934
|
* @returns {TransactionRequest}
|
|
21701
21935
|
*/
|
|
21702
21936
|
build() {
|
|
21703
|
-
const
|
|
21704
|
-
|
|
21705
|
-
|
|
21937
|
+
const ret = wasm.transactionrequestbuilder_build(this.__wbg_ptr);
|
|
21938
|
+
if (ret[2]) {
|
|
21939
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
21940
|
+
}
|
|
21941
|
+
return TransactionRequest.__wrap(ret[0]);
|
|
21706
21942
|
}
|
|
21707
21943
|
/**
|
|
21708
21944
|
* Merges an advice map to be available during script execution.
|
|
@@ -21710,16 +21946,15 @@ class TransactionRequestBuilder {
|
|
|
21710
21946
|
* @returns {TransactionRequestBuilder}
|
|
21711
21947
|
*/
|
|
21712
21948
|
extendAdviceMap(advice_map) {
|
|
21713
|
-
const ptr = this.__destroy_into_raw();
|
|
21714
21949
|
_assertClass(advice_map, AdviceMap);
|
|
21715
|
-
const ret = wasm.transactionrequestbuilder_extendAdviceMap(
|
|
21950
|
+
const ret = wasm.transactionrequestbuilder_extendAdviceMap(this.__wbg_ptr, advice_map.__wbg_ptr);
|
|
21716
21951
|
return TransactionRequestBuilder.__wrap(ret);
|
|
21717
21952
|
}
|
|
21718
21953
|
/**
|
|
21719
21954
|
* Creates a new empty transaction request builder.
|
|
21720
21955
|
*/
|
|
21721
21956
|
constructor() {
|
|
21722
|
-
const ret = wasm.
|
|
21957
|
+
const ret = wasm.transactionrequestbuilder_js_new();
|
|
21723
21958
|
this.__wbg_ptr = ret >>> 0;
|
|
21724
21959
|
TransactionRequestBuilderFinalization.register(this, this.__wbg_ptr, this);
|
|
21725
21960
|
return this;
|
|
@@ -21730,9 +21965,8 @@ class TransactionRequestBuilder {
|
|
|
21730
21965
|
* @returns {TransactionRequestBuilder}
|
|
21731
21966
|
*/
|
|
21732
21967
|
withAuthArg(auth_arg) {
|
|
21733
|
-
const ptr = this.__destroy_into_raw();
|
|
21734
21968
|
_assertClass(auth_arg, Word);
|
|
21735
|
-
const ret = wasm.transactionrequestbuilder_withAuthArg(
|
|
21969
|
+
const ret = wasm.transactionrequestbuilder_withAuthArg(this.__wbg_ptr, auth_arg.__wbg_ptr);
|
|
21736
21970
|
return TransactionRequestBuilder.__wrap(ret);
|
|
21737
21971
|
}
|
|
21738
21972
|
/**
|
|
@@ -21741,9 +21975,8 @@ class TransactionRequestBuilder {
|
|
|
21741
21975
|
* @returns {TransactionRequestBuilder}
|
|
21742
21976
|
*/
|
|
21743
21977
|
withCustomScript(script) {
|
|
21744
|
-
const ptr = this.__destroy_into_raw();
|
|
21745
21978
|
_assertClass(script, TransactionScript);
|
|
21746
|
-
const ret = wasm.transactionrequestbuilder_withCustomScript(
|
|
21979
|
+
const ret = wasm.transactionrequestbuilder_withCustomScript(this.__wbg_ptr, script.__wbg_ptr);
|
|
21747
21980
|
return TransactionRequestBuilder.__wrap(ret);
|
|
21748
21981
|
}
|
|
21749
21982
|
/**
|
|
@@ -21752,9 +21985,9 @@ class TransactionRequestBuilder {
|
|
|
21752
21985
|
* @returns {TransactionRequestBuilder}
|
|
21753
21986
|
*/
|
|
21754
21987
|
withExpectedFutureNotes(note_details_and_tag) {
|
|
21755
|
-
const ptr = this.__destroy_into_raw();
|
|
21756
21988
|
_assertClass(note_details_and_tag, NoteDetailsAndTagArray);
|
|
21757
|
-
|
|
21989
|
+
var ptr0 = note_details_and_tag.__destroy_into_raw();
|
|
21990
|
+
const ret = wasm.transactionrequestbuilder_withExpectedFutureNotes(this.__wbg_ptr, ptr0);
|
|
21758
21991
|
return TransactionRequestBuilder.__wrap(ret);
|
|
21759
21992
|
}
|
|
21760
21993
|
/**
|
|
@@ -21763,9 +21996,9 @@ class TransactionRequestBuilder {
|
|
|
21763
21996
|
* @returns {TransactionRequestBuilder}
|
|
21764
21997
|
*/
|
|
21765
21998
|
withExpectedOutputRecipients(recipients) {
|
|
21766
|
-
const ptr = this.__destroy_into_raw();
|
|
21767
21999
|
_assertClass(recipients, NoteRecipientArray);
|
|
21768
|
-
|
|
22000
|
+
var ptr0 = recipients.__destroy_into_raw();
|
|
22001
|
+
const ret = wasm.transactionrequestbuilder_withExpectedOutputRecipients(this.__wbg_ptr, ptr0);
|
|
21769
22002
|
return TransactionRequestBuilder.__wrap(ret);
|
|
21770
22003
|
}
|
|
21771
22004
|
/**
|
|
@@ -21774,8 +22007,7 @@ class TransactionRequestBuilder {
|
|
|
21774
22007
|
* @returns {TransactionRequestBuilder}
|
|
21775
22008
|
*/
|
|
21776
22009
|
withExpirationDelta(expiration_delta) {
|
|
21777
|
-
const
|
|
21778
|
-
const ret = wasm.transactionrequestbuilder_withExpirationDelta(ptr, expiration_delta);
|
|
22010
|
+
const ret = wasm.transactionrequestbuilder_withExpirationDelta(this.__wbg_ptr, expiration_delta);
|
|
21779
22011
|
return TransactionRequestBuilder.__wrap(ret);
|
|
21780
22012
|
}
|
|
21781
22013
|
/**
|
|
@@ -21784,9 +22016,9 @@ class TransactionRequestBuilder {
|
|
|
21784
22016
|
* @returns {TransactionRequestBuilder}
|
|
21785
22017
|
*/
|
|
21786
22018
|
withForeignAccounts(foreign_accounts) {
|
|
21787
|
-
const ptr = this.__destroy_into_raw();
|
|
21788
22019
|
_assertClass(foreign_accounts, ForeignAccountArray);
|
|
21789
|
-
|
|
22020
|
+
var ptr0 = foreign_accounts.__destroy_into_raw();
|
|
22021
|
+
const ret = wasm.transactionrequestbuilder_withForeignAccounts(this.__wbg_ptr, ptr0);
|
|
21790
22022
|
return TransactionRequestBuilder.__wrap(ret);
|
|
21791
22023
|
}
|
|
21792
22024
|
/**
|
|
@@ -21795,9 +22027,9 @@ class TransactionRequestBuilder {
|
|
|
21795
22027
|
* @returns {TransactionRequestBuilder}
|
|
21796
22028
|
*/
|
|
21797
22029
|
withInputNotes(notes) {
|
|
21798
|
-
const ptr = this.__destroy_into_raw();
|
|
21799
22030
|
_assertClass(notes, NoteAndArgsArray);
|
|
21800
|
-
|
|
22031
|
+
var ptr0 = notes.__destroy_into_raw();
|
|
22032
|
+
const ret = wasm.transactionrequestbuilder_withInputNotes(this.__wbg_ptr, ptr0);
|
|
21801
22033
|
return TransactionRequestBuilder.__wrap(ret);
|
|
21802
22034
|
}
|
|
21803
22035
|
/**
|
|
@@ -21806,9 +22038,9 @@ class TransactionRequestBuilder {
|
|
|
21806
22038
|
* @returns {TransactionRequestBuilder}
|
|
21807
22039
|
*/
|
|
21808
22040
|
withOwnOutputNotes(notes) {
|
|
21809
|
-
const ptr = this.__destroy_into_raw();
|
|
21810
22041
|
_assertClass(notes, NoteArray);
|
|
21811
|
-
|
|
22042
|
+
var ptr0 = notes.__destroy_into_raw();
|
|
22043
|
+
const ret = wasm.transactionrequestbuilder_withOwnOutputNotes(this.__wbg_ptr, ptr0);
|
|
21812
22044
|
return TransactionRequestBuilder.__wrap(ret);
|
|
21813
22045
|
}
|
|
21814
22046
|
/**
|
|
@@ -21817,9 +22049,8 @@ class TransactionRequestBuilder {
|
|
|
21817
22049
|
* @returns {TransactionRequestBuilder}
|
|
21818
22050
|
*/
|
|
21819
22051
|
withScriptArg(script_arg) {
|
|
21820
|
-
const ptr = this.__destroy_into_raw();
|
|
21821
22052
|
_assertClass(script_arg, Word);
|
|
21822
|
-
const ret = wasm.transactionrequestbuilder_withScriptArg(
|
|
22053
|
+
const ret = wasm.transactionrequestbuilder_withScriptArg(this.__wbg_ptr, script_arg.__wbg_ptr);
|
|
21823
22054
|
return TransactionRequestBuilder.__wrap(ret);
|
|
21824
22055
|
}
|
|
21825
22056
|
}
|
|
@@ -21994,7 +22225,8 @@ class TransactionScriptInputPair {
|
|
|
21994
22225
|
_assertClass(word, Word);
|
|
21995
22226
|
var ptr0 = word.__destroy_into_raw();
|
|
21996
22227
|
_assertClass(felts, FeltArray);
|
|
21997
|
-
|
|
22228
|
+
var ptr1 = felts.__destroy_into_raw();
|
|
22229
|
+
const ret = wasm.transactionscriptinputpair_new(ptr0, ptr1);
|
|
21998
22230
|
this.__wbg_ptr = ret >>> 0;
|
|
21999
22231
|
TransactionScriptInputPairFinalization.register(this, this.__wbg_ptr, this);
|
|
22000
22232
|
return this;
|
|
@@ -22066,18 +22298,13 @@ class TransactionScriptInputPairArray {
|
|
|
22066
22298
|
wasm.transactionscriptinputpairarray_push(this.__wbg_ptr, element.__wbg_ptr);
|
|
22067
22299
|
}
|
|
22068
22300
|
/**
|
|
22069
|
-
* Replace the element at `index`. Borrows + clones the input
|
|
22070
|
-
* (mirrors `push`), so the caller's JS handle remains valid
|
|
22071
|
-
* after the call. Without this borrow, passing `elem` by
|
|
22072
|
-
* value would move the underlying Rust value out of the
|
|
22073
|
-
* caller's JS handle and any subsequent method on it would
|
|
22074
|
-
* panic with `"null pointer passed to rust"`.
|
|
22075
22301
|
* @param {number} index
|
|
22076
22302
|
* @param {TransactionScriptInputPair} elem
|
|
22077
22303
|
*/
|
|
22078
22304
|
replaceAt(index, elem) {
|
|
22079
22305
|
_assertClass(elem, TransactionScriptInputPair);
|
|
22080
|
-
|
|
22306
|
+
var ptr0 = elem.__destroy_into_raw();
|
|
22307
|
+
const ret = wasm.transactionscriptinputpairarray_replaceAt(this.__wbg_ptr, index, ptr0);
|
|
22081
22308
|
if (ret[1]) {
|
|
22082
22309
|
throw takeFromExternrefTable0(ret[0]);
|
|
22083
22310
|
}
|
|
@@ -22391,15 +22618,23 @@ class WebClient {
|
|
|
22391
22618
|
* const balance = await reader.getBalance(faucetId);
|
|
22392
22619
|
* ```
|
|
22393
22620
|
* @param {AccountId} account_id
|
|
22394
|
-
* @returns {AccountReader}
|
|
22621
|
+
* @returns {Promise<AccountReader>}
|
|
22395
22622
|
*/
|
|
22396
22623
|
accountReader(account_id) {
|
|
22397
22624
|
_assertClass(account_id, AccountId);
|
|
22398
22625
|
const ret = wasm.webclient_accountReader(this.__wbg_ptr, account_id.__wbg_ptr);
|
|
22399
|
-
|
|
22400
|
-
|
|
22401
|
-
|
|
22402
|
-
|
|
22626
|
+
return ret;
|
|
22627
|
+
}
|
|
22628
|
+
/**
|
|
22629
|
+
* @param {AccountId} account_id
|
|
22630
|
+
* @param {AuthSecretKey} secret_key
|
|
22631
|
+
* @returns {Promise<void>}
|
|
22632
|
+
*/
|
|
22633
|
+
addAccountSecretKeyToWebStore(account_id, secret_key) {
|
|
22634
|
+
_assertClass(account_id, AccountId);
|
|
22635
|
+
_assertClass(secret_key, AuthSecretKey);
|
|
22636
|
+
const ret = wasm.webclient_addAccountSecretKeyToWebStore(this.__wbg_ptr, account_id.__wbg_ptr, secret_key.__wbg_ptr);
|
|
22637
|
+
return ret;
|
|
22403
22638
|
}
|
|
22404
22639
|
/**
|
|
22405
22640
|
* @param {string} tag
|
|
@@ -22448,6 +22683,9 @@ class WebClient {
|
|
|
22448
22683
|
* * `store_name`: Optional name for the web store. If `None`, the store name defaults to
|
|
22449
22684
|
* `MidenClientDB_{network_id}`, where `network_id` is derived from the `node_url`.
|
|
22450
22685
|
* Explicitly setting this allows for creating multiple isolated clients.
|
|
22686
|
+
* * `debug_mode`: Optional flag to enable debug mode for transaction execution. When enabled,
|
|
22687
|
+
* the transaction executor records additional information useful for debugging. Defaults to
|
|
22688
|
+
* disabled.
|
|
22451
22689
|
* @param {string | null} [node_url]
|
|
22452
22690
|
* @param {string | null} [node_note_transport_url]
|
|
22453
22691
|
* @param {Uint8Array | null} [seed]
|
|
@@ -22480,6 +22718,8 @@ class WebClient {
|
|
|
22480
22718
|
* * `get_key_cb`: Callback to retrieve the secret key bytes for a given public key.
|
|
22481
22719
|
* * `insert_key_cb`: Callback to persist a secret key.
|
|
22482
22720
|
* * `sign_cb`: Callback to produce serialized signature bytes for the provided inputs.
|
|
22721
|
+
* * `debug_mode`: Optional flag to enable debug mode for transaction execution. Defaults to
|
|
22722
|
+
* disabled.
|
|
22483
22723
|
* @param {string | null} [node_url]
|
|
22484
22724
|
* @param {string | null} [node_note_transport_url]
|
|
22485
22725
|
* @param {Uint8Array | null} [seed]
|
|
@@ -22503,14 +22743,11 @@ class WebClient {
|
|
|
22503
22743
|
return ret;
|
|
22504
22744
|
}
|
|
22505
22745
|
/**
|
|
22506
|
-
* @returns {CodeBuilder}
|
|
22746
|
+
* @returns {Promise<CodeBuilder>}
|
|
22507
22747
|
*/
|
|
22508
22748
|
createCodeBuilder() {
|
|
22509
22749
|
const ret = wasm.webclient_createCodeBuilder(this.__wbg_ptr);
|
|
22510
|
-
|
|
22511
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
22512
|
-
}
|
|
22513
|
-
return CodeBuilder.__wrap(ret[0]);
|
|
22750
|
+
return ret;
|
|
22514
22751
|
}
|
|
22515
22752
|
/**
|
|
22516
22753
|
* Creates a new client with a mock RPC API. Useful for testing purposes and proof-of-concept
|
|
@@ -22518,7 +22755,7 @@ class WebClient {
|
|
|
22518
22755
|
* @param {Uint8Array | null} [seed]
|
|
22519
22756
|
* @param {Uint8Array | null} [serialized_mock_chain]
|
|
22520
22757
|
* @param {Uint8Array | null} [serialized_mock_note_transport_node]
|
|
22521
|
-
* @returns {Promise<
|
|
22758
|
+
* @returns {Promise<string>}
|
|
22522
22759
|
*/
|
|
22523
22760
|
createMockClient(seed, serialized_mock_chain, serialized_mock_note_transport_node) {
|
|
22524
22761
|
var ptr0 = isLikeNone(seed) ? 0 : passArray8ToWasm0(seed, wasm.__wbindgen_malloc);
|
|
@@ -22565,7 +22802,8 @@ class WebClient {
|
|
|
22565
22802
|
_assertClass(tx_script, TransactionScript);
|
|
22566
22803
|
_assertClass(advice_inputs, AdviceInputs);
|
|
22567
22804
|
_assertClass(foreign_accounts, ForeignAccountArray);
|
|
22568
|
-
|
|
22805
|
+
var ptr0 = foreign_accounts.__destroy_into_raw();
|
|
22806
|
+
const ret = wasm.webclient_executeProgram(this.__wbg_ptr, account_id.__wbg_ptr, tx_script.__wbg_ptr, advice_inputs.__wbg_ptr, ptr0);
|
|
22569
22807
|
return ret;
|
|
22570
22808
|
}
|
|
22571
22809
|
/**
|
|
@@ -22592,7 +22830,8 @@ class WebClient {
|
|
|
22592
22830
|
*/
|
|
22593
22831
|
exportAccountFile(account_id) {
|
|
22594
22832
|
_assertClass(account_id, AccountId);
|
|
22595
|
-
|
|
22833
|
+
var ptr0 = account_id.__destroy_into_raw();
|
|
22834
|
+
const ret = wasm.webclient_exportAccountFile(this.__wbg_ptr, ptr0);
|
|
22596
22835
|
return ret;
|
|
22597
22836
|
}
|
|
22598
22837
|
/**
|
|
@@ -22640,6 +22879,30 @@ class WebClient {
|
|
|
22640
22879
|
const ret = wasm.webclient_getAccount(this.__wbg_ptr, account_id.__wbg_ptr);
|
|
22641
22880
|
return ret;
|
|
22642
22881
|
}
|
|
22882
|
+
/**
|
|
22883
|
+
* Retrieves an authentication secret key from the keystore given a public key commitment.
|
|
22884
|
+
*
|
|
22885
|
+
* The public key commitment should correspond to one of the keys tracked by the keystore.
|
|
22886
|
+
* Returns the associated [`AuthSecretKey`] if found, or an error if not found.
|
|
22887
|
+
* @param {Word} pub_key_commitment
|
|
22888
|
+
* @returns {Promise<AuthSecretKey>}
|
|
22889
|
+
*/
|
|
22890
|
+
getAccountAuthByPubKeyCommitment(pub_key_commitment) {
|
|
22891
|
+
_assertClass(pub_key_commitment, Word);
|
|
22892
|
+
const ret = wasm.webclient_getAccountAuthByPubKeyCommitment(this.__wbg_ptr, pub_key_commitment.__wbg_ptr);
|
|
22893
|
+
return ret;
|
|
22894
|
+
}
|
|
22895
|
+
/**
|
|
22896
|
+
* Retrieves the full account data for the account associated with the given public key
|
|
22897
|
+
* commitment, returning `null` if no account is found.
|
|
22898
|
+
* @param {Word} pub_key_commitment
|
|
22899
|
+
* @returns {Promise<Account | undefined>}
|
|
22900
|
+
*/
|
|
22901
|
+
getAccountByKeyCommitment(pub_key_commitment) {
|
|
22902
|
+
_assertClass(pub_key_commitment, Word);
|
|
22903
|
+
const ret = wasm.webclient_getAccountByKeyCommitment(this.__wbg_ptr, pub_key_commitment.__wbg_ptr);
|
|
22904
|
+
return ret;
|
|
22905
|
+
}
|
|
22643
22906
|
/**
|
|
22644
22907
|
* Retrieves the account code for a specific account.
|
|
22645
22908
|
*
|
|
@@ -22737,7 +23000,20 @@ class WebClient {
|
|
|
22737
23000
|
return ret;
|
|
22738
23001
|
}
|
|
22739
23002
|
/**
|
|
22740
|
-
*
|
|
23003
|
+
* Returns all public key commitments associated with the given account ID.
|
|
23004
|
+
*
|
|
23005
|
+
* These commitments can be used with [`getAccountAuthByPubKeyCommitment`]
|
|
23006
|
+
* to retrieve the corresponding secret keys from the keystore.
|
|
23007
|
+
* @param {AccountId} account_id
|
|
23008
|
+
* @returns {Promise<Word[]>}
|
|
23009
|
+
*/
|
|
23010
|
+
getPublicKeyCommitmentsOfAccount(account_id) {
|
|
23011
|
+
_assertClass(account_id, AccountId);
|
|
23012
|
+
const ret = wasm.webclient_getPublicKeyCommitmentsOfAccount(this.__wbg_ptr, account_id.__wbg_ptr);
|
|
23013
|
+
return ret;
|
|
23014
|
+
}
|
|
23015
|
+
/**
|
|
23016
|
+
* Retrieves the setting value for `key`, or `None` if it hasn't been set.
|
|
22741
23017
|
* @param {string} key
|
|
22742
23018
|
* @returns {Promise<any | undefined>}
|
|
22743
23019
|
*/
|
|
@@ -22766,7 +23042,7 @@ class WebClient {
|
|
|
22766
23042
|
}
|
|
22767
23043
|
/**
|
|
22768
23044
|
* @param {AccountId} account_id
|
|
22769
|
-
* @returns {Promise<
|
|
23045
|
+
* @returns {Promise<void>}
|
|
22770
23046
|
*/
|
|
22771
23047
|
importAccountById(account_id) {
|
|
22772
23048
|
_assertClass(account_id, AccountId);
|
|
@@ -22775,7 +23051,7 @@ class WebClient {
|
|
|
22775
23051
|
}
|
|
22776
23052
|
/**
|
|
22777
23053
|
* @param {AccountFile} account_file
|
|
22778
|
-
* @returns {Promise<
|
|
23054
|
+
* @returns {Promise<string>}
|
|
22779
23055
|
*/
|
|
22780
23056
|
importAccountFile(account_file) {
|
|
22781
23057
|
_assertClass(account_file, AccountFile);
|
|
@@ -22784,8 +23060,20 @@ class WebClient {
|
|
|
22784
23060
|
return ret;
|
|
22785
23061
|
}
|
|
22786
23062
|
/**
|
|
23063
|
+
* Imports a note file and returns the imported note's identifier.
|
|
23064
|
+
*
|
|
23065
|
+
* A note file that carries metadata — an explicit `NoteId` or a full note
|
|
23066
|
+
* with proof — resolves to a concrete `NoteId`, which is returned so the
|
|
23067
|
+
* caller can look the note up with [`get_input_note`]. A details-only file
|
|
23068
|
+
* (`NoteDetails`) has no metadata and therefore no `NoteId` yet, so its
|
|
23069
|
+
* metadata-independent details commitment is returned instead.
|
|
23070
|
+
*
|
|
23071
|
+
* Migration note (miden-client PR #2214): `Client::import_notes` now
|
|
23072
|
+
* returns `Vec<NoteDetailsCommitment>` rather than `Vec<NoteId>`, since
|
|
23073
|
+
* metadata-less imports have no note ID; this method recovers the `NoteId`
|
|
23074
|
+
* from the note file when one is available.
|
|
22787
23075
|
* @param {NoteFile} note_file
|
|
22788
|
-
* @returns {Promise<
|
|
23076
|
+
* @returns {Promise<string>}
|
|
22789
23077
|
*/
|
|
22790
23078
|
importNoteFile(note_file) {
|
|
22791
23079
|
_assertClass(note_file, NoteFile);
|
|
@@ -22867,7 +23155,7 @@ class WebClient {
|
|
|
22867
23155
|
return ret;
|
|
22868
23156
|
}
|
|
22869
23157
|
/**
|
|
22870
|
-
* @returns {Promise<
|
|
23158
|
+
* @returns {Promise<string[]>}
|
|
22871
23159
|
*/
|
|
22872
23160
|
listTags() {
|
|
22873
23161
|
const ret = wasm.webclient_listTags(this.__wbg_ptr);
|
|
@@ -22918,19 +23206,27 @@ class WebClient {
|
|
|
22918
23206
|
return TransactionRequest.__wrap(ret[0]);
|
|
22919
23207
|
}
|
|
22920
23208
|
/**
|
|
23209
|
+
* Creates, persists, and returns a new fungible faucet account.
|
|
23210
|
+
*
|
|
23211
|
+
* Only fungible faucets are supported, so passing `non_fungible = true` fails fast with a
|
|
23212
|
+
* clear message. The faucet is registered with mint and burn policies (both `AllowAll`); its
|
|
23213
|
+
* secret key is added to the keystore.
|
|
22921
23214
|
* @param {AccountStorageMode} storage_mode
|
|
22922
23215
|
* @param {boolean} non_fungible
|
|
23216
|
+
* @param {string} token_name
|
|
22923
23217
|
* @param {string} token_symbol
|
|
22924
23218
|
* @param {number} decimals
|
|
22925
23219
|
* @param {bigint} max_supply
|
|
22926
23220
|
* @param {AuthScheme} auth_scheme
|
|
22927
23221
|
* @returns {Promise<Account>}
|
|
22928
23222
|
*/
|
|
22929
|
-
newFaucet(storage_mode, non_fungible, token_symbol, decimals, max_supply, auth_scheme) {
|
|
23223
|
+
newFaucet(storage_mode, non_fungible, token_name, token_symbol, decimals, max_supply, auth_scheme) {
|
|
22930
23224
|
_assertClass(storage_mode, AccountStorageMode);
|
|
22931
|
-
const ptr0 = passStringToWasm0(
|
|
23225
|
+
const ptr0 = passStringToWasm0(token_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
22932
23226
|
const len0 = WASM_VECTOR_LEN;
|
|
22933
|
-
const
|
|
23227
|
+
const ptr1 = passStringToWasm0(token_symbol, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
23228
|
+
const len1 = WASM_VECTOR_LEN;
|
|
23229
|
+
const ret = wasm.webclient_newFaucet(this.__wbg_ptr, storage_mode.__wbg_ptr, non_fungible, ptr0, len0, ptr1, len1, decimals, max_supply, auth_scheme);
|
|
22934
23230
|
return ret;
|
|
22935
23231
|
}
|
|
22936
23232
|
/**
|
|
@@ -22938,17 +23234,61 @@ class WebClient {
|
|
|
22938
23234
|
* @param {AccountId} faucet_id
|
|
22939
23235
|
* @param {NoteType} note_type
|
|
22940
23236
|
* @param {bigint} amount
|
|
22941
|
-
* @returns {TransactionRequest}
|
|
23237
|
+
* @returns {Promise<TransactionRequest>}
|
|
22942
23238
|
*/
|
|
22943
23239
|
newMintTransactionRequest(target_account_id, faucet_id, note_type, amount) {
|
|
22944
23240
|
_assertClass(target_account_id, AccountId);
|
|
22945
23241
|
_assertClass(faucet_id, AccountId);
|
|
22946
23242
|
const ret = wasm.webclient_newMintTransactionRequest(this.__wbg_ptr, target_account_id.__wbg_ptr, faucet_id.__wbg_ptr, note_type, amount);
|
|
23243
|
+
return ret;
|
|
23244
|
+
}
|
|
23245
|
+
/**
|
|
23246
|
+
* @param {Note} pswap_note
|
|
23247
|
+
* @param {AccountId} creator_account_id
|
|
23248
|
+
* @returns {TransactionRequest}
|
|
23249
|
+
*/
|
|
23250
|
+
newPswapCancelTransactionRequest(pswap_note, creator_account_id) {
|
|
23251
|
+
_assertClass(pswap_note, Note);
|
|
23252
|
+
_assertClass(creator_account_id, AccountId);
|
|
23253
|
+
const ret = wasm.webclient_newPswapCancelTransactionRequest(this.__wbg_ptr, pswap_note.__wbg_ptr, creator_account_id.__wbg_ptr);
|
|
23254
|
+
if (ret[2]) {
|
|
23255
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
23256
|
+
}
|
|
23257
|
+
return TransactionRequest.__wrap(ret[0]);
|
|
23258
|
+
}
|
|
23259
|
+
/**
|
|
23260
|
+
* @param {Note} pswap_note
|
|
23261
|
+
* @param {AccountId} consumer_account_id
|
|
23262
|
+
* @param {bigint} account_fill_amount
|
|
23263
|
+
* @param {bigint} note_fill_amount
|
|
23264
|
+
* @returns {TransactionRequest}
|
|
23265
|
+
*/
|
|
23266
|
+
newPswapConsumeTransactionRequest(pswap_note, consumer_account_id, account_fill_amount, note_fill_amount) {
|
|
23267
|
+
_assertClass(pswap_note, Note);
|
|
23268
|
+
_assertClass(consumer_account_id, AccountId);
|
|
23269
|
+
const ret = wasm.webclient_newPswapConsumeTransactionRequest(this.__wbg_ptr, pswap_note.__wbg_ptr, consumer_account_id.__wbg_ptr, account_fill_amount, note_fill_amount);
|
|
22947
23270
|
if (ret[2]) {
|
|
22948
23271
|
throw takeFromExternrefTable0(ret[1]);
|
|
22949
23272
|
}
|
|
22950
23273
|
return TransactionRequest.__wrap(ret[0]);
|
|
22951
23274
|
}
|
|
23275
|
+
/**
|
|
23276
|
+
* @param {AccountId} creator_account_id
|
|
23277
|
+
* @param {AccountId} offered_asset_faucet_id
|
|
23278
|
+
* @param {bigint} offered_asset_amount
|
|
23279
|
+
* @param {AccountId} requested_asset_faucet_id
|
|
23280
|
+
* @param {bigint} requested_asset_amount
|
|
23281
|
+
* @param {NoteType} note_type
|
|
23282
|
+
* @param {NoteType} payback_note_type
|
|
23283
|
+
* @returns {Promise<TransactionRequest>}
|
|
23284
|
+
*/
|
|
23285
|
+
newPswapCreateTransactionRequest(creator_account_id, offered_asset_faucet_id, offered_asset_amount, requested_asset_faucet_id, requested_asset_amount, note_type, payback_note_type) {
|
|
23286
|
+
_assertClass(creator_account_id, AccountId);
|
|
23287
|
+
_assertClass(offered_asset_faucet_id, AccountId);
|
|
23288
|
+
_assertClass(requested_asset_faucet_id, AccountId);
|
|
23289
|
+
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);
|
|
23290
|
+
return ret;
|
|
23291
|
+
}
|
|
22952
23292
|
/**
|
|
22953
23293
|
* @param {AccountId} sender_account_id
|
|
22954
23294
|
* @param {AccountId} target_account_id
|
|
@@ -22957,17 +23297,14 @@ class WebClient {
|
|
|
22957
23297
|
* @param {bigint} amount
|
|
22958
23298
|
* @param {number | null} [recall_height]
|
|
22959
23299
|
* @param {number | null} [timelock_height]
|
|
22960
|
-
* @returns {TransactionRequest}
|
|
23300
|
+
* @returns {Promise<TransactionRequest>}
|
|
22961
23301
|
*/
|
|
22962
23302
|
newSendTransactionRequest(sender_account_id, target_account_id, faucet_id, note_type, amount, recall_height, timelock_height) {
|
|
22963
23303
|
_assertClass(sender_account_id, AccountId);
|
|
22964
23304
|
_assertClass(target_account_id, AccountId);
|
|
22965
23305
|
_assertClass(faucet_id, AccountId);
|
|
22966
23306
|
const ret = wasm.webclient_newSendTransactionRequest(this.__wbg_ptr, sender_account_id.__wbg_ptr, target_account_id.__wbg_ptr, faucet_id.__wbg_ptr, note_type, amount, isLikeNone(recall_height) ? 0x100000001 : (recall_height) >>> 0, isLikeNone(timelock_height) ? 0x100000001 : (timelock_height) >>> 0);
|
|
22967
|
-
|
|
22968
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
22969
|
-
}
|
|
22970
|
-
return TransactionRequest.__wrap(ret[0]);
|
|
23307
|
+
return ret;
|
|
22971
23308
|
}
|
|
22972
23309
|
/**
|
|
22973
23310
|
* @param {AccountId} sender_account_id
|
|
@@ -22977,17 +23314,14 @@ class WebClient {
|
|
|
22977
23314
|
* @param {bigint} requested_asset_amount
|
|
22978
23315
|
* @param {NoteType} note_type
|
|
22979
23316
|
* @param {NoteType} payback_note_type
|
|
22980
|
-
* @returns {TransactionRequest}
|
|
23317
|
+
* @returns {Promise<TransactionRequest>}
|
|
22981
23318
|
*/
|
|
22982
23319
|
newSwapTransactionRequest(sender_account_id, offered_asset_faucet_id, offered_asset_amount, requested_asset_faucet_id, requested_asset_amount, note_type, payback_note_type) {
|
|
22983
23320
|
_assertClass(sender_account_id, AccountId);
|
|
22984
23321
|
_assertClass(offered_asset_faucet_id, AccountId);
|
|
22985
23322
|
_assertClass(requested_asset_faucet_id, AccountId);
|
|
22986
23323
|
const ret = wasm.webclient_newSwapTransactionRequest(this.__wbg_ptr, sender_account_id.__wbg_ptr, offered_asset_faucet_id.__wbg_ptr, offered_asset_amount, requested_asset_faucet_id.__wbg_ptr, requested_asset_amount, note_type, payback_note_type);
|
|
22987
|
-
|
|
22988
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
22989
|
-
}
|
|
22990
|
-
return TransactionRequest.__wrap(ret[0]);
|
|
23324
|
+
return ret;
|
|
22991
23325
|
}
|
|
22992
23326
|
/**
|
|
22993
23327
|
* @param {AccountStorageMode} storage_mode
|
|
@@ -23003,39 +23337,28 @@ class WebClient {
|
|
|
23003
23337
|
const ret = wasm.webclient_newWallet(this.__wbg_ptr, storage_mode.__wbg_ptr, mutable, auth_scheme, ptr0, len0);
|
|
23004
23338
|
return ret;
|
|
23005
23339
|
}
|
|
23006
|
-
proveBlock() {
|
|
23007
|
-
const ret = wasm.webclient_proveBlock(this.__wbg_ptr);
|
|
23008
|
-
if (ret[1]) {
|
|
23009
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
23010
|
-
}
|
|
23011
|
-
}
|
|
23012
23340
|
/**
|
|
23013
|
-
*
|
|
23014
|
-
* @param {TransactionResult} transaction_result
|
|
23015
|
-
* @returns {Promise<ProvenTransaction>}
|
|
23341
|
+
* @returns {Promise<void>}
|
|
23016
23342
|
*/
|
|
23017
|
-
|
|
23018
|
-
|
|
23019
|
-
const ret = wasm.webclient_proveTransaction(this.__wbg_ptr, transaction_result.__wbg_ptr);
|
|
23343
|
+
proveBlock() {
|
|
23344
|
+
const ret = wasm.webclient_proveBlock(this.__wbg_ptr);
|
|
23020
23345
|
return ret;
|
|
23021
23346
|
}
|
|
23022
23347
|
/**
|
|
23023
|
-
* Generates a transaction proof using the provided prover
|
|
23024
|
-
*
|
|
23025
|
-
* Takes the prover by reference so the JS-side handle is NOT consumed
|
|
23026
|
-
* by wasm-bindgen. Taking `TransactionProver` by value would transfer
|
|
23027
|
-
* ownership on each call, invalidating the JS object's internal WASM
|
|
23028
|
-
* handle; after one use, subsequent calls from JS would pass a dangling
|
|
23029
|
-
* handle that wasm-bindgen interprets as `None`, silently falling back
|
|
23030
|
-
* to the local prover.
|
|
23348
|
+
* Generates a transaction proof using either the provided prover or the client's default
|
|
23349
|
+
* prover if none is supplied.
|
|
23031
23350
|
* @param {TransactionResult} transaction_result
|
|
23032
|
-
* @param {TransactionProver} prover
|
|
23351
|
+
* @param {TransactionProver | null} [prover]
|
|
23033
23352
|
* @returns {Promise<ProvenTransaction>}
|
|
23034
23353
|
*/
|
|
23035
|
-
|
|
23354
|
+
proveTransaction(transaction_result, prover) {
|
|
23036
23355
|
_assertClass(transaction_result, TransactionResult);
|
|
23037
|
-
|
|
23038
|
-
|
|
23356
|
+
let ptr0 = 0;
|
|
23357
|
+
if (!isLikeNone(prover)) {
|
|
23358
|
+
_assertClass(prover, TransactionProver);
|
|
23359
|
+
ptr0 = prover.__destroy_into_raw();
|
|
23360
|
+
}
|
|
23361
|
+
const ret = wasm.webclient_proveTransaction(this.__wbg_ptr, transaction_result.__wbg_ptr, ptr0);
|
|
23039
23362
|
return ret;
|
|
23040
23363
|
}
|
|
23041
23364
|
/**
|
|
@@ -23104,29 +23427,19 @@ class WebClient {
|
|
|
23104
23427
|
}
|
|
23105
23428
|
/**
|
|
23106
23429
|
* Returns the inner serialized mock chain if it exists.
|
|
23107
|
-
* @returns {Uint8Array}
|
|
23430
|
+
* @returns {Promise<Uint8Array>}
|
|
23108
23431
|
*/
|
|
23109
23432
|
serializeMockChain() {
|
|
23110
23433
|
const ret = wasm.webclient_serializeMockChain(this.__wbg_ptr);
|
|
23111
|
-
|
|
23112
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
23113
|
-
}
|
|
23114
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
23115
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
23116
|
-
return v1;
|
|
23434
|
+
return ret;
|
|
23117
23435
|
}
|
|
23118
23436
|
/**
|
|
23119
23437
|
* Returns the inner serialized mock note transport node if it exists.
|
|
23120
|
-
* @returns {Uint8Array}
|
|
23438
|
+
* @returns {Promise<Uint8Array>}
|
|
23121
23439
|
*/
|
|
23122
23440
|
serializeMockNoteTransportNode() {
|
|
23123
23441
|
const ret = wasm.webclient_serializeMockNoteTransportNode(this.__wbg_ptr);
|
|
23124
|
-
|
|
23125
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
23126
|
-
}
|
|
23127
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
23128
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
23129
|
-
return v1;
|
|
23442
|
+
return ret;
|
|
23130
23443
|
}
|
|
23131
23444
|
/**
|
|
23132
23445
|
* Sets a setting key-value in the store. It can then be retrieved using `get_setting`.
|
|
@@ -23142,25 +23455,11 @@ class WebClient {
|
|
|
23142
23455
|
}
|
|
23143
23456
|
/**
|
|
23144
23457
|
* Returns the identifier of the underlying store (e.g. `IndexedDB` database name, file path).
|
|
23145
|
-
* @returns {string}
|
|
23458
|
+
* @returns {Promise<string>}
|
|
23146
23459
|
*/
|
|
23147
23460
|
storeIdentifier() {
|
|
23148
|
-
|
|
23149
|
-
|
|
23150
|
-
try {
|
|
23151
|
-
const ret = wasm.webclient_storeIdentifier(this.__wbg_ptr);
|
|
23152
|
-
var ptr1 = ret[0];
|
|
23153
|
-
var len1 = ret[1];
|
|
23154
|
-
if (ret[3]) {
|
|
23155
|
-
ptr1 = 0; len1 = 0;
|
|
23156
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
23157
|
-
}
|
|
23158
|
-
deferred2_0 = ptr1;
|
|
23159
|
-
deferred2_1 = len1;
|
|
23160
|
-
return getStringFromWasm0(ptr1, len1);
|
|
23161
|
-
} finally {
|
|
23162
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
23163
|
-
}
|
|
23461
|
+
const ret = wasm.webclient_storeIdentifier(this.__wbg_ptr);
|
|
23462
|
+
return ret;
|
|
23164
23463
|
}
|
|
23165
23464
|
/**
|
|
23166
23465
|
* Executes a transaction specified by the request against the specified account,
|
|
@@ -23226,11 +23525,11 @@ class WebClient {
|
|
|
23226
23525
|
return ret;
|
|
23227
23526
|
}
|
|
23228
23527
|
/**
|
|
23229
|
-
* @returns {boolean}
|
|
23528
|
+
* @returns {Promise<boolean>}
|
|
23230
23529
|
*/
|
|
23231
23530
|
usesMockChain() {
|
|
23232
23531
|
const ret = wasm.webclient_usesMockChain(this.__wbg_ptr);
|
|
23233
|
-
return ret
|
|
23532
|
+
return ret;
|
|
23234
23533
|
}
|
|
23235
23534
|
}
|
|
23236
23535
|
if (Symbol.dispose) WebClient.prototype[Symbol.dispose] = WebClient.prototype.free;
|
|
@@ -23355,7 +23654,6 @@ class Word {
|
|
|
23355
23654
|
}
|
|
23356
23655
|
/**
|
|
23357
23656
|
* Creates a Word from a hex string.
|
|
23358
|
-
* Fails if the provided string is not a valid hex representation of a Word.
|
|
23359
23657
|
* @param {string} hex
|
|
23360
23658
|
* @returns {Word}
|
|
23361
23659
|
*/
|
|
@@ -23369,14 +23667,21 @@ class Word {
|
|
|
23369
23667
|
return Word.__wrap(ret[0]);
|
|
23370
23668
|
}
|
|
23371
23669
|
/**
|
|
23372
|
-
* Creates a word from four
|
|
23670
|
+
* Creates a word from four numeric values.
|
|
23671
|
+
*
|
|
23672
|
+
* Each input must be a canonical field element, i.e. strictly less than the field modulus.
|
|
23673
|
+
* `Felt::new` (now fallible on the 0.15 surface) errors out on inputs at or beyond the
|
|
23674
|
+
* modulus; the error is surfaced to JS.
|
|
23373
23675
|
* @param {BigUint64Array} u64_vec
|
|
23374
23676
|
*/
|
|
23375
23677
|
constructor(u64_vec) {
|
|
23376
23678
|
const ptr0 = passArray64ToWasm0(u64_vec, wasm.__wbindgen_malloc);
|
|
23377
23679
|
const len0 = WASM_VECTOR_LEN;
|
|
23378
23680
|
const ret = wasm.word_new(ptr0, len0);
|
|
23379
|
-
|
|
23681
|
+
if (ret[2]) {
|
|
23682
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
23683
|
+
}
|
|
23684
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
23380
23685
|
WordFinalization.register(this, this.__wbg_ptr, this);
|
|
23381
23686
|
return this;
|
|
23382
23687
|
}
|
|
@@ -23426,7 +23731,7 @@ class Word {
|
|
|
23426
23731
|
}
|
|
23427
23732
|
}
|
|
23428
23733
|
/**
|
|
23429
|
-
* Returns the word as an array of
|
|
23734
|
+
* Returns the word as an array of numeric values.
|
|
23430
23735
|
* @returns {BigUint64Array}
|
|
23431
23736
|
*/
|
|
23432
23737
|
toU64s() {
|
|
@@ -23576,7 +23881,7 @@ class wbg_rayon_PoolBuilder {
|
|
|
23576
23881
|
* @returns {number}
|
|
23577
23882
|
*/
|
|
23578
23883
|
numThreads() {
|
|
23579
|
-
const ret = wasm.
|
|
23884
|
+
const ret = wasm.storagemapinfo_blockNumber(this.__wbg_ptr);
|
|
23580
23885
|
return ret >>> 0;
|
|
23581
23886
|
}
|
|
23582
23887
|
/**
|
|
@@ -23734,6 +24039,10 @@ function __wbg_get_imports(memory) {
|
|
|
23734
24039
|
const ret = AccountProof.__wrap(arg0);
|
|
23735
24040
|
return ret;
|
|
23736
24041
|
},
|
|
24042
|
+
__wbg_accountreader_new: function(arg0) {
|
|
24043
|
+
const ret = AccountReader.__wrap(arg0);
|
|
24044
|
+
return ret;
|
|
24045
|
+
},
|
|
23737
24046
|
__wbg_accountstatus_new: function(arg0) {
|
|
23738
24047
|
const ret = AccountStatus.__wrap(arg0);
|
|
23739
24048
|
return ret;
|
|
@@ -23742,7 +24051,7 @@ function __wbg_get_imports(memory) {
|
|
|
23742
24051
|
const ret = AccountStorage.__wrap(arg0);
|
|
23743
24052
|
return ret;
|
|
23744
24053
|
},
|
|
23745
|
-
|
|
24054
|
+
__wbg_addNoteTag_40dad1e41d8a6415: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
23746
24055
|
var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
|
|
23747
24056
|
wasm.__wbindgen_free(arg2, arg3 * 1, 1);
|
|
23748
24057
|
let v1;
|
|
@@ -23765,15 +24074,15 @@ function __wbg_get_imports(memory) {
|
|
|
23765
24074
|
__wbg_append_a992ccc37aa62dc4: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
23766
24075
|
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
23767
24076
|
}, arguments); },
|
|
23768
|
-
|
|
24077
|
+
__wbg_applyFullAccountState_0f46ca4819ec19a2: function(arg0, arg1, arg2) {
|
|
23769
24078
|
const ret = applyFullAccountState(getStringFromWasm0(arg0, arg1), JsAccountUpdate.__wrap(arg2));
|
|
23770
24079
|
return ret;
|
|
23771
24080
|
},
|
|
23772
|
-
|
|
24081
|
+
__wbg_applyStateSync_4577b4125b70be6e: function(arg0, arg1, arg2) {
|
|
23773
24082
|
const ret = applyStateSync(getStringFromWasm0(arg0, arg1), JsStateSyncUpdate.__wrap(arg2));
|
|
23774
24083
|
return ret;
|
|
23775
24084
|
},
|
|
23776
|
-
|
|
24085
|
+
__wbg_applyTransactionDelta_956ac5d25a74f4f2: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20) {
|
|
23777
24086
|
let deferred0_0;
|
|
23778
24087
|
let deferred0_1;
|
|
23779
24088
|
let deferred1_0;
|
|
@@ -23890,6 +24199,10 @@ function __wbg_get_imports(memory) {
|
|
|
23890
24199
|
__wbg_close_a79afee31de55b36: function() { return handleError(function (arg0) {
|
|
23891
24200
|
arg0.close();
|
|
23892
24201
|
}, arguments); },
|
|
24202
|
+
__wbg_codebuilder_new: function(arg0) {
|
|
24203
|
+
const ret = CodeBuilder.__wrap(arg0);
|
|
24204
|
+
return ret;
|
|
24205
|
+
},
|
|
23893
24206
|
__wbg_committednote_new: function(arg0) {
|
|
23894
24207
|
const ret = CommittedNote.__wrap(arg0);
|
|
23895
24208
|
return ret;
|
|
@@ -23920,7 +24233,7 @@ function __wbg_get_imports(memory) {
|
|
|
23920
24233
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
23921
24234
|
}
|
|
23922
24235
|
},
|
|
23923
|
-
|
|
24236
|
+
__wbg_exportStore_6122bc835ba1335e: function(arg0, arg1) {
|
|
23924
24237
|
const ret = exportStore(getStringFromWasm0(arg0, arg1));
|
|
23925
24238
|
return ret;
|
|
23926
24239
|
},
|
|
@@ -23952,7 +24265,7 @@ function __wbg_get_imports(memory) {
|
|
|
23952
24265
|
const ret = FetchedNote.__wrap(arg0);
|
|
23953
24266
|
return ret;
|
|
23954
24267
|
},
|
|
23955
|
-
|
|
24268
|
+
__wbg_forceImportStore_fee039594a1dd764: function(arg0, arg1, arg2) {
|
|
23956
24269
|
const ret = forceImportStore(getStringFromWasm0(arg0, arg1), arg2);
|
|
23957
24270
|
return ret;
|
|
23958
24271
|
},
|
|
@@ -23972,7 +24285,7 @@ function __wbg_get_imports(memory) {
|
|
|
23972
24285
|
const ret = FungibleAssetDeltaItem.__wrap(arg0);
|
|
23973
24286
|
return ret;
|
|
23974
24287
|
},
|
|
23975
|
-
|
|
24288
|
+
__wbg_getAccountAddresses_c2905210853e4c1d: function(arg0, arg1, arg2, arg3) {
|
|
23976
24289
|
let deferred0_0;
|
|
23977
24290
|
let deferred0_1;
|
|
23978
24291
|
try {
|
|
@@ -23984,7 +24297,7 @@ function __wbg_get_imports(memory) {
|
|
|
23984
24297
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
23985
24298
|
}
|
|
23986
24299
|
},
|
|
23987
|
-
|
|
24300
|
+
__wbg_getAccountAuthByPubKeyCommitment_aa1c1ea910be8702: function(arg0, arg1, arg2, arg3) {
|
|
23988
24301
|
let deferred0_0;
|
|
23989
24302
|
let deferred0_1;
|
|
23990
24303
|
try {
|
|
@@ -23996,7 +24309,7 @@ function __wbg_get_imports(memory) {
|
|
|
23996
24309
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
23997
24310
|
}
|
|
23998
24311
|
},
|
|
23999
|
-
|
|
24312
|
+
__wbg_getAccountCode_624d99224830e698: function(arg0, arg1, arg2, arg3) {
|
|
24000
24313
|
let deferred0_0;
|
|
24001
24314
|
let deferred0_1;
|
|
24002
24315
|
try {
|
|
@@ -24008,7 +24321,7 @@ function __wbg_get_imports(memory) {
|
|
|
24008
24321
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24009
24322
|
}
|
|
24010
24323
|
},
|
|
24011
|
-
|
|
24324
|
+
__wbg_getAccountHeaderByCommitment_87400f84a64deb6f: function(arg0, arg1, arg2, arg3) {
|
|
24012
24325
|
let deferred0_0;
|
|
24013
24326
|
let deferred0_1;
|
|
24014
24327
|
try {
|
|
@@ -24020,7 +24333,7 @@ function __wbg_get_imports(memory) {
|
|
|
24020
24333
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24021
24334
|
}
|
|
24022
24335
|
},
|
|
24023
|
-
|
|
24336
|
+
__wbg_getAccountHeader_1bfe2e4c80c39a5a: function(arg0, arg1, arg2, arg3) {
|
|
24024
24337
|
let deferred0_0;
|
|
24025
24338
|
let deferred0_1;
|
|
24026
24339
|
try {
|
|
@@ -24032,7 +24345,7 @@ function __wbg_get_imports(memory) {
|
|
|
24032
24345
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24033
24346
|
}
|
|
24034
24347
|
},
|
|
24035
|
-
|
|
24348
|
+
__wbg_getAccountIdByKeyCommitment_119e889c02d0a383: function(arg0, arg1, arg2, arg3) {
|
|
24036
24349
|
let deferred0_0;
|
|
24037
24350
|
let deferred0_1;
|
|
24038
24351
|
try {
|
|
@@ -24044,11 +24357,11 @@ function __wbg_get_imports(memory) {
|
|
|
24044
24357
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24045
24358
|
}
|
|
24046
24359
|
},
|
|
24047
|
-
|
|
24360
|
+
__wbg_getAccountIds_b7c51b913d5bf21d: function(arg0, arg1) {
|
|
24048
24361
|
const ret = getAccountIds(getStringFromWasm0(arg0, arg1));
|
|
24049
24362
|
return ret;
|
|
24050
24363
|
},
|
|
24051
|
-
|
|
24364
|
+
__wbg_getAccountStorageMaps_ea32cd8cf6fc6297: function(arg0, arg1, arg2, arg3) {
|
|
24052
24365
|
let deferred0_0;
|
|
24053
24366
|
let deferred0_1;
|
|
24054
24367
|
try {
|
|
@@ -24060,7 +24373,7 @@ function __wbg_get_imports(memory) {
|
|
|
24060
24373
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24061
24374
|
}
|
|
24062
24375
|
},
|
|
24063
|
-
|
|
24376
|
+
__wbg_getAccountStorage_277a00af1ae659dd: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
24064
24377
|
let deferred0_0;
|
|
24065
24378
|
let deferred0_1;
|
|
24066
24379
|
try {
|
|
@@ -24074,7 +24387,7 @@ function __wbg_get_imports(memory) {
|
|
|
24074
24387
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24075
24388
|
}
|
|
24076
24389
|
},
|
|
24077
|
-
|
|
24390
|
+
__wbg_getAccountVaultAssets_e588f7c19992bf5a: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
24078
24391
|
let deferred0_0;
|
|
24079
24392
|
let deferred0_1;
|
|
24080
24393
|
try {
|
|
@@ -24088,23 +24401,27 @@ function __wbg_get_imports(memory) {
|
|
|
24088
24401
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24089
24402
|
}
|
|
24090
24403
|
},
|
|
24091
|
-
|
|
24404
|
+
__wbg_getAllAccountHeaders_cc5df55ad899e5ca: function(arg0, arg1) {
|
|
24092
24405
|
const ret = getAllAccountHeaders(getStringFromWasm0(arg0, arg1));
|
|
24093
24406
|
return ret;
|
|
24094
24407
|
},
|
|
24095
|
-
|
|
24408
|
+
__wbg_getBlockHeaders_08a8804e4b3ff442: function(arg0, arg1, arg2, arg3) {
|
|
24096
24409
|
var v0 = getArrayU32FromWasm0(arg2, arg3).slice();
|
|
24097
24410
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
24098
24411
|
const ret = getBlockHeaders(getStringFromWasm0(arg0, arg1), v0);
|
|
24099
24412
|
return ret;
|
|
24100
24413
|
},
|
|
24101
|
-
|
|
24414
|
+
__wbg_getCurrentBlockchainPeaks_f0d990ec54236a85: function(arg0, arg1) {
|
|
24415
|
+
const ret = getCurrentBlockchainPeaks(getStringFromWasm0(arg0, arg1));
|
|
24416
|
+
return ret;
|
|
24417
|
+
},
|
|
24418
|
+
__wbg_getForeignAccountCode_d4d803c5248469e8: function(arg0, arg1, arg2, arg3) {
|
|
24102
24419
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
24103
24420
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
24104
24421
|
const ret = getForeignAccountCode(getStringFromWasm0(arg0, arg1), v0);
|
|
24105
24422
|
return ret;
|
|
24106
24423
|
},
|
|
24107
|
-
|
|
24424
|
+
__wbg_getInputNoteByOffset_a1163c6c190c7bc0: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
|
|
24108
24425
|
let deferred1_0;
|
|
24109
24426
|
let deferred1_1;
|
|
24110
24427
|
try {
|
|
@@ -24118,25 +24435,25 @@ function __wbg_get_imports(memory) {
|
|
|
24118
24435
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
24119
24436
|
}
|
|
24120
24437
|
},
|
|
24121
|
-
|
|
24438
|
+
__wbg_getInputNotesFromIds_c19092f0da179fdf: function(arg0, arg1, arg2, arg3) {
|
|
24122
24439
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
24123
24440
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
24124
24441
|
const ret = getInputNotesFromIds(getStringFromWasm0(arg0, arg1), v0);
|
|
24125
24442
|
return ret;
|
|
24126
24443
|
},
|
|
24127
|
-
|
|
24444
|
+
__wbg_getInputNotesFromNullifiers_ef5e3e241e8f14b9: function(arg0, arg1, arg2, arg3) {
|
|
24128
24445
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
24129
24446
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
24130
24447
|
const ret = getInputNotesFromNullifiers(getStringFromWasm0(arg0, arg1), v0);
|
|
24131
24448
|
return ret;
|
|
24132
24449
|
},
|
|
24133
|
-
|
|
24450
|
+
__wbg_getInputNotes_9a2890b2c05db53e: function(arg0, arg1, arg2, arg3) {
|
|
24134
24451
|
var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
|
|
24135
24452
|
wasm.__wbindgen_free(arg2, arg3 * 1, 1);
|
|
24136
24453
|
const ret = getInputNotes(getStringFromWasm0(arg0, arg1), v0);
|
|
24137
24454
|
return ret;
|
|
24138
24455
|
},
|
|
24139
|
-
|
|
24456
|
+
__wbg_getKeyCommitmentsByAccountId_98d1052aa93e54d1: function(arg0, arg1, arg2, arg3) {
|
|
24140
24457
|
let deferred0_0;
|
|
24141
24458
|
let deferred0_1;
|
|
24142
24459
|
try {
|
|
@@ -24148,7 +24465,7 @@ function __wbg_get_imports(memory) {
|
|
|
24148
24465
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24149
24466
|
}
|
|
24150
24467
|
},
|
|
24151
|
-
|
|
24468
|
+
__wbg_getNoteScript_f33c8718fc90d2c4: function(arg0, arg1, arg2, arg3) {
|
|
24152
24469
|
let deferred0_0;
|
|
24153
24470
|
let deferred0_1;
|
|
24154
24471
|
try {
|
|
@@ -24160,33 +24477,33 @@ function __wbg_get_imports(memory) {
|
|
|
24160
24477
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24161
24478
|
}
|
|
24162
24479
|
},
|
|
24163
|
-
|
|
24480
|
+
__wbg_getNoteTags_e2ed88e636d0ad2a: function(arg0, arg1) {
|
|
24164
24481
|
const ret = getNoteTags(getStringFromWasm0(arg0, arg1));
|
|
24165
24482
|
return ret;
|
|
24166
24483
|
},
|
|
24167
|
-
|
|
24484
|
+
__wbg_getOutputNotesFromIds_1cfcb787c56927d6: function(arg0, arg1, arg2, arg3) {
|
|
24168
24485
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
24169
24486
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
24170
24487
|
const ret = getOutputNotesFromIds(getStringFromWasm0(arg0, arg1), v0);
|
|
24171
24488
|
return ret;
|
|
24172
24489
|
},
|
|
24173
|
-
|
|
24490
|
+
__wbg_getOutputNotesFromNullifiers_ab2d0529c918ceb6: function(arg0, arg1, arg2, arg3) {
|
|
24174
24491
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
24175
24492
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
24176
24493
|
const ret = getOutputNotesFromNullifiers(getStringFromWasm0(arg0, arg1), v0);
|
|
24177
24494
|
return ret;
|
|
24178
24495
|
},
|
|
24179
|
-
|
|
24496
|
+
__wbg_getOutputNotes_3ce2621bbaa0b67a: function(arg0, arg1, arg2, arg3) {
|
|
24180
24497
|
var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
|
|
24181
24498
|
wasm.__wbindgen_free(arg2, arg3 * 1, 1);
|
|
24182
24499
|
const ret = getOutputNotes(getStringFromWasm0(arg0, arg1), v0);
|
|
24183
24500
|
return ret;
|
|
24184
24501
|
},
|
|
24185
|
-
|
|
24502
|
+
__wbg_getPartialBlockchainNodesAll_97b2296b6f446165: function(arg0, arg1) {
|
|
24186
24503
|
const ret = getPartialBlockchainNodesAll(getStringFromWasm0(arg0, arg1));
|
|
24187
24504
|
return ret;
|
|
24188
24505
|
},
|
|
24189
|
-
|
|
24506
|
+
__wbg_getPartialBlockchainNodesUpToInOrderIndex_a00a947793bcac3c: function(arg0, arg1, arg2, arg3) {
|
|
24190
24507
|
let deferred0_0;
|
|
24191
24508
|
let deferred0_1;
|
|
24192
24509
|
try {
|
|
@@ -24198,16 +24515,12 @@ function __wbg_get_imports(memory) {
|
|
|
24198
24515
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24199
24516
|
}
|
|
24200
24517
|
},
|
|
24201
|
-
|
|
24518
|
+
__wbg_getPartialBlockchainNodes_ed95c0aed168e0bd: function(arg0, arg1, arg2, arg3) {
|
|
24202
24519
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
24203
24520
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
24204
24521
|
const ret = getPartialBlockchainNodes(getStringFromWasm0(arg0, arg1), v0);
|
|
24205
24522
|
return ret;
|
|
24206
24523
|
},
|
|
24207
|
-
__wbg_getPartialBlockchainPeaksByBlockNum_5a9240ed1087ee15: function(arg0, arg1, arg2) {
|
|
24208
|
-
const ret = getPartialBlockchainPeaksByBlockNum(getStringFromWasm0(arg0, arg1), arg2 >>> 0);
|
|
24209
|
-
return ret;
|
|
24210
|
-
},
|
|
24211
24524
|
__wbg_getRandomValues_ea728b1d79dae146: function() { return handleError(function (arg0) {
|
|
24212
24525
|
globalThis.crypto.getRandomValues(arg0);
|
|
24213
24526
|
}, arguments); },
|
|
@@ -24215,7 +24528,7 @@ function __wbg_get_imports(memory) {
|
|
|
24215
24528
|
const ret = arg0.getReader();
|
|
24216
24529
|
return ret;
|
|
24217
24530
|
}, arguments); },
|
|
24218
|
-
|
|
24531
|
+
__wbg_getSetting_ae10044e2d623298: function(arg0, arg1, arg2, arg3) {
|
|
24219
24532
|
let deferred0_0;
|
|
24220
24533
|
let deferred0_1;
|
|
24221
24534
|
try {
|
|
@@ -24227,7 +24540,7 @@ function __wbg_get_imports(memory) {
|
|
|
24227
24540
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24228
24541
|
}
|
|
24229
24542
|
},
|
|
24230
|
-
|
|
24543
|
+
__wbg_getSyncHeight_58fc6088ffc73f66: function(arg0, arg1) {
|
|
24231
24544
|
const ret = getSyncHeight(getStringFromWasm0(arg0, arg1));
|
|
24232
24545
|
return ret;
|
|
24233
24546
|
},
|
|
@@ -24235,15 +24548,15 @@ function __wbg_get_imports(memory) {
|
|
|
24235
24548
|
const ret = arg0.getTime();
|
|
24236
24549
|
return ret;
|
|
24237
24550
|
},
|
|
24238
|
-
|
|
24551
|
+
__wbg_getTrackedBlockHeaderNumbers_5ff16c5dbe739bda: function(arg0, arg1) {
|
|
24239
24552
|
const ret = getTrackedBlockHeaderNumbers(getStringFromWasm0(arg0, arg1));
|
|
24240
24553
|
return ret;
|
|
24241
24554
|
},
|
|
24242
|
-
|
|
24555
|
+
__wbg_getTrackedBlockHeaders_b20d19487c2d6df9: function(arg0, arg1) {
|
|
24243
24556
|
const ret = getTrackedBlockHeaders(getStringFromWasm0(arg0, arg1));
|
|
24244
24557
|
return ret;
|
|
24245
24558
|
},
|
|
24246
|
-
|
|
24559
|
+
__wbg_getTransactions_162de0ea1d0f2668: function(arg0, arg1, arg2, arg3) {
|
|
24247
24560
|
let deferred0_0;
|
|
24248
24561
|
let deferred0_1;
|
|
24249
24562
|
try {
|
|
@@ -24255,7 +24568,7 @@ function __wbg_get_imports(memory) {
|
|
|
24255
24568
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24256
24569
|
}
|
|
24257
24570
|
},
|
|
24258
|
-
|
|
24571
|
+
__wbg_getUnspentInputNoteNullifiers_252553121097b242: function(arg0, arg1) {
|
|
24259
24572
|
const ret = getUnspentInputNoteNullifiers(getStringFromWasm0(arg0, arg1));
|
|
24260
24573
|
return ret;
|
|
24261
24574
|
},
|
|
@@ -24299,7 +24612,7 @@ function __wbg_get_imports(memory) {
|
|
|
24299
24612
|
const ret = InputNoteRecord.__wrap(arg0);
|
|
24300
24613
|
return ret;
|
|
24301
24614
|
},
|
|
24302
|
-
|
|
24615
|
+
__wbg_insertAccountAddress_a6b2f038c55aee0a: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
24303
24616
|
let deferred0_0;
|
|
24304
24617
|
let deferred0_1;
|
|
24305
24618
|
try {
|
|
@@ -24313,7 +24626,7 @@ function __wbg_get_imports(memory) {
|
|
|
24313
24626
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24314
24627
|
}
|
|
24315
24628
|
},
|
|
24316
|
-
|
|
24629
|
+
__wbg_insertAccountAuth_adb2bbf98e1c34d4: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
24317
24630
|
let deferred0_0;
|
|
24318
24631
|
let deferred0_1;
|
|
24319
24632
|
let deferred1_0;
|
|
@@ -24330,7 +24643,7 @@ function __wbg_get_imports(memory) {
|
|
|
24330
24643
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
24331
24644
|
}
|
|
24332
24645
|
},
|
|
24333
|
-
|
|
24646
|
+
__wbg_insertAccountKeyMapping_47e616ac5977fb9c: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
24334
24647
|
let deferred0_0;
|
|
24335
24648
|
let deferred0_1;
|
|
24336
24649
|
let deferred1_0;
|
|
@@ -24347,15 +24660,13 @@ function __wbg_get_imports(memory) {
|
|
|
24347
24660
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
24348
24661
|
}
|
|
24349
24662
|
},
|
|
24350
|
-
|
|
24663
|
+
__wbg_insertBlockHeader_23b7b30d0614926f: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
24351
24664
|
var v0 = getArrayU8FromWasm0(arg3, arg4).slice();
|
|
24352
24665
|
wasm.__wbindgen_free(arg3, arg4 * 1, 1);
|
|
24353
|
-
|
|
24354
|
-
wasm.__wbindgen_free(arg5, arg6 * 1, 1);
|
|
24355
|
-
const ret = insertBlockHeader(getStringFromWasm0(arg0, arg1), arg2 >>> 0, v0, v1, arg7 !== 0);
|
|
24666
|
+
const ret = insertBlockHeader(getStringFromWasm0(arg0, arg1), arg2 >>> 0, v0, arg5 !== 0);
|
|
24356
24667
|
return ret;
|
|
24357
24668
|
},
|
|
24358
|
-
|
|
24669
|
+
__wbg_insertPartialBlockchainNodes_403400ec217229f2: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
24359
24670
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
24360
24671
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
24361
24672
|
var v1 = getArrayJsValueFromWasm0(arg4, arg5).slice();
|
|
@@ -24363,7 +24674,7 @@ function __wbg_get_imports(memory) {
|
|
|
24363
24674
|
const ret = insertPartialBlockchainNodes(getStringFromWasm0(arg0, arg1), v0, v1);
|
|
24364
24675
|
return ret;
|
|
24365
24676
|
},
|
|
24366
|
-
|
|
24677
|
+
__wbg_insertSetting_fcdab04463e418b0: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
24367
24678
|
let deferred0_0;
|
|
24368
24679
|
let deferred0_1;
|
|
24369
24680
|
try {
|
|
@@ -24377,7 +24688,7 @@ function __wbg_get_imports(memory) {
|
|
|
24377
24688
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24378
24689
|
}
|
|
24379
24690
|
},
|
|
24380
|
-
|
|
24691
|
+
__wbg_insertTransactionScript_a97df45bc8841578: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
24381
24692
|
var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
|
|
24382
24693
|
wasm.__wbindgen_free(arg2, arg3 * 1, 1);
|
|
24383
24694
|
let v1;
|
|
@@ -24480,11 +24791,11 @@ function __wbg_get_imports(memory) {
|
|
|
24480
24791
|
const ret = arg0.length;
|
|
24481
24792
|
return ret;
|
|
24482
24793
|
},
|
|
24483
|
-
|
|
24794
|
+
__wbg_listSettingKeys_aa9e036a0e93602e: function(arg0, arg1) {
|
|
24484
24795
|
const ret = listSettingKeys(getStringFromWasm0(arg0, arg1));
|
|
24485
24796
|
return ret;
|
|
24486
24797
|
},
|
|
24487
|
-
|
|
24798
|
+
__wbg_lockAccount_00786cae6f7ea636: function(arg0, arg1, arg2, arg3) {
|
|
24488
24799
|
let deferred0_0;
|
|
24489
24800
|
let deferred0_1;
|
|
24490
24801
|
try {
|
|
@@ -24537,6 +24848,10 @@ function __wbg_get_imports(memory) {
|
|
|
24537
24848
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
24538
24849
|
}
|
|
24539
24850
|
}, arguments); },
|
|
24851
|
+
__wbg_networknotestatusinfo_new: function(arg0) {
|
|
24852
|
+
const ret = NetworkNoteStatusInfo.__wrap(arg0);
|
|
24853
|
+
return ret;
|
|
24854
|
+
},
|
|
24540
24855
|
__wbg_new_0_73afc35eb544e539: function() {
|
|
24541
24856
|
const ret = new Date();
|
|
24542
24857
|
return ret;
|
|
@@ -24576,7 +24891,7 @@ function __wbg_get_imports(memory) {
|
|
|
24576
24891
|
const a = state0.a;
|
|
24577
24892
|
state0.a = 0;
|
|
24578
24893
|
try {
|
|
24579
|
-
return
|
|
24894
|
+
return wasm_bindgen_9615981aab4586b0___convert__closures_____invoke___wasm_bindgen_9615981aab4586b0___JsValue__wasm_bindgen_9615981aab4586b0___JsValue_____(a, state0.b, arg0, arg1);
|
|
24580
24895
|
} finally {
|
|
24581
24896
|
state0.a = a;
|
|
24582
24897
|
}
|
|
@@ -24635,6 +24950,10 @@ function __wbg_get_imports(memory) {
|
|
|
24635
24950
|
const ret = NoteAndArgs.__unwrap(arg0);
|
|
24636
24951
|
return ret;
|
|
24637
24952
|
},
|
|
24953
|
+
__wbg_noteattachment_new: function(arg0) {
|
|
24954
|
+
const ret = NoteAttachment.__wrap(arg0);
|
|
24955
|
+
return ret;
|
|
24956
|
+
},
|
|
24638
24957
|
__wbg_noteconsumability_new: function(arg0) {
|
|
24639
24958
|
const ret = NoteConsumability.__wrap(arg0);
|
|
24640
24959
|
return ret;
|
|
@@ -24691,7 +25010,7 @@ function __wbg_get_imports(memory) {
|
|
|
24691
25010
|
const ret = Array.of(arg0, arg1, arg2);
|
|
24692
25011
|
return ret;
|
|
24693
25012
|
},
|
|
24694
|
-
|
|
25013
|
+
__wbg_openDatabase_8cdde169e05fa396: function(arg0, arg1, arg2, arg3) {
|
|
24695
25014
|
const ret = openDatabase(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
|
|
24696
25015
|
return ret;
|
|
24697
25016
|
},
|
|
@@ -24725,7 +25044,7 @@ function __wbg_get_imports(memory) {
|
|
|
24725
25044
|
const ret = ProvenTransaction.__wrap(arg0);
|
|
24726
25045
|
return ret;
|
|
24727
25046
|
},
|
|
24728
|
-
|
|
25047
|
+
__wbg_pruneAccountHistory_77197f52f4287754: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
24729
25048
|
let deferred0_0;
|
|
24730
25049
|
let deferred0_1;
|
|
24731
25050
|
let deferred1_0;
|
|
@@ -24742,8 +25061,12 @@ function __wbg_get_imports(memory) {
|
|
|
24742
25061
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
24743
25062
|
}
|
|
24744
25063
|
},
|
|
24745
|
-
|
|
24746
|
-
|
|
25064
|
+
__wbg_pruneIrrelevantBlocks_649b0446c426cb86: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
25065
|
+
var v0 = getArrayU32FromWasm0(arg2, arg3).slice();
|
|
25066
|
+
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
25067
|
+
var v1 = getArrayJsValueFromWasm0(arg4, arg5).slice();
|
|
25068
|
+
wasm.__wbindgen_free(arg4, arg5 * 4, 4);
|
|
25069
|
+
const ret = pruneIrrelevantBlocks(getStringFromWasm0(arg0, arg1), v0, v1);
|
|
24747
25070
|
return ret;
|
|
24748
25071
|
},
|
|
24749
25072
|
__wbg_queueMicrotask_0aa0a927f78f5d98: function(arg0) {
|
|
@@ -24760,13 +25083,13 @@ function __wbg_get_imports(memory) {
|
|
|
24760
25083
|
__wbg_releaseLock_aa5846c2494b3032: function(arg0) {
|
|
24761
25084
|
arg0.releaseLock();
|
|
24762
25085
|
},
|
|
24763
|
-
|
|
25086
|
+
__wbg_removeAccountAddress_fc888f883a71bd4f: function(arg0, arg1, arg2, arg3) {
|
|
24764
25087
|
var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
|
|
24765
25088
|
wasm.__wbindgen_free(arg2, arg3 * 1, 1);
|
|
24766
25089
|
const ret = removeAccountAddress(getStringFromWasm0(arg0, arg1), v0);
|
|
24767
25090
|
return ret;
|
|
24768
25091
|
},
|
|
24769
|
-
|
|
25092
|
+
__wbg_removeAccountAuth_8f11e01dd6099b42: function(arg0, arg1, arg2, arg3) {
|
|
24770
25093
|
let deferred0_0;
|
|
24771
25094
|
let deferred0_1;
|
|
24772
25095
|
try {
|
|
@@ -24778,7 +25101,7 @@ function __wbg_get_imports(memory) {
|
|
|
24778
25101
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24779
25102
|
}
|
|
24780
25103
|
},
|
|
24781
|
-
|
|
25104
|
+
__wbg_removeAllMappingsForKey_1fd0c55cb2cd0b61: function(arg0, arg1, arg2, arg3) {
|
|
24782
25105
|
let deferred0_0;
|
|
24783
25106
|
let deferred0_1;
|
|
24784
25107
|
try {
|
|
@@ -24790,7 +25113,7 @@ function __wbg_get_imports(memory) {
|
|
|
24790
25113
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
24791
25114
|
}
|
|
24792
25115
|
},
|
|
24793
|
-
|
|
25116
|
+
__wbg_removeNoteTag_77e6e3497d921600: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
24794
25117
|
var v0 = getArrayU8FromWasm0(arg2, arg3).slice();
|
|
24795
25118
|
wasm.__wbindgen_free(arg2, arg3 * 1, 1);
|
|
24796
25119
|
let v1;
|
|
@@ -24806,7 +25129,7 @@ function __wbg_get_imports(memory) {
|
|
|
24806
25129
|
const ret = removeNoteTag(getStringFromWasm0(arg0, arg1), v0, v1, v2);
|
|
24807
25130
|
return ret;
|
|
24808
25131
|
},
|
|
24809
|
-
|
|
25132
|
+
__wbg_removeSetting_39da4a2d256af0e2: function(arg0, arg1, arg2, arg3) {
|
|
24810
25133
|
let deferred0_0;
|
|
24811
25134
|
let deferred0_1;
|
|
24812
25135
|
try {
|
|
@@ -24949,6 +25272,10 @@ function __wbg_get_imports(memory) {
|
|
|
24949
25272
|
const ret = StorageMapEntry.__wrap(arg0);
|
|
24950
25273
|
return ret;
|
|
24951
25274
|
},
|
|
25275
|
+
__wbg_storagemapentryjs_new: function(arg0) {
|
|
25276
|
+
const ret = StorageMapEntryJs.__wrap(arg0);
|
|
25277
|
+
return ret;
|
|
25278
|
+
},
|
|
24952
25279
|
__wbg_storagemapinfo_new: function(arg0) {
|
|
24953
25280
|
const ret = StorageMapInfo.__wrap(arg0);
|
|
24954
25281
|
return ret;
|
|
@@ -24989,6 +25316,10 @@ function __wbg_get_imports(memory) {
|
|
|
24989
25316
|
const ret = TransactionRecord.__wrap(arg0);
|
|
24990
25317
|
return ret;
|
|
24991
25318
|
},
|
|
25319
|
+
__wbg_transactionrequest_new: function(arg0) {
|
|
25320
|
+
const ret = TransactionRequest.__wrap(arg0);
|
|
25321
|
+
return ret;
|
|
25322
|
+
},
|
|
24992
25323
|
__wbg_transactionresult_new: function(arg0) {
|
|
24993
25324
|
const ret = TransactionResult.__wrap(arg0);
|
|
24994
25325
|
return ret;
|
|
@@ -25005,13 +25336,13 @@ function __wbg_get_imports(memory) {
|
|
|
25005
25336
|
const ret = TransactionSummary.__wrap(arg0);
|
|
25006
25337
|
return ret;
|
|
25007
25338
|
},
|
|
25008
|
-
|
|
25339
|
+
__wbg_undoAccountStates_e36a3027b0d94828: function(arg0, arg1, arg2, arg3) {
|
|
25009
25340
|
var v0 = getArrayJsValueFromWasm0(arg2, arg3).slice();
|
|
25010
25341
|
wasm.__wbindgen_free(arg2, arg3 * 4, 4);
|
|
25011
25342
|
const ret = undoAccountStates(getStringFromWasm0(arg0, arg1), v0);
|
|
25012
25343
|
return ret;
|
|
25013
25344
|
},
|
|
25014
|
-
|
|
25345
|
+
__wbg_upsertAccountCode_a57f0b2098ba7190: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
25015
25346
|
let deferred0_0;
|
|
25016
25347
|
let deferred0_1;
|
|
25017
25348
|
try {
|
|
@@ -25025,7 +25356,7 @@ function __wbg_get_imports(memory) {
|
|
|
25025
25356
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25026
25357
|
}
|
|
25027
25358
|
},
|
|
25028
|
-
|
|
25359
|
+
__wbg_upsertAccountRecord_3fb1a14436632f21: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16) {
|
|
25029
25360
|
let deferred0_0;
|
|
25030
25361
|
let deferred0_1;
|
|
25031
25362
|
let deferred1_0;
|
|
@@ -25067,7 +25398,7 @@ function __wbg_get_imports(memory) {
|
|
|
25067
25398
|
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
25068
25399
|
}
|
|
25069
25400
|
},
|
|
25070
|
-
|
|
25401
|
+
__wbg_upsertAccountStorage_cd428602fca677b1: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
25071
25402
|
let deferred0_0;
|
|
25072
25403
|
let deferred0_1;
|
|
25073
25404
|
try {
|
|
@@ -25081,7 +25412,7 @@ function __wbg_get_imports(memory) {
|
|
|
25081
25412
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25082
25413
|
}
|
|
25083
25414
|
},
|
|
25084
|
-
|
|
25415
|
+
__wbg_upsertForeignAccountCode_ea1c872f50b83cf7: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
25085
25416
|
let deferred0_0;
|
|
25086
25417
|
let deferred0_1;
|
|
25087
25418
|
let deferred2_0;
|
|
@@ -25100,49 +25431,56 @@ function __wbg_get_imports(memory) {
|
|
|
25100
25431
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
25101
25432
|
}
|
|
25102
25433
|
},
|
|
25103
|
-
|
|
25434
|
+
__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) {
|
|
25104
25435
|
let deferred0_0;
|
|
25105
25436
|
let deferred0_1;
|
|
25106
|
-
let deferred4_0;
|
|
25107
|
-
let deferred4_1;
|
|
25108
25437
|
let deferred6_0;
|
|
25109
25438
|
let deferred6_1;
|
|
25110
|
-
let
|
|
25111
|
-
let
|
|
25439
|
+
let deferred8_0;
|
|
25440
|
+
let deferred8_1;
|
|
25441
|
+
let deferred9_0;
|
|
25442
|
+
let deferred9_1;
|
|
25112
25443
|
try {
|
|
25113
25444
|
deferred0_0 = arg2;
|
|
25114
25445
|
deferred0_1 = arg3;
|
|
25115
|
-
|
|
25116
|
-
|
|
25446
|
+
let v1;
|
|
25447
|
+
if (arg4 !== 0) {
|
|
25448
|
+
v1 = getStringFromWasm0(arg4, arg5).slice();
|
|
25449
|
+
wasm.__wbindgen_free(arg4, arg5 * 1, 1);
|
|
25450
|
+
}
|
|
25117
25451
|
var v2 = getArrayU8FromWasm0(arg6, arg7).slice();
|
|
25118
25452
|
wasm.__wbindgen_free(arg6, arg7 * 1, 1);
|
|
25119
25453
|
var v3 = getArrayU8FromWasm0(arg8, arg9).slice();
|
|
25120
25454
|
wasm.__wbindgen_free(arg8, arg9 * 1, 1);
|
|
25121
|
-
|
|
25122
|
-
|
|
25455
|
+
var v4 = getArrayU8FromWasm0(arg10, arg11).slice();
|
|
25456
|
+
wasm.__wbindgen_free(arg10, arg11 * 1, 1);
|
|
25123
25457
|
var v5 = getArrayU8FromWasm0(arg12, arg13).slice();
|
|
25124
25458
|
wasm.__wbindgen_free(arg12, arg13 * 1, 1);
|
|
25125
25459
|
deferred6_0 = arg14;
|
|
25126
25460
|
deferred6_1 = arg15;
|
|
25127
|
-
|
|
25128
|
-
|
|
25129
|
-
|
|
25130
|
-
|
|
25131
|
-
|
|
25132
|
-
|
|
25133
|
-
|
|
25134
|
-
|
|
25461
|
+
var v7 = getArrayU8FromWasm0(arg16, arg17).slice();
|
|
25462
|
+
wasm.__wbindgen_free(arg16, arg17 * 1, 1);
|
|
25463
|
+
deferred8_0 = arg18;
|
|
25464
|
+
deferred8_1 = arg19;
|
|
25465
|
+
deferred9_0 = arg20;
|
|
25466
|
+
deferred9_1 = arg21;
|
|
25467
|
+
var v10 = getArrayU8FromWasm0(arg23, arg24).slice();
|
|
25468
|
+
wasm.__wbindgen_free(arg23, arg24 * 1, 1);
|
|
25469
|
+
let v11;
|
|
25470
|
+
if (arg27 !== 0) {
|
|
25471
|
+
v11 = getStringFromWasm0(arg27, arg28).slice();
|
|
25472
|
+
wasm.__wbindgen_free(arg27, arg28 * 1, 1);
|
|
25135
25473
|
}
|
|
25136
|
-
const ret = upsertInputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), v1, v2, v3, getStringFromWasm0(
|
|
25474
|
+
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);
|
|
25137
25475
|
return ret;
|
|
25138
25476
|
} finally {
|
|
25139
25477
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25140
|
-
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
25141
25478
|
wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
|
|
25142
|
-
wasm.__wbindgen_free(
|
|
25479
|
+
wasm.__wbindgen_free(deferred8_0, deferred8_1, 1);
|
|
25480
|
+
wasm.__wbindgen_free(deferred9_0, deferred9_1, 1);
|
|
25143
25481
|
}
|
|
25144
25482
|
},
|
|
25145
|
-
|
|
25483
|
+
__wbg_upsertNoteScript_77ad6333fd8d09bd: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
25146
25484
|
let deferred0_0;
|
|
25147
25485
|
let deferred0_1;
|
|
25148
25486
|
try {
|
|
@@ -25156,35 +25494,37 @@ function __wbg_get_imports(memory) {
|
|
|
25156
25494
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25157
25495
|
}
|
|
25158
25496
|
},
|
|
25159
|
-
|
|
25497
|
+
__wbg_upsertOutputNote_086a8c1c81f11d3c: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17) {
|
|
25160
25498
|
let deferred0_0;
|
|
25161
25499
|
let deferred0_1;
|
|
25162
|
-
let
|
|
25163
|
-
let
|
|
25500
|
+
let deferred3_0;
|
|
25501
|
+
let deferred3_1;
|
|
25164
25502
|
try {
|
|
25165
25503
|
deferred0_0 = arg2;
|
|
25166
25504
|
deferred0_1 = arg3;
|
|
25167
25505
|
var v1 = getArrayU8FromWasm0(arg4, arg5).slice();
|
|
25168
25506
|
wasm.__wbindgen_free(arg4, arg5 * 1, 1);
|
|
25169
|
-
|
|
25170
|
-
|
|
25171
|
-
|
|
25172
|
-
|
|
25173
|
-
|
|
25174
|
-
|
|
25175
|
-
|
|
25176
|
-
|
|
25507
|
+
var v2 = getArrayU8FromWasm0(arg6, arg7).slice();
|
|
25508
|
+
wasm.__wbindgen_free(arg6, arg7 * 1, 1);
|
|
25509
|
+
deferred3_0 = arg8;
|
|
25510
|
+
deferred3_1 = arg9;
|
|
25511
|
+
var v4 = getArrayU8FromWasm0(arg10, arg11).slice();
|
|
25512
|
+
wasm.__wbindgen_free(arg10, arg11 * 1, 1);
|
|
25513
|
+
let v5;
|
|
25514
|
+
if (arg12 !== 0) {
|
|
25515
|
+
v5 = getStringFromWasm0(arg12, arg13).slice();
|
|
25516
|
+
wasm.__wbindgen_free(arg12, arg13 * 1, 1);
|
|
25177
25517
|
}
|
|
25178
|
-
var
|
|
25179
|
-
wasm.__wbindgen_free(
|
|
25180
|
-
const ret = upsertOutputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), v1, getStringFromWasm0(
|
|
25518
|
+
var v6 = getArrayU8FromWasm0(arg16, arg17).slice();
|
|
25519
|
+
wasm.__wbindgen_free(arg16, arg17 * 1, 1);
|
|
25520
|
+
const ret = upsertOutputNote(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), v1, v2, getStringFromWasm0(arg8, arg9), v4, v5, arg14 >>> 0, arg15, v6);
|
|
25181
25521
|
return ret;
|
|
25182
25522
|
} finally {
|
|
25183
25523
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25184
|
-
wasm.__wbindgen_free(
|
|
25524
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
25185
25525
|
}
|
|
25186
25526
|
},
|
|
25187
|
-
|
|
25527
|
+
__wbg_upsertStorageMapEntries_068d8303824fff58: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
25188
25528
|
let deferred0_0;
|
|
25189
25529
|
let deferred0_1;
|
|
25190
25530
|
try {
|
|
@@ -25198,7 +25538,7 @@ function __wbg_get_imports(memory) {
|
|
|
25198
25538
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25199
25539
|
}
|
|
25200
25540
|
},
|
|
25201
|
-
|
|
25541
|
+
__wbg_upsertTransactionRecord_a285bd5d3fd5a278: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) {
|
|
25202
25542
|
let deferred0_0;
|
|
25203
25543
|
let deferred0_1;
|
|
25204
25544
|
try {
|
|
@@ -25219,7 +25559,7 @@ function __wbg_get_imports(memory) {
|
|
|
25219
25559
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
25220
25560
|
}
|
|
25221
25561
|
},
|
|
25222
|
-
|
|
25562
|
+
__wbg_upsertVaultAssets_53ecfc329186db4e: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
25223
25563
|
let deferred0_0;
|
|
25224
25564
|
let deferred0_1;
|
|
25225
25565
|
try {
|
|
@@ -25262,18 +25602,18 @@ function __wbg_get_imports(memory) {
|
|
|
25262
25602
|
return ret;
|
|
25263
25603
|
},
|
|
25264
25604
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
25265
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
25266
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
25605
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 122, function: Function { arguments: [Externref], shim_idx: 123, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
25606
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_9615981aab4586b0___closure__destroy___dyn_core_91ed24bc3d45dfd0___ops__function__FnMut__wasm_bindgen_9615981aab4586b0___JsValue____Output_______, wasm_bindgen_9615981aab4586b0___convert__closures_____invoke___wasm_bindgen_9615981aab4586b0___JsValue_____);
|
|
25267
25607
|
return ret;
|
|
25268
25608
|
},
|
|
25269
25609
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
25270
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
25271
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
25610
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 122, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 123, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
25611
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_9615981aab4586b0___closure__destroy___dyn_core_91ed24bc3d45dfd0___ops__function__FnMut__wasm_bindgen_9615981aab4586b0___JsValue____Output_______, wasm_bindgen_9615981aab4586b0___convert__closures_____invoke___wasm_bindgen_9615981aab4586b0___JsValue_____);
|
|
25272
25612
|
return ret;
|
|
25273
25613
|
},
|
|
25274
25614
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
25275
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
25276
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
25615
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 122, function: Function { arguments: [], shim_idx: 444, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
25616
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_9615981aab4586b0___closure__destroy___dyn_core_91ed24bc3d45dfd0___ops__function__FnMut__wasm_bindgen_9615981aab4586b0___JsValue____Output_______, wasm_bindgen_9615981aab4586b0___convert__closures_____invoke______);
|
|
25277
25617
|
return ret;
|
|
25278
25618
|
},
|
|
25279
25619
|
__wbindgen_cast_0000000000000004: function(arg0) {
|
|
@@ -25384,7 +25724,7 @@ function __wbg_get_imports(memory) {
|
|
|
25384
25724
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
25385
25725
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
25386
25726
|
},
|
|
25387
|
-
memory: memory || new WebAssembly.Memory({initial:
|
|
25727
|
+
memory: memory || new WebAssembly.Memory({initial:59,maximum:65536,shared:true}),
|
|
25388
25728
|
};
|
|
25389
25729
|
return {
|
|
25390
25730
|
__proto__: null,
|
|
@@ -25392,16 +25732,16 @@ function __wbg_get_imports(memory) {
|
|
|
25392
25732
|
};
|
|
25393
25733
|
}
|
|
25394
25734
|
|
|
25395
|
-
function
|
|
25396
|
-
wasm.
|
|
25735
|
+
function wasm_bindgen_9615981aab4586b0___convert__closures_____invoke______(arg0, arg1) {
|
|
25736
|
+
wasm.wasm_bindgen_9615981aab4586b0___convert__closures_____invoke______(arg0, arg1);
|
|
25397
25737
|
}
|
|
25398
25738
|
|
|
25399
|
-
function
|
|
25400
|
-
wasm.
|
|
25739
|
+
function wasm_bindgen_9615981aab4586b0___convert__closures_____invoke___wasm_bindgen_9615981aab4586b0___JsValue_____(arg0, arg1, arg2) {
|
|
25740
|
+
wasm.wasm_bindgen_9615981aab4586b0___convert__closures_____invoke___wasm_bindgen_9615981aab4586b0___JsValue_____(arg0, arg1, arg2);
|
|
25401
25741
|
}
|
|
25402
25742
|
|
|
25403
|
-
function
|
|
25404
|
-
wasm.
|
|
25743
|
+
function wasm_bindgen_9615981aab4586b0___convert__closures_____invoke___wasm_bindgen_9615981aab4586b0___JsValue__wasm_bindgen_9615981aab4586b0___JsValue_____(arg0, arg1, arg2, arg3) {
|
|
25744
|
+
wasm.wasm_bindgen_9615981aab4586b0___convert__closures_____invoke___wasm_bindgen_9615981aab4586b0___JsValue__wasm_bindgen_9615981aab4586b0___JsValue_____(arg0, arg1, arg2, arg3);
|
|
25405
25745
|
}
|
|
25406
25746
|
|
|
25407
25747
|
|
|
@@ -25598,6 +25938,9 @@ const MerklePathFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
25598
25938
|
const NetworkIdFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
25599
25939
|
? { register: () => {}, unregister: () => {} }
|
|
25600
25940
|
: new FinalizationRegistry(ptr => wasm.__wbg_networkid_free(ptr >>> 0, 1));
|
|
25941
|
+
const NetworkNoteStatusInfoFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
25942
|
+
? { register: () => {}, unregister: () => {} }
|
|
25943
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_networknotestatusinfo_free(ptr >>> 0, 1));
|
|
25601
25944
|
const NoteFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
25602
25945
|
? { register: () => {}, unregister: () => {} }
|
|
25603
25946
|
: new FinalizationRegistry(ptr => wasm.__wbg_note_free(ptr >>> 0, 1));
|
|
@@ -25751,6 +26094,9 @@ const StorageMapFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
25751
26094
|
const StorageMapEntryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
25752
26095
|
? { register: () => {}, unregister: () => {} }
|
|
25753
26096
|
: new FinalizationRegistry(ptr => wasm.__wbg_storagemapentry_free(ptr >>> 0, 1));
|
|
26097
|
+
const StorageMapEntryJsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
26098
|
+
? { register: () => {}, unregister: () => {} }
|
|
26099
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_storagemapentryjs_free(ptr >>> 0, 1));
|
|
25754
26100
|
const StorageMapInfoFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
25755
26101
|
? { register: () => {}, unregister: () => {} }
|
|
25756
26102
|
: new FinalizationRegistry(ptr => wasm.__wbg_storagemapinfo_free(ptr >>> 0, 1));
|
|
@@ -26274,6 +26620,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
26274
26620
|
Library: Library,
|
|
26275
26621
|
MerklePath: MerklePath,
|
|
26276
26622
|
NetworkId: NetworkId,
|
|
26623
|
+
NetworkNoteStatusInfo: NetworkNoteStatusInfo,
|
|
26277
26624
|
NetworkType: NetworkType,
|
|
26278
26625
|
Note: Note,
|
|
26279
26626
|
NoteAndArgs: NoteAndArgs,
|
|
@@ -26281,7 +26628,6 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
26281
26628
|
NoteArray: NoteArray,
|
|
26282
26629
|
NoteAssets: NoteAssets,
|
|
26283
26630
|
NoteAttachment: NoteAttachment,
|
|
26284
|
-
NoteAttachmentKind: NoteAttachmentKind,
|
|
26285
26631
|
NoteAttachmentScheme: NoteAttachmentScheme,
|
|
26286
26632
|
NoteConsumability: NoteConsumability,
|
|
26287
26633
|
NoteConsumptionStatus: NoteConsumptionStatus,
|
|
@@ -26332,6 +26678,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
26332
26678
|
SparseMerklePath: SparseMerklePath,
|
|
26333
26679
|
StorageMap: StorageMap,
|
|
26334
26680
|
StorageMapEntry: StorageMapEntry,
|
|
26681
|
+
StorageMapEntryJs: StorageMapEntryJs,
|
|
26335
26682
|
StorageMapInfo: StorageMapInfo,
|
|
26336
26683
|
StorageMapUpdate: StorageMapUpdate,
|
|
26337
26684
|
StorageSlot: StorageSlot,
|
|
@@ -26372,7 +26719,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
26372
26719
|
|
|
26373
26720
|
const module$1 = new URL("assets/miden_client_web.wasm", self.location.href);
|
|
26374
26721
|
|
|
26375
|
-
var
|
|
26722
|
+
var CargoSmJQCGjz = /*#__PURE__*/Object.freeze({
|
|
26376
26723
|
__proto__: null,
|
|
26377
26724
|
Account: Account,
|
|
26378
26725
|
AccountArray: AccountArray,
|
|
@@ -26436,6 +26783,7 @@ var CargoCZopJ_X = /*#__PURE__*/Object.freeze({
|
|
|
26436
26783
|
Library: Library,
|
|
26437
26784
|
MerklePath: MerklePath,
|
|
26438
26785
|
NetworkId: NetworkId,
|
|
26786
|
+
NetworkNoteStatusInfo: NetworkNoteStatusInfo,
|
|
26439
26787
|
NetworkType: NetworkType,
|
|
26440
26788
|
Note: Note,
|
|
26441
26789
|
NoteAndArgs: NoteAndArgs,
|
|
@@ -26443,7 +26791,6 @@ var CargoCZopJ_X = /*#__PURE__*/Object.freeze({
|
|
|
26443
26791
|
NoteArray: NoteArray,
|
|
26444
26792
|
NoteAssets: NoteAssets,
|
|
26445
26793
|
NoteAttachment: NoteAttachment,
|
|
26446
|
-
NoteAttachmentKind: NoteAttachmentKind,
|
|
26447
26794
|
NoteAttachmentScheme: NoteAttachmentScheme,
|
|
26448
26795
|
NoteConsumability: NoteConsumability,
|
|
26449
26796
|
NoteConsumptionStatus: NoteConsumptionStatus,
|
|
@@ -26494,6 +26841,7 @@ var CargoCZopJ_X = /*#__PURE__*/Object.freeze({
|
|
|
26494
26841
|
SparseMerklePath: SparseMerklePath,
|
|
26495
26842
|
StorageMap: StorageMap,
|
|
26496
26843
|
StorageMapEntry: StorageMapEntry,
|
|
26844
|
+
StorageMapEntryJs: StorageMapEntryJs,
|
|
26497
26845
|
StorageMapInfo: StorageMapInfo,
|
|
26498
26846
|
StorageMapUpdate: StorageMapUpdate,
|
|
26499
26847
|
StorageSlot: StorageSlot,
|