Clean up crates and imports
This commit is contained in:
parent
69880545d8
commit
92f5d25150
|
@ -12,8 +12,8 @@ license = "MIT License"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
rand = "0.6"
|
rand = "0.6"
|
||||||
rand_core = "0.4.0"
|
rand_core = "0.4.0"
|
||||||
ff = { git = "https://github.com/boltlabs-inc/ff", branch = "master" }
|
ff_bl = { git = "https://github.com/boltlabs-inc/ff", branch = "master" }
|
||||||
pairing = { git = "https://github.com/boltlabs-inc/pairing", branch = "master", features = ["serde"] }
|
pairing_bl = { git = "https://github.com/boltlabs-inc/pairing", branch = "master", features = ["serde"] }
|
||||||
libc = "*"
|
libc = "*"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
|
|
|
@ -40,9 +40,7 @@ We will switch to the stable release channel once libbolt (and dependencies) are
|
||||||
|
|
||||||
# Build & Install
|
# Build & Install
|
||||||
|
|
||||||
Please ensure you have installed the libsodium library for your platform. See install instructions [here](https://download.libsodium.org/doc/installation/index.html).
|
To build the library in debug, execute tests and basic examples, run `make`
|
||||||
|
|
||||||
To build the library and execute basic examples, run `make`
|
|
||||||
|
|
||||||
# Tests
|
# Tests
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
extern crate rand_core;
|
extern crate rand_core;
|
||||||
extern crate bolt;
|
extern crate bolt;
|
||||||
extern crate ff;
|
extern crate ff_bl as ff;
|
||||||
extern crate pairing;
|
extern crate pairing_bl as pairing;
|
||||||
extern crate time;
|
extern crate time;
|
||||||
extern crate secp256k1;
|
extern crate secp256k1;
|
||||||
|
|
||||||
|
|
|
@ -4,11 +4,9 @@ Efficient Protocols for Set Membership and Range Proofs
|
||||||
Jan Camenisch, Rafik Chaabouni, and abhi shelat
|
Jan Camenisch, Rafik Chaabouni, and abhi shelat
|
||||||
Asiacrypt 2008
|
Asiacrypt 2008
|
||||||
*/
|
*/
|
||||||
extern crate pairing;
|
|
||||||
extern crate rand;
|
|
||||||
|
|
||||||
use rand::Rng;
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
use rand::Rng;
|
||||||
use cl::{Signature, PublicParams, setup, BlindKeyPair, ProofState, SignatureProof, BlindPublicKey};
|
use cl::{Signature, PublicParams, setup, BlindKeyPair, ProofState, SignatureProof, BlindPublicKey};
|
||||||
use ped92::{Commitment, CSMultiParams};
|
use ped92::{Commitment, CSMultiParams};
|
||||||
use pairing::{Engine, CurveProjective};
|
use pairing::{Engine, CurveProjective};
|
||||||
|
|
|
@ -1,14 +1,3 @@
|
||||||
/*
|
|
||||||
* Implement for Bolt protocols:
|
|
||||||
* - initializing channel state and generating cust/merch wallets
|
|
||||||
* - establish protocol
|
|
||||||
* - pay protocol
|
|
||||||
* - channel close algorithms (WIP)
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern crate pairing;
|
|
||||||
extern crate rand;
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use pairing::Engine;
|
use pairing::Engine;
|
||||||
use cl::{BlindKeyPair, Signature};
|
use cl::{BlindKeyPair, Signature};
|
||||||
|
@ -134,8 +123,6 @@ impl<E: Engine> ChannelToken<E> {
|
||||||
|
|
||||||
// add a method to compute hash on chain: SHA256 + RIPEMD160?
|
// add a method to compute hash on chain: SHA256 + RIPEMD160?
|
||||||
}
|
}
|
||||||
// add methods to check if channel token is initialized
|
|
||||||
// (only if
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Channel state for generating/loading channel parameters and generating keypairs
|
/// Channel state for generating/loading channel parameters and generating keypairs
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
// cl.rs
|
// cl.rs
|
||||||
// CL Sigs - Pointcheval Sanders ('06)
|
// CL Sigs - Pointcheval Sanders ('06)
|
||||||
extern crate pairing;
|
|
||||||
extern crate rand;
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use pairing::{CurveProjective, Engine};
|
use pairing::{CurveProjective, Engine};
|
||||||
use ff::PrimeField;
|
use ff::PrimeField;
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
#[cfg(all(test, feature = "unstable"))]
|
#[cfg(all(test, feature = "unstable"))]
|
||||||
extern crate test;
|
extern crate test;
|
||||||
|
|
||||||
extern crate ff;
|
extern crate ff_bl as ff;
|
||||||
extern crate pairing;
|
extern crate pairing_bl as pairing;
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
extern crate rand_core;
|
extern crate rand_core;
|
||||||
|
|
||||||
|
@ -159,10 +159,6 @@ pub mod bidirectional {
|
||||||
pub signature: secp256k1::Signature,
|
pub signature: secp256k1::Signature,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn init() {
|
|
||||||
//sodiumoxide::init();
|
|
||||||
}
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// init_merchant - takes as input the public params, merchant balance and keypair.
|
/// init_merchant - takes as input the public params, merchant balance and keypair.
|
||||||
/// Generates merchant data which consists of channel token and merchant state.
|
/// Generates merchant data which consists of channel token and merchant state.
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
extern crate pairing;
|
|
||||||
extern crate rand;
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
use cl::{Signature, PublicParams, setup, BlindKeyPair, SignatureProof, BlindPublicKey};
|
use cl::{Signature, PublicParams, setup, BlindKeyPair, SignatureProof, BlindPublicKey};
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
extern crate pairing;
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use pairing::Engine;
|
use pairing::Engine;
|
||||||
use ff::PrimeField;
|
use ff::PrimeField;
|
||||||
|
|
Loading…
Reference in New Issue