Core library for the Amadeus blockchain node with networking, consensus, and storage.
[dependencies]
amadeus-node = "1.3"- Networking - UDP P2P protocol with encryption and compression
- Consensus - BFT consensus with dual chains (rooted and temporal)
- Storage - RocksDB-backed persistent chain storage
- Transaction Pool - Mempool and nonce tracking
- Peer Management - ANR (Amadeus Network Records) and handshakes
use amadeus_node::{Config, Context};
// Load configuration
let config = Config::from_fs(None, None).await?;
// Create network context
let ctx = Context::with_config_and_socket(config, socket).await?;
// Handle incoming message
let protocol_msg = ctx.parse_udp(&buf, src_ip).await;
let instructions = ctx.handle(protocol_msg?, src_ip).await?;
for instruction in instructions {
ctx.execute(instruction).await?;
}use amadeus_node::consensus::doms::tx;
// Build transaction
let tx_packed = tx::build(
&config,
b"Coin",
"transfer",
&[recipient, amount, symbol],
None,
None,
None,
);config- Node configuration and identitycontext- Runtime state containerconsensus::fabric- Chain storage (RocksDB)consensus::doms- Domain types (Entry, Tx, Attestation)node::protocol- Network message handlingnode::peers- Peer connection managementnode::txpool- Transaction poolmetrics- Performance telemetry
system-metrics- Enable CPU/memory monitoring (default)
For detailed API documentation, see docs.rs/amadeus-node.
Apache-2.0