npm.io
0.0.1 • Published 2 years ago

@n0computer/iroh

Licence
MIT
Version
0.0.1
Deps
0
Size
8 kB
Vulns
0
Weekly
0

iroh-js

This is a very much work-in-progress version of a javascript client for iroh. It's distinct from iroh-ffi, which actually embeds an iroh node in the host language. This package focuses on defining the core iroh API in javascript & backing it with some sort of RPC API.

Currently the only supported RPC backing is iroh.network (documentation here). Get an API token then boot up with:

import { Node } from '@n0computer/iroh'

const auth = process.env['IROH_AUTH_TOKEN']
const node = new Node({
  type: 'http',
  baseUrl: 'https://api.iroh.network',
  username: 'your_username',
  auth,
});

Keywords