Introduction
Erebos is a set of JavaScript tools to build decentralised applications on top of Swarm, created by the Mainframe team originally for the PSS-based Onyx messaging application proof of concept and now used as a core piece of Mainframe OS.
Swarm is a distributed storage platform and content distribution network, a native base layer service of the Ethereum web3 stack.
If you are not familiar with Swarm yet, the Swarm introduction should be a good place to get started.
Swarm APIs
Individual packages
The @erebos/bzz-browser
and @erebos/bzz-node
packages expose the Bzz APIs, to interact with files in Swarm.
The @erebos/bzz-feed
package provides additional APIs to interact with Swarm feeds while the @erebos/bzz-fs
package provides additional APIs to interact with the local file system.
The @erebos/pss
package exposes the Pss APIs, for communications over Swarm.
Swarm client
The @erebos/swarm-browser
and @erebos/swarm-node
packages expose the SwarmClient class that includes either @erebos/bzz-browser
(in @erebos/swarm-browser
) or @erebos/bzz-node
(in @erebos/swarm-node
) and @erebos/pss
.
It is meant to be a simple way to get started with Swarm in Node or browser environments.
Utility packages
@erebos/hex
provides functions to convert to and from hexadecimal-encoded strings.@erebos/keccak256
provides hashing function, notably to derive an Ethereum address from a public key.@erebos/secp256k1
provides signing functions, notably used to publish Swarm feeds.@erebos/wallet-hd
provides a Hierarchical Deterministic wallet interface that can be used to create Ethreum transactions and publish Swarm feeds.
Additional tools
Data structures
A few higher-level data structures are implemented on top of Swarm APIs, helping support some common use-cases.
Command-line interface
The Erebos CLI provides useful commands to use Swarm's Bzz (including feeds) and Pss APIs.
It also supports more advanced use cases, such as interacting with Timelines and a simple way to publish static websites.
JSON-RPC specification
Various JSON-RPC libraries are provided to support communications with Ethereum, Swarm or other JSON-RPC interfaces.