import type { Chain } from "viem"; import type { EntryPointVersion } from "../entrypoint/types.js"; import { BaseError } from "./base.js"; /** * This error is thrown when an account could not be found to execute a specific action. It extends the `BaseError` class. */ export declare class AccountNotFoundError extends BaseError { name: string; /** * Constructor for initializing an error message indicating that an account could not be found to execute the specified action. */ constructor(); } /** * This error is thrown when an account is not a Modular Account V2 */ export declare class NotAModularAccountV2Error extends BaseError { name: string; /** * Constructor for initializing an error message indicating that the account is not a Modular Account V2. */ constructor(); } /** * Represents an error that is thrown when no default factory is defined for a specific account type on a given chain and entry point version. * This error suggests providing an override via the `factoryAddress` parameter when creating an account. */ export declare class DefaultFactoryNotDefinedError extends BaseError { name: string; /** * Constructs an error message indicating that no default factory was found for the given account type, chain, and entry point version. * * @param {string} accountType the type of account * @param {Chain} chain the blockchain chain * @param {EntryPointVersion} version the entry point version */ constructor(accountType: string, chain: Chain, version: EntryPointVersion); } /** * Custom error class for handling errors when getting a counterfactual address. This extends the `BaseError` class and provides a custom error message and name. */ export declare class GetCounterFactualAddressError extends BaseError { name: string; /** * Constructor for initializing an error message indicating the failure of fetching the counter-factual address. */ constructor(); } /** * An error class representing the condition where upgrades are not supported for a specific account type. This error extends the `BaseError` class and provides a custom error message based on the account type. */ export declare class UpgradesNotSupportedError extends BaseError { name: string; /** * Error constructor for indicating that upgrades are not supported by the given account type. * * @param {string} accountType The type of account that does not support upgrades */ constructor(accountType: string); } /** * Error thrown when attempting to sign a transaction that is not supported by smart contracts. */ export declare class SignTransactionNotSupportedError extends BaseError { name: string; /** * Throws an error indicating that signing a transaction is not supported by smart contracts. * */ constructor(); } /** * Custom error class `FailedToGetStorageSlotError` which is used to signal a failure when attempting to retrieve a storage slot. This error includes the slot and slot descriptor in its message and inherits from `BaseError`. */ export declare class FailedToGetStorageSlotError extends BaseError { name: string; /** * Custom error message constructor for failing to get a specific storage slot. * * @param {string} slot The storage slot that failed to be accessed or retrieved * @param {string} slotDescriptor A description of the storage slot, for additional context in the error message */ constructor(slot: string, slotDescriptor: string); } /** * Represents an error indicating that batch execution is not supported for a specific account type. */ export declare class BatchExecutionNotSupportedError extends BaseError { name: string; /** * Constructs an error message indicating that batch execution is not supported by the specified account type. * * @param {string} accountType the type of account that does not support batch execution */ constructor(accountType: string); } /** * Represents an error that occurs when an account requires an owner to execute but none is provided. */ export declare class AccountRequiresOwnerError extends BaseError { name: string; /** * Constructs an error indicating that an account of the specified type requires an owner to execute. * * @param {string} accountType The type of account that requires an owner */ constructor(accountType: string); } /** * Represents an error that occurs when an attempt is made to call `UpgradeToAndCall` on an account type that does not support it. Includes the account type in the error message. */ export declare class UpgradeToAndCallNotSupportedError extends BaseError { name: string; /** * Constructs an error message indicating that `UpgradeToAndCall` is not supported by the specified account type. * * @param {string} accountType The type of account that does not support `UpgradeToAndCall` */ constructor(accountType: string); } /** * Represents an error thrown when an account type does not match the expected type. */ export declare class IncorrectAccountType extends BaseError { name: string; /** * Constructs an error object indicating that the expected account type does not match the actual account type. * * @param {string} expected the expected account type * @param {string} actual the actual account type that was received */ constructor(expected: string, actual: string); } /** * Error class indicating that a smart account operation requires a signer. */ export declare class SmartAccountWithSignerRequiredError extends BaseError { name: string; /** * Initializes a new instance of the error class with a predefined error message indicating that a smart account requires a signer. */ constructor(); }