import type { Commitment, Rpc, RpcSubscriptions, SolanaRpcApi, SolanaRpcSubscriptionsApi } from '@solana/kit'; import type { TpuClient, SendResult } from './tpu-client.js'; /** Dependencies injected into {@link sendAndConfirmTpuTransactionFactory}. */ export interface TpuConfirmFactoryCfg { /** The TPU client used to send the transaction. */ tpu: TpuClient; /** JSON-RPC client for block-height polling. */ rpc: Rpc; /** WebSocket subscriptions client for signature-status streaming. */ rpcSubscriptions: RpcSubscriptions; } /** Per-call options for the function returned by {@link sendAndConfirmTpuTransactionFactory}. */ export interface TpuConfirmOptions { /** Desired confirmation level (e.g. `'confirmed'` or `'finalized'`). */ commitment: Commitment; /** Optional abort signal to cancel both the send and the confirmation wait. */ abortSignal?: AbortSignal; /** Block height after which the blockhash is considered expired; obtained from `getLatestBlockhash`. */ lastValidBlockHeight: bigint; } /** Extends {@link SendResult} with the commitment level used during confirmation. */ export interface TpuConfirmResult extends SendResult { /** Commitment level at which confirmation was obtained. */ commitment: Commitment; } /** * Creates a `sendAndConfirmTpuTransaction` function that sends a raw * transaction via the TPU fast-path and then waits for on-chain confirmation * using kit's block-height + signature-status racing strategy. * * Throws when: * - the blockhash's last-valid block height is exceeded * - the caller's `abortSignal` fires * - the transaction fails on-chain */ export declare function sendAndConfirmTpuTransactionFactory(cfg: TpuConfirmFactoryCfg): (tx: Uint8Array, opts: TpuConfirmOptions) => Promise; //# sourceMappingURL=confirm.d.ts.map