| Crates.io | nour |
| lib.rs | nour |
| version | 1.0.0 |
| created_at | 2025-11-03 05:37:31.081776+00 |
| updated_at | 2025-11-03 05:37:31.081776+00 |
| description | High-performance Bitcoin SV toolkit for transactions, scripts, P2P, and wallets |
| homepage | |
| repository | https://github.com/murphsicles/nour |
| max_upload_size | |
| id | 1913969 |
| size | 593,288 |
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.
Hash160, SHA256d), bloom filters, variable integers, reactive programming.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" }
libzmq3-dev (networking), secp256k1, bitcoin_hashes, tokio, base58 (see Cargo.toml).Install dependencies on Ubuntu:
sudo apt-get update && sudo apt-get install -y libzmq3-dev
use nour::address::{addr_encode, AddressType};
use nour::network::Network;
use nour::util::hash160;
let pubkeyhash = hash160(&[0; 33]);
let addr = addr_encode(&pubkeyhash, AddressType::P2PKH, Network::Mainnet);
println!("Address: {}", addr);
use nour::address::addr_decode;
use nour::network::Network;
let addr = "15wpV72HRpAFPMmosR3jvGq7axU7t6ghX5";
let (pubkeyhash, addr_type) = addr_decode(&addr, Network::Mainnet).unwrap();
println!("Pubkey Hash: {:?}", pubkeyhash);
println!("Address Type: {:?}", addr_type);
use nour::messages::{Message, Ping, Version, NODE_BITCOIN_CASH, PROTOCOL_VERSION};
use nour::network::Network;
use nour::peer::{Peer, SVPeerFilter};
use nour::util::secs_since;
use std::sync::Arc;
use std::time::UNIX_EPOCH;
use tokio::net::TcpStream;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let stream = TcpStream::connect("127.0.0.1:8333").await?;
let version = Version {
version: PROTOCOL_VERSION,
services: NODE_BITCOIN_CASH,
timestamp: secs_since(UNIX_EPOCH) as i64,
..Default::default()
};
let peer = Peer::connect("127.0.0.1", 8333, Network::Mainnet, version, Arc::new(SVPeerFilter::new(0)));
peer.connected_event().poll();
let ping = Message::Ping(Ping { nonce: 0 });
peer.send_async(&ping).await.unwrap();
Ok(())
}
More examples are available in the examples directory.
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
Contributions are welcome! Please follow these steps:
git checkout -b feature/my-feature).git commit -m "Add my feature").git push origin feature/my-feature).Report issues at GitHub Issues.
Nour is licensed under the Open BSV License.