import type { PublicClient } from 'viem'; import type { AuthorizedAccount, ReadOnlyAccount } from '../account/evm'; import type { BundlerConfig } from '../bundler'; import { GasCostEstimate, UserOperationCall } from '../types'; /** * Result of sending a kernel operation */ export interface KernelUserOperationResult { /** The user operation hash */ userOpHash: `0x${string}`; /** The transaction receipt */ receipt: { blockNumber: bigint; /** Actual on-chain transaction hash (ENG-170) */ transactionHash: `0x${string}`; }; } /** * Configuration for sending a kernel user operation */ export interface SendKernelUserOperationConfig { /** The authorized account to use for signing */ authorizedAccount: AuthorizedAccount; /** Public client for chain interactions */ publicClient: PublicClient; /** Bundler config for sending user operations */ bundlerConfig: BundlerConfig; /** The user operation call to send */ userOperationCall: UserOperationCall; /** Gas limits from a prior estimation pass. When provided, viem skips * eth_estimateUserOperationGas required for native sweeps, where bundler * prefund deduction causes a full-balance transfer to revert. */ gasLimits?: GasCostEstimate; } /** * Sends a user operation using ZeroDev Kernel smart account * * This is the ZeroDev-specific implementation for sending user operations * * @param config The user operation configuration * @returns The user operation hash and receipt * * @throws {MissingChainError} If publicClient does not have a chain configured * @throws {Error} If the transaction fails to send */ export declare function sendKernelUserOperation({ publicClient, bundlerConfig, authorizedAccount, userOperationCall, gasLimits }: SendKernelUserOperationConfig): Promise; export interface GetGasCostEstimateConfig { /** Public client for chain interactions */ publicClient: PublicClient; /** The read-only account to use for estimation */ readOnlyAccount: ReadOnlyAccount; /** Bundler config for sending user operations */ bundlerConfig: BundlerConfig; /** The user operation call to estimate the gas cost for */ userOperationCall: UserOperationCall; } /** * Gets a gas cost estimate for a user operation * * This is the ZeroDev-specific implementation for getting a gas cost estimate for a user operation * * @param config The gas cost estimate configuration * @returns The gas cost estimate * * @throws {MissingChainError} If publicClient does not have a chain configured * @throws {Error} If the gas cost estimate fails to be retrieved */ export declare function getKernelGasCostEstimate({ publicClient, bundlerConfig, readOnlyAccount, userOperationCall }: GetGasCostEstimateConfig): Promise;