dht-cache/dist/DHTDataBase.d.ts

38 lines
1.2 KiB
TypeScript
Raw Normal View History

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