/** * UserOp Submission — handles sending signed UserOps to the chain. * * Two modes: * 1. Self-relay: WORKER_PRIVATE_KEY calls handleOps (needs ETH) * 2. Relayer: RELAYER_PRIVATE_KEY calls handleOps (worker needs no ETH) * * The relayer pattern matches b402-facilitator's walletIncognitoSettle — * a separate funded wallet submits the TX and receives gas refund. */ import { ethers } from 'ethers'; import type { PackedUserOp } from './userop-builder'; export interface SubmitConfig { /** The provider to use */ provider: ethers.JsonRpcProvider; /** Worker's private key (signs UserOps, may also submit if no relayer) */ workerKey: string; /** Separate relayer key for gas-free submission. If set, worker needs no ETH. */ relayerKey?: string; /** Gas limit for the outer handleOps call */ gasLimit?: bigint; } /** * Submit a signed UserOp via EntryPoint.handleOps(). * * If relayerKey is provided, the relayer wallet calls handleOps (worker needs no ETH). * Otherwise, the worker wallet calls handleOps (worker needs ETH for gas). */ export declare function submitUserOp(userOp: PackedUserOp, config: SubmitConfig): Promise<{ txHash: string; blockNumber: number; }>; /** * Resolve the relayer key from env or config. * Falls back to worker key if no relayer is configured. */ export declare function resolveRelayerKey(): string | undefined;