Skip to main content

dig_clvm/
lib.rs

1//! dig-clvm: DIG L2 CLVM Consensus Engine
2//!
3//! Validates spend bundles and computes coin additions/removals for DIG validators.
4//! Built as a thin orchestration layer on top of the Chia crate ecosystem.
5
6// ── CLVM Runtime ──
7pub use clvm_traits::{self, FromClvm, ToClvm};
8pub use clvm_utils::{self, tree_hash, CurriedProgram, ToTreeHash, TreeHash};
9pub use clvmr::{self, cost::Cost, Allocator, NodePtr};
10
11// ── Chia Protocol Types ──
12pub use chia_protocol::{self, Bytes, Bytes32, Coin, CoinSpend, CoinState, Program, SpendBundle};
13
14// ── Consensus Engine ──
15pub use chia_consensus::{self, consensus_constants::ConsensusConstants, opcodes};
16
17// ── BLS Signatures ──
18pub use chia_bls::{self, aggregate_verify, BlsCache, PublicKey, SecretKey, Signature};
19
20// ── SDK Types & Conditions ──
21pub use chia_sdk_types::{self, Condition, Conditions, Mod};
22
23// ── DIG Network Constants ──
24pub use dig_constants::{self, NetworkConstants, DIG_MAINNET, DIG_TESTNET};
25
26// ── Spend Construction ──
27pub use chia_sdk_driver::{
28    self, DriverError, Layer, Puzzle, Spend, SpendContext, SpendWithConditions,
29};
30
31// ── Coin State ──
32pub use chia_sdk_coinset::{self, CoinRecord};
33
34// ── Puzzles ──
35pub use chia_puzzles;
36
37// ── dig-clvm's own consensus orchestration ──
38pub mod consensus;
39
40pub use consensus::{
41    build_block_generator, validate_block, validate_spend_bundle, BlockGeneratorResult,
42    SpendResult, ValidationConfig, ValidationContext, ValidationError, L1_MAX_COST_PER_SPEND,
43    L2_MAX_COST_PER_BLOCK,
44};