@miden-sdk/miden-sdk 0.15.3 → 0.15.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.
Files changed (47) hide show
  1. package/README.md +85 -0
  2. package/dist/mt/{Cargo-D2qNRrNR.js → Cargo-C001gt8g.js} +587 -90
  3. package/dist/mt/Cargo-C001gt8g.js.map +1 -0
  4. package/dist/mt/api-types.d.ts +189 -0
  5. package/dist/mt/assets/miden_client_web.wasm +0 -0
  6. package/dist/mt/crates/miden_client_web.d.ts +153 -3
  7. package/dist/mt/docs-entry.d.ts +3 -0
  8. package/dist/mt/eager.js +1 -1
  9. package/dist/mt/index.d.ts +3 -0
  10. package/dist/mt/index.js +302 -13
  11. package/dist/mt/index.js.map +1 -1
  12. package/dist/mt/wasm.js +1 -1
  13. package/dist/mt/workerHelpers.js +1 -1
  14. package/dist/mt/workers/{Cargo-D2qNRrNR-n_GEbq73.js → Cargo-C001gt8g-B8wBADUI.js} +587 -90
  15. package/dist/mt/workers/Cargo-C001gt8g-B8wBADUI.js.map +1 -0
  16. package/dist/mt/workers/assets/miden_client_web.wasm +0 -0
  17. package/dist/mt/workers/web-client-methods-worker.js +589 -90
  18. package/dist/mt/workers/web-client-methods-worker.js.map +1 -1
  19. package/dist/mt/workers/web-client-methods-worker.module.js +1 -1
  20. package/dist/mt/workers/web-client-methods-worker.module.js.map +1 -1
  21. package/dist/mt/workers/workerHelpers.js +1 -1
  22. package/dist/st/{Cargo-BP7-0qVT.js → Cargo-CR1mzjgg.js} +593 -98
  23. package/dist/st/Cargo-CR1mzjgg.js.map +1 -0
  24. package/dist/st/api-types.d.ts +189 -0
  25. package/dist/st/assets/miden_client_web.wasm +0 -0
  26. package/dist/st/crates/miden_client_web.d.ts +153 -3
  27. package/dist/st/docs-entry.d.ts +3 -0
  28. package/dist/st/eager.js +1 -1
  29. package/dist/st/index.d.ts +3 -0
  30. package/dist/st/index.js +302 -13
  31. package/dist/st/index.js.map +1 -1
  32. package/dist/st/wasm.js +1 -1
  33. package/dist/st/workers/{Cargo-BP7-0qVT-CmfAy6bf.js → Cargo-CR1mzjgg-DeDmKA4W.js} +593 -98
  34. package/dist/st/workers/Cargo-CR1mzjgg-DeDmKA4W.js.map +1 -0
  35. package/dist/st/workers/assets/miden_client_web.wasm +0 -0
  36. package/dist/st/workers/web-client-methods-worker.js +595 -98
  37. package/dist/st/workers/web-client-methods-worker.js.map +1 -1
  38. package/dist/st/workers/web-client-methods-worker.module.js +1 -1
  39. package/dist/st/workers/web-client-methods-worker.module.js.map +1 -1
  40. package/js/node-index.js +4 -0
  41. package/js/resources/transactions.js +289 -12
  42. package/js/standalone.js +61 -0
  43. package/package.json +4 -4
  44. package/dist/mt/Cargo-D2qNRrNR.js.map +0 -1
  45. package/dist/mt/workers/Cargo-D2qNRrNR-n_GEbq73.js.map +0 -1
  46. package/dist/st/Cargo-BP7-0qVT.js.map +0 -1
  47. package/dist/st/workers/Cargo-BP7-0qVT-CmfAy6bf.js.map +0 -1
