import type { ChainData, Token } from "@0xsquid/squid-types";
import { ChainType } from "@0xsquid/squid-types";
import { Connector } from "@wagmi/core";
import { IBitcoinContextData } from "../../core/providers/BitcoinProvider";
import { ICosmosContextData } from "../../core/providers/CosmosProvider";
import { IEvmContextData } from "../../core/providers/EvmProvider";
import { ISolanaContextData } from "../../core/providers/SolanaProvider";
import { IStellarContextData } from "../../core/providers/StellarProvider";
import { ISuiContextData } from "../../core/providers/SuiProvider";
import { IXrplContextData } from "../../core/providers/XrplProvider";
import { TokenWithBalance } from "../../core/types/tokens";
import type { ChainTypeToWalletState, ConnectWalletResult, EnsSearchResult, Wallet } from "../../core/types/wallet";
type FormatHashParams = {
    hash?: string;
    chainType?: ChainType;
};
export declare const formatHash: ({ chainType, hash }: FormatHashParams) => string;
export declare const isWalletAddressValid: (chainData?: ChainData, address?: string) => boolean;
export declare const redirectToExtensionsStore: (wallet: Wallet) => void;
/**
 * Dynamically accesses a nested property of an object based on a dot-separated string path.
 * Returns the value of the property if found, otherwise undefined.
 * e.g. "xfi.keplr" will return window.xfi.keplr
 */
export declare const accessProperty: (object: Record<string, any>, path: string) => any;
export declare const definedInWindow: (path: string | undefined, clientWindow: Window | undefined) => boolean;
export declare const populateWallets: <T extends Wallet>(window: Window | undefined, wallets: T[]) => T[];
/**
 * Get the base chain to connect to
 * If only one chain type is selected, use that chain type
 * Otherwise, use the wallet's type
 * This is mainly used for Cosmos wallets, they need a reference chain to connect to (because addresses are different on each chain)
 * @param wallet
 * @param chain
 * @param selectedChainTypes
 * @param findChain
 * @returns
 */
export declare const getDefaultChain: (wallet: Wallet, chain: ChainData | undefined, selectedChainTypes: ChainType[] | undefined, findChain: (chainId: string) => ChainData | undefined) => ChainData | undefined;
/**
 * Sort order:
 * 1. Connected wallets
 * 2. Installed wallets
 * 3. Priority wallets
 * 4. The rest
 *
 * On mobile, Injected and WalletConnect are always on top,
 * after installed wallets.
 *
 * @returns The sorted wallets
 */
export declare function sortWallets(a: Pick<Wallet, "connectorId" | "isInstalled">, b: Pick<Wallet, "connectorId" | "isInstalled">, { isMobile, connectedWallets, priorityList, }: {
    isMobile: boolean;
    connectedWallets?: Pick<Wallet, "connectorId">[];
    priorityList?: Wallet["connectorId"][];
}): number;
export declare function areSameAddress(address1?: string, address2?: string): boolean;
export declare function sortAddressBook(a: EnsSearchResult, b: EnsSearchResult, selectedAddress?: string): 1 | 0 | -1;
export declare const calculateTotalUsdBalanceUSD: (tokens: Pick<TokenWithBalance, "balance" | "usdPrice">[]) => string;
export declare function addTokenToWallet({ token: { address, decimals, symbol, logoURI }, provider, }: {
    token: Pick<Token, "address" | "symbol" | "decimals" | "logoURI">;
    provider: any;
}): any;
export declare function isEvmChainNotSupportedError(error: any): boolean;
export declare const getWalletSupportedChainTypes: (wallet: Wallet) => ChainType[];
export declare const getConnectorForChainType: <T extends ChainType>(wallet: Wallet, chainType: T) => ChainTypeToWalletState[T]["wallet"]["connector"] | undefined;
export declare function walletSupportsChainType(wallet: Wallet, chainType: ChainType): boolean;
interface ConnectWalletMutations {
    connectEvm: IEvmContextData["connectEvm"];
    connectCosmos: ICosmosContextData["connectCosmos"];
    cosmosConnectedWallet: ICosmosContextData["cosmosConnectedWallet"];
    connectSolana: ISolanaContextData["connectSolana"];
    connectBitcoin: IBitcoinContextData["connectBitcoin"];
    connectSui: ISuiContextData["connectSui"];
    connectXrpl: IXrplContextData["connectXrpl"];
    connectStellar: IStellarContextData["connectStellar"];
}
type ConnectWalletParams = {
    wallet: Wallet;
    selectedChain?: ChainData;
    selectedChainTypes?: ChainType[];
    findChain: (chainId: string) => ChainData | undefined;
} & ConnectWalletMutations;
interface WalletConnectionResult {
    wallet: Wallet;
    addresses: Array<{
        chainType: ChainType;
        data: ConnectWalletResult<ChainType>;
    }>;
}
export declare const connectWallet: (params: ConnectWalletParams) => Promise<WalletConnectionResult | null>;
/**
 * Wallets may have a cancelConnect method
 * This is used to cancel a pending connection and clean up resources
 * (e.g. network requests, event listeners, etc.)
 */
export declare const cancelConnectWallet: (wallet: Wallet) => void;
export declare const isProblematicConnector: (connector: Connector | undefined) => boolean;
interface MergeWalletsParams {
    singleChainWallets: Wallet[];
    multiChainWallets: Wallet[];
}
export declare function mergeWallets({ multiChainWallets, singleChainWallets, }: MergeWalletsParams): Wallet[];
export {};
