import { MultiProvider4337, RpcProvider } from '@safe-global/safe-4337-provider'; import { Signer, ethers } from 'ethers'; import { MetaTransaction, SignedSafeTransaction } from './execution'; import { PackedUserOperation, UserOperation } from './userOp'; export { MultiProvider4337 }; export interface OperationParams { nonce: bigint; initCode: string; verificationGasLimit: bigint; callGasLimit: bigint; preVerificationGas: bigint; maxPriorityFeePerGas: bigint; maxFeePerGas: bigint; validAfter: bigint; validUntil: bigint; } export interface GlobalConfig { safeSingleton: string; entryPoint: string; erc4337module: string; proxyFactory: string; proxyCreationCode: string; safeModuleSetup: string; chainId: number; } export interface SafeConfig { signers: string[]; threshold: number; nonce: number; } export declare class Safe4337Operation { private safe; private action; private params; private globalConfig; private signatures; constructor(safe: Safe4337, action: MetaTransaction, params: OperationParams, globalConfig: GlobalConfig); operationHash(): string; encodedSignatures(): Promise; packedUserOperation(paymasterAndData?: string): Promise; userOperation(paymasterAndData?: string): Promise; authorize(signer: ethers.Signer): Promise; static build(provider: RpcProvider, safe: Safe4337, action: MetaTransaction, globalConfig: GlobalConfig): Promise; } export declare class Safe4337 { address: string; private globalConfig; private safeConfig; private provider; constructor(address: string, globalConfig: GlobalConfig, safeConfig?: SafeConfig); connect(provider: RpcProvider): Safe4337; disconnect(): void; isDeployed(): Promise; deploy(deployer: Signer): Promise; getInitCode(): string; getSigners(): Promise; getModules(): Promise; getThreshold(): Promise; operate(action: MetaTransaction): Promise; /** * Creates a new instance of Safe4337 with the specified signer and global configuration. * * @param {string} signer - A signer address. * @param {GlobalConfig} globalConfig - The global configuration for the Safe4337 instance. * @returns {Safe4337} A new instance of Safe4337. */ static withSigner(signer: string, globalConfig: GlobalConfig): Safe4337; /** * Creates a new instance of Safe4337 with the specified signers, threshold, and global configuration. * * @param {string[]} signers - An array of signer addresses. * @param {number} threshold - The number of signatures required to execute a transaction. * @param {GlobalConfig} globalConfig - The global configuration for the Safe4337 instance. * @returns {Safe4337} A new instance of Safe4337. */ static withSigners(signers: string[], threshold: number, globalConfig: GlobalConfig): Safe4337; /** * Creates a new instance of Safe4337 with the provided SafeConfig and GlobalConfig. * @param {SafeConfig} safeConfig - The SafeConfig object containing the configuration for the Safe4337 instance. * @param {GlobalConfig} globalConfig - The GlobalConfig object containing the global configuration for the Safe4337 instance. * @returns {Safe4337} A new instance of Safe4337. */ static withConfigs(safeConfig: SafeConfig, globalConfig: GlobalConfig): Safe4337; /** * Encodes the transaction data for executing a safe transaction. * @param {SignedSafeTransaction} transaction - The signed safe transaction object. * @returns {string} The encoded transaction data. */ static getExecTransactionData(transaction: SignedSafeTransaction): string; }