@@ -30,6 +30,9 @@ import type {
30
30
  AccountStorageRequirements,
31
31
  TransactionScript,
32
32
  NoteScript,
33
+ NoteRecipient,
34
+ NoteExecutionHint,
35
+ NetworkAccountTarget,
33
36
  AdviceInputs,
34
37
  FeltArray,
35
38
  PswapLineageRecord,
@@ -357,6 +360,48 @@ export interface SendResult {
357
360
  result: TransactionResult;
358
361
  }
359
362
 
363
+ /**
364
+ * Options for {@link TransactionsResource.createNetworkNote} and the standalone
365
+ * {@link buildNetworkNote}. Builds a Public, custom-script note carrying a
366
+ * `NetworkAccountTarget` attachment so a public network account auto-consumes it.
367
+ *
368
+ * Provide exactly one of `recipient` or `script`.
369
+ */
370
+ export interface NetworkNoteOptions extends TransactionOptions {
371
+ /** Account that creates, funds, and submits the note (the executing sender). */
372
+ account: AccountRef;
373
+ /**
374
+ * The network account the note targets. Any account reference, or a pre-built
375
+ * `NetworkAccountTarget`. Encoded as the note's `NetworkAccountTarget`
376
+ * attachment — this is what makes `isNetworkNote()` true.
377
+ */
378
+ target: AccountRef | NetworkAccountTarget;
379
+ /** Execution hint when `target` is an account reference. Defaults to `always`. */
380
+ executionHint?: NoteExecutionHint;
381
+ /**
382
+ * Recipient carrying the note's custom consumption script. Build with
383
+ * `new NoteRecipient(serialNum, noteScript, noteStorage)`, or omit and pass
384
+ * `script` to have the recipient built for you.
385
+ */
386
+ recipient?: NoteRecipient;
387
+ /** Custom consumption script; the recipient is built with a fresh serial number. */
388
+ script?: NoteScript;
389
+ /** Note storage / inputs the script reads (used with `script`). */
390
+ inputs?: bigint[];
391
+ /** Assets locked into the note. Optional — a note may carry no assets. */
392
+ assets?: Asset | Asset[];
393
+ /** Extra attachment payload appended AFTER the required `NetworkAccountTarget`. */
394
+ attachment?: bigint[];
395
+ }
396
+
397
+ /** Result of {@link TransactionsResource.createNetworkNote}. */
398
+ export interface NetworkNoteResult {
399
+ txId: TransactionId;
400
+ /** The built network note (read its id / attachments). */
401
+ note: Note;
402
+ result: TransactionResult;
403
+ }
404
+
360
405
  /** Result of methods that previously returned bare TransactionId. */
361
406
  export interface TransactionSubmitResult {
362
407
  txId: TransactionId;
@@ -374,6 +419,21 @@ export interface MintOptions extends TransactionOptions {
374
419
  type?: NoteVisibility;
375
420
  }
376
421
 
422
+ export interface BridgeOptions extends TransactionOptions {
423
+ /** Account that creates and funds the bridge note (the sender / executing account). */
424
+ account: AccountRef;
425
+ /** Bridge account that consumes the note and burns the bridged asset. */
426
+ bridgeAccount: AccountRef;
427
+ /** Faucet / token ID of the fungible asset to bridge. */
428
+ token: AccountRef;
429
+ /** Amount of the asset to bridge. */
430
+ amount: number | bigint;
431
+ /** AggLayer-assigned network ID of the destination chain. */
432
+ destinationNetwork: number;
433
+ /** Destination Ethereum address on the destination network (0x-prefixed hex). */
434
+ destinationAddress: string;
435
+ }
436
+
377
437
  export interface ConsumeOptions extends TransactionOptions {
378
438
  account: AccountRef;
379
439
  notes: NoteInput | NoteInput[];
@@ -384,6 +444,73 @@ export interface ConsumeAllOptions extends TransactionOptions {
384
444
  maxNotes?: number;
385
445
  }
386
446
 
447
+ /**
448
+ * A single operation inside a transaction batch. The shape mirrors the
449
+ * singular options types (`SendOptions`, `MintOptions`, ...) minus the
450
+ * `account` field — the executing account is set once at the batch level
451
+ * and shared by every operation (V1 single-account constraint).
452
+ */
453
+ export type BatchOperation =
454
+ | {
455
+ kind: "send";
456
+ to: AccountRef;
457
+ token: AccountRef;
458
+ amount: number | bigint;
459
+ type?: NoteVisibility;
460
+ reclaimAfter?: number;
461
+ timelockUntil?: number;
462
+ }
463
+ | {
464
+ kind: "mint";
465
+ to: AccountRef;
466
+ amount: number | bigint;
467
+ type?: NoteVisibility;
468
+ }
469
+ | {
470
+ kind: "consume";
471
+ notes: NoteInput | NoteInput[];
472
+ }
473
+ | {
474
+ kind: "swap";
475
+ offer: Asset;
476
+ request: Asset;
477
+ type?: NoteVisibility;
478
+ paybackType?: NoteVisibility;
479
+ }
480
+ | {
481
+ kind: "execute";
482
+ script: TransactionScript;
483
+ foreignAccounts?: (
484
+ | AccountRef
485
+ | { id: AccountRef; storage?: AccountStorageRequirements }
486
+ )[];
487
+ }
488
+ | {
489
+ /** Escape hatch for pre-built TransactionRequests. */
490
+ kind: "custom";
491
+ request: TransactionRequest;
492
+ };
493
+
494
+ export interface BatchOptions {
495
+ /** The account executing every operation in the batch (single-account in V1). */
496
+ account: AccountRef;
497
+ /** Operations to execute atomically as a batch. Must be non-empty. */
498
+ operations: BatchOperation[];
499
+ /**
500
+ * Wait until the batch's block has been observed in the local sync height.
501
+ * Differs from singular `waitForConfirmation`: the V1 batch API returns
502
+ * only a block number, so we poll chain height rather than per-tx status.
503
+ */
504
+ waitForConfirmation?: boolean;
505
+ /** Wall-clock polling timeout for `waitForConfirmation` (default 60_000ms). */
506
+ timeout?: number;
507
+ }
508
+
509
+ export interface BatchSubmitResult {
510
+ /** The block number the batch was accepted into. */
511
+ blockNumber: number;
512
+ }
513
+
387
514
  export interface SwapOptions extends TransactionOptions {
388
515
  account: AccountRef;
389
516
  offer: Asset;
@@ -484,6 +611,16 @@ export interface PreviewMintOptions {
484
611
  type?: NoteVisibility;
485
612
  }
486
613
 
614
+ export interface PreviewBridgeOptions {
615
+ operation: "bridge";
616
+ account: AccountRef;
617
+ bridgeAccount: AccountRef;
618
+ token: AccountRef;
619
+ amount: number | bigint;
620
+ destinationNetwork: number;
621
+ destinationAddress: string;
622
+ }
623
+
487
624
  export interface PreviewConsumeOptions {
488
625
  operation: "consume";
489
626
  account: AccountRef;
@@ -531,6 +668,7 @@ export interface PreviewCustomOptions {
531
668
  export type PreviewOptions =
532
669
  | PreviewSendOptions
533
670
  | PreviewMintOptions
671
+ | PreviewBridgeOptions
534
672
  | PreviewConsumeOptions
535
673
  | PreviewSwapOptions
536
674
  | PreviewPswapCreateOptions
@@ -730,6 +868,22 @@ export interface TransactionsResource {
730
868
  * @param options - Mint options including the faucet, recipient, and amount.
731
869
  */
732
870
  mint(options: MintOptions): Promise<TransactionSubmitResult>;
871
+ /**
872
+ * Builds a Public custom-script note carrying a `NetworkAccountTarget`
873
+ * attachment, submits it as an own output note, and (optionally) waits for
874
+ * confirmation. The submitted note satisfies `Note.isNetworkNote()`, so a
875
+ * public network account will auto-consume it.
876
+ */
877
+ createNetworkNote(options: NetworkNoteOptions): Promise<NetworkNoteResult>;
878
+ /**
879
+ * Bridge a fungible asset out to another network via the AggLayer. Emits a
880
+ * single public B2AGG (Bridge-to-AggLayer) note that the bridge account
881
+ * consumes, burning the asset so it can be claimed at the destination
882
+ * Ethereum address on the destination network.
883
+ *
884
+ * @param options - Sender, bridge account, token, amount, and destination.
885
+ */
886
+ bridge(options: BridgeOptions): Promise<TransactionSubmitResult>;
733
887
  /**
734
888
  * Consume one or more notes for an account.
735
889
  *
@@ -803,6 +957,34 @@ export interface TransactionsResource {
803
957
  options?: TransactionOptions
804
958
  ): Promise<TransactionSubmitResult>;
805
959
 
960
+ /**
961
+ * Execute a heterogeneous batch of operations against a single account.
962
+ * Each operation is built, proven individually and as a batch, and all
963
+ * operations are submitted atomically — either every tx in the batch
964
+ * lands or none does.
965
+ *
966
+ * V1 supports only same-account batches (mirrors the underlying Rust
967
+ * `Client::new_transaction_batch()` constraint).
968
+ *
969
+ * @param options - Batch options including the account and operations.
970
+ */
971
+ batch(options: BatchOptions): Promise<BatchSubmitResult>;
972
+
973
+ /**
974
+ * Submit pre-built TransactionRequests as an atomic batch. Plural
975
+ * counterpart of {@link submit} — for callers that already have built
976
+ * requests in hand and want to skip the high-level operation builders.
977
+ *
978
+ * @param account - The account executing every transaction in the batch.
979
+ * @param requests - Pre-built transaction requests (must be non-empty).
980
+ * @param options - Optional batch settings (waitForConfirmation, timeout, prover).
981
+ */
982
+ submitBatch(
983
+ account: AccountRef,
984
+ requests: TransactionRequest[],
985
+ options?: Omit<BatchOptions, "account" | "operations">
986
+ ): Promise<BatchSubmitResult>;
987
+
806
988
  /** Execute a program (view call) and return the resulting stack output. */
807
989
  executeProgram(options: ExecuteProgramOptions): Promise<FeltArray>;
808
990
 
@@ -1173,6 +1355,13 @@ export declare function createP2IDENote(
1173
1355
  options: P2IDEOptions
1174
1356
  ): ReturnType<WasmModule["Note"]["createP2IDENote"]>;
1175
1357
 
1358
+ /**
1359
+ * Builds (without submitting) a Public custom-script note carrying a
1360
+ * `NetworkAccountTarget` attachment. Provide exactly one of `recipient` or
1361
+ * `script`.
1362
+ */
1363
+ export declare function buildNetworkNote(opts: NetworkNoteOptions): Note;
1364
+
1176
1365
  /** Builds a swap tag for note matching. Returns a NoteTag (use `.asU32()` for the numeric value). */
1177
1366
  export declare function buildSwapTag(
1178
1367
  options: BuildSwapTagOptions
@@ -967,10 +967,13 @@ export class AuthSecretKey {
967
967
  }
968
968
 
969
969
  /**
970
- * Provides metadata for a basic fungible faucet account component.
970
+ * Provides metadata for a fungible faucet account component.
971
971
  *
972
- * Reads the on-chain [`FungibleFaucet`] component for the account, which holds the
973
- * per-token info (symbol/decimals/maxSupply).
972
+ * Reads the on-chain `FungibleFaucet` component for the account, which holds the per-token
973
+ * info (symbol, decimals, supply, and the descriptive metadata). The same component backs both
974
+ * "basic" public faucets and network-style faucets — in the current protocol the distinction is
975
+ * a function of the surrounding account configuration (account type, auth, access control), not
976
+ * of the faucet component itself — so this reads metadata from either kind of faucet account.
974
977
  */
975
978
  export class BasicFungibleFaucetComponent {
976
979
  private constructor();
@@ -980,10 +983,22 @@ export class BasicFungibleFaucetComponent {
980
983
  * Returns the number of decimal places for the token.
981
984
  */
982
985
  decimals(): number;
986
+ /**
987
+ * Returns the optional free-form token description, or `undefined` when unset.
988
+ */
989
+ description(): string | undefined;
990
+ /**
991
+ * Returns the optional external link (e.g. project website), or `undefined` when unset.
992
+ */
993
+ externalLink(): string | undefined;
983
994
  /**
984
995
  * Extracts faucet metadata from an account.
985
996
  */
986
997
  static fromAccount(account: Account): BasicFungibleFaucetComponent;
998
+ /**
999
+ * Returns the optional token logo URI, or `undefined` when unset.
1000
+ */
1001
+ logoUri(): string | undefined;
987
1002
  /**
988
1003
  * Returns the maximum token supply.
989
1004
  */
@@ -992,6 +1007,14 @@ export class BasicFungibleFaucetComponent {
992
1007
  * Returns the faucet's token symbol.
993
1008
  */
994
1009
  symbol(): TokenSymbol;
1010
+ /**
1011
+ * Returns the human-readable token name.
1012
+ */
1013
+ tokenName(): string;
1014
+ /**
1015
+ * Returns the current token supply (the amount minted so far).
1016
+ */
1017
+ tokenSupply(): Felt;
995
1018
  }
996
1019
 
997
1020
  /**
@@ -1242,6 +1265,43 @@ export class Endpoint {
1242
1265
  readonly protocol: string;
1243
1266
  }
1244
1267
 
1268
+ /**
1269
+ * A 20-byte Ethereum address, used as the destination of an `AggLayer` bridge-out (B2AGG) note.
1270
+ *
1271
+ * Construct one from a hex string with [`EthAddress::from_hex`] (the `0x` prefix is optional) or
1272
+ * from raw bytes with [`EthAddress::from_bytes`]. The canonical lowercase, `0x`-prefixed hex form
1273
+ * is available via [`EthAddress::to_hex`] (also exposed as `toString`).
1274
+ */
1275
+ export class EthAddress {
1276
+ private constructor();
1277
+ free(): void;
1278
+ [Symbol.dispose](): void;
1279
+ /**
1280
+ * Builds an Ethereum address from its raw 20-byte big-endian representation.
1281
+ *
1282
+ * Returns an error if the input is not exactly 20 bytes long.
1283
+ */
1284
+ static fromBytes(bytes: Uint8Array): EthAddress;
1285
+ /**
1286
+ * Builds an Ethereum address from a hex string (with or without the `0x` prefix).
1287
+ *
1288
+ * Returns an error if the string is not valid hex or does not encode exactly 20 bytes.
1289
+ */
1290
+ static fromHex(hex: string): EthAddress;
1291
+ /**
1292
+ * Returns the raw 20-byte big-endian representation of the address.
1293
+ */
1294
+ toBytes(): Uint8Array;
1295
+ /**
1296
+ * Returns the canonical lowercase, `0x`-prefixed hex representation of the address.
1297
+ */
1298
+ toHex(): string;
1299
+ /**
1300
+ * Returns the canonical lowercase, `0x`-prefixed hex representation of the address.
1301
+ */
1302
+ toString(): string;
1303
+ }
1304
+
1245
1305
  /**
1246
1306
  * Describes the result of executing a transaction program for the Miden protocol.
1247
1307
  *
@@ -2053,6 +2113,44 @@ export class MerklePath {
2053
2113
  verify(index: bigint, node: Word, root: Word): boolean;
2054
2114
  }
2055
2115
 
2116
+ /**
2117
+ * Targets a note at a public network account so the operator auto-consumes it.
2118
+ *
2119
+ * A note is a network note when it is `Public` and carries a valid
2120
+ * `NetworkAccountTarget` attachment (see `Note.isNetworkNote`).
2121
+ */
2122
+ export class NetworkAccountTarget {
2123
+ free(): void;
2124
+ [Symbol.dispose](): void;
2125
+ /**
2126
+ * Returns the note execution hint.
2127
+ */
2128
+ executionHint(): NoteExecutionHint;
2129
+ /**
2130
+ * Decodes a `NoteAttachment` back into a `NetworkAccountTarget`.
2131
+ *
2132
+ * # Errors
2133
+ * Errors if the attachment is not a valid network-account-target attachment.
2134
+ */
2135
+ static fromAttachment(attachment: NoteAttachment): NetworkAccountTarget;
2136
+ /**
2137
+ * Creates a target for the given network account. `executionHint` defaults
2138
+ * to `NoteExecutionHint.always()`.
2139
+ *
2140
+ * # Errors
2141
+ * Errors if `account_id` is not a public account.
2142
+ */
2143
+ constructor(account_id: AccountId, execution_hint?: NoteExecutionHint | null);
2144
+ /**
2145
+ * Returns the targeted network account id.
2146
+ */
2147
+ targetId(): AccountId;
2148
+ /**
2149
+ * Encodes this target as a `NoteAttachment`.
2150
+ */
2151
+ toAttachment(): NoteAttachment;
2152
+ }
2153
+
2056
2154
  /**
2057
2155
  * The identifier of a Miden network.
2058
2156
  */
@@ -2133,6 +2231,10 @@ export class Note {
2133
2231
  * Returns the assets locked inside the note.
2134
2232
  */
2135
2233
  assets(): NoteAssets;
2234
+ /**
2235
+ * Returns the note's attachments.
2236
+ */
2237
+ attachments(): NoteAttachment[];
2136
2238
  /**
2137
2239
  * Returns the commitment to the note (its ID).
2138
2240
  *
@@ -2142,6 +2244,16 @@ export class Note {
2142
2244
  * unchanged.
2143
2245
  */
2144
2246
  commitment(): Word;
2247
+ /**
2248
+ * Builds a B2AGG (Bridge-to-AggLayer) note that bridges the given assets out to another
2249
+ * network via the `AggLayer`.
2250
+ *
2251
+ * The note is always public and is consumed by `bridge_account`, which burns the assets so
2252
+ * they can be claimed on the destination network at `destination_address` (an Ethereum
2253
+ * address on the AggLayer-assigned `destination_network`). The assets must be fungible assets
2254
+ * issued by a network faucet.
2255
+ */
2256
+ static createB2AggNote(sender: AccountId, bridge_account: AccountId, assets: NoteAssets, destination_network: number, destination_address: EthAddress): Note;
2145
2257
  /**
2146
2258
  * Builds a P2IDE note that can be reclaimed or timelocked based on block heights.
2147
2259
  */
@@ -2158,6 +2270,11 @@ export class Note {
2158
2270
  * Returns the unique identifier of the note.
2159
2271
  */
2160
2272
  id(): NoteId;
2273
+ /**
2274
+ * Returns true if the note is a network note (public + a valid
2275
+ * `NetworkAccountTarget` attachment).
2276
+ */
2277
+ isNetworkNote(): boolean;
2161
2278
  /**
2162
2279
  * Returns the public metadata associated with the note.
2163
2280
  */
@@ -2186,6 +2303,14 @@ export class Note {
2186
2303
  * Serializes the note into bytes.
2187
2304
  */
2188
2305
  serialize(): Uint8Array;
2306
+ /**
2307
+ * Creates a note carrying the provided attachments, using the metadata's
2308
+ * sender / note type / tag (attachments on the metadata itself are ignored).
2309
+ *
2310
+ * # Errors
2311
+ * Errors if the attachment set is invalid (too many attachments or words).
2312
+ */
2313
+ static withAttachments(note_assets: NoteAssets, note_metadata: NoteMetadata, note_recipient: NoteRecipient, attachments: NoteAttachment[]): Note;
2189
2314
  }
2190
2315
 
2191
2316
  export class NoteAndArgs {
@@ -2792,6 +2917,11 @@ export class NoteRecipient {
2792
2917
  * Returns the digest of the recipient data (used in the note commitment).
2793
2918
  */
2794
2919
  digest(): Word;
2920
+ /**
2921
+ * Creates a recipient from a script and storage, generating a fresh random
2922
+ * serial number (the secret that prevents double-spends).
2923
+ */
2924
+ static fromScript(note_script: NoteScript, storage: NoteStorage): NoteRecipient;
2795
2925
  /**
2796
2926
  * Creates a note recipient from its serial number, script, and storage.
2797
2927
  */
@@ -4669,6 +4799,16 @@ export class WebClient {
4669
4799
  * but callers only need a single await instead of two.
4670
4800
  */
4671
4801
  newAccountWithSecretKey(account: Account, secret_key: AuthSecretKey): Promise<void>;
4802
+ /**
4803
+ * Builds a transaction request that bridges a fungible asset out to another network via the
4804
+ * `AggLayer`.
4805
+ *
4806
+ * The request emits a single public B2AGG (Bridge-to-AggLayer) note holding `amount` units of
4807
+ * the `faucet_id` asset. The note is consumed by `bridge_account_id`, which burns the asset so
4808
+ * it can be claimed at `destination_address` (an Ethereum address) on the AggLayer-assigned
4809
+ * `destination_network`.
4810
+ */
4811
+ newB2AggTransactionRequest(sender_account_id: AccountId, bridge_account_id: AccountId, faucet_id: AccountId, amount: bigint, destination_network: number, destination_address: EthAddress): Promise<TransactionRequest>;
4672
4812
  newConsumeTransactionRequest(list_of_notes: Note[]): TransactionRequest;
4673
4813
  /**
4674
4814
  * Creates, persists, and returns a new fungible faucet account.
@@ -4744,6 +4884,16 @@ export class WebClient {
4744
4884
  * the chain tip is performed, and the required block header is retrieved.
4745
4885
  */
4746
4886
  submitNewTransaction(account_id: AccountId, transaction_request: TransactionRequest): Promise<TransactionId>;
4887
+ /**
4888
+ * Executes a batch of transactions against the specified account, proves them individually
4889
+ * and as a batch, submits the batch to the network, and atomically applies the per-tx
4890
+ * updates to the local store. Returns the block number the batch was accepted into.
4891
+ *
4892
+ * All transactions must target the same local account — the `account_id` argument.
4893
+ * Each element of `transaction_requests` is the serialized-bytes form of a
4894
+ * `TransactionRequest` (obtained via `tx_request.serialize()`)
4895
+ */
4896
+ submitNewTransactionBatch(account_id: AccountId, transaction_requests: Uint8Array[]): Promise<number>;
4747
4897
  /**
4748
4898
  * Executes a transaction specified by the request against the specified account, proves it
4749
4899
  * with the user provided prover, submits it to the network, and updates the local database.
@@ -14,8 +14,11 @@ export {
14
14
  AccountStorage,
15
15
  AdviceMap,
16
16
  AssetVault,
17
+ BasicFungibleFaucetComponent,
18
+ EthAddress,
17
19
  Felt,
18
20
  InputNoteRecord,
21
+ NetworkAccountTarget,
19
22
  Note,
20
23
  NoteExportFormat,
21
24
  NoteFile,
package/dist/st/eager.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { getWasmOrThrow } from './index.js';
2
2
  export { AccountType, AuthScheme, CompilerResource, Linking, MidenArrays, MidenClient, MockWasmWebClient, MockWasmWebClient as MockWebClient, NoteVisibility, StorageMode, StorageResult, StorageView, WasmWebClient, buildSwapTag, createP2IDENote, createP2IDNote, withSyncLock, wordToBigInt } from './index.js';
3
- export { Account, AccountArray, AccountBuilder, AccountBuilderResult, AccountCode, AccountComponent, AccountComponentCode, AccountDelta, AccountFile, AccountHeader, AccountId, AccountIdArray, AccountInterface, AccountProof, AccountReader, AccountStatus, AccountStorage, AccountStorageDelta, AccountStorageMode, AccountStorageRequirements, AccountVaultDelta, Address, AdviceInputs, AdviceMap, AssetVault, AuthFalcon512RpoMultisigConfig, AuthSecretKey, BasicFungibleFaucetComponent, BlockHeader, CodeBuilder, CommittedNote, ConsumableNoteRecord, Endpoint, ExecutedTransaction, Felt, FeltArray, FetchedAccount, FetchedNote, FlattenedU8Vec, ForeignAccount, ForeignAccountArray, FungibleAsset, FungibleAssetDelta, FungibleAssetDeltaItem, GetProceduresResultItem, InputNote, InputNoteRecord, InputNoteState, InputNotes, IntoUnderlyingByteSource, IntoUnderlyingSink, IntoUnderlyingSource, JsAccountUpdate, JsSettingMutation, JsStateSyncUpdate, JsStorageMapEntry, JsStorageSlot, JsVaultAsset, Library, MerklePath, NetworkId, NetworkNoteStatusInfo, NetworkType, Note, NoteAndArgs, NoteAndArgsArray, NoteArray, NoteAssets, NoteAttachment, NoteAttachmentScheme, NoteConsumability, NoteConsumptionStatus, NoteDetails, NoteDetailsAndTag, NoteDetailsAndTagArray, NoteExecutionHint, NoteExportFormat, NoteFile, NoteFilter, NoteFilterTypes, NoteHeader, NoteId, NoteIdAndArgs, NoteIdAndArgsArray, NoteInclusionProof, NoteLocation, NoteMetadata, NoteRecipient, NoteRecipientArray, NoteScript, NoteStorage, NoteSyncBlock, NoteSyncInfo, NoteTag, NoteType, OutputNote, OutputNoteArray, OutputNoteRecord, OutputNoteState, OutputNotes, Package, PartialNote, Poseidon2, ProcedureThreshold, Program, ProvenTransaction, PswapLineageRecord, PswapLineageState, PublicKey, RpcClient, Rpo256, SerializedInputNoteData, SerializedOutputNoteData, SerializedTransactionData, Signature, SigningInputs, SigningInputsType, SlotAndKeys, SparseMerklePath, StorageMap, StorageMapEntry, StorageMapEntryJs, StorageMapInfo, StorageMapUpdate, StorageSlot, StorageSlotArray, SyncSummary, TestUtils, TokenSymbol, TransactionArgs, TransactionFilter, TransactionId, TransactionProver, TransactionRecord, TransactionRequest, TransactionRequestBuilder, TransactionResult, TransactionScript, TransactionScriptInputPair, TransactionScriptInputPairArray, TransactionStatus, TransactionStoreUpdate, TransactionSummary, WebClient, WebKeystoreApi, Word, createAuthFalcon512RpoMultisig, exportStore, importStore, initSync, sequentialSumBench, setupLogging } from './Cargo-BP7-0qVT.js';
3
+ export { Account, AccountArray, AccountBuilder, AccountBuilderResult, AccountCode, AccountComponent, AccountComponentCode, AccountDelta, AccountFile, AccountHeader, AccountId, AccountIdArray, AccountInterface, AccountProof, AccountReader, AccountStatus, AccountStorage, AccountStorageDelta, AccountStorageMode, AccountStorageRequirements, AccountVaultDelta, Address, AdviceInputs, AdviceMap, AssetVault, AuthFalcon512RpoMultisigConfig, AuthSecretKey, BasicFungibleFaucetComponent, BlockHeader, CodeBuilder, CommittedNote, ConsumableNoteRecord, Endpoint, EthAddress, ExecutedTransaction, Felt, FeltArray, FetchedAccount, FetchedNote, FlattenedU8Vec, ForeignAccount, ForeignAccountArray, FungibleAsset, FungibleAssetDelta, FungibleAssetDeltaItem, GetProceduresResultItem, InputNote, InputNoteRecord, InputNoteState, InputNotes, IntoUnderlyingByteSource, IntoUnderlyingSink, IntoUnderlyingSource, JsAccountUpdate, JsSettingMutation, JsStateSyncUpdate, JsStorageMapEntry, JsStorageSlot, JsVaultAsset, Library, MerklePath, NetworkAccountTarget, NetworkId, NetworkNoteStatusInfo, NetworkType, Note, NoteAndArgs, NoteAndArgsArray, NoteArray, NoteAssets, NoteAttachment, NoteAttachmentScheme, NoteConsumability, NoteConsumptionStatus, NoteDetails, NoteDetailsAndTag, NoteDetailsAndTagArray, NoteExecutionHint, NoteExportFormat, NoteFile, NoteFilter, NoteFilterTypes, NoteHeader, NoteId, NoteIdAndArgs, NoteIdAndArgsArray, NoteInclusionProof, NoteLocation, NoteMetadata, NoteRecipient, NoteRecipientArray, NoteScript, NoteStorage, NoteSyncBlock, NoteSyncInfo, NoteTag, NoteType, OutputNote, OutputNoteArray, OutputNoteRecord, OutputNoteState, OutputNotes, Package, PartialNote, Poseidon2, ProcedureThreshold, Program, ProvenTransaction, PswapLineageRecord, PswapLineageState, PublicKey, RpcClient, Rpo256, SerializedInputNoteData, SerializedOutputNoteData, SerializedTransactionData, Signature, SigningInputs, SigningInputsType, SlotAndKeys, SparseMerklePath, StorageMap, StorageMapEntry, StorageMapEntryJs, StorageMapInfo, StorageMapUpdate, StorageSlot, StorageSlotArray, SyncSummary, TestUtils, TokenSymbol, TransactionArgs, TransactionFilter, TransactionId, TransactionProver, TransactionRecord, TransactionRequest, TransactionRequestBuilder, TransactionResult, TransactionScript, TransactionScriptInputPair, TransactionScriptInputPairArray, TransactionStatus, TransactionStoreUpdate, TransactionSummary, WebClient, WebKeystoreApi, Word, createAuthFalcon512RpoMultisig, exportStore, importStore, initSync, sequentialSumBench, setupLogging } from './Cargo-CR1mzjgg.js';
4
4
  import './wasm.js';
5
5
 
6
6
  // Eager entry point for @miden-sdk/miden-sdk (browser builds).
@@ -62,6 +62,9 @@ export declare class StorageResult {
62
62
  /** Returns all four Felts of the stored Word. Pass-through to Word.toFelts(). */
63
63
  toFelts(): Felt[];
64
64
 
65
+ /** Returns all four elements of the stored Word as a BigUint64Array. Pass-through to Word.toU64s(). */
66
+ toU64s(): BigUint64Array;
67
+
65
68
  /** The first Felt of the stored Word. */
66
69
  felt(): Felt | undefined;
67
70