diff --git a/dist/index.d.ts.map b/dist/index.d.ts.map index d44fd35..c7235b2 100644 --- a/dist/index.d.ts.map +++ b/dist/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAU,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAsBhC,qBAAa,GAAG;IACd,OAAO,CAAC,aAAa,CAAU;IAC/B,OAAO,CAAC,EAAE,CAAa;gBAEX,aAAa,UAAO;IAInB,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAS/C,KAAK,IAAI,OAAO,CAAC,QAAQ,CAAC;IAMnB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IASvC,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAY1C,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;YAM3B,MAAM;IAaP,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC;YAcxB,KAAK;CAIpB;AAED,qBAAa,MAAO,SAAQ,YAAY;IACtC,OAAO,CAAC,EAAE,CAAS;IACnB,OAAO,CAAC,YAAY,CAAqC;gBAE7C,EAAE,EAAE,MAAM;IAKtB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,GAAG,IAAI;IAkB/D,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,IAAI;IAStC,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAIrC,GAAG,IAAI,IAAI;IAIX,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,UAAU;CAInB"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAU,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAsBhC,qBAAa,GAAG;IACd,OAAO,CAAC,aAAa,CAAU;IAC/B,OAAO,CAAC,EAAE,CAAa;gBAEX,aAAa,UAAO;IAInB,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAa/C,KAAK,IAAI,OAAO,CAAC,QAAQ,CAAC;IAMnB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IASvC,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAY1C,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;YAM3B,MAAM;IAaP,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC;YAcxB,KAAK;CAIpB;AAED,qBAAa,MAAO,SAAQ,YAAY;IACtC,OAAO,CAAC,EAAE,CAAS;IACnB,OAAO,CAAC,YAAY,CAAqC;gBAE7C,EAAE,EAAE,MAAM;IAKtB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,GAAG,IAAI;IAkB/D,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,IAAI;IAStC,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAIrC,GAAG,IAAI,IAAI;IAIX,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,UAAU;CAInB"} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index dcce6a7..be9307a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -24,7 +24,11 @@ export class DHT { } async connect(pubkey) { await this.setup(); - const [resp, err] = await callModule(DHT_MODULE, "connect", { pubkey }); + const dht = !this.useDefaultDht ? this.id : undefined; + const [resp, err] = await callModule(DHT_MODULE, "connect", { + pubkey, + dht, + }); if (err) { throw new Error(err); }