Skip to content

library for working with karai channels in nodejs

License

Notifications You must be signed in to change notification settings

karai/libkarai-js

Repository files navigation

image

libkarai-js

npm version

A library to interact with karai channels in javascript.

This library provides three exported classes.

  • KeyRing class, which contains a pair of ed25519 keys and sign / verify methods
  • Channel class, which you can use to interact with a channel
  • Utils class, which contains a couple useful type conversion functions

Install

yarn add libkarai-js

Documentation

You can find a link to the documentation here

Quickstart

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
});

About

library for working with karai channels in nodejs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •