crypto-client
Version:
An unified client for all cryptocurrency exchanges.
22 lines (21 loc) • 1.37 kB
TypeScript
import { Market } from 'crypto-markets';
import { DepositAddress } from '../pojo';
export declare const FIAT_SYMBOLS: string[];
export declare type AsyncFunc = (...args: any[]) => Promise<any>;
export declare function sleep(ms: number): Promise<any>;
export declare function Retry(times?: number, logger?: any): (target: Record<string, any>, propertyName: string, propertyDesciptor: TypedPropertyDescriptor<AsyncFunc>) => TypedPropertyDescriptor<AsyncFunc>;
export declare function retry(func: (...args: any[]) => Promise<any>, // eslint-disable-line no-shadow
times?: number, logger?: any, ...args: any[]): Promise<any>;
export declare function calcPrecision(numberStr: string): number;
export declare function numberToString(n: number, decimal: number, ceil?: boolean): string;
export declare function validatePriceQuantity(market: Market, price: string, quantity: string): boolean;
export declare function convertPriceAndQuantityToStrings(market: Market, price: number, quantity: number, sell: boolean): [string, string];
export declare function calcTokenPlatform(depositAddresses: {
[key: string]: {
[key: string]: DepositAddress;
};
}): {
[key: string]: string;
};
export declare function detectPlatformFromAddress(address: string): string | undefined;
export declare function detectPlatform(address: string, symbol: string): string | undefined;