Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
💡 Nour
A Rust library for building Bitcoin SV (BSV) applications and infrastructure, providing robust tools for P2P networking, address handling, transaction processing, script evaluation, node connections, and wallet management. Nour is optimized for BSV’s massive on-chain scaling, supporting millions of transactions per second (TPS) with async networking, efficient cryptography, and compatibility with Galaxy’s high-throughput capabilities.
Features
- P2P Protocol: Construct, serialize, and deserialize messages (sync/async) for BSV’s peer-to-peer network, supporting protocol version 70016.
- Address Handling: Encode/decode Base58 addresses for P2PKH and P2SH.
- Transaction Signing: Create and sign transactions, optimized for large blocks.
- Script Evaluation: Validate BSV scripts with Genesis rules (e.g., P2SH sunset).
- Node Connections: Connect to BSV nodes with async message handling for high TPS.
- Wallet Support: BIP-32/BIP-39 key derivation and mnemonic phrases.
- Network Support: Mainnet, Testnet, STN with seed node iteration.
- Primitives: Fast hashing (
Hash160,SHA256d), bloom filters, variable integers, reactive programming.
Installation
Add to your Cargo.toml:
[dependencies]
nour = "1.0.0"
Or use the development version:
[dependencies]
nour = { git = "https://github.com/murphsicles/nour", branch = "main" }
System Requirements
- Rust: Stable 1.91 or later.
- Dependencies:
libzmq3-dev(networking),secp256k1,bitcoin_hashes,tokio,base58(see Cargo.toml). - OS: Linux (recommended), macOS, Windows.
Install dependencies on Ubuntu:
sudo apt-get update && sudo apt-get install -y libzmq3-dev
Usage
Encode a Base58 Address
use ;
use Network;
use hash160;
let pubkeyhash = hash160;
let addr = addr_encode;
println!;
Decode a Base58 Address
use addr_decode;
use Network;
let addr = "15wpV72HRpAFPMmosR3jvGq7axU7t6ghX5";
let = addr_decode.unwrap;
println!;
println!;
Connect to a Bitcoin SV Node
use ;
use Network;
use ;
use secs_since;
use Arc;
use UNIX_EPOCH;
use TcpStream;
async
More examples are available in the examples directory.
Building and Testing
Clone the repository and run tests:
git clone https://github.com/murphsicles/nour.git
cd nour
cargo test -- --nocapture
Build the library:
cargo build --release
Known Limitations
- ZMQ Dependency: Some node connections may require a running BSV node with ZMQ enabled.
Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a feature branch (
git checkout -b feature/my-feature). - Commit changes (
git commit -m "Add my feature"). - Push to the branch (
git push origin feature/my-feature). - Open a Pull Request.
Report issues at GitHub Issues.
License
Nour is licensed under the Open BSV License.
Acknowledgments
- Built for the BSV blockchain community by murphsicles.
- Designed to support Bitcoin SV’s commitment to massive on-chain scaling and Galaxy’s high-throughput architecture.