xud
Version:
Exchange Union Daemon
26 lines (25 loc) • 824 B
TypeScript
import Logger from '../Logger';
import GrpcInitService from './GrpcInitService';
import GrpcService from './GrpcService';
declare class GrpcServer {
private logger;
grpcService: GrpcService;
grpcInitService: GrpcInitService;
private server;
constructor(logger: Logger);
/**
* Start the server and begin listening on the provided port
* @returns true if the server started listening successfully, false otherwise
*/
listen: (port: number, host: string, tlsCertPath: string, tlsKeyPath: string) => Promise<void>;
/**
* Stop listening for requests
*/
close: () => Promise<void>;
/**
* Generate a new certificate and save it to the disk
* @returns the cerificate and its private key
*/
private generateCertificate;
}
export default GrpcServer;