@miden-sdk/react 0.13.2 → 0.14.0-alpha

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/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
3
  import { ReactNode } from 'react';
4
- import { AccountStorageMode, Account, AccountHeader, AccountId, TransactionRequest, WebClient, AccountFile, InputNoteRecord, ConsumableNoteRecord, TransactionId, TransactionFilter, TransactionRecord, TransactionProver } from '@miden-sdk/miden-sdk';
5
- export { Account, AccountFile, AccountHeader, AccountId, AccountStorageMode, ConsumableNoteRecord, InputNoteRecord, NoteType, TransactionFilter, TransactionId, TransactionRecord, TransactionRequest, WebClient } from '@miden-sdk/miden-sdk';
4
+ import { AccountStorageMode, AccountComponent, Account, AccountHeader, AuthScheme, AccountId, TransactionRequest, WasmWebClient, AccountFile, InputNoteRecord, ConsumableNoteRecord, TransactionId, TransactionFilter, TransactionRecord, TransactionProver, NoteAttachment } from '@miden-sdk/miden-sdk';
5
+ export { Account, AccountFile, AccountHeader, AccountId, AccountStorageMode, AuthScheme, ConsumableNoteRecord, InputNoteRecord, NoteType, TransactionFilter, TransactionId, TransactionRecord, TransactionRequest, WasmWebClient as WebClient } from '@miden-sdk/miden-sdk';
6
6
 
