/** * ERC-4337 Account Abstraction Types * * Type definitions for UserOperations, bundler interactions, * and Sequence0 AA wallet configuration. */ /** * Packed UserOperation for ERC-4337 v0.7. * * This is the on-chain format submitted to the EntryPoint contract. * Gas limits and fee parameters are packed into bytes32 fields. */ export interface PackedUserOperation { /** Smart account address */ sender: string; /** Anti-replay nonce (hex-encoded uint256) */ nonce: string; /** Factory address + factoryData for first-time account deployment (hex, empty for existing accounts) */ initCode: string; /** Encoded call to execute on the smart account (hex) */ callData: string; /** Packed: verificationGasLimit (16 bytes) || callGasLimit (16 bytes) */ accountGasLimits: string; /** Pre-verification gas (hex-encoded uint256) */ preVerificationGas: string; /** Packed: maxPriorityFeePerGas (16 bytes) || maxFeePerGas (16 bytes) */ gasFees: string; /** Paymaster address + verification/postOp gas + paymaster-specific data (hex) */ paymasterAndData: string; /** FROST Schnorr signature or ECDSA signature (hex) */ signature: string; } /** * Parameters for building a UserOperation. */ export interface UserOperationParams { /** Smart account address */ sender: string; /** Nonce (hex-encoded, auto-fetched if omitted) */ nonce?: string; /** Encoded call to execute (hex) */ callData: string; /** Gas limit for the main execution call */ callGasLimit?: number; /** Gas limit for the verification step */ verificationGasLimit?: number; /** Pre-verification gas (covers calldata cost + overhead) */ preVerificationGas?: number; /** Maximum fee per gas (hex or number) */ maxFeePerGas?: string | number; /** Maximum priority fee per gas (hex or number) */ maxPriorityFeePerGas?: string | number; /** Init code for first-time account deployment (hex) */ initCode?: string; /** Paymaster + paymaster data (hex) */ paymasterAndData?: string; } /** * A single call to execute via the smart account. */ export interface AccountTransaction { /** Target contract address */ to: string; /** ETH value to send (in wei) */ value?: bigint | string; /** Calldata for the target contract (hex) */ data?: string; } /** * Options for creating a new Sequence0 AA wallet. */ export interface Sequence0AccountOptions { /** FROST threshold: minimum signers required */ threshold: number; /** FROST committee size: total agents */ committeeSize: number; /** Target EVM chain (e.g. 'ethereum', 'polygon', 'base') */ chain: string; /** EntryPoint v0.7 contract address (defaults to canonical deployment) */ entryPoint?: string; /** Sequence0AccountFactory contract address */ factory?: string; /** Sequence0 SDK network ('mainnet' | 'testnet') */ network?: 'mainnet' | 'testnet'; /** Agent URL override (for testnet or direct connection) */ agentUrl?: string; /** Owner private key for signing DKG and sign requests */ ownerPrivateKey?: string; /** Custom RPC URL for the target EVM chain */ rpcUrl?: string; /** Bundler RPC URL for submitting UserOperations */ bundlerUrl?: string; } /** * JSON-RPC request to a bundler. */ export interface BundlerRequest { jsonrpc: '2.0'; method: string; params: unknown[]; id: number; } /** * JSON-RPC response from a bundler. */ export interface BundlerResponse { jsonrpc: '2.0'; result?: T; error?: { code: number; message: string; data?: unknown; }; id: number; } /** * Gas estimate returned by eth_estimateUserOperationGas. */ export interface UserOperationGasEstimate { preVerificationGas: string; verificationGasLimit: string; callGasLimit: string; paymasterVerificationGasLimit?: string; paymasterPostOpGasLimit?: string; } /** * Receipt returned by eth_getUserOperationReceipt. */ export interface UserOperationReceipt { userOpHash: string; entryPoint: string; sender: string; nonce: string; paymaster: string; actualGasCost: string; actualGasUsed: string; success: boolean; logs: any[]; receipt: { transactionHash: string; transactionIndex: string; blockHash: string; blockNumber: string; from: string; to: string; cumulativeGasUsed: string; gasUsed: string; contractAddress: string | null; logs: any[]; status: string; effectiveGasPrice: string; }; } /** * Canonical ERC-4337 EntryPoint v0.7 deployment address. * Deployed at the same address on all EVM chains via CREATE2. */ export declare const ENTRYPOINT_V07_ADDRESS = "0x0000000071727De22E5E9d8BAf0edAc6f37da032"; export declare const FACTORY_ADDRESSES: Record; /** * Default bundler URLs per chain. * These are public bundlers -- for production, use a private bundler. */ export declare const DEFAULT_BUNDLER_URLS: Record; /** * Chain IDs for supported EVM chains. */ export declare const CHAIN_IDS: Record; //# sourceMappingURL=types.d.ts.map