*Update dist

This commit is contained in:
Derrick Hammer 2023-01-15 03:36:25 -05:00
parent 0a9197315c
commit ae6609f0b0
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 4 additions and 0 deletions

1
dist/index.d.ts vendored
View File

@ -8,5 +8,6 @@ export declare class PeerDiscovery {
private _sources;
registerSource(name: string, source: PeerSource): boolean;
removeSource(name: string): boolean;
removeAllSources(): void;
discover(pubkey: string | Buffer, options?: {}): Promise<Peer | boolean>;
}

3
dist/index.js vendored
View File

@ -21,6 +21,9 @@ class PeerDiscovery {
this._sources.delete(name);
return true;
}
removeAllSources() {
this._sources.clear();
}
async discover(pubkey, options = {}) {
if (!b4a_1.default.isBuffer(pubkey)) {
pubkey = b4a_1.default.from(pubkey, "hex");