import { PairConfig } from './consts/Types'; import { GetBalanceResponse, Balance, OrderSide } from './proto/boltzrpc_pb'; /** * Generate an id * * @param length how many characters the id should have */ export declare const generateId: (length: number) => string; /** * Get the pair id of a pair */ export declare const getPairId: (pair: PairConfig | { base: string; quote: string; }) => string; /** * Get the quote and base asset of a pair id */ export declare const splitPairId: (pairId: string) => { base: string; quote: string; }; /** * Concat an error code and its prefix */ export declare const concatErrorCode: (prefix: number, code: number) => string; /** * Stringify any object or array */ export declare const stringify: (object: any) => string; /** * Turn a map into an object */ export declare const mapToObject: (map: Map) => any; /** * Check whether a variable is a non-array object */ export declare const isObject: (val: any) => boolean; /** * Recursively merge properties from different sources into a target object, overriding any * existing properties * * @param target The destination object to merge into. * @param sources The sources objects to copy from. */ export declare const deepMerge: (target: any, ...sources: any[]) => object; /** * Capitalize the first letter of a string */ export declare const capitalizeFirstLetter: (input: string) => string; /** * Gets the home directory */ export declare const getSystemHomeDir: () => string; /** * Get the data directory of a service */ export declare const getServiceDir: (service: string) => string; /** * Resolve '~' on Linux and Unix-Like systems */ export declare const resolveHome: (filename: string) => string; /** * Convert minutes into milliseconds */ export declare const minutesToMilliseconds: (minutes: number) => number; /** * Convert satoshis to whole coins and remove trailing zeros */ export declare const satoshisToCoins: (satoshis: number) => number; /** * Round a number to a specific amount of decimals */ export declare const roundToDecimals: (number: number, decimals: number) => number; /** * Converts a "GetBalanceResponse" into a map */ export declare const parseBalances: (balance: GetBalanceResponse.AsObject) => Promise>; /** * Gets the symbol for the fee of a swap */ export declare const getFeeSymbol: (pairId: string, orderSide: OrderSide, isReverse: boolean) => string; /** * Converts the reponse of the backend method "getFeeEstimation" to an object */ export declare const feeMapToObject: (feesMap: [string, number][]) => any; export declare const getSmallestDenomination: (symbol: string) => string; export declare const getAmountOfInvoice: (invoice: string) => number;