diff --git a/dist/dhtOnlineBase.d.ts b/dist/dhtOnlineBase.d.ts index 1e5e796..851298b 100644 --- a/dist/dhtOnlineBase.d.ts +++ b/dist/dhtOnlineBase.d.ts @@ -15,19 +15,17 @@ export default class DHTOnlineBase extends EventEmitter { get online(): string[]; broadcast(data: any, ttl?: number): void; getPeerData(id: Buffer | string): any; - protected setData(data: any): void; + setData(data: any): void; private _broadcastData; protected onAddPeer(id: Buffer): void; protected onRemovePeer(id: Buffer): void; protected onGetBroadcast(message: Buffer, id: Buffer): void; private _hasSeenPeer; private _setPeer; - private _removePeer; private _ensurePeer; private _addPeerConnection; private _removePeerConnection; private _bootstrapFrom; - private _getPeerConnectedTo; private _getBootstrapInfo; private _recalculate; private _maybeHexify; diff --git a/dist/dhtOnlineBase.d.ts.map b/dist/dhtOnlineBase.d.ts.map index 60177ef..92365b3 100644 --- a/dist/dhtOnlineBase.d.ts.map +++ b/dist/dhtOnlineBase.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"dhtOnlineBase.d.ts","sourceRoot":"","sources":["../src/dhtOnlineBase.ts"],"names":[],"mappings":";;AAAA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAYlC,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,YAAY;IACrD,OAAO,CAAC,EAAE,CAAS;IACnB,OAAO,CAAC,YAAY,CAAU;IAC9B,OAAO,CAAC,KAAK,CAAM;IACnB,OAAO,CAAC,WAAW,CAAW;IAC9B,OAAO,CAAC,IAAI,CAAK;IACjB,OAAO,CAAC,QAAQ,CAAoB;gBAExB,EAAE,EAAE,MAAM,EAAE,EAAE,QAA2B,EAAE;;KAAK;IAa5D,OAAO,CAAC,OAAO,CAAW;IAE1B,IAAI,MAAM,IAAI,MAAM,EAAE,CAErB;IAED,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM;IAIjC,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAI/B,SAAS,CAAC,OAAO,C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AAE,EAAE,MAAM;IAqC9B,SAAS,CAAC,YAAY,CAAC,EAAE,EAAE,MAAM;IAiBjC,SAAS,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM;IA6CpD,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,QAAQ;IAGhB,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,kBAAkB;IAY1B,OAAO,CAAC,qBAAqB;IAa7B,OAAO,CAAC,cAAc;IA2BtB,OAAO,CAAC,iBAAiB;IAczB,OAAO,CAAC,YAAY;IAwBpB,OAAO,CAAC,YAAY;CAOrB"} \ No newline at end of file diff --git a/dist/dhtOnlineBase.js b/dist/dhtOnlineBase.js index 5c89e8c..99b03aa 100644 --- a/dist/dhtOnlineBase.js +++ b/dist/dhtOnlineBase.js @@ -135,9 +135,6 @@ class DHTOnlineBase extends events_1.default { _setPeer(id, data) { this.graph.addNode(this._maybeHexify(id), data); } - _removePeer(id) { - this.graph.removeNode(this._maybeHexify(id)); - } _ensurePeer(id) { id = this._maybeHexify(id); if (!this._hasSeenPeer(id)) { @@ -185,9 +182,6 @@ class DHTOnlineBase extends events_1.default { this.emit("bootstrapped"); this._recalculate(); } - _getPeerConnectedTo(id) { - return this.graph.successors(id); - } _getBootstrapInfo() { const state = {}; for (const [id, rawData] of this.graph.nodes(true)) {