GithubHelp home page GithubHelp logo

mingderwang / libbolt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zcashfoundation/libbolt

0.0 3.0 0.0 579 KB

Rust implementation of libbolt

License: MIT License

Makefile 0.42% Rust 99.58%

libbolt's Introduction

libbolt

A pure-Rust library implementation of BOLT: Blind Off-chain Lightweight Transactions.

BOLT is a system for conducting privacy-preserving off-chain payments between pairs of individual parties. BOLT is designed to provide a Layer 2 payment protocol for privacy-preserving cryptocurrencies such as Zcash, by allowing individuals to establish and use payment channels for instantaneous payments that do not require an on-chain transaction.

WARNING

The libbolt library is a proof of concept implementation that relies on experimental libraries and dependencies at the moment. It is not suitable for production software yet.

Dependencies

  • secp256k1
  • sodiumoxide
  • bn
  • bulletproofs

Note that the above rust dependencies will be compiled and installed as a result of running the make command.

Rust Nightly Setup

Please keep in mind we are currently working with nightly Rust for now which gives access to the nightly compiler and experimental features.

rustup install nightly

To run a quick test of the nightly toolchain, run the following command:

rustup run nightly rustc --version

Optionally, to make this the default globally, run the following command:

rustup default nightly

We will switch to the stable release channel once libbolt (and dependencies) are ready for production use.

Build & Install

Please ensure you have installed the libsodium library for your platform. See install instructions here.

To build the library and execute basic tests, run make

Tests

To run libbolt unit tests, run make test

Benchmarks

To run libbolt benchmarks, run make bench

Usage

To use the libbolt library, add the libbolt crate to your dependency file in Cargo.toml as follows:

[dependencies]
libbolt = "0.1.0"

Then add an extern declaration at the root of your crate as follows:

extern crate libbolt;

API

The libbolt library provides APIs for three types of privacy-preserving payment channels:

  • unidirectional payment channels (work in progress)
  • bidirectional payment channels (done)
  • third-party payments (done)

Bidirectional Payment Channels

TODO

Third-party Payment Support

TODO

Documentation

Build the api documentation by simply running make doc. Documentation will be generated in your local target/doc directory.

For the libbolt design documentation, see the docs/bolt_design.pdf document.

Contributions

To contribute code improvements, please checkout the repository, make your changes and submit a pull request.

git clone https://github.com/yeletech/libbolt.git

License

Licensed under MIT (LICENSE-MIT or http://opensource.org/licenses/MIT)

libbolt's People

Contributors

jakinyele avatar rex4539 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.