| Crates.io | anya-core |
| lib.rs | anya-core |
| version | 1.2.0 |
| created_at | 2025-07-20 11:46:47.621567+00 |
| updated_at | 2025-07-20 11:46:47.621567+00 |
| description | Enterprise-grade Bitcoin Infrastructure Platform |
| homepage | |
| repository | https://github.com/anya-org/anya-core |
| max_upload_size | |
| id | 1761011 |
| size | 24,942,106 |
A modular Bitcoin infrastructure platform designed for enterprise applications, Layer2 protocol integration, and decentralized AI/ML systems.
Last Updated: July 14, 2025 Version: 1.2.0
๐ Complete Documentation - Comprehensive guides and references
Quick Navigation:
Anya Core is an advanced integrated system combining Bitcoin/crypto functionality, ML-based analytics, and Web5 decentralized data management with enterprise-grade security and revenue tracking. Built on a hexagonal architecture, it provides a robust, scalable, and secure platform for institutional-grade operations.
Core Bitcoin Features:
Layer2 Protocol Framework:
Enterprise Infrastructure:
AI Labeling: This project follows the AI Labeling System with standardized compliance markers for AI readiness, security, and Bitcoin protocol compliance.
System Architecture:
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Applications โ โ Web APIs โ โ External Tools โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ โ โ
โโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโ
โ Anya Core โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โ โ Bitcoin โ โ Layer2 โ โ Enterprise โ โ
โ โ Protocol โ โ Protocols โ โ Infrastructure โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# System requirements
- Rust 1.70+ with Cargo
- Git for version control
- 4GB+ RAM available
- 10GB+ disk space
# Optional for full features
- Bitcoin Core 24.0+ (for full Bitcoin integration)
- Docker (for containerized deployment)
git clone https://github.com/Anya-org/Anya-core.git
cd Anya-core
cargo build --release
Create a basic configuration file:
mkdir -p ~/.config/anya-core
cat > ~/.config/anya-core/config.toml << EOF
[bitcoin]
network = "testnet"
rpc_url = "http://localhost:18332"
[layer2]
enabled = ["lightning", "rgb"]
[security]
hsm_enabled = false
log_level = "info"
EOF
# Run core functionality tests
cargo test --lib
# Run integration tests (requires setup)
cargo test --test integration_tests
use anya_core::{BitcoinClient, Layer2Manager};
// Initialize Bitcoin client
let bitcoin_client = BitcoinClient::new(config)?;
// Create Layer2 manager for protocol integration
let layer2_manager = Layer2Manager::new()?;
// Process Bitcoin transactions
let tx_result = bitcoin_client.process_transaction(raw_tx)?;
println!("Transaction processed: {}", tx_result.txid);
Minimum Requirements:
Software Dependencies:
# Clone and build
git clone https://github.com/Anya-org/Anya-core.git
cd Anya-core
cargo build --release
# Run setup script
./scripts/setup.sh
# Install Rust if not present
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Build the project
cargo build --release --features "complete"
# Install system-wide (optional)
sudo cp target/release/anya-core /usr/local/bin/
Configuration Files:
~/.config/anya-core/config.toml~/.config/anya-core/bitcoin.toml~/.config/anya-core/layer2.tomlExample Configuration:
# ~/.config/anya-core/config.toml
[bitcoin]
network = "testnet" # testnet, mainnet, regtest
rpc_url = "http://localhost:18332" # Bitcoin Core RPC
data_dir = "~/.anya-core/bitcoin"
[layer2]
enabled_protocols = ["lightning", "rgb", "dlc"]
lightning_node_url = "localhost:9735"
[security]
hsm_enabled = false # Enable for production
audit_logging = true
max_concurrent_operations = 100
[monitoring]
metrics_enabled = true
prometheus_port = 9090
log_level = "info" # trace, debug, info, warn, error
Environment Variable Overrides:
# Override any config value with environment variables
export ANYA_BITCOIN_NETWORK=mainnet
export ANYA_BITCOIN_RPC_URL=http://localhost:8332
export ANYA_SECURITY_HSM_ENABLED=true
export ANYA_MONITORING_LOG_LEVEL=debug
Consensus Layer:
Wallet Functionality:
Currently Implemented:
Integration Status:
Architecture:
Security Features:
Monitoring & Operations:
Core Languages & Frameworks:
bitcoin, secp256k1, bdk for Bitcoin protocol implementationKey Dependencies (from Cargo.toml):
[dependencies]
# Bitcoin ecosystem
bitcoin = { version = "0.32.6", features = ["std", "serde", "rand"] }
secp256k1 = { version = "0.29.1", features = ["rand-std", "global-context"] }
bdk = { version = "0.30", features = ["std", "compiler"] }
# Async runtime and networking
tokio = { version = "1.45.1", features = ["full"] }
hyper = { version = "1.6.0", features = ["full"] }
# Serialization and data handling
serde = { version = "1.0.219", features = ["derive", "rc"] }
serde_json = { version = "1.0.140", features = ["preserve_order"] }
# Error handling and logging
anyhow = { version = "1.0.98", features = ["std", "backtrace"] }
tracing = { version = "0.1.41", features = ["std", "attributes"] }
src/
โโโ bitcoin/ # Bitcoin protocol implementation
โ โโโ consensus/ # Consensus rules and validation
โ โโโ script/ # Script execution and Taproot support
โ โโโ transaction/ # Transaction processing and PSBT
โโโ layer2/ # Layer2 protocol implementations
โ โโโ lightning/ # Lightning Network integration
โ โโโ rgb/ # RGB protocol for assets
โ โโโ dlc/ # Discrete Log Contracts
โ โโโ manager.rs # Protocol coordination
โโโ security/ # Security and cryptographic operations
โ โโโ hsm/ # Hardware Security Module integration
โ โโโ audit/ # Security auditing framework
โโโ core/ # Core system components
โ โโโ config/ # Configuration management
โ โโโ error/ # Error handling
โโโ api/ # External API interfaces
Fully Implemented:
In Progress:
Test Coverage:
๐ข Completed Components:
๐ก In Active Development:
๐ด Planned Features:
| Protocol | Status | Implementation | Notes |
|---|---|---|---|
| Lightning Network | ๐ก Framework Ready | Core interfaces implemented | Payment processing in development |
| RGB Protocol | ๐ก Framework Ready | Asset framework complete | Client integration ongoing |
| State Channels | ๐ข Implemented | Generalized framework | Ready for protocol-specific implementations |
| DLC | ๐ก Framework Ready | Oracle integration planned | Contract execution in development |
| Taproot Assets | ๐ก Framework Ready | Asset issuance foundation | Full implementation in progress |
| BOB Protocol | ๐ด Planned | EVM bridge design | Integration planned for Q3 2025 |
| RSK | ๐ด Planned | Sidechain integration | Development planned for Q4 2025 |
# Current test results
Running 91 tests... โ
PASSING
- Core Bitcoin: 28 tests passing
- Layer2 Framework: 15 tests passing
- Security Components: 12 tests passing
- Integration Tests: 9 tests passing
- Utility Tests: 27 tests passing
Build Status: โ
Clean compilation
Lint Status: โ ๏ธ 1 warning (unused import)
Unit Tests:
# Run all unit tests
cargo test --lib
# Run specific module tests
cargo test bitcoin::
cargo test layer2::
cargo test security::
Integration Tests:
# Run Layer2 integration tests
cargo test --test layer2_integration_comprehensive
# Run Bitcoin protocol tests
cargo test --test bitcoin_integration
BIP Compliance Testing:
# Validate BIP compliance
./scripts/bitcoin/validate-bip-compliance.js
# Run BIP test vectors
cargo test --test bip_tests -- --nocapture
Security Validation:
# Run security audit
cargo audit
# Check for unsafe code
cargo geiger
# Run clippy for code quality
cargo clippy -- -D warnings
Performance Testing:
# Run benchmarks
cargo bench
# Memory usage analysis
cargo test --release -- --nocapture | grep "memory"
We welcome contributions to Anya Core! This project is actively developed and we appreciate community involvement.
1. Development Setup:
# Fork and clone the repository
git clone https://github.com/your-username/Anya-core.git
cd Anya-core
# Set up development environment
./scripts/setup.sh
cargo build
# Run tests to ensure everything works
cargo test --lib
2. Areas for Contribution:
3. Development Guidelines:
4. Submission Process:
# Create feature branch
git checkout -b feature/your-feature-name
# Make changes and test
cargo test --lib
cargo clippy -- -D warnings
# Commit with proper labels
git commit -m "feat(bitcoin): implement BIP-XXX support
[AIR-3][AIS-3][BPC-3] Detailed description of changes
Labels: [AIR-3][AIS-3][BPC-3]
Scope: bitcoin, protocol"
# Submit pull request
git push origin feature/your-feature-name
This project is dual-licensed under:
See LICENSE for full license text.
Project Resources:
Bitcoin Standards:
Community:
Special thanks to the following projects and communities that make Anya Core possible:
Maintainer: Botshelo Mokoka (botshelomokoka@gmail.com)
Last Updated: July 15, 2025
Version: 1.2.1 Development Build