UNPKG

xud

Version:
74 lines (73 loc) 2.35 kB
import { XuNetwork } from './constants/enums'; import { LndClientConfig } from './lndclient/types'; import { OrderBookThresholds } from './orderbook/types'; import { PoolConfig } from './p2p/types'; import { ConnextClientConfig } from './connextclient/types'; declare class Config { p2p: PoolConfig; xudir: string; loglevel: string; logpath: string; logdateformat: string; network: XuNetwork; strict: boolean; rpc: { disable: boolean; host: string; port: number; }; http: { host: string; port: number; }; lnd: { [currency: string]: LndClientConfig | undefined; }; connext: ConnextClientConfig; orderthresholds: OrderBookThresholds; webproxy: { port: number; disable: boolean; }; instanceid: number; /** Whether to intialize a new database with default values. */ initdb: boolean; /** The file path for the database, or ':memory:' if the database should be kept in memory. */ dbpath: string; /** Whether matching will be disabled */ nomatching: boolean; /** Whether a password should not be used to encrypt the xud key and underlying wallets. */ noencrypt: boolean; /** * Whether to disable sanity swaps that verify that the orders can possibly be swapped * before adding trading pairs as active. */ nosanityswaps: boolean; /** * Whether to disable balance checks that verify that the orders can possibly be swapped * before adding them to the order book. */ nobalancechecks: boolean; constructor(); private static readConfigProps; /** * Loads the xud configuration from an optional file and any command line arguments. * @returns a promise that resolves to `true` if a config file was found and loaded, otherwise `false` */ load: (args?: { [argName: string]: any; } | undefined) => Promise<boolean>; /** * Creates a directory if it does not exist, otherwise does nothing. */ private mkDirIfNotExist; private getNetwork; private setDefaultMacaroonPaths; private getDefaultP2pPort; private getDefaultRpcPort; private getDefaultHttpPort; private getDefaultDbPath; private getDefaultLogPath; private getDefaultLogLevel; } export default Config;