lazarus-receipts
Rust SDK for Lazarus Receipts verification.
Installation
[]
= "1.0"
Quick Start
use ;
// Build leaves
let leaf_a = hash256;
let leaf_b = hash256;
// Build root: H(leaf_a || leaf_b)
let mut combined = Vecnew;
combined.extend_from_slice;
combined.extend_from_slice;
let root = hash256;
// Proof for leaf_a: sibling (leaf_b) is on RIGHT
let proof = vec!;
assert!;
API
hash256(data: &[u8]) -> [u8; 32]
SHA-256 hash.
receipt_hash_from_json_bytes(bytes: &[u8]) -> [u8; 32]
Hash receipt JSON bytes (placeholder until canonicalization lands).
verify_merkle_proof_directional(leaf, root, proof) -> bool
Verifies a Merkle proof using positional v1.0.1 rule:
L:cur = H(sibling || cur)R:cur = H(cur || sibling)
verify_merkle_proof_legacy_sorted(leaf, root, siblings) -> bool
Legacy sorted-pair verification (NOT auditor-grade). Deprecated.
License
Apache 2.0