UNPKG

tokenlon-sdk

Version:

imToken Tokenlon API for node

55 lines (54 loc) 1.6 kB
import { ECSignature } from '0x.js'; export declare type Side = 'BUY' | 'SELL'; export declare type Wallet = { address: string; privateKey: string; }; export declare type GasPriceAdaptor = 'safeLow' | 'average' | 'fast'; export declare type GlobalConfig = { server: { url: string; }; web3: { providerUrl: string; }; wallet: Wallet; onChainValidate?: boolean; gasPriceAdaptor: GasPriceAdaptor; zeroEx: { gasLimit: number; networkId: number; exchangeContractAddress: undefined | string; etherTokenContractAddress: string; tokenTransferProxyContractAddress: undefined | string; zrxContractAddress?: undefined | string; tokenRegistryContractAddress?: undefined | string; orderWatcherConfig?: { cleanupJobIntervalMs: undefined | number; eventPollingIntervalMs: undefined | number; expirationMarginMs: undefined | number; orderExpirationCheckingIntervalMs: undefined | number; }; }; }; export declare type SimpleOrder = { side: Side; price: number; amount: number; expirationUnixTimestampSec?: number; }; export declare type DexOrderBNToString = { maker: string; taker: string; makerTokenAddress: string; takerTokenAddress: string; exchangeContractAddress: string; expirationUnixTimestampSec: string; feeRecipient: string; makerFee: string; makerTokenAmount: string; takerFee: string; takerTokenAmount: string; salt: string; ecSignature: ECSignature; };