Cryptographic receipt system for ggen operations.
This crate provides a production-ready receipt system with Ed25519 signatures for verifiable operation tracking. Receipts can be chained together to form an auditable trail of operations.
Features
- Ed25519 digital signatures for cryptographic verification
- SHA-256 hashing for data integrity
- Receipt chaining with hash links
- Full serialization support with serde
- Comprehensive error handling
Examples
Creating and signing a receipt
use ;
let = generate_keypair;
let receipt = new
.sign
.expect;
// Verify the signature
receipt.verify.expect;
Building a receipt chain
use ;
let = generate_keypair;
// Create genesis receipt
let genesis = new
.sign
.expect;
let mut chain = from_genesis
.expect;
// Add a linked receipt
let receipt2 = new
.chain
.expect
.sign
.expect;
chain.append.expect;
// Verify the entire chain
chain.verify.expect;