0.0.1 • Published 5 months ago

@n0computer/iroh v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

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

5 months ago