/** Time units in milliseconds. */ export declare enum TimeUnit { ONE_SECOND = 1000, ONE_MINUTE = 60000, ONE_HOUR = 3600000, ONE_DAY = 86400000 } /** * Return a human-readable string from a number of basis points. * E.g. "100 bps" -> "1%". */ export declare const formatBps: (bps: number) => string; /** * Return a human-readable date string from a timestamp in milliseconds. */ export declare const formatDate: (ms: number) => string; /** * Return a human-readable string from a number of milliseconds. * E.g. "1 day", "2 hours", "3 minutes", "4 seconds". */ export declare const formatDuration: (ms: number) => string; /** * Return a human-readable string with the time difference between two timestamps. * E.g. "30s"/"30 sec", "1h"/"1 hour", "2d"/"2 days". */ export declare function formatTimeDiff({ timestamp, now, format, minTimeUnit, }: { timestamp: number; now?: number; format?: "short" | "long"; minTimeUnit?: TimeUnit; }): string; /** * Return the domain from a URL. * E.g. `"https://polymedia.app"` -> `"polymedia.app"`. */ export declare const urlToDomain: (url: string) => string; /** * Return a shortened version of a transaction digest. * E.g. "yjxT3tJvRdkg5p5NFN64hGUGSntWoB8MtA34ErFYMgW" -> "yjxT…YMgW". */ export declare const shortenDigest: (digest: string, start?: number, end?: number, separator?: string) => string;