erebos

erebos

  • Docs
  • Examples
  • API
  • Help
  • GitHub

›Utility libraries

Docs

  • Introduction
  • Getting started

Swarm examples

  • File storage examples
  • Feeds examples
  • Communications examples

Swarm APIs and CLI

  • Swarm client
  • Individual APIs
  • Bzz API
  • Bzz Feed API
  • Bzz FS API
  • Pss API
  • CLI

Data structures

  • Data structures
  • Feed lists
  • Document synchronization
  • Timeline

Timeline protocol

  • Timeline specification
  • Timeline example
  • Timeline API

Utility libraries

  • Hexadecimal encoding
  • Keccak256 hashing
  • SECP256k1 signing
  • Hierarchical Deterministic wallet

RPC tools

  • RPC clients, handler and transport
  • Base RPC class and types
  • RPC Errors
  • RequestRPC client (stateless)
  • StreamRPC client (stateful)
  • RPC handler
  • RPC client over HTTP
  • RPC client over WebSocket
  • RPC client over IPC
  • RPC client for browsers
  • RPC client for Node
  • RPC client for Electron
  • HTTP transport
  • WebSocket transport
  • IPC transport
  • Electron transport
Edit

Keccak256 hashing

Purpose

This package provides Keccak256 hashing functions, as used by Ethereum and Swarm.

Installation

npm install @erebos/keccak256

Usage

import { hash, pubKeyToAddress } from '@erebos/keccak256'

const hashed = hash(Buffer.from('hello'))

const pubKey = Buffer.from('...')
const address = pubKeyToAddress(pubKey)

Interfaces and types

hexValue

Hexadecimal-encoded string prefixed with 0x. This type is exported by the @erebos/hex package.

API

hash()

Arguments

  1. input: Array<number> | Buffer

Returns Array<number>

pubKeyToAddress()

Returns the Ethereum address from the provided key.

Arguments

  1. key: hexValue | Array<number> | Buffer

Returns hexValue

← Hexadecimal encodingSECP256k1 signing →
  • Purpose
  • Installation
  • Usage
  • Interfaces and types
    • hexValue
  • API
    • hash()
    • pubKeyToAddress()
Docs
Getting StartedAPI ReferenceCLI
Community
Gitter chatGitHub repositoryStar
Swarm
Official documentationHTTP gatewayDevelopment chat