2022-01-21 17:56:27 -08:00
|
|
|
#![allow(clippy::integer_arithmetic, clippy::op_ref)]
|
|
|
|
|
|
|
|
// The warning `clippy::op_ref` is disabled to allow efficient operator arithmetic of structs that
|
|
|
|
// implement the `Copy` trait.
|
|
|
|
//
|
|
|
|
// ```
|
|
|
|
// let opening_0: PedersenOpening = PedersenOpening::new_rand();
|
|
|
|
// let opening_1: PedersenOpening = PedersenOpening::new_rand();
|
|
|
|
//
|
|
|
|
// // since PedersenOpening implement `Copy`, `opening_0` and `opening_1` will be copied as
|
|
|
|
// // parameters before `opening_sum` is computed.
|
|
|
|
// let opening_sum = opening_0 + opening_1;
|
|
|
|
//
|
|
|
|
// // if passed in as references, the extra copies will not occur
|
|
|
|
// let opening_sum = &opening_0 + &opening_1;
|
|
|
|
// ```
|
|
|
|
//
|
|
|
|
// `clippy::op_ref` is turned off to prevent clippy from warning that this is not idiomatic code.
|
2022-01-04 20:44:07 -08:00
|
|
|
|
2021-09-29 21:45:35 -07:00
|
|
|
#[cfg(not(target_arch = "bpf"))]
|
|
|
|
#[macro_use]
|
|
|
|
pub(crate) mod macros;
|
|
|
|
#[cfg(not(target_arch = "bpf"))]
|
|
|
|
pub mod encryption;
|
|
|
|
#[cfg(not(target_arch = "bpf"))]
|
2022-02-23 12:13:32 -08:00
|
|
|
pub mod errors;
|
2021-09-29 21:45:35 -07:00
|
|
|
#[cfg(not(target_arch = "bpf"))]
|
|
|
|
mod range_proof;
|
|
|
|
#[cfg(not(target_arch = "bpf"))]
|
2021-12-16 05:26:43 -08:00
|
|
|
mod sigma_proofs;
|
2021-12-12 05:51:22 -08:00
|
|
|
#[cfg(not(target_arch = "bpf"))]
|
2021-12-16 05:26:43 -08:00
|
|
|
mod transcript;
|
2021-09-29 21:45:35 -07:00
|
|
|
|
2022-02-01 11:11:28 -08:00
|
|
|
// TODO: re-organize visibility
|
2022-05-07 00:20:53 -07:00
|
|
|
pub mod curve25519;
|
2022-02-01 11:11:28 -08:00
|
|
|
pub mod instruction;
|
2021-09-30 10:25:36 -07:00
|
|
|
pub mod zk_token_elgamal;
|
2021-09-29 21:45:35 -07:00
|
|
|
pub mod zk_token_proof_instruction;
|
|
|
|
pub mod zk_token_proof_program;
|