*add dht getter that returns a mock object including ready
This commit is contained in:
parent
46b0911d57
commit
44b9842ea9
|
@ -18,6 +18,15 @@ export class SwarmClient extends Client {
|
||||||
|
|
||||||
private _topics: Set<Uint8Array> = new Set<Uint8Array>();
|
private _topics: Set<Uint8Array> = new Set<Uint8Array>();
|
||||||
|
|
||||||
|
get dht() {
|
||||||
|
const self = this;
|
||||||
|
return {
|
||||||
|
async ready() {
|
||||||
|
return self.ready();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
constructor(useDefaultDht = true, autoReconnect = false) {
|
constructor(useDefaultDht = true, autoReconnect = false) {
|
||||||
super();
|
super();
|
||||||
this.useDefaultSwarm = useDefaultDht;
|
this.useDefaultSwarm = useDefaultDht;
|
||||||
|
|
Loading…
Reference in New Issue