import type { INormalizedNumber } from '../../types'; /** * Table of Contents * - Formatters * - Datetime * - Arrays * - Caching */ export declare function toNormalizedBn(value: string | bigint | number, decimals?: number | bigint): INormalizedNumber; /** * Get fallback RPC URLs for a specific chain */ export declare function getFallbackRpcUrls(chainId: number): string[]; export declare const filterOutBySize: (usdAmount: number) => boolean; /** * Formatters */ export declare function toTitleCase(str: string, type?: 'camel'): string; export declare function truncate(s: string, amount?: number): string; /** * Formats any numeric value (number, string, or bigint) to a standardized string. * * @param value - amount to be formatted * @param options - formatting options: * `showing` is the number of decimals to cut off at (or `'all'`); * `usd` toggles USD-value display; * `decimals` is how many decimals to parse to when `value` is a bigint. * * @returns standardized string type value */ export declare function round(value: number | string | bigint, options?: { showing?: number | 'all'; usd?: boolean; decimals?: number; }): string; export declare function loanStateToReadable(loanState: number | bigint): "PREAPPROVED" | "FUNDING_REQUIRED" | "FUNDED" | "ACTIVE" | "CANCELLED" | "MATURED" | "CLOSED"; /** * Datetime */ export declare function dateToUnix(date: Date): number; export declare function unixToDate(epoch: number): Date; export declare function isEarlierThanNow(startTime: Date): boolean; export declare function daysAgo(days: number): Date; export declare function prepareDateForDb(date: string | Date): string; /** * Arrays */ export declare function orderObjArrByDate>(objectArray: T[], options?: { key?: string; order?: 'asc' | 'desc'; }): T[]; /** * Calculate weights based on a specific property in array of objects. * @param data - Array of objects to calculate weights for * @param weightProperty - Property name to base weights on * @returns Original data with each item's `weight` added */ export declare function calculateWeights>(data?: T[], weightProperty?: string): Array; /** * Calculate weighted average for array of objects. * @param data - Array of objects with values * @param valueProperty - Property name containing the value to average * @param weightProperty - Optional property to base weights on * @returns Weighted average */ export declare function calculateWeightedAverage>(data?: T[], valueProperty?: string, weightProperty?: string): number; /** * Coerce a caller-supplied integer (`string | bigint | number`) to a `bigint`, * rejecting anything that is not a non-negative safe integer. `label` names the * calling method and `noun` the field being validated, so bad input surfaces as * `AugustValidationError('INVALID_INPUT')` at the SDK boundary instead of a * `BigInt()` SyntaxError wrapped as `UNKNOWN`. * @internal */ export declare function toRawBigInt(value: string | bigint | number, label: string, noun?: string): bigint;