import { d as XService, c as XConnector, X as XAccount } from '../../XConnector-12q0OVe5.js'; import { XToken } from '@sodax/types'; import { f as EvmTypeConfig } from '../../config-DfVq3n0Q.js'; import { Config, CreateConnectorFn, State, Connector } from 'wagmi'; import '@sodax/wallet-sdk-core'; import 'wagmi/connectors'; type WagmiOptions = { reconnectOnMount?: boolean; ssr?: boolean; /** * Base key for wagmi's cookie storage (state cookie = `.store`). @default 'sodax'. * SSR server and client must build from the same key, else the server reads the wrong cookie. */ persistKey?: string; }; declare const createWagmiConfig: (evmChains?: EvmTypeConfig["chains"], options?: WagmiOptions & { connectors?: CreateConnectorFn[]; }) => Config; /** * Wraps wagmi's `cookieToInitialState` so a malformed cookie returns `undefined` instead of throwing * during SSR. NOT validation: a well-formed but attacker-controlled cookie still passes — the live * wallet is authoritative once a connection is established. Errors are swallowed (not logged). */ declare function tryCookieToInitialState(config: Config, cookie: string | null | undefined): State | undefined; /** * Service class for handling EVM chain interactions. * Implements singleton pattern and provides methods for wallet/chain operations. */ declare class EvmXService extends XService { private static instance; wagmiConfig: Config | undefined; private constructor(); static getInstance(): EvmXService; _getTokenBalance(address: string | undefined, chainId: number, tokenAddress: string): Promise; _getChainBalance(address: string | undefined, chainId: number): Promise; getBalance(address: string | undefined, xToken: XToken): Promise; getBalances(address: string | undefined, xTokens: XToken[]): Promise>; } declare class EvmXConnector extends XConnector { connector: Connector; constructor(connector: Connector); connect(): Promise; disconnect(): Promise; get id(): string; get icon(): string | undefined; } export { EvmXConnector, EvmXService, createWagmiConfig as createWagmi, createWagmiConfig, tryCookieToInitialState };