An end-to-end encrypted pipeline for the Internet, utilizing the Hyperswarm and Noise Protocol for secure communications.
npm install hyperbeam
const Hyperbeam = require('hyperbeam')
// to generate a passphrase, leave the constructor empty
// and hyperbeam will generate one for you
const beam = new Hyperbeam()
// Use the following constructor with ('neznr3z3j44l7q7sgynbzpdrdlpausurbpcmqvwupmuoidolbopa') a 32-byte unique passphrase
// to find the other side of your pipe.
// const beam = new Hyperbeam('neznr3z3j44l7q7sgynbzpdrdlpausurbpcmqvwupmuoidolbopa')
// beam.key gives the passphrase
// make a little chat app
Step 1: Install Hyperbeam as a global npm package.
npm install -g hyperbeam
Step 2: Generate a passphrase, using the following command on a machine
echo 'hello world' | hyperbeam
Step 3: Then on another machine run the following command
# will print 'hello world'
const stream = new Hyperbeam([key][, options])
Make a new Hyperbeam duplex stream.
This stream will auto-connect to another peer using the same key with an end-to-end encrypted tunnel. When the other peer writes it's emitted as
dataon this stream. Likewise, when you write to this stream it's emitted as
dataon the other peer's stream.
If you do not pass a
keyinto the constructor (the passphrase), one will be generated and put on
A DHT instance. Defaults to a new instance
The passphrase used by the stream for connection.