7
7
  declare module "@miden-sdk/miden-sdk" {
8
8
  interface Account {
@@ -38,6 +38,8 @@ interface SignerAccountConfig {
38
38
  storageMode: AccountStorageMode;
39
39
  /** Optional seed for deterministic account ID */
40
40
  accountSeed?: Uint8Array;
41
+ /** Optional custom account components to include in the account (e.g. from a compiled .masp package) */
42
+ customComponents?: AccountComponent[];
41
43
  }
42
44
  /**
43
45
  * Context value provided by signer providers (Para, Turnkey, MidenFi, etc.).
@@ -110,7 +112,7 @@ interface MidenConfig {
110
112
  proverTimeoutMs?: number | bigint;
111
113
  }
112
114
  interface MidenState {
113
- client: WebClient | null;
115
+ client: WasmWebClient | null;
114
116
  isReady: boolean;
115
117
  isInitializing: boolean;
116
118
  error: Error | null;
@@ -161,6 +163,10 @@ interface AssetBalance {
161
163
  interface NotesFilter {
162
164
  status?: "all" | "consumed" | "committed" | "expected" | "processing";
163
165
  accountId?: string;
166
+ /** Only notes from this sender (any format, normalized internally) */
167
+ sender?: string;
168
+ /** Exclude these note IDs */
169
+ excludeIds?: string[];
164
170
  }
165
171
  interface NotesResult {
166
172
  notes: InputNoteRecord[];
@@ -213,8 +219,8 @@ interface CreateWalletOptions {
213
219
  storageMode?: "private" | "public" | "network";
214
220
  /** Whether code can be updated. Default: true */
215
221
  mutable?: boolean;
216
- /** Auth scheme: 0 = RpoFalcon512, 1 = EcdsaK256Keccak. Default: 0 */
217
- authScheme?: 0 | 1;
222
+ /** Auth scheme. Default: AuthScheme.AuthRpoFalcon512 */
223
+ authScheme?: AuthScheme;
218
224
  /** Initial seed for deterministic account ID */
219
225
  initSeed?: Uint8Array;
220
226
  }
@@ -227,8 +233,8 @@ interface CreateFaucetOptions {
227
233
  maxSupply: bigint;
228
234
  /** Storage mode. Default: private */
229
235
  storageMode?: "private" | "public" | "network";
230
- /** Auth scheme: 0 = RpoFalcon512, 1 = EcdsaK256Keccak. Default: 0 */
231
- authScheme?: 0 | 1;
236
+ /** Auth scheme. Default: AuthScheme.AuthRpoFalcon512 */
237
+ authScheme?: AuthScheme;
232
238
  }
233
239
  type ImportAccountOptions = {
234
240
  type: "file";
@@ -240,7 +246,7 @@ type ImportAccountOptions = {
240
246
  type: "seed";
241
247
  seed: Uint8Array;
242
248
  mutable?: boolean;
243
- authScheme?: 0 | 1;
249
+ authScheme?: AuthScheme;
244
250
  };
245
251
  interface SendOptions {
246
252
  /** Sender account ID */
@@ -249,20 +255,30 @@ interface SendOptions {
249
255
  to: string;
250
256
  /** Asset ID to send (token id) */
251
257
  assetId: string;
252
- /** Amount to send */
253
- amount: bigint;
258
+ /** Amount to send (ignored when sendAll is true) */
259
+ amount?: bigint;
254
260
  /** Note type. Default: private */
255
- noteType?: "private" | "public" | "encrypted";
261
+ noteType?: "private" | "public";
256
262
  /** Block height after which sender can reclaim note */
257
263
  recallHeight?: number;
258
264
  /** Block height after which recipient can consume note */
259
265
  timelockHeight?: number;
266
+ /** Arbitrary data payload attached to the note */
267
+ attachment?: bigint[] | Uint8Array | number[];
268
+ /** Skip auto-sync before send. Default: false */
269
+ skipSync?: boolean;
270
+ /** Send the full balance of this asset. When true, amount is ignored. */
271
+ sendAll?: boolean;
260
272
  }
261
273
  interface MultiSendRecipient {
262
274
  /** Recipient account ID */
263
275
  to: string;
264
276
  /** Amount to send */
265
277
  amount: bigint;
278
+ /** Per-recipient note type override */
279
+ noteType?: "private" | "public";
280
+ /** Per-recipient attachment */
281
+ attachment?: bigint[] | Uint8Array | number[];
266
282
  }
267
283
  interface MultiSendOptions {
268
284
  /** Sender account ID */
@@ -271,8 +287,10 @@ interface MultiSendOptions {
271
287
  assetId: string;
272
288
  /** Recipient list */
273
289
  recipients: MultiSendRecipient[];
274
- /** Note type. Default: private */
275
- noteType?: "private" | "public" | "encrypted";
290
+ /** Default note type for all recipients. Default: private */
291
+ noteType?: "private" | "public";
292
+ /** Skip auto-sync before send. Default: false */
293
+ skipSync?: boolean;
276
294
  }
277
295
  interface InternalTransferOptions {
278
296
  /** Sender account ID */
@@ -284,7 +302,7 @@ interface InternalTransferOptions {
284
302
  /** Amount to transfer */
285
303
  amount: bigint;
286
304
  /** Note type. Default: private */
287
- noteType?: "private" | "public" | "encrypted";
305
+ noteType?: "private" | "public";
288
306
  }
289
307
  interface InternalTransferChainOptions {
290
308
  /** Initial sender account ID */
@@ -296,7 +314,7 @@ interface InternalTransferChainOptions {
296
314
  /** Amount to transfer per hop */
297
315
  amount: bigint;
298
316
  /** Note type. Default: private */
299
- noteType?: "private" | "public" | "encrypted";
317
+ noteType?: "private" | "public";
300
318
  }
301
319
  interface InternalTransferResult {
302
320
  createTransactionId: string;
@@ -327,7 +345,7 @@ interface MintOptions {
327
345
  /** Amount to mint */
328
346
  amount: bigint;
329
347
  /** Note type. Default: private */
330
- noteType?: "private" | "public" | "encrypted";
348
+ noteType?: "private" | "public";
331
349
  }
332
350
  interface ConsumeOptions {
333
351
  /** Account ID that will consume the notes */
@@ -347,25 +365,105 @@ interface SwapOptions {
347
365
  /** Amount being requested */
348
366
  requestedAmount: bigint;
349
367
  /** Note type for swap note. Default: private */
350
- noteType?: "private" | "public" | "encrypted";
368
+ noteType?: "private" | "public";
351
369
  /** Note type for payback note. Default: private */
352
- paybackNoteType?: "private" | "public" | "encrypted";
370
+ paybackNoteType?: "private" | "public";
353
371
  }
354
372
  interface ExecuteTransactionOptions {
355
373
  /** Account ID the transaction applies to */
356
374
  accountId: string | AccountId;
357
375
  /** Transaction request or builder */
358
- request: TransactionRequest | ((client: WebClient) => TransactionRequest | Promise<TransactionRequest>);
376
+ request: TransactionRequest | ((client: WasmWebClient) => TransactionRequest | Promise<TransactionRequest>);
377
+ /** Skip auto-sync before transaction. Default: false */
378
+ skipSync?: boolean;
359
379
  }
360
380
  interface TransactionResult {
361
381
  transactionId: string;
362
382
  }
383
+ interface StreamedNote {
384
+ /** Note ID (hex string) */
385
+ id: string;
386
+ /** Sender account ID (bech32 if available) */
387
+ sender: string;
388
+ /** First fungible asset amount (convenience; 0n if no fungible assets) */
389
+ amount: bigint;
390
+ /** All assets on the note */
391
+ assets: NoteAsset[];
392
+ /** The underlying InputNoteRecord for escape-hatch access */
393
+ record: InputNoteRecord;
394
+ /** Timestamp (ms) when this note was first observed by the SDK */
395
+ firstSeenAt: number;
396
+ /** Pre-decoded attachment values, or null if no attachment */
397
+ attachment: bigint[] | null;
398
+ }
399
+ interface UseNoteStreamOptions {
400
+ /** Note status filter. Default: "committed" */
401
+ status?: "all" | "consumed" | "committed" | "expected" | "processing";
402
+ /** Only notes from this sender (any format, normalized internally) */
403
+ sender?: string | null;
404
+ /** Only notes first seen after this timestamp */
405
+ since?: number;
406
+ /** Exclude these note IDs (for cross-phase stale filtering) */
407
+ excludeIds?: Set<string> | string[];
408
+ /** Filter by primary asset amount */
409
+ amountFilter?: (amount: bigint) => boolean;
410
+ }
411
+ interface UseNoteStreamReturn {
412
+ /** Notes matching all filter criteria */
413
+ notes: StreamedNote[];
414
+ /** Most recent note (convenience) */
415
+ latest: StreamedNote | null;
416
+ /** Mark a note as handled (excluded from future renders) */
417
+ markHandled: (noteId: string) => void;
418
+ /** Mark all current notes as handled */
419
+ markAllHandled: () => void;
420
+ /** Snapshot current state for passing to next phase */
421
+ snapshot: () => {
422
+ ids: Set<string>;
423
+ timestamp: number;
424
+ };
425
+ isLoading: boolean;
426
+ error: Error | null;
427
+ }
428
+ interface UseSessionAccountOptions {
429
+ /** Callback to fund the session wallet. Receives the session wallet ID. */
430
+ fund: (sessionAccountId: string) => Promise<void>;
431
+ /** Asset ID of the funding token (reserved for future filtering of consumable notes) */
432
+ assetId?: string;
433
+ /** Wallet creation options */
434
+ walletOptions?: {
435
+ storageMode?: "private" | "public";
436
+ mutable?: boolean;
437
+ authScheme?: AuthScheme;
438
+ };
439
+ /** Polling interval for funding note detection (ms). Default: 3000 */
440
+ pollIntervalMs?: number;
441
+ /** Maximum time to wait for funding note (ms). Default: 60000 */
442
+ maxWaitMs?: number;
443
+ /** localStorage key prefix for persistence. Default: "miden-session" */
444
+ storagePrefix?: string;
445
+ }
446
+ type SessionAccountStep = "idle" | "creating" | "funding" | "consuming" | "ready";
447
+ interface UseSessionAccountReturn {
448
+ /** Start the create->fund->consume flow */
449
+ initialize: () => Promise<void>;
450
+ /** Session wallet ID (bech32), or null if not yet created */
451
+ sessionAccountId: string | null;
452
+ /** Whether the session wallet is funded and ready */
453
+ isReady: boolean;
454
+ /** Current step */
455
+ step: SessionAccountStep;
456
+ /** Error from any step */
457
+ error: Error | null;
458
+ /** Clear all session data and reset */
459
+ reset: () => void;
460
+ }
363
461
  declare const DEFAULTS: {
364
462
  readonly RPC_URL: undefined;
365
463
  readonly AUTO_SYNC_INTERVAL: 15000;
366
464
  readonly STORAGE_MODE: "private";
367
465
  readonly WALLET_MUTABLE: true;
368
- readonly AUTH_SCHEME: 0;
466
+ readonly AUTH_SCHEME: AuthScheme.AuthRpoFalcon512;
369
467
  readonly NOTE_TYPE: "private";
370
468
  readonly FAUCET_DECIMALS: 8;
371
469
  };
@@ -374,7 +472,7 @@ type ProverConfigSubset = Pick<MidenConfig, "prover" | "proverUrls" | "proverTim
374
472
  declare function resolveTransactionProver(config: ProverConfigSubset): TransactionProver | null;
375
473
 
376
474
  interface MidenContextValue {
377
- client: WebClient | null;
475
+ client: WasmWebClient | null;
378
476
  isReady: boolean;
379
477
  isInitializing: boolean;
380
478
  error: Error | null;
@@ -394,7 +492,7 @@ interface MidenProviderProps {
394
492
  }
395
493
  declare function MidenProvider({ children, config, loadingComponent, errorComponent, }: MidenProviderProps): react_jsx_runtime.JSX.Element;
396
494
  declare function useMiden(): MidenContextValue;
397
- declare function useMidenClient(): WebClient;
495
+ declare function useMidenClient(): WasmWebClient;
398
496
 
399
497
  /**
400
498
  * Hook to list all accounts in the client.
@@ -487,6 +585,34 @@ declare function useAccount(accountId: string | AccountId | undefined): AccountR
487
585
  */
488
586
  declare function useNotes(options?: NotesFilter): NotesResult;
489
587
 
588
+ /**
589
+ * Hook for temporal note tracking with a unified model.
590
+ *
591
+ * Replaces the common pattern of `handledNoteIds` refs, deferred baselines,
592
+ * and dual-track note decoding. Returns `StreamedNote` objects that merge
593
+ * summary data with the underlying record and pre-decode attachments.
594
+ *
595
+ * @example
596
+ * ```tsx
597
+ * function IncomingNotes({ opponentId }: { opponentId: string }) {
598
+ * const { notes, latest, markHandled, snapshot } = useNoteStream({
599
+ * sender: opponentId,
600
+ * status: "committed",
601
+ * });
602
+ *
603
+ * useEffect(() => {
604
+ * if (latest) {
605
+ * console.log("New note!", latest.attachment);
606
+ * markHandled(latest.id);
607
+ * }
608
+ * }, [latest, markHandled]);
609
+ *
610
+ * return <div>{notes.length} unhandled notes</div>;
611
+ * }
612
+ * ```
613
+ */
614
+ declare function useNoteStream(options?: UseNoteStreamOptions): UseNoteStreamReturn;
615
+
490
616
  /**
491
617
  * Hook to query transaction history and track transaction state.
492
618
  *
@@ -992,6 +1118,37 @@ interface UseTransactionResult {
992
1118
  */
993
1119
  declare function useTransaction(): UseTransactionResult;
994
1120
 
1121
+ /**
1122
+ * Hook to manage a session wallet lifecycle: create -> fund -> consume.
1123
+ *
1124
+ * Replaces the common 300+ line pattern of creating a temporary wallet,
1125
+ * waiting for funding, and consuming the funding note.
1126
+ *
1127
+ * @example
1128
+ * ```tsx
1129
+ * function SessionWallet() {
1130
+ * const { initialize, sessionAccountId, isReady, step, error, reset } =
1131
+ * useSessionAccount({
1132
+ * fund: async (sessionId) => {
1133
+ * // Send tokens from main wallet to session wallet
1134
+ * await send({ from: mainWalletId, to: sessionId, assetId, amount: 100n });
1135
+ * },
1136
+ * assetId: "0x...",
1137
+ * });
1138
+ *
1139
+ * if (error) return <div>Error: {error.message} <button onClick={reset}>Retry</button></div>;
1140
+ * if (isReady) return <div>Session ready: {sessionAccountId}</div>;
1141
+ *
1142
+ * return (
1143
+ * <button onClick={initialize} disabled={step !== "idle"}>
1144
+ * {step === "idle" ? "Start Session" : step}
1145
+ * </button>
1146
+ * );
1147
+ * }
1148
+ * ```
1149
+ */
1150
+ declare function useSessionAccount(options: UseSessionAccountOptions): UseSessionAccountReturn;
1151
+
995
1152
  declare const toBech32AccountId: (accountId: string) => string;
996
1153
 
997
1154
  declare const formatAssetAmount: (amount: bigint, decimals?: number) => string;
@@ -1000,4 +1157,99 @@ declare const parseAssetAmount: (input: string, decimals?: number) => bigint;
1000
1157
  declare const getNoteSummary: (note: ConsumableNoteRecord | InputNoteRecord, getAssetMetadata?: (assetId: string) => AssetMetadata | undefined) => NoteSummary | null;
1001
1158
  declare const formatNoteSummary: (summary: NoteSummary, formatAsset?: (asset: NoteAsset) => string) => string;
1002
1159
 
1003
- export { type AccountResult, type AccountsResult, type AssetBalance, type AssetMetadata, type ConsumeOptions, type CreateFaucetOptions, type CreateWalletOptions, DEFAULTS, type ExecuteTransactionOptions, type ImportAccountOptions, type InternalTransferChainOptions, type InternalTransferOptions, type InternalTransferResult, type MidenConfig, MidenProvider, type MidenState, type MintOptions, type MultiSendOptions, type MultiSendRecipient, type MutationResult, type NoteAsset, type NoteSummary, type NotesFilter, type NotesResult, type ProverConfig, type ProverUrls, type QueryResult, type RpcUrlConfig, type SendOptions, type SignCallback, type SignerAccountConfig, type SignerAccountType, SignerContext, type SignerContextValue, type SwapOptions, type SyncState, type TransactionHistoryOptions, type TransactionHistoryResult, type TransactionResult, type TransactionStage, type TransactionStatus, type UseConsumeResult, type UseCreateFaucetResult, type UseCreateWalletResult, type UseImportAccountResult, type UseInternalTransferResult, type UseMintResult, type UseMultiSendResult, type UseSendResult, type UseSwapResult, type UseSyncStateResult, type UseTransactionHistoryResult, type UseTransactionResult, type UseWaitForCommitResult, type UseWaitForNotesResult, type WaitForCommitOptions, type WaitForNotesOptions, formatAssetAmount, formatNoteSummary, getNoteSummary, parseAssetAmount, toBech32AccountId, useAccount, useAccounts, useAssetMetadata, useConsume, useCreateFaucet, useCreateWallet, useImportAccount, useInternalTransfer, useMiden, useMidenClient, useMint, useMultiSend, useNotes, useSend, useSigner, useSwap, useSyncState, useTransaction, useTransactionHistory, useWaitForCommit, useWaitForNotes };
1160
+ /**
1161
+ * Normalize any account ID format (hex, bech32, 0x-prefixed) to bech32.
1162
+ * Returns the original string if conversion fails.
1163
+ */
1164
+ declare function normalizeAccountId(id: string): string;
1165
+ /**
1166
+ * Compare two account IDs for equality regardless of format (hex vs bech32).
1167
+ * Parses both to AccountId objects and compares their hex representations.
1168
+ */
1169
+ declare function accountIdsEqual(a: string, b: string): boolean;
1170
+
1171
+ interface NoteAttachmentData {
1172
+ values: bigint[];
1173
+ kind: "word" | "array";
1174
+ }
1175
+ /**
1176
+ * Decode a note's attachment. Returns null if no attachment.
1177
+ */
1178
+ declare function readNoteAttachment(note: InputNoteRecord): NoteAttachmentData | null;
1179
+ /**
1180
+ * Encode values into a NoteAttachment.
1181
+ * <= 4 values -> Word (avoids miden-standards 0.13.x Array advice-map bug).
1182
+ * > 4 values -> Array.
1183
+ *
1184
+ * Note: Values are padded to word boundaries (multiples of 4) with trailing 0n.
1185
+ * `readNoteAttachment` returns raw values including padding. Consumers should
1186
+ * strip trailing zeros if they need the original unpadded values.
1187
+ */
1188
+ declare function createNoteAttachment(values: bigint[] | Uint8Array | number[]): NoteAttachment;
1189
+
1190
+ declare function bytesToBigInt(bytes: Uint8Array): bigint;
1191
+ declare function bigIntToBytes(value: bigint, length: number): Uint8Array;
1192
+ declare function concatBytes(...arrays: Uint8Array[]): Uint8Array;
1193
+
1194
+ type MidenErrorCode = "WASM_CLASS_MISMATCH" | "WASM_POINTER_CONSUMED" | "WASM_NOT_INITIALIZED" | "WASM_SYNC_REQUIRED" | "SEND_BUSY" | "OPERATION_BUSY" | "UNKNOWN";
1195
+ declare class MidenError extends Error {
1196
+ readonly code: MidenErrorCode;
1197
+ readonly cause?: unknown;
1198
+ constructor(message: string, options?: {
1199
+ cause?: unknown;
1200
+ code?: MidenErrorCode;
1201
+ });
1202
+ }
1203
+ declare function wrapWasmError(e: unknown): Error;
1204
+
1205
+ /** Minimal adapter shape (duck-typed, no dependency on wallet-adapter-base) */
1206
+ interface WalletAdapterLike {
1207
+ readyState: string;
1208
+ on(event: "readyStateChange", cb: (state: string) => void): void;
1209
+ off(event: "readyStateChange", cb: (state: string) => void): void;
1210
+ }
1211
+ /**
1212
+ * Wait for a wallet adapter to reach "Installed" readyState.
1213
+ * Returns immediately if already installed. Otherwise listens
1214
+ * for readyStateChange events with a timeout.
1215
+ *
1216
+ * @example
1217
+ * ```ts
1218
+ * const adapter = wallets[0].adapter;
1219
+ * await waitForWalletDetection(adapter); // default 5s timeout
1220
+ * await waitForWalletDetection(adapter, 10000); // 10s timeout
1221
+ * ```
1222
+ */
1223
+ declare function waitForWalletDetection(adapter: WalletAdapterLike, timeoutMs?: number): Promise<void>;
1224
+
1225
+ interface MigrateStorageOptions {
1226
+ /** Current version string to compare against stored version */
1227
+ version: string;
1228
+ /** localStorage key for version tracking. Default: "miden:storageVersion" */
1229
+ versionKey?: string;
1230
+ /** Callback before clearing storage (e.g., to save data) */
1231
+ onBeforeClear?: () => void | Promise<void>;
1232
+ /** Reload page after clearing. Default: true */
1233
+ reloadOnClear?: boolean;
1234
+ }
1235
+ /**
1236
+ * Check if stored version matches current version. If not, clear Miden IndexedDB
1237
+ * databases and localStorage, then optionally reload.
1238
+ * Returns true if migration was triggered.
1239
+ */
1240
+ declare function migrateStorage(options: MigrateStorageOptions): Promise<boolean>;
1241
+ /**
1242
+ * Clear all Miden-related IndexedDB databases.
1243
+ */
1244
+ declare function clearMidenStorage(): Promise<void>;
1245
+ /**
1246
+ * Create a namespaced localStorage helper for app state persistence.
1247
+ */
1248
+ declare function createMidenStorage(prefix: string): {
1249
+ get<T>(key: string): T | null;
1250
+ set<T>(key: string, value: T): void;
1251
+ remove(key: string): void;
1252
+ clear(): void;
1253
+ };
1254
+
1255
+ export { type AccountResult, type AccountsResult, type AssetBalance, type AssetMetadata, type ConsumeOptions, type CreateFaucetOptions, type CreateWalletOptions, DEFAULTS, type ExecuteTransactionOptions, type ImportAccountOptions, type InternalTransferChainOptions, type InternalTransferOptions, type InternalTransferResult, type MidenConfig, MidenError, type MidenErrorCode, MidenProvider, type MidenState, type MigrateStorageOptions, type MintOptions, type MultiSendOptions, type MultiSendRecipient, type MutationResult, type NoteAsset, type NoteAttachmentData, type NoteSummary, type NotesFilter, type NotesResult, type ProverConfig, type ProverUrls, type QueryResult, type RpcUrlConfig, type SendOptions, type SessionAccountStep, type SignCallback, type SignerAccountConfig, type SignerAccountType, SignerContext, type SignerContextValue, type StreamedNote, type SwapOptions, type SyncState, type TransactionHistoryOptions, type TransactionHistoryResult, type TransactionResult, type TransactionStage, type TransactionStatus, type UseConsumeResult, type UseCreateFaucetResult, type UseCreateWalletResult, type UseImportAccountResult, type UseInternalTransferResult, type UseMintResult, type UseMultiSendResult, type UseNoteStreamOptions, type UseNoteStreamReturn, type UseSendResult, type UseSessionAccountOptions, type UseSessionAccountReturn, type UseSwapResult, type UseSyncStateResult, type UseTransactionHistoryResult, type UseTransactionResult, type UseWaitForCommitResult, type UseWaitForNotesResult, type WaitForCommitOptions, type WaitForNotesOptions, type WalletAdapterLike, accountIdsEqual, bigIntToBytes, bytesToBigInt, clearMidenStorage, concatBytes, createMidenStorage, createNoteAttachment, formatAssetAmount, formatNoteSummary, getNoteSummary, migrateStorage, normalizeAccountId, parseAssetAmount, readNoteAttachment, toBech32AccountId, useAccount, useAccounts, useAssetMetadata, useConsume, useCreateFaucet, useCreateWallet, useImportAccount, useInternalTransfer, useMiden, useMidenClient, useMint, useMultiSend, useNoteStream, useNotes, useSend, useSessionAccount, useSigner, useSwap, useSyncState, useTransaction, useTransactionHistory, useWaitForCommit, useWaitForNotes, waitForWalletDetection, wrapWasmError };