*Update dist

This commit is contained in:
Derrick Hammer 2023-01-18 03:57:37 -05:00
parent 3a164422e9
commit 175b9d3189
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 5 additions and 3 deletions

4
dist/index.d.ts vendored
View File

@ -1,4 +1,6 @@
/// <reference types="node" resolution-mode="require"/>
import type { Peer } from "@lumeweb/peer-discovery";
declare const _default: (pubkey: Buffer, options?: {}) => Promise<boolean | Peer>;
declare const _default: (pubkey: Buffer, options?: {
host: string;
}) => Promise<boolean | Peer>;
export default _default;

4
dist/index.js vendored
View File

@ -6,10 +6,10 @@ import { ripemd160 } from "@noble/hashes/ripemd160";
import { sha256 } from "@noble/hashes/sha256";
import { bytesToHex } from "@noble/hashes/utils";
const hash160 = (data) => ripemd160(sha256(data));
export default async (pubkey, options = {}) => {
export default async (pubkey, options = { host: "irc.liberta.casa" }) => {
let ircPubKey = await ed.getPublicKey(ed.utils.randomPrivateKey());
let client = new IrcClient(undefined, bytesToHex(hash160(ircPubKey)).substring(0, 15), {
host: "irc.liberta.casa",
host: options.host,
port: 6697,
secure: true,
channels: ["#lumeweb"],