Skip to main content

arknet_common/
lib.rs

1//! Shared types, errors, and utilities used across the arknet workspace.
2//!
3//! This crate defines the vocabulary of the protocol: addresses, hashes, amounts,
4//! identifiers, error hierarchies, config schema, and serialization helpers.
5//! Every other crate in the workspace depends on it.
6//!
7//! See [`docs/PROTOCOL_SPEC.md`](../../../docs/PROTOCOL_SPEC.md) for canonical
8//! definitions and [`docs/SECURITY.md`](../../../docs/SECURITY.md) ยง12 for the
9//! post-quantum migration plan.
10
11#![forbid(unsafe_code)]
12#![warn(missing_docs)]
13
14pub mod config;
15pub mod errors;
16pub mod serialization;
17pub mod types;
18
19// Common re-exports for ergonomic downstream usage.
20pub use errors::{CommonError, Result};
21pub use types::{
22    Address, Amount, ChannelId, Hash256, Height, JobId, KemScheme, NodeId, PoolId, PubKey,
23    RoleBitmap, Signature, SignatureScheme, Timestamp, VrfScheme, ARK_SUPPLY_CAP, ATOMS_PER_ARK,
24};