import numbro from 'numbro'; /** * Delay by async/await * @param ms - milisenconds * @returns */ export declare const asyncWait: (ms: number) => Promise; /** * Shorten a long address * @param address - The long address * @param num - The number of the heading and trailing characters * @param delimiter - The delimiter * @returns Shortened address */ export declare const shortenAddress: (address: string, num?: number, delimiter?: string) => string; /** * Build a explorer url by context including addresses or transaction ids * @param addressOrTxId - Address or TxId * @returns */ export declare const explorer: (addressOrTxId: string) => string; /** * Wrapped Numbro - https://numbrojs.com/old-format.html * @param value - value * @returns */ export declare const numeric: (value?: number | string | bigint) => ReturnType; /** * Generate a random color * @param seed - Seed * @param opacity - Opacity * @returns */ export declare const randomColor: (seed?: string, opacity?: string | number) => string; /** * Fetch coingecko data with cache * @param ticket - Token ticket * @returns */ export declare const fetchCGK: (ticket?: string) => Promise<{ icon: any; symbol: any; name: any; address: any; rank: any; price: any; priceChange: any; totalVolume: any; }>; /** * Randomly choose an element in the input array * @param arr - Original array of elements * @returns */ export declare const randChoose: (arr: T[]) => T; /** * Randomize a subarray in the input array with a specific number of elements * @param arr - Original array of elements * @param num - Number of elements in randomized subarray * @returns */ export declare const randElements: (arr: T[], num: number) => T[]; export declare const SPL_TOKEN_PROGRAM = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; export declare const SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"; /** * Validate Solana address * @param address Solana address * @returns true/false */ export declare const isAddress: (address: string | undefined) => address is string; export declare const isGuestAddress: (address: string) => boolean; /** * Derive SPL Associated Token Account address * @param walletAddress Wallet address * @param mintAddress Mint address * @returns The SPL ATA address */ export declare const deriveAssociatedAddress: (walletAddress: string, mintAddress: string) => Promise;