Moloch Core - Fundamental types for the Moloch audit chain.
This crate provides the core data structures and cryptographic primitives used throughout the Moloch system:
- [
crypto] - Hashing (BLAKE3) and signatures (Ed25519) - [
event] - Audit events (the atomic unit of the chain) - [
block] - Blocks that batch events together - [
proof] - Merkle proofs for inclusion verification
Example
use ;
// Generate a key for signing
let key = generate;
// Create an audit event
let actor = new;
let resource = new;
let event = builder
.now
.event_type
.actor
.resource
.sign
.unwrap;
// Create a block containing the event
let sealer = new;
let block = new
.events
.seal;
assert!;