| Crates.io | stratum-apps |
| lib.rs | stratum-apps |
| version | 0.2.0 |
| created_at | 2025-10-08 14:42:03.760201+00 |
| updated_at | 2026-01-22 16:00:22.254354+00 |
| description | Complete Stratum V2 application development kit - all utilities in one crate |
| homepage | https://stratumprotocol.org |
| repository | https://github.com/stratum-mining/stratum |
| max_upload_size | |
| id | 1874049 |
| size | 233,186 |
Complete Stratum V2 application development kit - all utilities in one crate.
stratum-apps is a unified crate that provides all the utilities needed for building Stratum V2 applications.
This crate is organized into three main modules:
network_helpers - High-level networking utilities (from network_helpers_sv2)config_helpers - Configuration management helpers (from config_helpers_sv2)rpc - RPC utilities with custom serializable types (from rpc_sv2) - feature-gatedThe crate also re-exports stratum-core, the central hub for the Stratum V2 ecosystem that provides a cohesive API for all low-level protocol functionality.
Add to your Cargo.toml:
[dependencies]
stratum-apps = { version = "0.1.0", features = ["pool"] }
Basic usage:
use stratum_apps::{network_helpers, config_helpers};
// For RPC functionality (when rpc feature is enabled)
#[cfg(feature = "rpc")]
use stratum_apps::rpc::{BlockHash, MiniRpcClient};
network - Networking utilities (enabled by default)config - Configuration helpers (enabled by default)rpc - RPC utilities with custom serializable types (optional)
Hash, BlockHash, Amount types with proper JSON serializationMiniRpcClient for Bitcoin RPC communicationsv1 - Enable SV1 protocol support (includes translation utilities)with_buffer_pool - Enable buffer pooling for better performancepool - Everything needed for pool applicationsjd_client - Everything needed for JD client applicationsjd_server - Everything needed for JD server applications (includes RPC)translator - Everything needed for translator applications (includes SV1 + translation)mining_device - Everything needed for mining device applications[dependencies]
stratum-apps = { version = "1.0", features = ["pool"] }
use stratum_apps::{network_helpers, config_helpers};
// Use networking
let connection = network_helpers::Connection::new(stream, HandshakeRole::Responder).await?;
// Use configuration
let config: PoolConfig = config_helpers::parse_config("pool.toml")?;
[dependencies]
stratum-apps = { version = "1.0", features = ["jd_server"] }
use stratum_apps::{network_helpers, config_helpers, rpc};
// RPC functionality with custom types
use stratum_apps::rpc::{BlockHash, MiniRpcClient};
// All networking and configuration utilities available
// Plus RPC server utilities with proper serialization