A library to interact with karai channels in javascript.
This library provides three exported classes.
yarn add libkarai-js
You can find a link to the documentation here
import { Channel, KeyRing, Utils } from "libkarai-js";
const keyring = new KeyRing(":memory:");
const channel = new Channel("zeus.karai.io:4200", keyring, false);
channel.on("ready", async () => {
console.log("Channel info: ", channel.info());
console.log("My public key is " + Utils.toHexString(keyring.getPub()));
});
channel.on("error", (error) => {
// do something with the error
});
Generated using TypeDoc