diff --git a/src/convert.rs b/src/convert.rs index 0ea2505..9a69f18 100644 --- a/src/convert.rs +++ b/src/convert.rs @@ -5,10 +5,10 @@ // Copyright (c) DUSK NETWORK. All rights reserved. use crate::note::TRANSPARENT_BLINDER; -use crate::BlsScalar; use crate::{Crossover, Error, Fee, Note, NoteType, Remainder}; use core::convert::TryFrom; +use dusk_bls12_381::BlsScalar; use dusk_jubjub::{JubJubScalar, GENERATOR_EXTENDED, GENERATOR_NUMS_EXTENDED}; use dusk_poseidon::cipher::PoseidonCipher; diff --git a/src/crossover.rs b/src/crossover.rs index ea051b1..1ae9017 100644 --- a/src/crossover.rs +++ b/src/crossover.rs @@ -6,8 +6,7 @@ //! Fee module contains the logic related to `Crossover` structure -use crate::BlsScalar; - +use dusk_bls12_381::BlsScalar; use dusk_bytes::{DeserializableSlice, Error as BytesError, Serializable}; use dusk_jubjub::{JubJubAffine, JubJubExtended}; use dusk_poseidon::cipher::PoseidonCipher; diff --git a/src/fee.rs b/src/fee.rs index 79fa68d..dd881f1 100644 --- a/src/fee.rs +++ b/src/fee.rs @@ -7,6 +7,7 @@ //! Fee module contains the logic related to `Fee` and `Remainder` structure use crate::{Ownable, PublicKey, StealthAddress}; +use dusk_bls12_381::BlsScalar; use dusk_bytes::{DeserializableSlice, Error as BytesError, Serializable}; use dusk_jubjub::JubJubScalar; use dusk_poseidon::sponge::hash; @@ -17,8 +18,6 @@ use rkyv::{Archive, Deserialize, Serialize}; use core::cmp; -use crate::BlsScalar; - mod remainder; pub use remainder::Remainder; diff --git a/src/fee/remainder.rs b/src/fee/remainder.rs index 6a1e90f..0430d49 100644 --- a/src/fee/remainder.rs +++ b/src/fee/remainder.rs @@ -11,10 +11,9 @@ use crate::{Ownable, StealthAddress}; #[cfg(feature = "rkyv-impl")] use rkyv::{Archive, Deserialize, Serialize}; +use dusk_bls12_381::BlsScalar; use dusk_poseidon::sponge::hash; -use crate::BlsScalar; - /// The Remainder structure. #[derive(Clone, Copy, Debug)] #[cfg_attr( diff --git a/src/lib.rs b/src/lib.rs index acf755c..dd9ed92 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -28,7 +28,7 @@ pub mod note; /// Phoenix Core Keys & Addresses mod keys; -/// + mod permutation; /// Public (Spend) Key @@ -52,5 +52,3 @@ pub use message::Message; pub use note::{Note, NoteType}; #[cfg(feature = "alloc")] pub use transaction::Transaction; - -use dusk_bls12_381::BlsScalar; diff --git a/src/message.rs b/src/message.rs index f8a5c81..40f4980 100644 --- a/src/message.rs +++ b/src/message.rs @@ -4,12 +4,13 @@ // // Copyright (c) DUSK NETWORK. All rights reserved. -use crate::{BlsScalar, Error, Note, NoteType}; +use crate::{Error, Note, NoteType}; #[cfg(feature = "rkyv-impl")] use rkyv::{Archive, Deserialize, Serialize}; use crate::PublicKey; +use dusk_bls12_381::BlsScalar; use dusk_bytes::{DeserializableSlice, Serializable}; use dusk_jubjub::{dhke, JubJubAffine, JubJubExtended, JubJubScalar}; use dusk_poseidon::cipher::PoseidonCipher; diff --git a/src/note.rs b/src/note.rs index 0ce5030..cd7df9d 100644 --- a/src/note.rs +++ b/src/note.rs @@ -6,7 +6,8 @@ use core::convert::{TryFrom, TryInto}; -use crate::{Ownable, PublicKey, SecretKey, StealthAddress, ViewKey}; +use crate::{Error, Ownable, PublicKey, SecretKey, StealthAddress, ViewKey}; +use dusk_bls12_381::BlsScalar; use dusk_bytes::{DeserializableSlice, Error as BytesError, Serializable}; use dusk_jubjub::{ dhke, JubJubAffine, JubJubExtended, JubJubScalar, GENERATOR_EXTENDED, @@ -20,8 +21,6 @@ use rand_core::{CryptoRng, RngCore}; #[cfg(feature = "rkyv-impl")] use rkyv::{Archive, Deserialize, Serialize}; -use crate::{BlsScalar, Error}; - /// Blinder used for transparent pub(crate) const TRANSPARENT_BLINDER: JubJubScalar = JubJubScalar::zero(); diff --git a/src/transaction/stake.rs b/src/transaction/stake.rs index c256b9f..db0d93a 100644 --- a/src/transaction/stake.rs +++ b/src/transaction/stake.rs @@ -9,7 +9,7 @@ use alloc::vec::Vec; use dusk_bls12_381::BlsScalar; use dusk_bls12_381_sign::{PublicKey, Signature}; use dusk_bytes::Serializable; -use phoenix_core::StealthAddress; +use crate::StealthAddress; #[cfg(feature = "rkyv-impl")] use rkyv::{Archive, Deserialize, Serialize}; diff --git a/src/transaction/transfer.rs b/src/transaction/transfer.rs index 98dbc77..409ba7f 100644 --- a/src/transaction/transfer.rs +++ b/src/transaction/transfer.rs @@ -8,7 +8,7 @@ use alloc::vec::Vec; use dusk_bls12_381::BlsScalar; use dusk_poseidon::cipher::PoseidonCipher; -use phoenix_core::StealthAddress; +use crate::StealthAddress; #[cfg(feature = "rkyv-impl")] use rkyv::{Archive, Deserialize, Serialize};