initial update to libbolt
This commit is contained in:
parent
3eeb5fbfe6
commit
d680c4761f
|
@ -1,7 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
|
|
||||||
name = "libbolt"
|
name = "libbolt"
|
||||||
version = "0.0.1"
|
version = "0.1.0"
|
||||||
authors = ["J. Ayo Akinyele <ayo@yeletech.org>"]
|
authors = ["J. Ayo Akinyele <ayo@yeletech.org>"]
|
||||||
description = "library for Blind Off-chain Lightweight Transactions (BOLT)"
|
description = "library for Blind Off-chain Lightweight Transactions (BOLT)"
|
||||||
keywords = ["zcash", "payment channels", "bolt"]
|
keywords = ["zcash", "payment channels", "bolt"]
|
||||||
|
@ -13,3 +12,7 @@ license = "MIT License"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bn = "0.4.3"
|
bn = "0.4.3"
|
||||||
rand = "~0.3.14"
|
rand = "~0.3.14"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "bolt"
|
||||||
|
path = "bin/bolt.rs"
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
.PHONY: all
|
||||||
|
|
||||||
|
all:
|
||||||
|
cargo build
|
||||||
|
cargo run
|
||||||
|
|
||||||
|
clean:
|
||||||
|
cargo clean
|
|
@ -1,5 +1,6 @@
|
||||||
extern crate bn;
|
extern crate bn;
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
|
extern crate libbolt;
|
||||||
use bn::{Group, Fr, G1, G2, pairing};
|
use bn::{Group, Fr, G1, G2, pairing};
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
@ -23,4 +24,6 @@ fn main() {
|
||||||
|
|
||||||
assert!(alice_ss == bob_ss && bob_ss == carol_ss);
|
assert!(alice_ss == bob_ss && bob_ss == carol_ss);
|
||||||
println!("All bn tests succeeded!");
|
println!("All bn tests succeeded!");
|
||||||
|
|
||||||
|
libbolt::setup();
|
||||||
}
|
}
|
34
src/lib.rs
34
src/lib.rs
|
@ -0,0 +1,34 @@
|
||||||
|
extern crate bn;
|
||||||
|
// define some structures here
|
||||||
|
|
||||||
|
pub fn test_libbolt() {
|
||||||
|
println!("Hello, Libbolt here!");
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn setup() {
|
||||||
|
println!("Run Setup...");
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn keygen() {
|
||||||
|
println!("Run Keygen...");
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn init() {
|
||||||
|
println!("Run Init...");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn refund() {
|
||||||
|
println!("Run Refund...");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn refute() {
|
||||||
|
println!("Run Refute...");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn resolve() {
|
||||||
|
println!("Run Resolve...");
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue