Rust-Rust sv: Bitcoin Satoshi's Vision — A Rust library for working with Bitcoin SV .

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.

Comments

  • fix compilation error
    fix compilation error

    Jul 7, 2021

       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
    
    Reply
  • Is there some project use rust-sv to build bsv wallet?
    Is there some project use rust-sv to build bsv wallet?

    Sep 23, 2021

    Just for some cases to learning.

    Reply
  • Move enabled opcodes from disabled list
    Move enabled opcodes from disabled list

    Jul 9, 2019

    There were some working opcodes that were mistakenly shown as disabled.

    Reply
  • remove unnecessary muts
    remove unnecessary muts

    Jul 9, 2019

    Fix for the compiler warnings regarding multiple unneeded mutable variables.

    Reply
  • nightly no longer needed
    nightly no longer needed

    Jul 9, 2019

    I've tested building the library and the documentation with rustc 1.36 stable without any problems.

    Reply
  • Format code using 'cargo fmt'
    Format code using 'cargo fmt'

    Mar 25, 2019

                                                                                                                                                                                                           
    Reply
  • Rust PR 75180 fix.
    Rust PR 75180 fix.

    Mar 13, 2021

    Compilation fix for 75180. Mergable with Rust 1.52.

    Reply
  • Update crate for Rust 2018
    Update crate for Rust 2018

    Mar 22, 2019

    Run 'cargo fix --edition' to update crate for Rust 2018

    Reply