import type { SmartContractAccount } from "@aa-sdk/core"; import type { AlchemyTransport } from "@account-kit/infra"; import type { Address, Chain, Client, Hex, JsonRpcAccount, Transport } from "viem"; import type { RequestAccountParams } from "./client/actions/requestAccount.ts"; import type { WalletServerViemRpcSchema } from "@alchemy/wallet-api-types/rpc"; export type CreateInnerClientParams = { chain: Chain; transport: AlchemyTransport; policyIds?: string[]; account?: TAccount | Address | undefined; }; export type InnerWalletApiClientBase = Client | undefined, WalletServerViemRpcSchema, { policyIds?: string[]; } & TExtend>; export type CachedAccount = { account: SmartContractAccount; requestParams: RequestAccountParams; }; export type InternalState = { setAccount: (account: CachedAccount) => void; getAccount: () => CachedAccount | undefined; }; export type InnerWalletApiClient = InnerWalletApiClientBase<{ internal: InternalState; }>; export type WithoutChainId = T extends { chainId: Hex; } ? Omit : T; export type WithoutRawPayload = T extends { rawPayload: Hex; } ? Omit : T;