Skip to content

Example: HyperBeam

Lorenzo Mangani edited this page Dec 21, 2020 · 7 revisions

Decentralized paStash with HyperBeam

Hyperbeam is a 1-1 end-to-end encrypted internet pipe powered by Hyperswarm and Noise.

In this decentralized tracing example, we'll use Hyperbeam for two paStash instances to discover each other and exchange peer-to-peer encrypted bidirectional secure data pipes.

Bonus: The secure pipe can handle anything paStash can handle! 🔒

🔧 Install

Install pastash and the required plugin on two separate systems:

npm install -g @pastash/pastash @pastash/input_hyperbeam @pastash/output_hyperbeam

📍 Example

Create a recipe on the sender and receiver, sharing the same hyper key.

📢 Sender
input {
  stdin {}
}

output {
  hyperbeam {
    path => supersecretkeyword
  }
}
pastash --config_file=/tmp/sender.conf
📻 Receiver
input {
  hyperbeam {
    path => supersecretkeyword
  }
}

output {
  stdout {}
}
pastash --config_file=/tmp/receiver.conf
🔔 Try it!

Type something in the sender console and you should see corresponding events on the receiver. Et Voila'!

Next: use it to create a decentralized, p2p log and event distribution with a simple key exchange 🚀


Clone this wiki locally