A Rust library for working with Bitcoin SV

Related tags

Cryptography rust-sv
Overview

Rust-SV

A library to build Bitcoin SV applications in Rust.

Documentation

Features

  • 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

Installation

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.

License

rust-sv is licensed under the MIT license.

You might also like...
Rustcoin - A LightWeight SDK For Bitcoin, Ethernum

Rustcoin - A LightWeight SDK For Bitcoin, Ethernum

The Stage 2 building block to reach the dream of DSNs with Bitcoin DeFi

rust-nostr Intro A complete suite of nostr Bitcoin libraries that can be used to develop Decentralized Social Networks (DSN) with integrated Bitcoin f

A preview of the integration between Bitcoin and the Internet Computer.

Bitcoin Integration Developer Preview Overview The integration between the Internet Computer and Bitcoin will enable developers to build canisters tha

interBTC  A trust-minimized bridge from Bitcoin to Polkadot.
interBTC A trust-minimized bridge from Bitcoin to Polkadot.

interBTC A trust-minimized bridge from Bitcoin to Polkadot. Explore the specification » Report Bug · Request Feature This repository is hosted on GitH

A demo of the Internet Computer's Bitcoin API

Bitcoin Integration Demo A demo of the bitcoin endpoints on the Internet Computer. This demo is already deployed to the IC, so you can already try it

A package that has a collection of unspent p2wsh bitcoin transactions.

P2WSH-UTXO A package that has a collection of unspent p2wsh transactions. Useful to see what are potential unspent multisig transactions. Library Crea

Low-level Bitcoin P2P Network Client

Peerlink What is Peerlink? Peerlink is a low-level network client for the Bitcoin P2P network written in Rust. It uses a nonblocking reactor to accept

Bitcoin PSBT signer, descriptor exporter and more for offline devices.
Bitcoin PSBT signer, descriptor exporter and more for offline devices.

KeeChain Description KeeChain is a Bitcoin application to transform your offline computer in an AirGap Signing Device (aka Hardware Wallet). Getting s

Create Bitcoin double-spend discouraging bonds on Liquid.

doubletake A tool for creating Bitcoin double-spend punishment bonds on Liquid. WARNING: Don't use this tool for real use cases yet. There are still a

Comments
  • 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
Owner
Brenton Gunning
Brenton Gunning
Modern, lightweight & standard-compliant bitcoin wallet runtime & cli without rust-bitcoin dependencies

Bitcoin protocol command-line wallet & tools Modern, minimalistic & standard-compliant cold wallet from LNP/BP Standards Association. Contributing Con

BP: Bitcoin protocol 3 Jul 31, 2023
Bitcoin Push Notification Service (BPNS) allows you to receive notifications of Bitcoin transactions of your non-custodial wallets on a provider of your choice, all while respecting your privacy

Bitcoin Push Notification Service (BPNS) Description Bitcoin Push Notification Service (BPNS) allows you to receive notifications of Bitcoin transacti

BPNS 1 May 2, 2022
Library with support for de/serialization, parsing and executing on data-structures and network messages related to Bitcoin

Rust Bitcoin Library with support for de/serialization, parsing and executing on data-structures and network messages related to Bitcoin. Heads up for

Rust Bitcoin Community 1.3k Dec 29, 2022
Rust command line program for Bitcoin brainwallet

brainwallet Rust command line program for Bitcoin brainwallet as implemented at https://www.bitaddress.org. To run it, first install Rust, e.g. from h

Frank Buss 3 Dec 30, 2021
A Bitcoin wallet collider that brute forces random wallet addresses written in Rust.

Plutus-Rustus Bitcoin Brute Forcer A Bitcoin wallet collider that brute forces random wallet addresses written in Rust. This is a straight port of Plu

null 46 Dec 23, 2022
A bitcoin vanity address generator written with the Rust programming language.

btc-vanity A bitcoin vanity address generator written with the Rust programming language. With btc-vanity you can create a private key which has a com

Emirhan TALA 22 Aug 7, 2023
Flexible Rust implementation of the MuSig2 multisignature protocol, compatible with Bitcoin.

MuSig2 This crate provides a flexible rust implementation of MuSig2, an optimized digital signature aggregation protocol, on the secp256k1 elliptic cu

null 4 Oct 31, 2023
The Parity Bitcoin client

The Parity Bitcoin client. Gitter Installing from source Installing the snap Running tests Going online Importing bitcoind database Command line inter

Parity Technologies 714 Dec 21, 2022
Iterate over bitcoin blocks

Blocks iterator Iterates over Bitcoin blocks, decoding data inside Bitcoin Core's blocks directory. Features: Blocks are returned in height order, it

Riccardo Casatta 38 Nov 8, 2022
EXPERIMENTAL: Bitcoin Core Prometheus exporter based on User-Space, Statically Defined Tracing and eBPF.

bitcoind-observer An experimental Prometheus metric exporter for Bitcoin Core based on Userspace, Statically Defined Tracing and eBPF. This demo is ba

0xB10C 24 Nov 8, 2022