A Rust library for working with Bitcoin SV



A library to build Bitcoin SV applications in Rust.



  • P2P protocol messages (construction and serialization)
  • Address encoding and decoding
  • Transaction signing
  • Script evaluation
  • Node connections and basic message handling
  • Wallet key derivation and mnemonic parsing
  • Mainnet and testnet support
  • Various Bitcoin primitives
  • Genesis upgrade support


Add sv = "0.2" to Cargo.toml

Known limitations

This library should not be used for consensus code because its validation checks are incomplete.

Comparison with other Rust libraries

rust-bitcoin - rust-sv has no ties to rust-bitcoin. This library can do everything rust-bitcoin can do and more for Bitcoin SV.

parity-bitcoin - The parity Bitcoin client is a full node in Rust. Its code is more full-featured and also more complex.

bitcrust - The bitcrust project is strong in some areas and lacking in others. The two projects could be used together.


rust-sv is licensed under the MIT license.

You might also like...
Rust implementation of Zcash protocol

The Parity Zcash client. Gitter Blog: Parity teams up with Zcash Foundation for Parity Zcash client Installing from source Installing the snap Running

rust client libraries to deal with the current cardano mainnet (byron / cardano-sl)

Rust implementation of Cardano primitives, helpers, and related applications Cardano Rust is a modular toolbox of Cardano’s cryptographic primitives,

Tendermint in Rust!

tendermint.rs Tendermint in Rust with TLA+ specifications. Tendermint is a high-performance blockchain consensus engine for Byzantine fault tolerant a

Rust port of the Terry Davis' (RIP) "god says" program

RIP Terry A. Davis 1969-2018 god says Rust port of the programmer Terry Davis' "god says" (AKA GodSpeaks) program. Terrence Andrew Davis (December 15,

Implementation of the Kademlia DHT protocol in Rust
Implementation of the Kademlia DHT protocol in Rust

kademlia-dht Simple implementation of the Kademlia DHT protocol in Rust with state dumping features for educational purposes (not production-ready). T

Collection of Key Derivation Functions written in pure Rust

RustCrypto: Key Derivation Functions Collection of Key Derivation Functions (KDF) written in pure Rust. Supported Algorithms Algorithm Crate Crates.io

Cryptocurrencies trend-following trading bot sandbox written in Rust.

Trend trading bot Experiments repo about (crypto) trend trading. By "trend" I mean trading following the trend using technical indicators (vs other ki

Martinez is vNext Ethereum implementation written in pure Rust with Erigon architecture as design.
Martinez is vNext Ethereum implementation written in pure Rust with Erigon architecture as design.

🧬 Martinez 🧬 Next-generation implementation of Ethereum protocol ("client") written in Rust, based on Erigon architecture. Why run Martinez? Look at

Fully typed access to the Erigon db in rust

Overview Fully typed access to the Erigon database in rust. use erigon_db::{Erigon, env_open}; use ethereum_types::Address; fn main() - eyre::Result

  • Fix to enable downloading of 3.8GB blocks

    Fix to enable downloading of 3.8GB blocks

    The orignal AtomicReader would only read blocks upto 2GB. This is because the underlying posix read() function is limited to INT_MAX (+2147483647) as documented here https://www.ibm.com/docs/en/zos/2.1.0?topic=functions-read-read-from-file-socket

    The update checks the size of the slice we are requesting if it is greater than MAX_BUFFER_SIZE_USIZE, then it limits the slice size to MAX_BUFFER_SIZE_USIZE. The remainder of the buffer will be requested on the next call to AtomicReader::read as intended.

    opened by arthurggordon 0
  • fix compilation error

    fix compilation error

       Compiling sv v0.2.1 (/mnt/dbox/Dropbox/dev/rust/libera/bisevi/_info/crates/rust-sv)
    error[E0283]: type annotations needed
       --> src/messages/message.rs:366:83
    366 |             Message::Other(s) => Err(io::Error::new(io::ErrorKind::InvalidData, s.as_ref())),
        |                                                                                 --^^^^^^--
        |                                                                                 | |
        |                                                                                 | cannot infer type for type parameter `T` declared on the trait `AsRef`
        |                                                                                 this method call resolves to `&T`
        = note: cannot satisfy `String: AsRef<_>`
    help: use the fully qualified path for the potential candidates
    366 |             Message::Other(s) => Err(io::Error::new(io::ErrorKind::InvalidData, <String as AsRef<OsStr>>::as_ref(s))),
        |                                                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    366 |             Message::Other(s) => Err(io::Error::new(io::ErrorKind::InvalidData, <String as AsRef<Path>>::as_ref(s))),
        |                                                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    366 |             Message::Other(s) => Err(io::Error::new(io::ErrorKind::InvalidData, <String as AsRef<[u8]>>::as_ref(s))),
        |                                                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    366 |             Message::Other(s) => Err(io::Error::new(io::ErrorKind::InvalidData, <String as AsRef<str>>::as_ref(s))),
        |                                                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    error: aborting due to previous error
    For more information about this error, try `rustc --explain E0283`.
    error: could not compile `sv
    opened by joseluis 1
Brenton Gunning
Brenton Gunning
CFDs on Bitcoin.

Project Hermes CFD trading on Bitcoin. Details coming soon. Starting the maker and taker daemon The maker and taker frontend depend on the respective

COMIT 58 Dec 26, 2022
A Rust library for generating cryptocurrency wallets

Table of Contents 1. Overview 2. Build Guide 2.1 Install Rust 2.2a Build from Homebrew 2.2b Build from Crates.io 2.2c Build from Source Code 3. Usage

Aleo 554 Dec 31, 2022
Coinbase pro client for Rust

Coinbase pro client for Rust Supports SYNC/ASYNC/Websocket-feed data support Features private and public API sync and async support websocket-feed sup

null 126 Dec 30, 2022
Custom Ethereum vanity address generator made in Rust

ethaddrgen Custom Ethereum address generator Get a shiny ethereum address and stand out from the crowd! Disclaimer: Do not use the private key shown i

Jakub Hlusička 153 Dec 27, 2022
The new, performant, and simplified version of Holochain on Rust (sometimes called Holochain RSM for Refactored State Model)

Holochain License: This repository contains the core Holochain libraries and binaries. This is the most recent and well maintained version of Holochai

Holochain 737 Dec 28, 2022
DEPRECATED. The Holochain framework implemented in rust with a redux style internal state-model.

Holochain-rust Travis: Circle CI: Codecov: License: This code is loosely based on the previous Golang prototype. Code Status: This Rust version is alp

Holochain 1k Jan 3, 2023
IBC modules and relayer - Formal specifications and Rust implementation

ibc-rs Rust implementation of the Inter-Blockchain Communication (IBC) protocol. This project comprises primarily four crates: The ibc crate defines t

Informal Systems 296 Jan 4, 2023
A Rust implementation of BIP-0039

bip39-rs A Rust implementation of BIP0039 Changes See the changelog file, or the Github releases for specific tags. Documentation Add bip39 to your Ca

Infincia LLC 49 Dec 9, 2022
Rust Ethereum 2.0 Client

Lighthouse: Ethereum 2.0 An open-source Ethereum 2.0 client, written in Rust and maintained by Sigma Prime. Documentation Overview Lighthouse is: Read

Sigma Prime 2.1k Jan 1, 2023
Official Rust implementation of the Nimiq protocol

Nimiq Core implementation in Rust (core-rs) Rust implementation of the Nimiq Blockchain Core Nimiq is a frictionless payment protocol for the web. Thi

Nimiq 72 Sep 23, 2022