| Crates.io | node-builder |
| lib.rs | node-builder |
| version | 0.12.0 |
| created_at | 2025-11-10 11:48:05.527919+00 |
| updated_at | 2025-11-10 11:48:05.527919+00 |
| description | A minimal node implementation for running integration tests of the Miden client. NOT for production use. |
| homepage | |
| repository | https://github.com/0xMiden/miden-client |
| max_upload_size | |
| id | 1925227 |
| size | 148,037 |
A minimal node implementation used exclusively for running integration tests of the Miden client. This crate is NOT intended for production use.
This crate provides a simplified node implementation that is used to run integration tests for:
use miden_node_builder::NodeBuilder;
use std::path::PathBuf;
use std::time::Duration;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
// Create a new node builder for testing
let builder = NodeBuilder::new(PathBuf::from("./data"))
.with_block_interval(Duration::from_millis(1000))
.with_batch_interval(Duration::from_millis(1000));
// Start the node
let node_handle = builder.start().await?;
println!("RPC server listening at: {}", node_handle.rpc_url());
// ... run tests ...
// Stop the node when done
node_handle.stop().await?;
Ok(())
}
For a complete working example, see the simple.rs example in the crate's source code.
The builder initializes and manages the following components:
data_directory: Path to store node datablock_interval: Duration between block production attemptsbatch_interval: Duration between batch production attemptsThis implementation is intentionally simplified and may not include all features of a production node. It is designed to be:
This project is MIT licensed.