import type { ResourceEstimate } from "./budget.js"; export interface V1SimulationResult { err: unknown; logs: string[] | null; unitsConsumed: number | null; loadedAccountsDataSize: number | null; } export declare function toBase64(bytes: Uint8Array): string; export declare function simulateV1Transaction(rpcUrl: string, wireBytes: Uint8Array, options?: { sigVerify?: boolean; replaceRecentBlockhash?: boolean; commitment?: string; }): Promise; /** * Measure a transaction's resource use by simulating it at the maximum limits. * `build` receives the limits and must return serialized (signature slots may be * zero) v1 bytes. Throws when simulation fails or the RPC omits loaded-data size, * rather than returning a zero that v1 would treat as "no budget". * * The result is valid only for the instruction set `build` compiles (e.g. SOL * and SPL shields differ). `rpcUrl` is called with a plain `fetch` and only a * `content-type` header — an RPC that authenticates via custom headers must be * reached another way, with the resulting limits passed explicitly. */ export declare function estimateV1ResourceLimits(rpcUrl: string, build: (limits: ResourceEstimate) => Uint8Array): Promise; export declare function sendV1Transaction(rpcUrl: string, wireBytes: Uint8Array, options?: { skipPreflight?: boolean; preflightCommitment?: string; maxRetries?: number; }): Promise;