dht-cache/dist/DHTDataBase.d.ts

38 lines
1.2 KiB
TypeScript

/// <reference types="node" />
/// <reference types="node" />
import EventEmitter from "events";
export default class DHTDataBase extends EventEmitter {
protected swarm: any;
private id;
private bootstrapped;
private graph;
private connectedTo;
constructor(id: Buffer, { swarm }?: {
swarm?: any;
});
private _data;
get data(): {};
set data(value: {});
private _online;
get online(): string[];
broadcast(data: any, ttl?: number): void;
getPeerRaw(id: Buffer | string): any;
getPeerField(id: Buffer | string, field: string): any;
getPeerData(id: Buffer | string): any;
getPeerTimestamp(id: Buffer | string): any;
getPeerSignature(id: Buffer | string): any;
protected onAddPeer(id: Buffer): void;
protected onRemovePeer(id: Buffer): void;
protected onGetBroadcast(message: Buffer, id: Buffer): void;
private _broadcastData;
private _hasSeenPeer;
private _setPeer;
private _ensurePeer;
private _addPeerConnection;
private _removePeerConnection;
private _bootstrapFrom;
private _getBootstrapInfo;
private _recalculate;
private _maybeHexify;
}
//# sourceMappingURL=DHTDataBase.d.ts.map