export { erc7579Actions } from 'permissionless/actions/erc7579'; import * as viem from 'viem'; import { Address, Hex, PrivateKeyAccount, Chain, PublicClient, LocalAccount, UnionPartialBy, Transport, Client, Prettify as Prettify$1, Hash, SendTransactionParameters, Abi, ContractFunctionName, ContractFunctionArgs, WriteContractParameters, TypedData, RpcSchema, BundlerRpcSchema, PublicClientConfig, Account, OneOf, AbiFunction, ByteArray, WalletClient, SignableMessage, TypedDataDefinition, EIP1193Provider as EIP1193Provider$1, BaseError, EIP1193Parameters, EIP1193RequestFn } from 'viem'; import { Prettify } from 'viem/types/utils'; import { ToSafeSmartAccountReturnType } from 'permissionless/accounts'; import { UserOperation, SmartAccount, SendUserOperationParameters, BundlerActions, PaymasterActions } from 'viem/account-abstraction'; import { SmartAccountClientConfig } from 'permissionless'; import { Prettify as Prettify$2 } from 'viem/chains'; import { signMessage, signTypedData } from 'permissionless/actions/smartAccount'; import { Session, SmartSessionMode, EnableSessionData } from '@rhinestone/module-sdk'; export { SmartSessionMode } from '@rhinestone/module-sdk'; import { Handler } from 'mitt'; declare const ENTRYPOINT_ADDRESS_V07 = "0x0000000071727De22E5E9d8BAf0edAc6f37da032"; declare const customChains: ({ blockExplorers?: { [key: string]: { name: string; url: string; apiUrl?: string | undefined; }; default: { name: string; url: string; apiUrl?: string | undefined; }; } | undefined | undefined; blockTime?: number | undefined | undefined; contracts: { readonly multicall3: { readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11"; }; }; ensTlds?: readonly string[] | undefined; id: 4078; name: "Muster"; nativeCurrency: { readonly decimals: 18; readonly name: "Ether"; readonly symbol: "ETH"; }; experimental_preconfirmationTime?: number | undefined | undefined; rpcUrls: { readonly default: { readonly http: readonly ["https://muster.alt.technology/"]; }; readonly public: { readonly http: readonly ["https://muster.alt.technology/"]; }; }; sourceId?: number | undefined | undefined; testnet?: boolean | undefined | undefined; custom?: Record | undefined; fees?: viem.ChainFees | undefined; formatters?: undefined; serializers?: viem.ChainSerializers | undefined; readonly network: "muster"; } | { blockExplorers?: { [key: string]: { name: string; url: string; apiUrl?: string | undefined; }; default: { name: string; url: string; apiUrl?: string | undefined; }; } | undefined | undefined; blockTime?: number | undefined | undefined; contracts: { readonly multicall3: { readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11"; }; }; ensTlds?: readonly string[] | undefined; id: 1291; name: "Swisstronik testnet"; nativeCurrency: { readonly decimals: 18; readonly name: "Ether"; readonly symbol: "ETH"; }; experimental_preconfirmationTime?: number | undefined | undefined; rpcUrls: { readonly default: { readonly http: readonly ["https://json-rpc.testnet.swisstronik.com/unencrypted/"]; }; readonly public: { readonly http: readonly ["https://json-rpc.testnet.swisstronik.com/unencrypted/"]; }; }; sourceId?: number | undefined | undefined; testnet?: boolean | undefined | undefined; custom?: Record | undefined; fees?: viem.ChainFees | undefined; formatters?: undefined; serializers?: viem.ChainSerializers | undefined; readonly network: "swisstronik testnet"; })[]; declare enum WalletVersion { V1 = "v1.0" } type SafeContractParams = { safeProxyFactoryAddress: Address; safeSingletonAddress: Address; multisendAddress: Address; fallbackHandler: Address; setUpContractAddress: Address; safeWebAuthnSharedSignerContractAddress: Address; p256Verifier: Address; safeWebAuthnSignerFactory: Address; safe4337ModuleAddress?: Address; safe4337SessionKeysModule?: Address; migrationContractAddress?: Address; }; type RecoveryParams = { socialRecoveryModuleAddress: Address; moduleFactoryAddress: Address; delayModuleAddress: Address; recoveryCooldown: number; recoveryExpiration: number; guardianAddress: Address; }; type DeploymentParams = { version: WalletVersion; safeContractParams: SafeContractParams; recoveryParams: RecoveryParams; }; type ProjectParams = { chainId: string; safeContractParams: SafeContractParams; recoveryParams: RecoveryParams; }; type Wallet = { projectId: string; chainId: string; address: string; creationDate: Date; connectionDate: Date; initiatorAddress: string; deploymentParams: DeploymentParams; }; type DeviceData = { browser: string; os: string; platform: string; }; type WebAuthnSigner = { projectId: string; userId: string; chainId: string; smartAccountAddress: string; publicKeyId: string; publicKeyX: string; publicKeyY: string; signerAddress: string; deviceData: DeviceData; creationDate?: Date; }; type Signer$1 = { signerAddress: Address; deviceData: DeviceData; publicKeyId?: Hex; publicKeyX?: Hex; publicKeyY?: Hex; }; type RelayedTransactionStatus = { received: { date: Date; }; attributed?: { date: Date; relayerAddress: string; }; sent?: { date: Date; hash: string; gasLimit: string; maxPriorityFeePerGas: string; maxFeePerGas: string; nonce: number; }; rebroadcasted?: { date: Date; hash: string; gasLimit: string; maxPriorityFeePerGas: string; maxFeePerGas: string; nonce: number; }[]; confirmed?: { date: Date; hash: string; gasUsed: string; effectiveGasPrice: string; status: number; }; }; type RelayedTransactionDetails = { id: string; to: string; data: string; projectId?: string; isSponsored?: boolean; status: RelayedTransactionStatus; }; declare enum OperationType { Call = 0, DelegateCall = 1 } interface MetaTransactionData { readonly to: string; readonly value: string; readonly data: string; readonly operation?: OperationType | string; } interface SafeTransactionDataPartial extends MetaTransactionData { readonly operation?: OperationType | string; readonly safeTxGas?: number | string; readonly baseGas?: number | string; readonly gasPrice?: number | string; readonly gasToken?: number | string; readonly refundReceiver?: string; readonly nonce?: number | string; } declare class API { private readonly api; private readonly _apiKey; constructor(apiKey: string, baseUrl?: string); get apiUrl(): string; get apiKey(): string; getProjectParams(chainId: number): Promise; getWalletByNetworks(walletAddress: Address): Promise; createWallet({ chainId, smartAccountAddress, initiatorAddress, }: { chainId: number; smartAccountAddress: Address; initiatorAddress: Address; }): Promise; initWallet({ chainId, smartAccountAddress, initiatorAddress, publicKeyId, publicKeyX, publicKeyY, deviceData, }: { chainId: number; smartAccountAddress: Address; initiatorAddress: Address; publicKeyId?: Hex; publicKeyX?: Hex; publicKeyY?: Hex; deviceData?: DeviceData; }): Promise; importExternalSafe({ smartAccountAddress, publicKeyId, publicKeyX, publicKeyY, deviceData, signerAddress, chainId, transactionCalldata, }: { smartAccountAddress: Address; publicKeyId?: Hex; publicKeyX?: Hex; publicKeyY?: Hex; deviceData?: DeviceData; signerAddress: Address; chainId: string; transactionCalldata: Hex; }): Promise; /** * WebAuthn Section */ createWebAuthnSigner({ chainId, walletAddress, publicKeyId, publicKeyX, publicKeyY, deviceData, signerAddress, isSharedWebAuthnSigner, }: { chainId: number; walletAddress: Hex; publicKeyId: Hex; publicKeyX: Hex; publicKeyY: Hex; deviceData: DeviceData; signerAddress: Address; isSharedWebAuthnSigner: boolean; }): Promise; getPasskeySignerByPublicKeyId(publicKeyId: Hex): Promise; getPasskeySignersByWalletAddress(walletAddress: Address): Promise; predictWebAuthnSignerAddress({ publicKeyX, publicKeyY, }: { publicKeyX: Hex; publicKeyY: Hex; }): Promise; getWebAuthnSignersByWalletAddressAndChain(walletAddress: Address, chainId: number): Promise; isValidSignature(walletAddress: Address, message: string, signature: Hex, chainId: number): Promise; getRelayedTransaction(relayId: string, chainId: number): Promise; } type eoaFallback = { signer: PrivateKeyAccount; privateKey: Hex; encryptionSalt?: string; }; interface webAuthnOptions { authenticatorSelection?: { authenticatorAttachment?: AuthenticatorAttachment; userVerification?: UserVerificationRequirement; requireResidentKey?: boolean; residentKey?: ResidentKeyRequirement; }; attestation?: AttestationConveyancePreference; extensions?: any; tauriOptions?: { androidApkOrigin: string; rpId: string; }; } type PasskeyLocalStorageFormat = { id: Hex; pubkeyCoordinates: { x: Hex; y: Hex; }; signerAddress: Address; publicKeyAlgorithm?: number; }; interface ComethSignerTypes { type: "localWallet" | "passkey"; } interface FallbackEoaSigner extends ComethSignerTypes { type: "localWallet"; eoaFallback: eoaFallback; } interface PasskeySigner extends ComethSignerTypes { type: "passkey"; passkey: PasskeyLocalStorageFormat; } type ComethSigner = FallbackEoaSigner | PasskeySigner; type ComethSignerConfig = { disableEoaFallback?: boolean; encryptionSalt?: string; webAuthnOptions?: webAuthnOptions; rpId?: string; passKeyName?: string; fullDomainSelected?: boolean; }; type CreateSignerParams = { apiKey: string; chain: Chain; smartAccountAddress?: Address; safeContractParams: SafeContractParams; baseUrl?: string; publicClient?: PublicClient; } & ComethSignerConfig; type Signer = ComethSigner | PrivateKeyAccount; type SafeSigner = LocalAccount & { getStubSignature(): Promise; signUserOperation: (parameters: UnionPartialBy & { chainId?: number | undefined; }) => Promise; }; type ComethSafeSmartAccount = ToSafeSmartAccountReturnType<"0.7"> & { connectApiInstance: API; signerAddress: Address; safeContractParams: SafeContractParams; comethSignerConfig?: ComethSignerConfig; publicClient?: PublicClient; }; type createSafeSmartAccountParameters$1 = Prettify<{ apiKey: string; chain: Chain; publicClient?: PublicClient; baseUrl?: string; smartAccountAddress?: Address; comethSignerConfig?: ComethSignerConfig; safeContractConfig?: SafeContractParams; signer?: Signer; smartSessionSigner?: SafeSigner; }>; /** * Create a Safe smart account */ declare function createSafeSmartAccount({ apiKey, chain, publicClient, baseUrl, smartAccountAddress, comethSignerConfig, safeContractConfig, signer, smartSessionSigner, }: createSafeSmartAccountParameters$1): Promise; interface QRCodeOptions { width?: number; margin?: number; color?: { dark?: string; light?: string; }; } type CreateNewSignerParams = { webAuthnOptions?: webAuthnOptions; passKeyName?: string; fullDomainSelected?: boolean; encryptionSalt?: string; }; /** * Creates a new passkey signer for a smart account * @param apiKey - The API key for authentication * @param baseUrl - Optional base URL for the API * @param smartAccountAddress - The address of the smart account * @param passKeyName - Optional name for the passkey * @param encryptionSalt - Optional encryption salt * @param fullDomainSelected - Optional selected the full domain for the passkey */ declare const createNewSignerWithAccountAddress: ({ apiKey, baseUrl, smartAccountAddress, params, }: { apiKey: string; smartAccountAddress: Address; baseUrl?: string; params?: CreateNewSignerParams; }) => Promise; /** * Creates a new passkey signer * @param apiKey - The API key for authentication * @param baseUrl - Optional base URL for the API * @param passKeyName - Optional name for the passkey * @param encryptionSalt - Optional encryption salt * @param fullDomainSelected - Optional selected the full domain for the passkey */ declare const createNewSigner: ({ apiKey, baseUrl, params, }: { apiKey: string; baseUrl?: string; params?: CreateNewSignerParams; }) => Promise; declare const serializeUrlWithSignerPayload: (validationPageUrl: string, signerPayload: Signer$1) => Promise; declare const generateQRCodeUrl: (validationPageUrl: string, signerPayload: Signer$1, options?: QRCodeOptions) => Promise; type RetrieveAccountAddressWithSignatureResponse = { smartAccountAddress: Address; signature: Hex; publicKeyId: Hex; }; type RetrieveFromPasskeysParams = { apiKey: string; chain: Chain; fullDomainSelected?: boolean; rpId?: string; baseUrl?: string; publicClient?: PublicClient; checkLegacy?: boolean; legacyBaseUrl?: string; tauriOptions?: webAuthnOptions["tauriOptions"]; }; type RetrieveFromPasskeyIdParams = { apiKey: string; id: string; chain: Chain; fullDomainSelected?: boolean; rpId?: string; baseUrl?: string; publicClient?: PublicClient; tauriOptions?: webAuthnOptions["tauriOptions"]; }; /** * Function used to retrieve an account address from passkeys * @param apiKey * @param chain * @param fullDomainSelected * @param rpId */ declare const retrieveAccountAddressFromPasskeys: (params: RetrieveFromPasskeysParams) => Promise
; /** * Function used to retrieve an account address from a passkey id * @param apiKey * @param id * @param chain * @param fullDomainSelected * @param rpId */ declare const retrieveAccountAddressFromPasskeyId: (params: RetrieveFromPasskeyIdParams) => Promise
; /** * Retrieves an account address from passkeys and signs the provided hash * in the same WebAuthn ceremony. Returns the wallet address, the signature * payload and the public key id, so callers can authenticate a user in a * single biometric prompt. */ declare const retrieveAccountAddressFromPasskeysWithSignature: (params: RetrieveFromPasskeysParams & { hash: Hex; }) => Promise; /** * Retrieves an account address from a passkey id and signs the provided hash * in the same WebAuthn ceremony. Returns the wallet address, the signature * payload and the public key id. */ declare const retrieveAccountAddressFromPasskeyIdWithSignature: (params: RetrieveFromPasskeyIdParams & { hash: Hex; }) => Promise; type SafeImportActions = { prepareImportSafe1_1Tx: () => Promise<{ tx: SafeTransactionDataPartial; passkey?: PasskeyLocalStorageFormat; eoaSigner?: PrivateKeyAccount; }>; prepareImportSafe1_3Tx: () => Promise<{ tx: SafeTransactionDataPartial; passkey?: PasskeyLocalStorageFormat; eoaSigner?: PrivateKeyAccount; }>; prepareImportSafe1_4Tx: () => Promise<{ tx: SafeTransactionDataPartial; passkey?: PasskeyLocalStorageFormat; eoaSigner?: PrivateKeyAccount; }>; importSafe: ({ tx, signature, passkey, eoaSigner, }: { tx: SafeTransactionDataPartial; signature: Hex; passkey?: PasskeyLocalStorageFormat; eoaSigner?: PrivateKeyAccount; }) => Promise; signTransactionByExternalOwner: ({ signer, tx, }: { signer: PrivateKeyAccount; tx: SafeTransactionDataPartial; }) => Promise; signTransactionByExternalOwnerFor1_1: ({ signer, tx, }: { signer: PrivateKeyAccount; tx: SafeTransactionDataPartial; }) => Promise; }; declare function importSafeActions(): (client: Client) => SafeImportActions; type ValidateAddDevice = { signer: Signer$1; }; declare function validateAddDevice(client: Client, args: Prettify$1): Promise; type CancelRecoveryRequestParams = { effectiveDelayAddress?: Address; }; declare function cancelRecoveryRequest(client: Client, args: Prettify$1): Promise; type GetDelayModuleAddressParams = { expiration: number; cooldown: number; }; declare function getDelayModuleAddress(client: Client, args: Prettify$1): Promise
; type GetGuardianAddressParams = { delayModuleAddress: Address; }; declare function getGuardianAddress(client: Client, args: Prettify$1): Promise
; type AddGuardianParams = { delayModuleAddress: Address; guardianAddress: Address; }; declare function addGuardian(client: Client, args: Prettify$1): Promise; type DisableGuardianParams = { guardianAddress: Address; expiration?: number; cooldown?: number; }; declare function disableGuardian(client: Client, args: Prettify$1): Promise; type SetupCustomDelayModuleParams = { guardianAddress: Address; expiration?: number; cooldown?: number; }; declare function setupCustomDelayModule(client: Client, args: Prettify$1): Promise; type RecoveryParamsResponse = { txCreatedAt: bigint; txHash: string; }; type GetRecoveryRequestParams = { effectiveDelayAddress?: Address; }; declare function getRecoveryRequest(client: Client, args?: Prettify$1): Promise; type IsRecoveryActiveParams = { effectiveDelayAddress?: Address; }; type IsRecoveryActiveReturnType = { isDelayModuleDeployed: boolean; guardianAddress: Address | null; }; declare function isRecoveryActive(client: Client, args?: Prettify$1): Promise; /** * Creates, signs, and sends a new transaction to the network. * This function also allows you to sponsor this transaction if sender is a smartAccount * * - Docs: https://viem.sh/docs/actions/wallet/sendTransaction.html * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/transactions/sending-transactions * - JSON-RPC Methods: * - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) * - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) * * @param client - Client to use * @param parameters - {@link SendTransactionParameters} * @returns The [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) hash. * * @example * import { createWalletClient, custom } from 'viem' * import { mainnet } from 'viem/chains' * import { sendTransaction } from 'viem/wallet' * * const client = createWalletClient({ * chain: mainnet, * transport: custom(window.ethereum), * }) * const hash = await sendTransaction(client, { * account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', * value: 1000000000000000000n, * }) * * @example * // Account Hoisting * import { createWalletClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { mainnet } from 'viem/chains' * import { sendTransaction } from 'viem/wallet' * * const client = createWalletClient({ * account: privateKeyToAccount('0x…'), * chain: mainnet, * transport: http(), * }) * const hash = await sendTransaction(client, { * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', * value: 1000000000000000000n, * }) */ declare function sendTransaction(client: Client, args: SendTransactionParameters | SendUserOperationParameters): Promise; declare function writeContract = ContractFunctionName, TArgs extends ContractFunctionArgs = ContractFunctionArgs, TChainOverride extends Chain | undefined = undefined>(client: Client, { abi, address, args, dataSuffix, functionName, ...request }: WriteContractParameters): Promise; type SmartAccountActions = { /** * Creates, signs, and sends a new transaction to the network. * This function also allows you to sponsor this transaction if sender is a smartAccount * * - Docs: https://viem.sh/docs/actions/wallet/sendTransaction.html * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/transactions/sending-transactions * - JSON-RPC Methods: * - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction) * - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction) * * @param args - {@link SendTransactionParameters} * @returns The [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) hash. {@link SendTransactionReturnType} * * @example * import { createWalletClient, custom } from 'viem' * import { mainnet } from 'viem/chains' * * const client = createWalletClient({ * chain: mainnet, * transport: custom(window.ethereum), * }) * const hash = await client.sendTransaction({ * account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', * value: 1000000000000000000n, * }) * * @example * // Account Hoisting * import { createWalletClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { mainnet } from 'viem/chains' * * const client = createWalletClient({ * account: privateKeyToAccount('0x…'), * chain: mainnet, * transport: http(), * }) * const hash = await client.sendTransaction({ * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', * value: 1000000000000000000n, * }) */ sendTransaction: (args: Parameters>[1]) => Promise; /** * Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. * * - Docs: https://viem.sh/docs/actions/wallet/signMessage.html * - JSON-RPC Methods: * - JSON-RPC Accounts: [`personal_sign`](https://docs.metamask.io/guide/signing-data.html#personal-sign) * - Local Accounts: Signs locally. No JSON-RPC request. * * With the calculated signature, you can: * - use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage.html) to verify the signature, * - use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress.html) to recover the signing address from a signature. * * @param args - {@link SignMessageParameters} * @returns The signed message. {@link SignMessageReturnType} * * @example * import { createWalletClient, custom } from 'viem' * import { mainnet } from 'viem/chains' * * const client = createWalletClient({ * chain: mainnet, * transport: custom(window.ethereum), * }) * const signature = await client.signMessage({ * account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', * message: 'hello world', * }) * * @example * // Account Hoisting * import { createWalletClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { mainnet } from 'viem/chains' * * const client = createWalletClient({ * account: privateKeyToAccount('0x…'), * chain: mainnet, * transport: http(), * }) * const signature = await client.signMessage({ * message: 'hello world', * }) */ signMessage: (args: Parameters>[1]) => ReturnType>; /** * Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. * * - Docs: https://viem.sh/docs/actions/wallet/signTypedData.html * - JSON-RPC Methods: * - JSON-RPC Accounts: [`eth_signTypedData_v4`](https://docs.metamask.io/guide/signing-data.html#signtypeddata-v4) * - Local Accounts: Signs locally. No JSON-RPC request. * * @param client - Client to use * @param args - {@link SignTypedDataParameters} * @returns The signed data. {@link SignTypedDataReturnType} * * @example * import { createWalletClient, custom } from 'viem' * import { mainnet } from 'viem/chains' * * const client = createWalletClient({ * chain: mainnet, * transport: custom(window.ethereum), * }) * const signature = await client.signTypedData({ * account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', * domain: { * name: 'Ether Mail', * version: '1', * chainId: 1, * verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', * }, * types: { * Person: [ * { name: 'name', type: 'string' }, * { name: 'wallet', type: 'address' }, * ], * Mail: [ * { name: 'from', type: 'Person' }, * { name: 'to', type: 'Person' }, * { name: 'contents', type: 'string' }, * ], * }, * primaryType: 'Mail', * message: { * from: { * name: 'Cow', * wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', * }, * to: { * name: 'Bob', * wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', * }, * contents: 'Hello, Bob!', * }, * }) * * @example * // Account Hoisting * import { createWalletClient, http } from 'viem' * import { privateKeyToAccount } from 'viem/accounts' * import { mainnet } from 'viem/chains' * * const client = createWalletClient({ * account: privateKeyToAccount('0x…'), * chain: mainnet, * transport: http(), * }) * const signature = await client.signTypedData({ * domain: { * name: 'Ether Mail', * version: '1', * chainId: 1, * verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC', * }, * types: { * Person: [ * { name: 'name', type: 'string' }, * { name: 'wallet', type: 'address' }, * ], * Mail: [ * { name: 'from', type: 'Person' }, * { name: 'to', type: 'Person' }, * { name: 'contents', type: 'string' }, * ], * }, * primaryType: 'Mail', * message: { * from: { * name: 'Cow', * wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826', * }, * to: { * name: 'Bob', * wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB', * }, * contents: 'Hello, Bob!', * }, * }) */ signTypedData: (args: Parameters>[1]) => ReturnType>; /** * Executes a write function on a contract. * This function also allows you to sponsor this transaction if sender is a smartAccount * * - Docs: https://viem.sh/docs/contract/writeContract.html * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/contracts/writing-to-contracts * * A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a [Transaction](https://viem.sh/docs/glossary/terms.html) is needed to be broadcast in order to change the state. * * Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet.html) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction.html) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData.html). * * __Warning: The `write` internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to [simulate the contract write with `contract.simulate`](https://viem.sh/docs/contract/writeContract.html#usage) before you execute it.__ * * @param args - {@link WriteContractParameters} * @returns A [Transaction Hash](https://viem.sh/docs/glossary/terms.html#hash). {@link WriteContractReturnType} * * @example * import { createWalletClient, custom, parseAbi } from 'viem' * import { mainnet } from 'viem/chains' * * const client = createWalletClient({ * chain: mainnet, * transport: custom(window.ethereum), * }) * const hash = await client.writeContract({ * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', * abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), * functionName: 'mint', * args: [69420], * }) * * @example * // With Validation * import { createWalletClient, custom, parseAbi } from 'viem' * import { mainnet } from 'viem/chains' * * const client = createWalletClient({ * chain: mainnet, * transport: custom(window.ethereum), * }) * const { request } = await client.simulateContract({ * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', * abi: parseAbi(['function mint(uint32 tokenId) nonpayable']), * functionName: 'mint', * args: [69420], * } * const hash = await client.writeContract(request) */ writeContract: = ContractFunctionName, TArgs extends ContractFunctionArgs = ContractFunctionArgs, TChainOverride extends Chain | undefined = undefined>(args: WriteContractParameters) => ReturnType>; }; type VerifySignatureParams = { message: string; signature: Hex; }; declare function verifySignature(client: Client, args: Prettify$1): Promise; type ComethClientActions = SmartAccountActions & { validateAddDevice: (args: Parameters>[1]) => Promise; setUpRecoveryModule: () => Promise; cancelRecoveryRequest: (args: Parameters>[1]) => Promise; isRecoveryActive: (args: Parameters>[1]) => Promise; getRecoveryRequest: (args: Parameters>[1]) => Promise; verifySignature: (args: Parameters>[1]) => Promise; getDelayModuleAddress: (args: Parameters>[1]) => Promise
; getGuardianAddress: (args: Parameters>[1]) => Promise
; addGuardian: (args: Parameters>[1]) => Promise; disableGuardian: (args: Parameters>[1]) => Promise; setupCustomDelayModule: (args: Parameters>[1]) => Promise; setFallbackTo7579: () => Promise; is7579Installed: () => Promise; }; type ComethAccountClientActions = ComethClientActions & SafeOwnerPluginActions; type ComethSmartAccountClient = Prettify$2 ? chain : undefined, account, rpcSchema extends RpcSchema ? [...BundlerRpcSchema, ...rpcSchema] : BundlerRpcSchema, BundlerActions & ComethAccountClientActions>>; declare function createSmartAccountClient(parameters: SmartAccountClientConfig): ComethSmartAccountClient; type EnrichedOwner = { address: Address; deviceData?: DeviceData; creationDate?: Date; isSmartContract?: boolean; }; type SafeOwnerPluginActions = { addOwner: (args: { ownerToAdd: Address; }) => Promise; removeOwner: (args: { ownerToRemove: Address; }) => Promise; getOwners: () => Promise; getEnrichedOwners: () => Promise; }; /** * RPC interface that's used for the cometh paymaster communication */ type ComethPaymasterRpcSchema = [ { Method: "pm_sponsorUserOperation"; Parameters: [userOperation: UserOperation<"0.7">, EntryPoint: Address]; ReturnType: { callGasLimit: Hex; verificationGasLimit: Hex; preVerificationGas: Hex; paymasterPostOpGasLimit: Hex; paymasterVerificationGasLimit: Hex; }; } ]; type ComethPaymasterClient = Client; type ComethPaymasterClientActions = { /** * Returns maxFeePerGas & maxPriorityFeePerGas required to sponsor a userOperation. */ getUserOperationGasPrice: () => Promise<{ maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; }>; }; declare const createComethPaymasterClient: (parameters: PublicClientConfig & { publicClient?: PublicClient; }) => ComethPaymasterClient; type Execution = { target: Address; value: bigint; callData: Hex; }; /** * Represents a hardcoded hex value reference. * Used when you want to bypass automatic hex conversion. */ type HardcodedReference = { /** The raw hex value */ raw: Hex; }; /** * Base types that can be converted to hex references. */ type BaseReferenceValue = string | number | bigint | boolean | ByteArray; /** * Union type of all possible reference values that can be converted to hex. * Includes both basic types and hardcoded references. */ type AnyReferenceValue = BaseReferenceValue | HardcodedReference; type PreparePermissionResponse = { /** Array of permission IDs for the created sessions. */ permissionIds: Hex[]; /** The execution object for the action. */ action: Execution; /** The sessions that were created. */ sessions: Session[]; }; /** * Represents the response for creating sessions. */ type GrantPermissionResponse = { /** The hash of the user operation. */ userOpHash: Hex; } & PreparePermissionResponse; type RemovePermissionResponse = { /** The hash of the user operation. */ userOpHash: Hex; /** The permission ID for the removing session. */ permissionId: Hex; /** The execution object for the action. */ action: Execution; }; type Call = { to: Hex; data?: Hex | undefined; value?: bigint | undefined; }; type OptionalSessionKeyData = OneOf<{ /** Public key for the session. Required for K1 algorithm validators. */ sessionPublicKey: Hex; } | { /** Data for the session key. */ sessionKeyData: Hex; }>; /** * Represents a rule for action policies. */ type Rule = { /** The condition to apply to the parameter */ condition: ParamCondition; /** The offset index in the calldata where the value to be checked is located */ offsetIndex: number; /** Indicates if the rule has a usage limit */ isLimited: boolean; /** The reference value to compare against */ ref: AnyReferenceValue; /** The usage object containing limit and used values (required if isLimited is true) */ usage: LimitUsage; }; type ActionPolicyInfo = { /** The address of the contract to be included in the policy */ contractAddress: Hex; /** The timeframe policy can be used to restrict a session to only be able to be used within a certain timeframe */ validUntil?: number; /** Timestamp after which the policy becomes valid */ validAfter?: number; /** The value limit policy can be used to enforce that only a certain amount of native value can be spent. For ERC-20 limits, use the spending limit policy */ valueLimit?: bigint; /** The spending limits policy can be used to ensure that only a certain amount of ERC-20 tokens can be spent. For native value spends, use the value limit policy */ tokenLimits?: SpendingLimitPolicyData[]; /** The value limit policy can be used to enforce that only a certain amount of native value can be spent. For ERC-20 limits, use the spending limit policy. */ usageLimit?: bigint; /** The sudo policy is an action policy that will allow any action for the specified target and selector. */ sudo?: boolean; } & OneOf<{ /** The specific function selector from the contract to be included in the policy */ functionSelector: string | AbiFunction; /** Array of rules for the policy */ rules?: Rule[]; } | { /** The ABI of the contract to be included in the policy */ abi: Abi; }>; /** * Parameters for creating a session. */ type CreateSessionDataParams = OptionalSessionKeyData & { /** Public key for the session. Required for K1 algorithm validators. */ sessionPublicKey?: Hex; /** Address of the session validator. */ sessionValidator?: Address; /** Data for the session validator. */ sessionValidatorInitData?: Hex; /** Optional salt for the session. */ salt?: Hex; /** Timestamp until which the session is valid. */ sessionValidUntil?: number; /** Timestamp after which the session becomes valid. */ sessionValidAfter?: number; /** Chain IDs where the session should be enabled. Useful for enable mode. */ chainIds?: bigint[]; /** Array of action policy data for the session. */ actionPoliciesInfo?: ActionPolicyInfo[]; }; declare enum ParamCondition { EQUAL = 0, GREATER_THAN = 1, LESS_THAN = 2, GREATER_THAN_OR_EQUAL = 3, LESS_THAN_OR_EQUAL = 4, NOT_EQUAL = 5 } type SpendingLimitPolicyData = { /** The address of the token to be included in the policy */ token: Address; /** The limit for the token */ limit: bigint; }; /** * Represents the usage limit for a rule. */ type LimitUsage = { limit: bigint; used: bigint; }; /** * Represents the possible modes for a smart session. */ type SmartSessionModeType = (typeof SmartSessionMode)[keyof typeof SmartSessionMode]; /** * Represents the data structure for using a session module. */ type UsePermissionModuleData = { /** The mode of the smart session. */ mode?: SmartSessionModeType; /** Data for enabling the session. */ enableSessionData?: EnableSessionData; /** The index of the permission ID to use for the session. Defaults to 0. */ permissionIdIndex?: number; } & PreparePermissionResponse; type GrantPermissionParameters = { /** Array of session data parameters for creating multiple sessions. */ sessionRequestedInfo: CreateSessionDataParams[]; /** The maximum fee per gas unit the transaction is willing to pay. */ maxFeePerGas?: bigint; /** The maximum priority fee per gas unit the transaction is willing to pay. */ maxPriorityFeePerGas?: bigint; /** The nonce of the transaction. If not provided, it will be determined automatically. */ nonce?: bigint; /** Optional public client for blockchain interactions. */ publicClient?: PublicClient; /** The modular smart account to create sessions for. If not provided, the client's account will be used. */ account?: TAccount; /** Optional attesters to trust. */ attesters?: Hex[]; /** Additional calls to be included in the user operation. */ calls?: Call[]; }; type IsPermissionInstalledParameters = { session: Session; }; type PreparePermissionParameters = { /** Array of session data parameters for creating multiple sessions. */ sessionRequestedInfo: CreateSessionDataParams[]; /** The maximum fee per gas unit the transaction is willing to pay. */ maxFeePerGas?: bigint; /** The maximum priority fee per gas unit the transaction is willing to pay. */ maxPriorityFeePerGas?: bigint; /** The nonce of the transaction. If not provided, it will be determined automatically. */ nonce?: bigint; /** Optional public client for blockchain interactions. */ publicClient?: PublicClient; /** The modular smart account to create sessions for. If not provided, the client's account will be used. */ account?: TAccount; }; type RemovePermissionParameters = { /** The permission ID to remove. */ permissionId: Hex; /** Optional public client for blockchain interactions. */ publicClient?: PublicClient; }; type TrustAttestersParameters = { /** The addresses of the attesters to be trusted. */ attesters?: Hex[]; /** The address of the registry contract. */ registryAddress?: Hex; /** The maximum fee per gas unit the transaction is willing to pay. */ maxFeePerGas?: bigint; /** The maximum priority fee per gas unit the transaction is willing to pay. */ maxPriorityFeePerGas?: bigint; /** The nonce of the transaction. If not provided, it will be determined automatically. */ nonce?: bigint; /** The smart account to use for trusting attesters. If not provided, the client's account will be used. */ account?: TAccount; /** The threshold of the attesters to be trusted. */ threshold?: number; }; /** * Parameters for using a smart session to execute actions. * */ type UsePermissionParameters$1 = { /** Array of executions to perform in the session. Allows for batch transactions if the session is enabled for multiple actions. */ actions: Execution[]; /** The maximum fee per gas unit the transaction is willing to pay. */ maxFeePerGas?: bigint; /** The maximum priority fee per gas unit the transaction is willing to pay. */ maxPriorityFeePerGas?: bigint; verificationGasLimit?: bigint; }; type SmartSessionCreateActions = { /** * Creates multiple sessions for a smart account. * * @param args - Parameters for creating sessions. * @returns A promise that resolves to the creation response. */ grantPermission: (args: GrantPermissionParameters) => Promise; /** * Removes a session for a smart account. * * @param args - Parameters for removing session. * @returns A promise that resolves to the removal response. */ removePermission: (args: RemovePermissionParameters) => Promise; /** * Prepares permission for a smart account. * * @param args - Parameters for preparing permission. * @returns A promise that resolves to the transaction hash. */ preparePermission: (args: PreparePermissionParameters) => Promise; /** * Creates multiple sessions for a smart account. * * @param args - Parameters for creating sessions. * @returns A promise that resolves to the creation response. */ isPermissionInstalled: (args: IsPermissionInstalledParameters) => Promise; /** * Trusts attesters for a smart account. * * @param args - Parameters for trusting attesters. * @returns A promise that resolves to the transaction hash. */ trustAttesters: (args?: TrustAttestersParameters) => Promise; /** * Uses a session to perform an action. * * @param args - Parameters for using a session. * @returns A promise that resolves to the transaction hash. */ usePermission: (args: UsePermissionParameters$1) => Promise; }; /** * Creates actions for managing smart session creation. * * @returns A function that takes a client and returns SmartSessionCreateActions. */ declare function smartSessionActions(): (client: Client) => SmartSessionCreateActions; type UsePermissionModuleParameters = { moduleData?: UsePermissionModuleData; signer: PrivateKeyAccount; }; declare function toSmartSessionsSigner(smartAccountClient: ComethSmartAccountClient, parameters: UsePermissionModuleParameters): Promise>; /** * Helper to create the Cometh Signer * @param apiKey * @param smartAccountAddress * @param disableEoaFallback * @param encryptionSalt * @param webAuthnOptions * @param passKeyName */ declare function createSigner({ apiKey, chain, publicClient, smartAccountAddress, baseUrl, disableEoaFallback, encryptionSalt, webAuthnOptions, rpId, passKeyName, fullDomainSelected, safeContractParams, }: CreateSignerParams): Promise; type LegacySafeSmartAccount = { address: Address; publicClient: PublicClient; migrate: () => Promise; hasMigrated: () => Promise; legacySignTransaction: ({ signer, tx, }: { signer: PrivateKeyAccount; tx: SafeTransactionDataPartial; }) => Promise; signTransaction: (transaction: SafeTransactionDataPartial) => Promise; }; type createSafeSmartAccountParameters = Prettify<{ apiKeyLegacy: string; apiKey4337: string; chain: Chain; smartAccountAddress?: Address; comethSignerConfig?: ComethSignerConfig; isImport?: boolean; baseUrl: string; publicClient: PublicClient; }>; /** * Create a Safe smart account * @param apiKey - The API key for authentication * @param rpcUrl - Optional RPC URL for the blockchain network * @param smartAccountAddress - Optional address of an existing smart account - * @returns A SafeSmartAccount instance */ declare function createLegacySafeSmartAccount({ apiKeyLegacy, apiKey4337, chain, smartAccountAddress, comethSignerConfig, isImport, baseUrl, publicClient, }: createSafeSmartAccountParameters): Promise; declare const retrieveLegacyWalletAddress: (apiKeyLegacy: string) => Promise; type UsePermissionParameters = { /** Array of executions to perform in the session. Allows for batch transactions if the session is enabled for multiple actions. */ actions: Execution[]; /** The maximum fee per gas unit the transaction is willing to pay. */ maxFeePerGas?: bigint; /** The maximum priority fee per gas unit the transaction is willing to pay. */ maxPriorityFeePerGas?: bigint; /** The nonce of the transaction. If not provided, it will be determined automatically. */ nonce?: bigint; /** The modular smart account to use for the session. If not provided, the client's account will be used. */ account?: TAccount; verificationGasLimit?: bigint; }; declare function walletClientToSmartAccountSigner(walletClient: WalletClient): { address: `0x${string}`; type: string; source: string; publicKey: `0x${string}`; signMessage: ({ message, }: { message: SignableMessage; }) => Promise; signTypedData, TPrimaryType extends keyof TTypedData | "EIP712Domain" = keyof TTypedData>(typedData: TypedDataDefinition): Promise<`0x${string}`>; }; declare const providerToSmartAccountSigner: (provider: EIP1193Provider$1, params?: { signerAddress: Hex; }) => Promise<{ address: `0x${string}`; type: string; source: string; publicKey: `0x${string}`; signMessage: ({ message, }: { message: SignableMessage; }) => Promise; signTypedData | { [x: string]: readonly viem.TypedDataParameter[]; [x: `string[${string}]`]: undefined; [x: `function[${string}]`]: undefined; [x: `address[${string}]`]: undefined; [x: `bool[${string}]`]: undefined; [x: `bytes[${string}]`]: undefined; [x: `bytes1[${string}]`]: undefined; [x: `bytes2[${string}]`]: undefined; [x: `bytes3[${string}]`]: undefined; [x: `bytes4[${string}]`]: undefined; [x: `bytes5[${string}]`]: undefined; [x: `bytes6[${string}]`]: undefined; [x: `bytes7[${string}]`]: undefined; [x: `bytes8[${string}]`]: undefined; [x: `bytes9[${string}]`]: undefined; [x: `bytes10[${string}]`]: undefined; [x: `bytes11[${string}]`]: undefined; [x: `bytes12[${string}]`]: undefined; [x: `bytes13[${string}]`]: undefined; [x: `bytes14[${string}]`]: undefined; [x: `bytes15[${string}]`]: undefined; [x: `bytes16[${string}]`]: undefined; [x: `bytes17[${string}]`]: undefined; [x: `bytes18[${string}]`]: undefined; [x: `bytes19[${string}]`]: undefined; [x: `bytes20[${string}]`]: undefined; [x: `bytes21[${string}]`]: undefined; [x: `bytes22[${string}]`]: undefined; [x: `bytes23[${string}]`]: undefined; [x: `bytes24[${string}]`]: undefined; [x: `bytes25[${string}]`]: undefined; [x: `bytes26[${string}]`]: undefined; [x: `bytes27[${string}]`]: undefined; [x: `bytes28[${string}]`]: undefined; [x: `bytes29[${string}]`]: undefined; [x: `bytes30[${string}]`]: undefined; [x: `bytes31[${string}]`]: undefined; [x: `bytes32[${string}]`]: undefined; [x: `int[${string}]`]: undefined; [x: `int8[${string}]`]: undefined; [x: `int16[${string}]`]: undefined; [x: `int24[${string}]`]: undefined; [x: `int32[${string}]`]: undefined; [x: `int40[${string}]`]: undefined; [x: `int48[${string}]`]: undefined; [x: `int56[${string}]`]: undefined; [x: `int64[${string}]`]: undefined; [x: `int72[${string}]`]: undefined; [x: `int80[${string}]`]: undefined; [x: `int88[${string}]`]: undefined; [x: `int96[${string}]`]: undefined; [x: `int104[${string}]`]: undefined; [x: `int112[${string}]`]: undefined; [x: `int120[${string}]`]: undefined; [x: `int128[${string}]`]: undefined; [x: `int136[${string}]`]: undefined; [x: `int144[${string}]`]: undefined; [x: `int152[${string}]`]: undefined; [x: `int160[${string}]`]: undefined; [x: `int168[${string}]`]: undefined; [x: `int176[${string}]`]: undefined; [x: `int184[${string}]`]: undefined; [x: `int192[${string}]`]: undefined; [x: `int200[${string}]`]: undefined; [x: `int208[${string}]`]: undefined; [x: `int216[${string}]`]: undefined; [x: `int224[${string}]`]: undefined; [x: `int232[${string}]`]: undefined; [x: `int240[${string}]`]: undefined; [x: `int248[${string}]`]: undefined; [x: `int256[${string}]`]: undefined; [x: `uint[${string}]`]: undefined; [x: `uint8[${string}]`]: undefined; [x: `uint16[${string}]`]: undefined; [x: `uint24[${string}]`]: undefined; [x: `uint32[${string}]`]: undefined; [x: `uint40[${string}]`]: undefined; [x: `uint48[${string}]`]: undefined; [x: `uint56[${string}]`]: undefined; [x: `uint64[${string}]`]: undefined; [x: `uint72[${string}]`]: undefined; [x: `uint80[${string}]`]: undefined; [x: `uint88[${string}]`]: undefined; [x: `uint96[${string}]`]: undefined; [x: `uint104[${string}]`]: undefined; [x: `uint112[${string}]`]: undefined; [x: `uint120[${string}]`]: undefined; [x: `uint128[${string}]`]: undefined; [x: `uint136[${string}]`]: undefined; [x: `uint144[${string}]`]: undefined; [x: `uint152[${string}]`]: undefined; [x: `uint160[${string}]`]: undefined; [x: `uint168[${string}]`]: undefined; [x: `uint176[${string}]`]: undefined; [x: `uint184[${string}]`]: undefined; [x: `uint192[${string}]`]: undefined; [x: `uint200[${string}]`]: undefined; [x: `uint208[${string}]`]: undefined; [x: `uint216[${string}]`]: undefined; [x: `uint224[${string}]`]: undefined; [x: `uint232[${string}]`]: undefined; [x: `uint240[${string}]`]: undefined; [x: `uint248[${string}]`]: undefined; [x: `uint256[${string}]`]: undefined; string?: undefined; address?: undefined; bool?: undefined; bytes?: undefined; bytes1?: undefined; bytes2?: undefined; bytes3?: undefined; bytes4?: undefined; bytes5?: undefined; bytes6?: undefined; bytes7?: undefined; bytes8?: undefined; bytes9?: undefined; bytes10?: undefined; bytes11?: undefined; bytes12?: undefined; bytes13?: undefined; bytes14?: undefined; bytes15?: undefined; bytes16?: undefined; bytes17?: undefined; bytes18?: undefined; bytes19?: undefined; bytes20?: undefined; bytes21?: undefined; bytes22?: undefined; bytes23?: undefined; bytes24?: undefined; bytes25?: undefined; bytes26?: undefined; bytes27?: undefined; bytes28?: undefined; bytes29?: undefined; bytes30?: undefined; bytes31?: undefined; bytes32?: undefined; int8?: undefined; int16?: undefined; int24?: undefined; int32?: undefined; int40?: undefined; int48?: undefined; int56?: undefined; int64?: undefined; int72?: undefined; int80?: undefined; int88?: undefined; int96?: undefined; int104?: undefined; int112?: undefined; int120?: undefined; int128?: undefined; int136?: undefined; int144?: undefined; int152?: undefined; int160?: undefined; int168?: undefined; int176?: undefined; int184?: undefined; int192?: undefined; int200?: undefined; int208?: undefined; int216?: undefined; int224?: undefined; int232?: undefined; int240?: undefined; int248?: undefined; int256?: undefined; uint8?: undefined; uint16?: undefined; uint24?: undefined; uint32?: undefined; uint40?: undefined; uint48?: undefined; uint56?: undefined; uint64?: undefined; uint72?: undefined; uint80?: undefined; uint88?: undefined; uint96?: undefined; uint104?: undefined; uint112?: undefined; uint120?: undefined; uint128?: undefined; uint136?: undefined; uint144?: undefined; uint152?: undefined; uint160?: undefined; uint168?: undefined; uint176?: undefined; uint184?: undefined; uint192?: undefined; uint200?: undefined; uint208?: undefined; uint216?: undefined; uint224?: undefined; uint232?: undefined; uint240?: undefined; uint248?: undefined; uint256?: undefined; }, TPrimaryType extends "EIP712Domain" | keyof TTypedData = keyof TTypedData>(typedData: TypedDataDefinition): Promise<`0x${string}`>; }>; type CallType = "call" | "delegatecall" | "batchcall"; type ExecutionMode = { type: callType; revertOnError?: boolean; selector?: `0x${string}`; context?: `0x${string}`; }; /** * Wallet Errors **/ declare class WalletDoesNotExistsError extends Error { constructor(); } declare class WalletNotConnectedError extends Error { constructor(); } declare class WalletNotDeployedError extends Error { constructor(); } declare class WalletAlreadyImportedError extends Error { constructor(); } declare class NoSignerFoundError extends Error { constructor(); } /** * Adaptor Errors **/ declare class EoaFallbackDisableError extends Error { constructor(); } declare class NoFallbackSignerError extends Error { constructor(); } declare class FallbackAlreadySetError extends Error { constructor(); } declare class SignerNotOwnerError extends Error { constructor(); } declare class UnauthorizedMethodError extends Error { constructor(methodName: string); } declare class RelayedTransactionError extends Error { constructor(); } /** * Safe Smart Account Errors **/ declare class SafeNotDeployedError extends Error { constructor(); } declare class ImportOnUndeployedSafeError extends Error { constructor(); } declare class RemoveOwnerOnUndeployedSafeError extends Error { constructor(); } declare class SmartAccountAddressNotFoundError extends Error { constructor(); } declare class MethodNotSupportedError extends BaseError { constructor(); } declare class BatchCallModeNotSupportedError extends Error { constructor(mode: ExecutionMode); } declare class NoCallsToEncodeError extends Error { constructor(); } declare class InvalidCallDataError extends Error { constructor(); } declare class SafeVersionNotSupportedError extends BaseError { constructor(supportedVersion: string, currentVersion: string); } declare class OwnerToRemoveIsNotSafeOwnerError extends Error { constructor(ownerToRemove: string); } declare class MigrationContractAddressNotAvailableError extends Error { constructor(); } declare class InvalidSmartAccountClientError extends Error { constructor(); } declare class InvalidAccountAddressError extends Error { constructor(); } /** * Recovery Errors **/ declare class NoRecoveryRequestFoundError extends BaseError { constructor(); } declare class AddressIsNotAGuardianError extends BaseError { constructor(); } declare class DelayModuleNotEnabledError extends BaseError { constructor(); } declare class DelayModuleAlreadySetUpError extends BaseError { constructor(); } declare class GuardianAlreadyEnabledError extends BaseError { constructor(); } declare class PreviousModuleNotFoundError extends BaseError { constructor(); } declare class RecoveryNotActiveError extends BaseError { constructor(); } declare class RecoveryNotSetUpError extends BaseError { constructor(); } declare class RecoveryAlreadySetUpError extends BaseError { constructor(); } /** * Signature Errors **/ declare class InvalidSignatureError extends Error { constructor(); } declare class InvalidSignerDataError extends Error { constructor(); } declare class InvalidSignatureEncodingError extends Error { constructor(); } declare class EoaSignerRequiredError extends Error { constructor(); } declare class CannotSignForAddressError extends Error { constructor(); } declare class InvalidSignerTypeError extends Error { constructor(); } /** * Add New Device Errors **/ declare class FailedToSerializeUrlError extends Error { constructor(error: Error); } declare class FailedToGenerateQRCodeError extends Error { constructor(error: Error); } declare class DeviceNotCompatibleWithPasskeysError extends Error { constructor(); } declare class DeviceNotCompatibleWithSECKP256r1PasskeysError extends Error { constructor(); } /** * Passkeys Errors **/ declare class PasskeyCreationError extends Error { constructor(); } declare class FailedToGeneratePasskeyError extends Error { constructor(); } declare class NoPasskeySignerFoundInDBError extends Error { constructor(); } declare class NoPasskeySignerFoundInLegacyDBError extends Error { constructor(); } declare class NoPasskeySignerFoundForGivenChain extends Error { constructor(); } declare class NoPasskeySignerFoundInDeviceError extends Error { constructor(); } declare class RetrieveWalletFromPasskeyError extends Error { constructor(); } declare class PasskeySignerFoundInLegacyDBError extends Error { constructor(); } declare class PasskeySignatureFailedError extends Error { constructor(); } declare class PasskeySignerNotValidError extends Error { constructor(); } /** * Session keys Errors **/ declare class PermissionNotInstalledError extends BaseError { constructor(); } declare class ExpiryRequiredError extends Error { constructor(); } declare class ExpiryInPastError extends Error { constructor(); } declare class UnsupportedPolicyError extends Error { constructor(policy: string); } declare class UnsupportedPermissionTypeError extends Error { constructor(permissionType: string); } declare class InvalidParamsError extends Error { constructor(message: string); } /** * Transactions Errors **/ declare class MissingToAddressError extends BaseError { constructor(); } /** * Utils Errors **/ declare class APINotFoundError extends Error { constructor(); } declare class FetchingProjectParamsError extends Error { constructor(); } declare class ChainIdNotFoundError extends Error { constructor(); } declare class NoPrivateKeyFoundError extends Error { constructor(); } declare class ChallengeNotFoundError extends Error { constructor(); } declare class MittEmitter { private emitter; constructor(); on(event: string, handler: Handler): void; off(event: string, handler: Handler): void; emit(event: string, value?: unknown): void; } declare class EIP1193Provider extends MittEmitter { private comethSmartAccountClient; private permissions; private capabilities; constructor(comethSmartAccountClient: ComethSmartAccountClient); getChainId(): number; request({ method, params, }: EIP1193Parameters): ReturnType; private handleGetChainId; private handleEthRequestAccounts; private handleEthAccounts; private handleEthSendTransaction; private handleEthSign; private handlePersonalSign; private handleEthSignTypedDataV4; private handleSwitchEthereumChain; private handleWalletSendcalls; private handleWalletCapabilities; private handleWalletGetCallStatus; private handleWalletGrantPermissions; } export { APINotFoundError, AddressIsNotAGuardianError, BatchCallModeNotSupportedError, type CancelRecoveryRequestParams, CannotSignForAddressError, ChainIdNotFoundError, ChallengeNotFoundError, type ComethSafeSmartAccount, type ComethSmartAccountClient, type CreateSessionDataParams, DelayModuleAlreadySetUpError, DelayModuleNotEnabledError, DeviceNotCompatibleWithPasskeysError, DeviceNotCompatibleWithSECKP256r1PasskeysError, EIP1193Provider, ENTRYPOINT_ADDRESS_V07, type EnrichedOwner, EoaFallbackDisableError, EoaSignerRequiredError, ExpiryInPastError, ExpiryRequiredError, FailedToGeneratePasskeyError, FailedToGenerateQRCodeError, FailedToSerializeUrlError, FallbackAlreadySetError, FetchingProjectParamsError, type GetRecoveryRequestParams, type GrantPermissionParameters, type GrantPermissionResponse, GuardianAlreadyEnabledError, ImportOnUndeployedSafeError, InvalidAccountAddressError, InvalidCallDataError, InvalidParamsError, InvalidSignatureEncodingError, InvalidSignatureError, InvalidSignerDataError, InvalidSignerTypeError, InvalidSmartAccountClientError, type IsRecoveryActiveParams, type IsRecoveryActiveReturnType, MethodNotSupportedError, MigrationContractAddressNotAvailableError, MissingToAddressError, NoCallsToEncodeError, NoFallbackSignerError, NoPasskeySignerFoundForGivenChain, NoPasskeySignerFoundInDBError, NoPasskeySignerFoundInDeviceError, NoPasskeySignerFoundInLegacyDBError, NoPrivateKeyFoundError, NoRecoveryRequestFoundError, NoSignerFoundError, OwnerToRemoveIsNotSafeOwnerError, PasskeyCreationError, PasskeySignatureFailedError, PasskeySignerFoundInLegacyDBError, PasskeySignerNotValidError, PermissionNotInstalledError, PreviousModuleNotFoundError, type QRCodeOptions, RecoveryAlreadySetUpError, RecoveryNotActiveError, RecoveryNotSetUpError, type RecoveryParamsResponse, RelayedTransactionError, RemoveOwnerOnUndeployedSafeError, RetrieveWalletFromPasskeyError, SafeNotDeployedError, type SafeSigner, SafeVersionNotSupportedError, type Signer$1 as Signer, SignerNotOwnerError, SmartAccountAddressNotFoundError, UnauthorizedMethodError, UnsupportedPermissionTypeError, UnsupportedPolicyError, type UsePermissionParameters, WalletAlreadyImportedError, WalletDoesNotExistsError, WalletNotConnectedError, WalletNotDeployedError, createComethPaymasterClient, createLegacySafeSmartAccount, createNewSigner, createNewSignerWithAccountAddress, createSafeSmartAccount, type createSafeSmartAccountParameters$1 as createSafeSmartAccountParameters, createSigner, createSmartAccountClient, customChains, generateQRCodeUrl, importSafeActions, providerToSmartAccountSigner, retrieveAccountAddressFromPasskeyId, retrieveAccountAddressFromPasskeyIdWithSignature, retrieveAccountAddressFromPasskeys, retrieveAccountAddressFromPasskeysWithSignature, retrieveLegacyWalletAddress, serializeUrlWithSignerPayload, smartSessionActions, toSmartSessionsSigner, walletClientToSmartAccountSigner, type webAuthnOptions };