import type { ChainType } from "@0xsquid/squid-types";
import { BitcoinConnector } from "./bitcoin";
import { CantonConnector } from "./canton";
import { CosmosConnector } from "./cosmos";
import { EvmConnector } from "./evm";
import { SolanaConnector } from "./solana";
import { StellarConnector } from "./stellar";
import { SuiAccount, SuiConnector } from "./sui";
import { XrplConnector } from "./xrpl";
export type TypedWindow = Window & typeof globalThis & {
    [key in WindowWalletFlag]?: any;
};
export declare enum WindowWalletFlag {
    Cosmostation = "cosmostation",
    Keplr = "keplr",
    Leap = "leap",
    Ctrl = "xfi",
    Phantom = "phantom",
    Unisat = "unisat",
    Backpack = "backpack",
    XrpLedgerMetamaskSnap = "xrpl-metamask-snap",
    Crossmark = "xrpl.crossmark",
    XamanXApp = "xaman-xapp",
    XamanQr = "xaman-qr",
    XrplWalletConnect = "xrpl-wallet-connect",
    XrplJoey = "xrpl-joey",
    XrplGirin = "xrpl-girin",
    XrplBifrost = "xrpl-bifrost",
    HotWallet = "hotWallet",
    XBull = "xBullSDK"
}
export type ConnectorID = "metamask" | "coinbase" | "walletConnect" | "keplr" | "cosmostation" | "leap" | "ctrl" | "bitget" | "rabby" | "okx" | "injected" | "trustwallet" | "exodus" | "rainbow" | "phantom" | "backpack" | "unisat" | "xrpl-metamask-snap" | "crossmark" | "xaman-xapp" | "xaman-qr" | "joey" | "girin" | "bifrost" | "brave" | "tokenpocket" | "nightly" | "cryptodotcom" | "freighter" | "xBull" | "lobstr" | "albedo" | "hanaWallet" | "hotWallet";
export type EvmWallet = Wallet & {
    type: ChainType.EVM;
    connector: ConnectorByChainType[ChainType.EVM];
};
export type CosmosWallet = Wallet & {
    type: ChainType.COSMOS;
    connector: ConnectorByChainType[ChainType.COSMOS];
};
export type SolanaWallet = Wallet & {
    type: ChainType.SOLANA;
    connector: ConnectorByChainType[ChainType.SOLANA];
};
export type BitcoinWallet = Wallet & {
    type: ChainType.BTC;
    connector: ConnectorByChainType[ChainType.BTC];
};
export type SuiWallet = Wallet & {
    type: ChainType.SUI;
    connector: ConnectorByChainType[ChainType.SUI];
};
export type XrplWallet = Wallet & {
    type: ChainType.XRPL;
    connector: ConnectorByChainType[ChainType.XRPL];
};
export type StellarWallet = Wallet & {
    type: ChainType.STELLAR;
    connector: ConnectorByChainType[ChainType.STELLAR];
};
export type CantonWallet = Wallet & {
    type: ChainType.CANTON;
    connector: ConnectorByChainType[ChainType.CANTON];
};
export type SupportedChain = {
    chainType: ChainType;
    chains?: string[];
};
export type NetworkConfig = {
    [T in ChainType]: {
        chainType: T;
        connector: ConnectorByChainType[T];
    };
}[ChainType];
export type Wallet = {
    name: string;
    connectorId: ConnectorID;
    connectorName: string;
    icon: string | undefined;
    windowFlag: WindowWalletFlag;
    isMobile?: boolean;
    isQrWallet?: boolean;
    isInstalled?: () => boolean;
    skipInstallCheck?: boolean;
    rdns?: string;
    url?: string;
} & ({
    isMultiChain: true;
    supportedNetworks: NetworkConfig[];
} | ({
    isMultiChain?: false;
} & {
    [T in ChainType]: {
        type: T;
        connector: ConnectorByChainType[T];
    };
}[ChainType]));
export interface AddEthereumChainParameter {
    chainId: string;
    chainName: string;
    nativeCurrency: {
        name: string;
        symbol: string;
        decimals: number;
        icon: string;
    };
    rpcUrls: string[];
    blockExplorerUrls?: string[];
    iconUrls?: string[];
}
export type EnsData = {
    name?: string;
    avatar?: string;
};
export type EnsSearchResult = {
    address: string;
    ens: EnsData;
    chainType: ChainType;
};
export type AddressWithEns = {
    address: string;
    ens: EnsData;
    chainType: ChainType;
};
export type FullAddressData = Partial<AddressWithEns> & {
    formatted?: string;
};
export type ConnectWalletResult<T extends ChainType> = ChainTypeToWalletState[T];
type BaseWalletState<WalletType extends Wallet> = {
    wallet: WalletType;
    address: string;
};
export interface ChainTypeToWalletState {
    [ChainType.EVM]: BaseWalletState<EvmWallet>;
    [ChainType.COSMOS]: BaseWalletState<CosmosWallet>;
    [ChainType.SOLANA]: BaseWalletState<SolanaWallet>;
    [ChainType.BTC]: BaseWalletState<BitcoinWallet>;
    [ChainType.SUI]: BaseWalletState<SuiWallet> & SuiAccount;
    [ChainType.XRPL]: BaseWalletState<XrplWallet>;
    [ChainType.STELLAR]: BaseWalletState<StellarWallet>;
    [ChainType.CANTON]: BaseWalletState<CantonWallet>;
}
interface ConnectorByChainType extends Record<ChainType, unknown> {
    [ChainType.EVM]: EvmConnector;
    [ChainType.COSMOS]: CosmosConnector;
    [ChainType.SOLANA]: SolanaConnector;
    [ChainType.BTC]: BitcoinConnector;
    [ChainType.SUI]: SuiConnector;
    [ChainType.XRPL]: XrplConnector;
    [ChainType.STELLAR]: StellarConnector;
    [ChainType.CANTON]: CantonConnector;
}
export {};
