*Update dist
This commit is contained in:
parent
3a164422e9
commit
175b9d3189
|
@ -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;
|
||||
|
|
|
@ -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"],
|
||||
|
|
Loading…
Reference in New Issue