import { ApiPromise } from '@polkadot/api'; import { WalletName } from '@solana/wallet-adapter-base'; import { Wallet } from '@solana/wallet-adapter-react'; import { ethers } from 'ethers'; import { Chain, Chains, PolkadotExtensionState, ProviderConfigs, SolanaWalletAdapterState } from '../core/interfaces'; export declare const userCanceledError: Error; /** * @param account * @param prefix * @param suffix * @returns */ export declare function truncateString(str: string, headNumber?: number, tailNumber?: number, replacement?: string): string; /** * @param u8a * @returns */ export declare const u8aToHex: (u8a: number[]) => `0x${string}`; /** * @param u8 * @returns */ export declare const u8ToHex: (u8: number) => `0x${string}`; interface ConnectedWalletCache { providerLabel: string; chainId: string; } export declare function setConnectedWalletCache(data: ConnectedWalletCache): void; export declare function getConnectedWalletCache(): ConnectedWalletCache | null; export declare function clearConnectedWalletCache(): void; export declare function constructPolkadotApi(options: { chainId: string; chains: Chains; }): Promise; export declare function getPolkadotExtensionStateByExtensionLabel(options: { appName?: string; label: string; providerConfigs: ProviderConfigs; }): Promise; export declare function switchEvmChain(options: { ethersProvider: ethers.providers.Web3Provider; chain: Chain; }): Promise; export declare function getWalletIcon(icon: string): string; export declare function getSolanaWalletAdapterStateByAdapterName(options: { name: string; wallets: Wallet[]; select(walletName: WalletName | null): void; connect: () => Promise; }): Promise; export declare function hexlifyChainId(chainId: number | string): string; export declare function getAccountAddressExplorerUrl(chain: Chain, account: string): string | undefined; export {};