import * as viem from 'viem'; import { Address, SignMessageReturnType, SignTypedDataParameters, Account, SignTypedDataReturnType, SimulateContractParameters, SimulateContractReturnType, GetContractParameters, Transport, Chain as Chain$1, PublicClient as PublicClient$1, GetContractReturnType, ContractFunctionConfig, MulticallParameters, MulticallReturnType, ReadContractParameters, ReadContractReturnType, MulticallContracts, WatchContractEventParameters, WriteContractParameters, WriteContractReturnType, GetEnsResolverReturnType, Hex, GetTransactionReturnType, SendTransactionParameters, SendTransactionReturnType, WaitForTransactionReceiptParameters, WaitForTransactionReceiptReturnType, WatchPendingTransactionsParameters, OnTransactionsParameter, FallbackTransportConfig, PublicClientConfig, FallbackTransport } from 'viem'; export { Address } from 'viem'; import { Mutate, StoreApi } from 'zustand/vanilla'; import { Connector, ConnectorData } from '@wagmi/connectors'; export { Connector, ConnectorData, ConnectorEvents, ConnectorNotFoundError, WindowProvider } from '@wagmi/connectors'; import { P as PublicClient, W as WebSocketPublicClient, U as Unit, a as WalletClient, H as Hash, C as ChainProviderFn } from './index-e744bbc2.js'; import { Chain } from 'viem/chains'; export { Chain, mainnet, sepolia } from 'viem/chains'; import { TypedData, Abi, Narrow, ExtractAbiFunctionNames } from 'abitype'; import { GetEnsAvatarReturnType } from 'viem/ens'; export { InjectedConnector, InjectedConnectorOptions } from '@wagmi/connectors/injected'; type BaseStorage = Pick; type ClientStorage = { getItem(key: string, defaultState?: T | null): T | null; setItem(key: string, value: T | null): void; removeItem(key: string): void; }; declare const noopStorage: BaseStorage; declare function createStorage({ deserialize, key: prefix, serialize, storage, }: { deserialize?: (value: string) => T; key?: string; serialize?: (value: T) => string; storage: BaseStorage; }): ClientStorage; type CreateConfigParameters = { /** Enables reconnecting to last used connector on init */ autoConnect?: boolean; /** * Connectors used for linking accounts * @default [new InjectedConnector()] */ connectors?: (() => Connector[]) | Connector[]; /** Custom logger */ logger?: { warn: typeof console.warn | null; }; /** Interface for connecting to network */ publicClient: ((config: { chainId?: number; }) => TPublicClient) | TPublicClient; /** * Custom storage for data persistance * @default window.localStorage */ storage?: ClientStorage; /** WebSocket interface for connecting to network */ webSocketPublicClient?: ((config: { chainId?: number; }) => TWebSocketPublicClient | undefined) | TWebSocketPublicClient; }; type Data$1 = ConnectorData; type State = { chains?: Connector['chains']; connector?: Connector; connectors: Connector[]; data?: Data$1; error?: Error; publicClient: TPublicClient; status: 'connected' | 'connecting' | 'reconnecting' | 'disconnected'; webSocketPublicClient?: TWebSocketPublicClient; }; declare class Config { #private; args: CreateConfigParameters; publicClients: Map; storage: ClientStorage; store: Mutate>, [ [ 'zustand/subscribeWithSelector', never ], [ 'zustand/persist', Partial> ] ]>; webSocketPublicClients: Map; constructor({ autoConnect, connectors, publicClient, storage, logger, webSocketPublicClient, }: CreateConfigParameters); get chains(): viem.Chain[] | undefined; get connectors(): Connector[]; get connector(): Connector | undefined; get data(): ConnectorData | undefined; get error(): Error | undefined; get lastUsedChainId(): number | undefined; get publicClient(): TPublicClient; get status(): "connecting" | "connected" | "reconnecting" | "disconnected"; get subscribe(): { (listener: (selectedState: State, previousSelectedState: State) => void): () => void; (selector: (state: State) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: { equalityFn?: ((a: U, b: U) => boolean) | undefined; fireImmediately?: boolean | undefined; } | undefined): () => void; }; get webSocketPublicClient(): TWebSocketPublicClient | undefined; setState(updater: State | ((state: State) => State)): void; clearState(): void; destroy(): Promise; autoConnect(): Promise; setConnectors(connectors: NonNullable): void; getPublicClient({ chainId }?: { chainId?: number; }): TPublicClient; setPublicClient(publicClient: CreateConfigParameters['publicClient']): void; getWebSocketPublicClient({ chainId }?: { chainId?: number; }): TWebSocketPublicClient | undefined; setWebSocketPublicClient(webSocketPublicClient: NonNullable['webSocketPublicClient']>): void; setLastUsedConnector(lastUsedConnector?: string | null): void; } declare function createConfig(args: CreateConfigParameters): Config; declare function getConfig(): Config; type ConnectArgs = { /** Chain ID to connect to */ chainId?: number; /** Connector to connect */ connector: Connector; }; type Data = Required; type ConnectResult = { account: Data['account']; chain: Data['chain']; connector: Config['connector']; }; declare function connect({ chainId, connector }: ConnectArgs): Promise>; declare function disconnect(): Promise; type FetchBalanceArgs = { /** Address of balance to check */ address: Address; /** Chain id to use for Public Client. */ chainId?: number; /** Units for formatting output */ formatUnits?: Unit; /** ERC-20 address */ token?: Address; }; type FetchBalanceResult = { decimals: number; formatted: string; symbol: string; value: bigint; }; declare function fetchBalance({ address, chainId, formatUnits: unit, token, }: FetchBalanceArgs): Promise; type GetAccountResult = { address: NonNullable; connector: NonNullable['connector']>; isConnected: true; isConnecting: false; isDisconnected: false; isReconnecting: false; status: 'connected'; } | { address: Data$1['account']; connector: Config['connector']; isConnected: boolean; isConnecting: false; isDisconnected: false; isReconnecting: true; status: 'reconnecting'; } | { address: Data$1['account']; connector: Config['connector']; isConnected: false; isReconnecting: false; isConnecting: true; isDisconnected: false; status: 'connecting'; } | { address: undefined; connector: undefined; isConnected: false; isReconnecting: false; isConnecting: false; isDisconnected: true; status: 'disconnected'; }; declare function getAccount(): GetAccountResult; type GetNetworkResult = { chain?: Chain & { unsupported?: boolean; }; chains: Chain[]; }; declare function getNetwork(): GetNetworkResult; type SignMessageArgs = { /** Message to sign with wallet */ message: string; }; type SignMessageResult = SignMessageReturnType; declare function signMessage(args: SignMessageArgs): Promise; type SignTypedDataArgs = SignTypedDataParameters; type SignTypedDataResult = SignTypedDataReturnType; declare function signTypedData({ domain, message, primaryType, types, }: SignTypedDataArgs): Promise; type SwitchNetworkArgs = { chainId: number; }; type SwitchNetworkResult = Chain; declare function switchNetwork({ chainId, }: SwitchNetworkArgs): Promise; type WatchAccountCallback = (data: GetAccountResult) => void; type WatchAccountConfig = { selector?({ address, connector, status, }: { address?: string; connector?: Connector; status: GetAccountResult['status']; }): any; }; declare function watchAccount(callback: WatchAccountCallback, { selector }?: WatchAccountConfig): () => void; type WatchNetworkCallback = (data: GetNetworkResult) => void; type WatchNetworkConfig = { selector?({ chainId, chains }: { chainId?: number; chains?: Chain[]; }): any; }; declare function watchNetwork(callback: WatchNetworkCallback, { selector }?: WatchNetworkConfig): () => void; type FetchTokenArgs = { /** Address of ERC-20 token */ address: Address; /** Chain id to use for Public Client. */ chainId?: number; /** Units for formatting output */ formatUnits?: Unit; }; type FetchTokenResult = { address: Address; decimals: number; name: string; symbol: string; totalSupply: { formatted: string; value: bigint; }; }; declare function fetchToken({ address, chainId, formatUnits: unit, }: FetchTokenArgs): Promise; type PrepareWriteContractConfig = Omit, 'chain'> & { /** Chain id to use for Public Client. */ chainId?: TChainId | number; /** Custom Wallet Client. */ walletClient?: TWalletClient | null; }; type PrepareWriteContractResult = Omit, 'request'> & { request: SimulateContractReturnType['request'] & { chainId?: TChainId; }; mode: 'prepared'; }; /** * @description Prepares the parameters required for a contract write transaction. * * Returns config to be passed through to `writeContract`. * * @example * import { prepareWriteContract, writeContract } from '@wagmi/core' * * const config = await prepareWriteContract({ * address: '0x...', * abi: wagmiAbi, * functionName: 'mint', * }) * const result = await writeContract(config) */ declare function prepareWriteContract({ abi, address, args, chainId, dataSuffix, functionName, walletClient: walletClient_, ...config }: PrepareWriteContractConfig): Promise>; type GetContractArgs = Omit, 'publicClient' | 'walletClient'> & { chainId?: number; walletClient?: NonNullable; }; type GetContractResult = GetContractReturnType; declare function getContract({ address, abi, chainId, walletClient, }: GetContractArgs): GetContractResult; type MulticallConfig = MulticallParameters & { /** Chain id to use for Public Client. */ chainId?: number; }; type MulticallResult = MulticallReturnType; declare function multicall({ chainId, contracts, blockNumber, blockTag, ...args }: MulticallConfig): Promise>; type ReadContractConfig = ReadContractParameters & { /** Chain id to use for Public Client. */ chainId?: number; }; type ReadContractResult = ReadContractReturnType; declare function readContract({ address, account, chainId, abi, args, functionName, blockNumber, blockTag, }: ReadContractConfig): Promise>; type ReadContractsConfig = Omit, 'contracts' | 'chainId'> & { /** Contracts to query */ contracts: Narrow ]>; }; type ReadContractsResult = MulticallResult; declare function readContracts({ contracts, blockNumber, blockTag, ...args }: ReadContractsConfig): Promise>; type WatchContractEventConfig = Pick, 'abi' | 'address' | 'eventName'> & { chainId?: number; }; type WatchContractEventCallback = WatchContractEventParameters['onLogs']; declare function watchContractEvent({ address, abi, chainId, eventName, }: WatchContractEventConfig, callback: WatchContractEventCallback): () => void; type WatchMulticallConfig = MulticallConfig & { listenToBlock?: boolean; }; type WatchMulticallCallback = (results: MulticallResult) => void; declare function watchMulticall(args: WatchMulticallConfig, callback: WatchMulticallCallback): () => void; type WatchReadContractConfig = ReadContractConfig & { listenToBlock?: boolean; }; type WatchReadContractCallback = (result: ReadContractResult) => void; declare function watchReadContract : string>(args: WatchReadContractConfig, callback: WatchReadContractCallback): () => void; type WatchReadContractsConfig = ReadContractsConfig & { listenToBlock?: boolean; }; type WatchReadContractsCallback = (results: ReadContractsResult) => void; declare function watchReadContracts(args: WatchReadContractsConfig, callback: WatchReadContractsCallback): () => void; type WriteContractMode = 'prepared' | undefined; type WriteContractPreparedArgs = { /** Chain id. */ chainId?: number; mode: 'prepared'; request: WriteContractParameters; }; type WriteContractUnpreparedArgs = Omit, 'chain'> & { /** Chain id. */ chainId?: number; mode?: never; }; type WriteContractArgs = WriteContractPreparedArgs | WriteContractUnpreparedArgs; type WriteContractResult = { hash: WriteContractReturnType; }; /** * @description Function to call a contract write method. * * It is recommended to pair this with the {@link prepareWriteContract} function * to avoid [UX pitfalls](https://wagmi.sh/react/prepare-hooks#ux-pitfalls-without-prepare-hooks). * * @example * import { prepareWriteContract, writeContract } from '@wagmi/core' * * const config = await prepareWriteContract({ * address: '0x...', * abi: wagmiAbi, * functionName: 'mint', * }) * const result = await writeContract(config) */ declare function writeContract(config: WriteContractUnpreparedArgs | WriteContractPreparedArgs): Promise; type FetchEnsAddressArgs = { /** Chain id to use for Public Client. */ chainId?: number; /** ENS name to resolve */ name: string; }; type FetchEnsAddressResult = Address | null; declare function fetchEnsAddress({ chainId, name, }: FetchEnsAddressArgs): Promise; type FetchEnsAvatarArgs = { /** ENS name */ name: string; /** Chain id to use for Public Client. */ chainId?: number; }; type FetchEnsAvatarResult = GetEnsAvatarReturnType; declare function fetchEnsAvatar({ name, chainId, }: FetchEnsAvatarArgs): Promise; type FetchEnsNameArgs = { /** Address to lookup */ address: Address; /** Chain id to use for Public Client */ chainId?: number; }; type FetchEnsNameResult = string | null; declare function fetchEnsName({ address, chainId, }: FetchEnsNameArgs): Promise; type FetchEnsResolverArgs = { /** Chain id to use for Public Client */ chainId?: number; /** ENS name to resolve */ name: string; }; type FetchEnsResolverResult = GetEnsResolverReturnType; declare function fetchEnsResolver({ chainId, name, }: FetchEnsResolverArgs): Promise; type FetchBlockNumberArgs = { chainId?: number; }; type FetchBlockNumberResult = bigint; declare function fetchBlockNumber({ chainId, }?: FetchBlockNumberArgs): Promise; type FetchFeeDataArgs = { /** Units for formatting output */ formatUnits?: Unit; /** Chain id to use for Public Client. */ chainId?: number; }; type FetchFeeDataResult = { lastBaseFeePerGas: bigint | null; gasPrice: bigint | null; maxFeePerGas: bigint | null; maxPriorityFeePerGas: bigint | null; formatted: { gasPrice: string | null; maxFeePerGas: string | null; maxPriorityFeePerGas: string | null; }; }; declare function fetchFeeData({ chainId, formatUnits: units, }?: FetchFeeDataArgs): Promise; type WatchBlockNumberArgs = { chainId?: number; listen: boolean; }; type WatchBlockNumberCallback = (blockNumber: FetchBlockNumberResult) => void; declare function watchBlockNumber(args: WatchBlockNumberArgs, callback: WatchBlockNumberCallback): () => void; type GetPublicClientArgs = { /** Chain id to use for public client. */ chainId?: number; }; type GetPublicClientResult = TPublicClient; declare function getPublicClient({ chainId }?: GetPublicClientArgs): GetPublicClientResult; type GetWalletClientArgs = { /** Chain ID to use for Wallet Client. */ chainId?: number; }; type GetWalletClientResult = WalletClient | null; declare function getWalletClient({ chainId, }?: GetWalletClientArgs): Promise; type GetWebSocketPublicClientArgs = { /** Chain id to use for public client */ chainId?: number; }; type GetWebSocketPublicClientResult = TWebSocketPublicClient | undefined; declare function getWebSocketPublicClient({ chainId, }?: GetWebSocketPublicClientArgs): GetWebSocketPublicClientResult; type WatchPublicClientCallback = (PublicClient: GetPublicClientResult) => void; declare function watchPublicClient(args: GetPublicClientArgs, callback: WatchPublicClientCallback): () => void; type WatchWalletClientArgs = GetWalletClientArgs; type WatchWalletClientCallback = (data: GetWalletClientResult) => void; declare function watchWalletClient({ chainId }: WatchWalletClientArgs, callback: WatchWalletClientCallback): () => void; type WatchWebSocketPublicClientCallback = (webSocketPublicClient: GetWebSocketPublicClientResult) => void; declare function watchWebSocketPublicClient(args: GetWebSocketPublicClientArgs, callback: WatchWebSocketPublicClientCallback): () => void; type FetchTransactionArgs = { /** Chain ID used to validate if the Wallet Client is connected to the target chain */ chainId?: number; hash: Hex; }; type FetchTransactionResult = GetTransactionReturnType; /** * @description Fetches transaction for hash * * @example * import { fetchTransaction } from '@wagmi/core' * * const transaction = await fetchTransaction({ * chainId: 1, * hash: '0x...', * }) */ declare function fetchTransaction({ chainId, hash, }: FetchTransactionArgs): Promise; type SendTransactionArgs = { /** Chain ID used to validate if the walletClient is connected to the target chain */ chainId?: number; mode?: 'prepared'; to: string; } & Omit, 'chain' | 'to'>; type SendTransactionResult = { hash: SendTransactionReturnType; }; /** * @description Function to send a transaction. * * It is recommended to pair this with the `prepareSendTransaction` function to avoid * [UX pitfalls](https://wagmi.sh/react/prepare-hooks#ux-pitfalls-without-prepare-hooks). * * @example * import { prepareSendTransaction, sendTransaction } from '@wagmi/core' * * const config = await prepareSendTransaction({ * to: 'moxey.eth', * value: parseEther('1'), * }) * const result = await sendTransaction(config) */ declare function sendTransaction({ accessList, account, chainId, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, mode, nonce, to, value, }: SendTransactionArgs): Promise; type PrepareSendTransactionArgs = Omit, 'chain' | 'gas' | 'to'> & { /** Chain ID used to validate if the walletClient is connected to the target chain */ chainId?: number; gas?: bigint | null; to?: string; walletClient?: TWalletClient | null; }; type PrepareSendTransactionResult = Omit & { mode: 'prepared'; to: Address; }; /** * @description Prepares the parameters required for sending a transaction. * * Returns config to be passed through to `sendTransaction`. * * @example * import { prepareSendTransaction, sendTransaction } from '@wagmi/core' * * const config = await prepareSendTransaction({ * request: { * to: 'moxey.eth', * value: parseEther('1'), * } * }) * const result = await sendTransaction(config) */ declare function prepareSendTransaction({ accessList, account, chainId, data, gas: gas_, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to: to_, value, walletClient: walletClient_, }: PrepareSendTransactionArgs): Promise; type WaitForTransactionArgs = { /** Chain id to use for Public Client. */ chainId?: number; /** * Number of blocks to wait for after transaction is mined * @default 1 */ confirmations?: number; /** Transaction hash to monitor */ hash: Hash; /** Callback to invoke when the transaction has been replaced (sped up). */ onReplaced?: WaitForTransactionReceiptParameters['onReplaced']; timeout?: number; }; type WaitForTransactionResult = WaitForTransactionReceiptReturnType; declare function waitForTransaction({ chainId, confirmations, hash, onReplaced, timeout, }: WaitForTransactionArgs): Promise; type WatchPendingTransactionsArgs = { chainId?: number; }; type WatchPendingTransactionsCallback = WatchPendingTransactionsParameters['onTransactions']; type WatchPendingTransactionsResult = OnTransactionsParameter; declare function watchPendingTransactions(args: WatchPendingTransactionsArgs, callback: WatchPendingTransactionsCallback): () => void; /** * [ERC-20 Token Standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-20) */ declare const erc20ABI: readonly [{ readonly type: "event"; readonly name: "Approval"; readonly inputs: readonly [{ readonly indexed: true; readonly name: "owner"; readonly type: "address"; }, { readonly indexed: true; readonly name: "spender"; readonly type: "address"; }, { readonly indexed: false; readonly name: "value"; readonly type: "uint256"; }]; }, { readonly type: "event"; readonly name: "Transfer"; readonly inputs: readonly [{ readonly indexed: true; readonly name: "from"; readonly type: "address"; }, { readonly indexed: true; readonly name: "to"; readonly type: "address"; }, { readonly indexed: false; readonly name: "value"; readonly type: "uint256"; }]; }, { readonly type: "function"; readonly name: "allowance"; readonly stateMutability: "view"; readonly inputs: readonly [{ readonly name: "owner"; readonly type: "address"; }, { readonly name: "spender"; readonly type: "address"; }]; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; }, { readonly type: "function"; readonly name: "approve"; readonly stateMutability: "nonpayable"; readonly inputs: readonly [{ readonly name: "spender"; readonly type: "address"; }, { readonly name: "amount"; readonly type: "uint256"; }]; readonly outputs: readonly [{ readonly name: ""; readonly type: "bool"; }]; }, { readonly type: "function"; readonly name: "balanceOf"; readonly stateMutability: "view"; readonly inputs: readonly [{ readonly name: "account"; readonly type: "address"; }]; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; }, { readonly type: "function"; readonly name: "decimals"; readonly stateMutability: "view"; readonly inputs: readonly []; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint8"; }]; }, { readonly type: "function"; readonly name: "name"; readonly stateMutability: "view"; readonly inputs: readonly []; readonly outputs: readonly [{ readonly name: ""; readonly type: "string"; }]; }, { readonly type: "function"; readonly name: "symbol"; readonly stateMutability: "view"; readonly inputs: readonly []; readonly outputs: readonly [{ readonly name: ""; readonly type: "string"; }]; }, { readonly type: "function"; readonly name: "totalSupply"; readonly stateMutability: "view"; readonly inputs: readonly []; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; }, { readonly type: "function"; readonly name: "transfer"; readonly stateMutability: "nonpayable"; readonly inputs: readonly [{ readonly name: "recipient"; readonly type: "address"; }, { readonly name: "amount"; readonly type: "uint256"; }]; readonly outputs: readonly [{ readonly name: ""; readonly type: "bool"; }]; }, { readonly type: "function"; readonly name: "transferFrom"; readonly stateMutability: "nonpayable"; readonly inputs: readonly [{ readonly name: "sender"; readonly type: "address"; }, { readonly name: "recipient"; readonly type: "address"; }, { readonly name: "amount"; readonly type: "uint256"; }]; readonly outputs: readonly [{ readonly name: ""; readonly type: "bool"; }]; }]; /** * [ERC-721 Non-Fungible Token Standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-721) */ declare const erc721ABI: readonly [{ readonly type: "event"; readonly name: "Approval"; readonly inputs: readonly [{ readonly indexed: true; readonly name: "owner"; readonly type: "address"; }, { readonly indexed: true; readonly name: "spender"; readonly type: "address"; }, { readonly indexed: true; readonly name: "tokenId"; readonly type: "uint256"; }]; }, { readonly type: "event"; readonly name: "ApprovalForAll"; readonly inputs: readonly [{ readonly indexed: true; readonly name: "owner"; readonly type: "address"; }, { readonly indexed: true; readonly name: "operator"; readonly type: "address"; }, { readonly indexed: false; readonly name: "approved"; readonly type: "bool"; }]; }, { readonly type: "event"; readonly name: "Transfer"; readonly inputs: readonly [{ readonly indexed: true; readonly name: "from"; readonly type: "address"; }, { readonly indexed: true; readonly name: "to"; readonly type: "address"; }, { readonly indexed: true; readonly name: "tokenId"; readonly type: "uint256"; }]; }, { readonly type: "function"; readonly name: "approve"; readonly stateMutability: "payable"; readonly inputs: readonly [{ readonly name: "spender"; readonly type: "address"; }, { readonly name: "tokenId"; readonly type: "uint256"; }]; readonly outputs: readonly []; }, { readonly type: "function"; readonly name: "balanceOf"; readonly stateMutability: "view"; readonly inputs: readonly [{ readonly name: "account"; readonly type: "address"; }]; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; }, { readonly type: "function"; readonly name: "getApproved"; readonly stateMutability: "view"; readonly inputs: readonly [{ readonly name: "tokenId"; readonly type: "uint256"; }]; readonly outputs: readonly [{ readonly name: ""; readonly type: "address"; }]; }, { readonly type: "function"; readonly name: "isApprovedForAll"; readonly stateMutability: "view"; readonly inputs: readonly [{ readonly name: "owner"; readonly type: "address"; }, { readonly name: "operator"; readonly type: "address"; }]; readonly outputs: readonly [{ readonly name: ""; readonly type: "bool"; }]; }, { readonly type: "function"; readonly name: "name"; readonly stateMutability: "view"; readonly inputs: readonly []; readonly outputs: readonly [{ readonly name: ""; readonly type: "string"; }]; }, { readonly type: "function"; readonly name: "ownerOf"; readonly stateMutability: "view"; readonly inputs: readonly [{ readonly name: "tokenId"; readonly type: "uint256"; }]; readonly outputs: readonly [{ readonly name: "owner"; readonly type: "address"; }]; }, { readonly type: "function"; readonly name: "safeTransferFrom"; readonly stateMutability: "payable"; readonly inputs: readonly [{ readonly name: "from"; readonly type: "address"; }, { readonly name: "to"; readonly type: "address"; }, { readonly name: "tokenId"; readonly type: "uint256"; }]; readonly outputs: readonly []; }, { readonly type: "function"; readonly name: "safeTransferFrom"; readonly stateMutability: "nonpayable"; readonly inputs: readonly [{ readonly name: "from"; readonly type: "address"; }, { readonly name: "to"; readonly type: "address"; }, { readonly name: "id"; readonly type: "uint256"; }, { readonly name: "data"; readonly type: "bytes"; }]; readonly outputs: readonly []; }, { readonly type: "function"; readonly name: "setApprovalForAll"; readonly stateMutability: "nonpayable"; readonly inputs: readonly [{ readonly name: "operator"; readonly type: "address"; }, { readonly name: "approved"; readonly type: "bool"; }]; readonly outputs: readonly []; }, { readonly type: "function"; readonly name: "symbol"; readonly stateMutability: "view"; readonly inputs: readonly []; readonly outputs: readonly [{ readonly name: ""; readonly type: "string"; }]; }, { readonly type: "function"; readonly name: "tokenByIndex"; readonly stateMutability: "view"; readonly inputs: readonly [{ readonly name: "index"; readonly type: "uint256"; }]; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; }, { readonly type: "function"; readonly name: "tokenByIndex"; readonly stateMutability: "view"; readonly inputs: readonly [{ readonly name: "owner"; readonly type: "address"; }, { readonly name: "index"; readonly type: "uint256"; }]; readonly outputs: readonly [{ readonly name: "tokenId"; readonly type: "uint256"; }]; }, { readonly type: "function"; readonly name: "tokenURI"; readonly stateMutability: "view"; readonly inputs: readonly [{ readonly name: "tokenId"; readonly type: "uint256"; }]; readonly outputs: readonly [{ readonly name: ""; readonly type: "string"; }]; }, { readonly type: "function"; readonly name: "totalSupply"; readonly stateMutability: "view"; readonly inputs: readonly []; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; }, { readonly type: "function"; readonly name: "transferFrom"; readonly stateMutability: "payable"; readonly inputs: readonly [{ readonly name: "sender"; readonly type: "address"; }, { readonly name: "recipient"; readonly type: "address"; }, { readonly name: "tokeId"; readonly type: "uint256"; }]; readonly outputs: readonly []; }]; /** * [ERC-4626 Tokenized Vaults Standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-4626) */ declare const erc4626ABI: readonly [{ readonly anonymous: false; readonly inputs: readonly [{ readonly indexed: true; readonly name: "owner"; readonly type: "address"; }, { readonly indexed: true; readonly name: "spender"; readonly type: "address"; }, { readonly indexed: false; readonly name: "value"; readonly type: "uint256"; }]; readonly name: "Approval"; readonly type: "event"; }, { readonly anonymous: false; readonly inputs: readonly [{ readonly indexed: true; readonly name: "sender"; readonly type: "address"; }, { readonly indexed: true; readonly name: "receiver"; readonly type: "address"; }, { readonly indexed: false; readonly name: "assets"; readonly type: "uint256"; }, { readonly indexed: false; readonly name: "shares"; readonly type: "uint256"; }]; readonly name: "Deposit"; readonly type: "event"; }, { readonly anonymous: false; readonly inputs: readonly [{ readonly indexed: true; readonly name: "from"; readonly type: "address"; }, { readonly indexed: true; readonly name: "to"; readonly type: "address"; }, { readonly indexed: false; readonly name: "value"; readonly type: "uint256"; }]; readonly name: "Transfer"; readonly type: "event"; }, { readonly anonymous: false; readonly inputs: readonly [{ readonly indexed: true; readonly name: "sender"; readonly type: "address"; }, { readonly indexed: true; readonly name: "receiver"; readonly type: "address"; }, { readonly indexed: true; readonly name: "owner"; readonly type: "address"; }, { readonly indexed: false; readonly name: "assets"; readonly type: "uint256"; }, { readonly indexed: false; readonly name: "shares"; readonly type: "uint256"; }]; readonly name: "Withdraw"; readonly type: "event"; }, { readonly inputs: readonly [{ readonly name: "owner"; readonly type: "address"; }, { readonly name: "spender"; readonly type: "address"; }]; readonly name: "allowance"; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; readonly stateMutability: "view"; readonly type: "function"; }, { readonly inputs: readonly [{ readonly name: "spender"; readonly type: "address"; }, { readonly name: "amount"; readonly type: "uint256"; }]; readonly name: "approve"; readonly outputs: readonly [{ readonly name: ""; readonly type: "bool"; }]; readonly stateMutability: "nonpayable"; readonly type: "function"; }, { readonly inputs: readonly []; readonly name: "asset"; readonly outputs: readonly [{ readonly name: "assetTokenAddress"; readonly type: "address"; }]; readonly stateMutability: "view"; readonly type: "function"; }, { readonly inputs: readonly [{ readonly name: "account"; readonly type: "address"; }]; readonly name: "balanceOf"; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; readonly stateMutability: "view"; readonly type: "function"; }, { readonly inputs: readonly [{ readonly name: "shares"; readonly type: "uint256"; }]; readonly name: "convertToAssets"; readonly outputs: readonly [{ readonly name: "assets"; readonly type: "uint256"; }]; readonly stateMutability: "view"; readonly type: "function"; }, { readonly inputs: readonly [{ readonly name: "assets"; readonly type: "uint256"; }]; readonly name: "convertToShares"; readonly outputs: readonly [{ readonly name: "shares"; readonly type: "uint256"; }]; readonly stateMutability: "view"; readonly type: "function"; }, { readonly inputs: readonly [{ readonly name: "assets"; readonly type: "uint256"; }, { readonly name: "receiver"; readonly type: "address"; }]; readonly name: "deposit"; readonly outputs: readonly [{ readonly name: "shares"; readonly type: "uint256"; }]; readonly stateMutability: "nonpayable"; readonly type: "function"; }, { readonly inputs: readonly [{ readonly name: "caller"; readonly type: "address"; }]; readonly name: "maxDeposit"; readonly outputs: readonly [{ readonly name: "maxAssets"; readonly type: "uint256"; }]; readonly stateMutability: "view"; readonly type: "function"; }, { readonly inputs: readonly [{ readonly name: "caller"; readonly type: "address"; }]; readonly name: "maxMint"; readonly outputs: readonly [{ readonly name: "maxShares"; readonly type: "uint256"; }]; readonly stateMutability: "view"; readonly type: "function"; }, { readonly inputs: readonly [{ readonly name: "owner"; readonly type: "address"; }]; readonly name: "maxRedeem"; readonly outputs: readonly [{ readonly name: "maxShares"; readonly type: "uint256"; }]; readonly stateMutability: "view"; readonly type: "function"; }, { readonly inputs: readonly [{ readonly name: "owner"; readonly type: "address"; }]; readonly name: "maxWithdraw"; readonly outputs: readonly [{ readonly name: "maxAssets"; readonly type: "uint256"; }]; readonly stateMutability: "view"; readonly type: "function"; }, { readonly inputs: readonly [{ readonly name: "shares"; readonly type: "uint256"; }, { readonly name: "receiver"; readonly type: "address"; }]; readonly name: "mint"; readonly outputs: readonly [{ readonly name: "assets"; readonly type: "uint256"; }]; readonly stateMutability: "nonpayable"; readonly type: "function"; }, { readonly inputs: readonly [{ readonly name: "assets"; readonly type: "uint256"; }]; readonly name: "previewDeposit"; readonly outputs: readonly [{ readonly name: "shares"; readonly type: "uint256"; }]; readonly stateMutability: "view"; readonly type: "function"; }, { readonly inputs: readonly [{ readonly name: "shares"; readonly type: "uint256"; }]; readonly name: "previewMint"; readonly outputs: readonly [{ readonly name: "assets"; readonly type: "uint256"; }]; readonly stateMutability: "view"; readonly type: "function"; }, { readonly inputs: readonly [{ readonly name: "shares"; readonly type: "uint256"; }]; readonly name: "previewRedeem"; readonly outputs: readonly [{ readonly name: "assets"; readonly type: "uint256"; }]; readonly stateMutability: "view"; readonly type: "function"; }, { readonly inputs: readonly [{ readonly name: "assets"; readonly type: "uint256"; }]; readonly name: "previewWithdraw"; readonly outputs: readonly [{ readonly name: "shares"; readonly type: "uint256"; }]; readonly stateMutability: "view"; readonly type: "function"; }, { readonly inputs: readonly [{ readonly name: "shares"; readonly type: "uint256"; }, { readonly name: "receiver"; readonly type: "address"; }, { readonly name: "owner"; readonly type: "address"; }]; readonly name: "redeem"; readonly outputs: readonly [{ readonly name: "assets"; readonly type: "uint256"; }]; readonly stateMutability: "nonpayable"; readonly type: "function"; }, { readonly inputs: readonly []; readonly name: "totalAssets"; readonly outputs: readonly [{ readonly name: "totalManagedAssets"; readonly type: "uint256"; }]; readonly stateMutability: "view"; readonly type: "function"; }, { readonly inputs: readonly []; readonly name: "totalSupply"; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; readonly stateMutability: "view"; readonly type: "function"; }, { readonly inputs: readonly [{ readonly name: "to"; readonly type: "address"; }, { readonly name: "amount"; readonly type: "uint256"; }]; readonly name: "transfer"; readonly outputs: readonly [{ readonly name: ""; readonly type: "bool"; }]; readonly stateMutability: "nonpayable"; readonly type: "function"; }, { readonly inputs: readonly [{ readonly name: "from"; readonly type: "address"; }, { readonly name: "to"; readonly type: "address"; }, { readonly name: "amount"; readonly type: "uint256"; }]; readonly name: "transferFrom"; readonly outputs: readonly [{ readonly name: ""; readonly type: "bool"; }]; readonly stateMutability: "nonpayable"; readonly type: "function"; }, { readonly inputs: readonly [{ readonly name: "assets"; readonly type: "uint256"; }, { readonly name: "receiver"; readonly type: "address"; }, { readonly name: "owner"; readonly type: "address"; }]; readonly name: "withdraw"; readonly outputs: readonly [{ readonly name: "shares"; readonly type: "uint256"; }]; readonly stateMutability: "nonpayable"; readonly type: "function"; }]; declare class ChainMismatchError extends Error { name: string; constructor({ activeChain, targetChain, }: { activeChain: string; targetChain: string; }); } declare class ChainNotConfiguredError extends Error { name: string; constructor({ chainId, connectorId, }: { chainId: number; connectorId?: string; }); } declare class ConnectorAlreadyConnectedError extends Error { name: string; message: string; } declare class ConfigChainsNotFound extends Error { name: string; message: string; } declare class SwitchChainNotSupportedError extends Error { name: string; constructor({ connector }: { connector: Connector; }); } type ConfigureChainsConfig = Pick & Pick & { stallTimeout?: number; }; declare function configureChains(defaultChains: TChain[], providers: ChainProviderFn[], { batch, pollingInterval, rank, retryCount, retryDelay, stallTimeout, }?: ConfigureChainsConfig): { readonly chains: TChain[]; readonly publicClient: ({ chainId }: { chainId?: number | undefined; }) => PublicClient; readonly webSocketPublicClient: ({ chainId }: { chainId?: number | undefined; }) => WebSocketPublicClient | undefined; }; /** Forked from https://github.com/epoberezkin/fast-deep-equal */ declare function deepEqual(a: any, b: any): boolean; declare function deserialize(cachedString: string): any; declare function getUnit(unit: Unit): number; type StandardReplacer = (key: string, value: any) => any; type CircularReplacer = (key: string, value: any, referenceKey: string) => any; /** * @function stringify * * @description * stringifier that handles circular values * Forked from https://github.com/planttheidea/fast-stringify * * @param value to stringify * @param [replacer] a custom replacer function for handling standard values * @param [indent] the number of spaces to indent the output by * @param [circularReplacer] a custom replacer function for handling circular values * @returns the stringified output */ declare function serialize(value: any, replacer?: StandardReplacer | null | undefined, indent?: number | null | undefined, circularReplacer?: CircularReplacer | null | undefined): string; export { ChainMismatchError, ChainNotConfiguredError, ChainProviderFn, Config, ConfigChainsNotFound, ConfigureChainsConfig, ConnectArgs, ConnectResult, ConnectorAlreadyConnectedError, CreateConfigParameters, FetchBalanceArgs, FetchBalanceResult, FetchBlockNumberArgs, FetchBlockNumberResult, FetchEnsAddressArgs, FetchEnsAddressResult, FetchEnsAvatarArgs, FetchEnsAvatarResult, FetchEnsNameArgs, FetchEnsNameResult, FetchEnsResolverArgs, FetchEnsResolverResult, FetchFeeDataArgs, FetchFeeDataResult, FetchTokenArgs, FetchTokenResult, FetchTransactionArgs, FetchTransactionResult, GetAccountResult, GetContractArgs, GetContractResult, GetNetworkResult, GetPublicClientArgs, GetPublicClientResult, GetWalletClientArgs, GetWalletClientResult, GetWebSocketPublicClientArgs, GetWebSocketPublicClientResult, Hash, MulticallConfig, MulticallResult, PrepareSendTransactionArgs, PrepareSendTransactionResult, PrepareWriteContractConfig, PrepareWriteContractResult, PublicClient, ReadContractConfig, ReadContractResult, ReadContractsConfig, ReadContractsResult, SendTransactionArgs, SendTransactionResult, SignMessageArgs, SignMessageResult, SignTypedDataArgs, SignTypedDataResult, ClientStorage as Storage, SwitchChainNotSupportedError, SwitchNetworkArgs, SwitchNetworkResult, Unit, WaitForTransactionArgs, WaitForTransactionResult, WalletClient, WatchAccountCallback, WatchBlockNumberArgs, WatchBlockNumberCallback, WatchContractEventCallback, WatchContractEventConfig, WatchMulticallCallback, WatchMulticallConfig, WatchNetworkCallback, WatchPendingTransactionsArgs, WatchPendingTransactionsCallback, WatchPendingTransactionsResult, WatchPublicClientCallback, WatchReadContractCallback, WatchReadContractConfig, WatchReadContractsCallback, WatchReadContractsConfig, WatchWalletClientArgs, WatchWalletClientCallback, WatchWebSocketPublicClientCallback, WebSocketPublicClient, WriteContractArgs, WriteContractMode, WriteContractPreparedArgs, WriteContractResult, WriteContractUnpreparedArgs, configureChains, connect, createConfig, createStorage, deepEqual, deserialize, disconnect, erc20ABI, erc4626ABI, erc721ABI, fetchBalance, fetchBlockNumber, fetchEnsAddress, fetchEnsAvatar, fetchEnsName, fetchEnsResolver, fetchFeeData, fetchToken, fetchTransaction, getAccount, getConfig, getContract, getNetwork, getPublicClient, getUnit, getWalletClient, getWebSocketPublicClient, multicall, noopStorage, prepareSendTransaction, prepareWriteContract, readContract, readContracts, sendTransaction, serialize, signMessage, signTypedData, switchNetwork, waitForTransaction, watchAccount, watchBlockNumber, watchContractEvent, watchMulticall, watchNetwork, watchPendingTransactions, watchPublicClient, watchReadContract, watchReadContracts, watchWalletClient, watchWebSocketPublicClient, writeContract };