3 releases

0.1.2 Jul 19, 2022
0.1.1 Jul 18, 2022
0.1.0 Jun 11, 2022

#191 in #light

MIT license

6KB
129 lines

Hyper-Hasher

A Simple BlockChain Library for rust and js

Examples

const {Block, Chain} = require('hyperhasher');

let chain = new Chain();

let block = new Block("DATA_FOR_THE_BLOCK",chain);

chain.push(block);
use hyperhasher::{Block, Chain};

fn main() {
    let mut chain = Chain::new();
    let block = Block::new("DATA_FOR_THE_BLOCK",&chain);
    chain.push(block);
}

lib.rs:

A light-weight Blockchain library using BLAKE3 for hashing.

Usage:

use hyperhasher::{
    HashString,
    Block,
    Chain,
    IBD
};

fn main(){
    //Craeting A New Chain
    let mut chain = Chain::new(IBD);
    let block = Block::new("test", &chain);
    chain.push(block);
    println!("{}", chain.hash);
}

Also see RustCrypto/hashes readme.

Dependencies

~1.5MB
~45K SLoC