import { Chain } from "@thirdweb-dev/chains"; import { ConnectParams, Connector } from "../../interfaces/connector"; import { AccountContractInfoInternal, FactoryContractInfoInternal, SmartWalletConfig, SmartWalletConnectionArgs, TransactionOptions } from "./types"; import { EVMWallet } from "../../interfaces"; import { ERC4337EthersSigner } from "./lib/erc4337-signer"; import { BigNumber, ethers, providers, utils } from "ethers"; import { SignerPermissionsInput, SignerWithPermissions, SmartContract, Transaction, TransactionResult } from "@thirdweb-dev/sdk"; export declare class SmartWalletConnector extends Connector { protected config: SmartWalletConfig; private aaProvider; private accountApi; personalWallet?: EVMWallet; chainId?: number; constructor(config: SmartWalletConfig); initialize(params: ConnectParams): Promise; connect(connectionArgs: ConnectParams): Promise; getProvider(): Promise; getSigner(): Promise; getAddress(): Promise; isConnected(): Promise; disconnect(): Promise; switchChain(chainId: number): Promise; setupListeners(): Promise; updateChains(chains: Chain[]): void; /** * Check whether the connected signer can execute a given transaction using the smart wallet. * @param transaction - The transaction to execute using the smart wallet. * @returns whether the connected signer can execute the transaction using the smart wallet. */ hasPermissionToExecute(transaction: Transaction): Promise; /** * Send a single transaction without waiting for confirmations * @param transaction - the transaction to send * @param config - optional the transaction configuration * @returns The awaitable transaction */ send(transaction: Transaction, options?: TransactionOptions): Promise; /** * Execute a single transaction (waiting for confirmations) * @param transaction - The transaction to execute * @returns The transaction receipt */ execute(transaction: Transaction, options?: TransactionOptions): Promise; sendBatch(transactions: Transaction[], options?: TransactionOptions): Promise; /** * Execute multiple transactions in a single batch * @param transactions - The transactions to execute * @returns The transaction receipt */ executeBatch(transactions: Transaction[], options?: TransactionOptions): Promise; sendRaw(transaction: utils.Deferrable, options?: TransactionOptions): Promise; executeRaw(transaction: utils.Deferrable, options?: TransactionOptions): Promise<{ receipt: ethers.providers.TransactionReceipt; }>; sendBatchRaw(transactions: utils.Deferrable[], options?: TransactionOptions): Promise; executeBatchRaw(transactions: utils.Deferrable[], options?: TransactionOptions): Promise<{ receipt: ethers.providers.TransactionReceipt; }>; estimate(transaction: Transaction, options?: TransactionOptions): Promise<{ ether: string; wei: BigNumber; details: { deployGasLimit: BigNumber; transactionGasLimit: BigNumber; gasPrice: BigNumber; transactionCost: BigNumber; deployCost: BigNumber; totalCost: BigNumber; }; }>; estimateRaw(transaction: utils.Deferrable, options?: TransactionOptions): Promise<{ ether: string; wei: BigNumber; details: { deployGasLimit: BigNumber; transactionGasLimit: BigNumber; gasPrice: BigNumber; transactionCost: BigNumber; deployCost: BigNumber; totalCost: BigNumber; }; }>; estimateBatch(transactions: Transaction[], options?: TransactionOptions): Promise<{ ether: string; wei: BigNumber; details: { deployGasLimit: BigNumber; transactionGasLimit: BigNumber; gasPrice: BigNumber; transactionCost: BigNumber; deployCost: BigNumber; totalCost: BigNumber; }; }>; estimateBatchRaw(transactions: utils.Deferrable[], options?: TransactionOptions): Promise<{ ether: string; wei: BigNumber; details: { deployGasLimit: BigNumber; transactionGasLimit: BigNumber; gasPrice: BigNumber; transactionCost: BigNumber; deployCost: BigNumber; totalCost: BigNumber; }; }>; /** * Manually deploy the smart wallet contract. If already deployed this will throw an error. * Note that this is not necessary as the smart wallet will be deployed automatically on the first transaction the user makes. * @returns The transaction receipt */ deploy(options?: TransactionOptions): Promise; /** * Check if the smart wallet contract is deployed * @returns true if the smart wallet contract is deployed */ isDeployed(): Promise; deployIfNeeded(options?: TransactionOptions): Promise; grantPermissions(target: string, permissions: SignerPermissionsInput): Promise; revokePermissions(target: string): Promise; addAdmin(target: string): Promise; removeAdmin(target: string): Promise; getAllActiveSigners(): Promise; /** * Get the underlying account contract of the smart wallet. * @returns The account contract of the smart wallet. */ getAccountContract(): Promise; /** * Get the underlying account factory contract of the smart wallet. * @returns The account factory contract. */ getFactoryContract(): Promise; protected defaultFactoryInfo(): FactoryContractInfoInternal; protected defaultAccountInfo(): AccountContractInfoInternal; private estimateTx; private estimateDeploymentGasLimit; private prepareBatchRaw; private prepareBatchTx; } //# sourceMappingURL=index.d.ts.map