Skip to content

Commit

Permalink
Initial checkin
Browse files Browse the repository at this point in the history
  • Loading branch information
brentongunning committed Nov 4, 2018
1 parent da9fb92 commit e6693b0
Show file tree
Hide file tree
Showing 69 changed files with 27,847 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Outputs
/target/

# Backup files generated by rust-fmt
**/*.rs.bk

# Local dependencies
Cargo.lock

# OS and IDE files
.DS_STORE
.vscode

25 changes: 25 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[package]
name = "bch"
version = "0.1.0"
authors = ["Brenton Gunning <brentongunning@gmail.com>"]

[dependencies]
byteorder = "1.2"
digest = "0.7"
dns-lookup = "0.9"
hex = "0.3"
lazy_static = "1.0"
linked-hash-map = "0.5"
log = { version = "0.4", features = ["max_level_trace", "release_max_level_warn"] }
murmur3 = "0.4"
rand = "0.5"
ring = "0.12"
ripemd160 = "0.7"
rust-base58 = "0.0"
rust-crypto = "0.2"
secp256k1 = "0.11"
snowflake = "1.3"

[profile.release]
opt-level = "s" # Optimize for size over speed
lto = true # Enable link-time optimizations to shrink binary
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Rust-BCH

A fresh library to build Bitcoin Cash applications in Rust.

Features

* P2P protocol messages (construction and serialization)
* Address generation (cashaddr and legacy)
* Transaction signing
* Script evaluation
* Node connections and basic message handling
* Wallet key derivation and mnemonic parsing
* Mainnet and testnet support
* Various Bitcoin primitives

# Requirements

Rust nightly is required for documentation due to a bug fix which has not yet made it to stable.

Run ./configure once to setup nightly.

# 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-bch has no ties to rust-bitcoin. This library can do everything rust-bitcoin can do and more for Bitcoin Cash.

*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.

# Support for the November 2018 hard fork

This library supports the SV implementation of Bitcoin Cash. It includes the new opcodes OP_MUL, OP_RSHIFT, OP_LSHIFT, and OP_INVERT and the increased script op limit. CDS and CTOR validation are not supported.

# License

rust-bch is licensed under the MIT license.
8 changes: 8 additions & 0 deletions configure
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

set -e
set -x

rustup install nightly
rustup update nightly
rustup override set nightly
Loading

0 comments on commit e6693b0

Please sign in to comment.