[−][src]Crate hypercore
Introduction
Hypercore is a secure, distributed append-only log. Built for sharing large datasets and streams of real time data as part of the Dat project. This is a rust port of the original node version aiming for interoperability. The primary way to use this crate is through the Feed struct.
Example
let mut feed = hypercore::open("./feed.db")?; feed.append(b"hello")?; feed.append(b"world")?; assert_eq!(feed.get(0)?, Some(b"hello".to_vec())); assert_eq!(feed.get(1)?, Some(b"world".to_vec()));
Modules
bitfield | Bitfield module. Exposes |
prelude | Convenience wrapper to import all of Hypercore's core. |
Structs
Feed | Append-only log structure. |
FeedBuilder | Construct a new |
Node | Nodes that are persisted to disk. |
Peer | A peer on the network. |
Proof | A merkle proof for an index, created by the |
PublicKey | An ed25519 public key. |
SecretKey | An EdDSA secret key. |
Signature | An ed25519 signature. |
Storage | Save data to a desired storage backend. |
Enums
Event | Events emitted. |
Store | The types of stores that can be created. |
Traits
NodeTrait | Functions that need to be implemented for the Data that |
Functions
generate_keypair | Generate a new |
open | Create a new Hypercore |
sign | Sign a byte slice using a keypair's private key. |
verify | Verify a signature on a message with a keypair's public key. |
Type Definitions
Result | A specialized |