xud
Version:
Exchange Union Daemon
55 lines (54 loc) • 2.1 kB
TypeScript
export declare type Address = {
host: string;
port: number;
/** Epoch timestamp of last successful connection with this address */
lastConnected?: number;
};
/** Information used for connecting to a remote node. */
export declare type NodeConnectionInfo = {
nodePubKey: string;
addresses: Address[];
lastAddress?: Address;
};
export declare type NodeState = {
/** This node's listening external socket addresses to advertise to peers. */
addresses: Address[];
pairs: string[];
connextIdentifier: string;
/** An object mapping currency symbols to lnd pub keys. */
lndPubKeys: {
[currency: string]: string | undefined;
};
/** An object mapping currency symbols to lnd listening uris */
lndUris: {
[currency: string]: string[] | undefined;
};
/** An object mapping currency symbols to token identifiers such as lnd chains or token contract addresses. */
tokenIdentifiers: {
[currency: string]: string | undefined;
};
};
export declare type PoolConfig = {
/** Whether or not to automatically detect and share current external ip address on startup. */
detectexternalip: boolean;
/** Whether to send a GetNodes packet to discover new nodes upon connecting to peers, defaults to true. */
discover: boolean;
/**
* Time interval between sending GetNodes packets to already connected peers. Measured in
* minutes, only applies if discover option is true.
*/
discoverminutes: number;
/** Whether or not to listen for incoming connections from peers. */
listen: boolean;
/** Which port to listen on. If 0, a random unused port will be used. */
port: number;
/** Whether to allow connections to tor nodes. */
tor: boolean;
/** The port that Tor's exposed SOCKS5 proxy is listening on. */
torport: number;
/**
* An array of IP addresses or host names which can be used to connect to this server.
* It will be advertised with peers for them to try to connect to the server in the future.
*/
addresses: string[];
};