UNPKG

xud

Version:
31 lines (30 loc) 997 B
/// <reference types="node" /> import { EventEmitter } from 'events'; interface Backup { on(event: 'newBackup', listener: (path: string) => void): this; on(event: 'changeDetected', listener: (client: string) => void): this; emit(event: 'newBackup', path: string): boolean; emit(event: 'changeDetected', client: string): boolean; } declare class Backup extends EventEmitter { private logger; private config; private backupDir; private fileWatchers; private lndClients; private checkLndTimer; /** A map of client names to a boolean indicating whether they have changed since the last backup. */ private databaseChangedMap; private xudBackupTimer; start: (args: { [argName: string]: any; }) => Promise<void>; stop: () => void; private waitForLndConnected; private startLndSubscriptions; private startFilewatcher; private readDatabase; private writeBackup; private getBackupPath; } export default Backup;