import type { LightAccount, MultiOwnerModularAccount } from "@alchemy/aa-accounts"; import type { ConnectionConfig } from "@alchemy/aa-core"; import type { CreateConnectorFn } from "@wagmi/core"; import { type Config as WagmiConfig } from "@wagmi/core"; import type { Chain } from "viem"; import type { PartialBy } from "viem/chains"; import type { AlchemyGasManagerConfig } from "../middleware/gasManager"; import type { AlchemySigner, AlchemySignerClient, AlchemySignerParams } from "../signer"; import type { ClientStore, CoreStore, StoredState } from "./store/types"; export type SupportedAccountTypes = "LightAccount" | "MultiOwnerModularAccount"; export type SupportedAccounts = LightAccount | MultiOwnerModularAccount; export type SupportedAccount = T extends "LightAccount" ? LightAccount : T extends "MultiOwnerModularAccount" ? MultiOwnerModularAccount : never; export type AlchemyAccountsConfig = { coreStore: CoreStore; clientStore: ClientStore; _internal: { wagmiConfig: WagmiConfig; ssr?: boolean; storageKey: string; sessionLength: number; }; }; export type Connection = ConnectionConfig & { chain: Chain; gasManagerConfig?: AlchemyGasManagerConfig; }; type RpcConnectionConfig = (Connection & { signerConnection?: ConnectionConfig; connections?: never; }) | { connections: Connection[]; chain: Chain; signerConnection: ConnectionConfig; }; export type CreateConfigProps = RpcConnectionConfig & { chain: Chain; sessionConfig?: AlchemySignerParams["sessionConfig"]; ssr?: boolean; storage?: (config?: { sessionLength: number; }) => Storage; connectors?: CreateConnectorFn[]; } & Omit, "iframeConfig">, "connection">; export type AlchemyClientState = StoredState; export {};