import type { SingleWithdrawWasm, WithdrawNovaWasm } from "../assets/wasm/web/zerc20_wasm.js"; import type { AggregationTreeState, BurnArtifacts, ChainEvents, FetchAggregationTreeStateParams, FetchLocalTeleportProofsParams, FetchTransferEventsParams, GenerateGlobalTeleportProofsParams, GlobalTeleportProofWithEvent, LocalTeleportProof, SecretAndTweak, SeparateEventsByEligibilityParams, SeparatedChainEvents } from "../types.js"; import type { WasmRuntimeOptions } from "./types.js"; /** * WasmRuntime manages the lifecycle and operations of the zERC20 WASM module. * * It handles: * - WASM initialization with fallback URL resolution * - Cryptographic derivation operations * - Aggregation tree and transfer event operations * - Zero-knowledge proof program creation */ export declare class WasmRuntime { private locator; private overrideUrl?; private initPromise?; private wasmBindings?; /** * Create a new WASM runtime instance. * @remarks * - In Node.js, the WASM bindings are loaded from the bundled node build. * - In browsers, the runtime lazily initializes on first use; call {@link ready} to pre-initialize. */ constructor(options?: WasmRuntimeOptions); /** * Replace the locator options used to resolve the WASM binary. * @remarks This resets any in-flight initialization so a subsequent call will re-initialize. */ configure(options: WasmRuntimeOptions): void; /** * Override the resolved WASM URL. * @remarks This takes precedence over `baseUrl`/`wasmFilename` resolution. */ setOverrideUrl(url?: string): void; /** * Ensure the WASM runtime is initialized and ready to use. * @remarks * This is optional in Node.js (bindings are available immediately), but recommended in browsers * to surface initialization errors early. */ ready(): Promise; getSeedMessage(): Promise; derivePaymentAdvice(seedHex: string, paymentAdviceIdHex: string, recipientChainId: bigint | number, recipientAddress: string): Promise; deriveInvoiceSingle(seedHex: string, invoiceIdHex: string, recipientChainId: bigint | number, recipientAddress: string): Promise; deriveInvoiceBatch(seedHex: string, invoiceIdHex: string, subId: number, recipientChainId: bigint | number, recipientAddress: string): Promise; buildFullBurnAddress(recipientChainId: bigint | number, recipientAddress: string, secretHex: string, tweakHex: string): Promise; decodeFullBurnAddress(payloadHex: string): Promise; generalRecipientFr(chainId: bigint | number, recipientAddress: string, tweakHex: string): Promise; aggregationRoot(snapshot: readonly string[]): Promise; aggregationMerkleProof(snapshot: readonly string[], index: number): Promise; fetchAggregationTreeState(params: FetchAggregationTreeStateParams): Promise; fetchTransferEvents(params: FetchTransferEventsParams): Promise; separateEventsByEligibility(params: SeparateEventsByEligibilityParams): Promise; fetchLocalTeleportMerkleProofs(params: FetchLocalTeleportProofsParams): Promise; generateGlobalTeleportMerkleProofs(params: GenerateGlobalTeleportProofsParams): Promise; createSingleWithdrawProgram(localPk: Uint8Array, localVk: Uint8Array, globalPk: Uint8Array, globalVk: Uint8Array): Promise; createWithdrawNovaProgram(localPp: Uint8Array, localVp: Uint8Array, globalPp: Uint8Array, globalVp: Uint8Array): Promise; private ensureReady; private readyBindings; private getBindings; private initialize; private resolveCandidateUrls; private resolveConfiguredUrl; } //# sourceMappingURL=runtime.d.ts.map