diff --git a/key_protocol/src/key_management/mod.rs b/key_protocol/src/key_management/mod.rs index 73e1ab53..e939fcc0 100644 --- a/key_protocol/src/key_management/mod.rs +++ b/key_protocol/src/key_management/mod.rs @@ -1,4 +1,3 @@ -use common::TreeHashType; use log::info; use nssa_core::{ NullifierPublicKey, SharedSecretKey, @@ -6,7 +5,6 @@ use nssa_core::{ }; use secret_holders::{PrivateKeyHolder, SecretSpendingKey, SeedHolder}; use serde::{Deserialize, Serialize}; -use sha2::{Digest, digest::FixedOutput}; pub type PublicAccountSigningKey = [u8; 32]; diff --git a/nssa/core/src/account.rs b/nssa/core/src/account.rs index 889592db..8bce23cc 100644 --- a/nssa/core/src/account.rs +++ b/nssa/core/src/account.rs @@ -90,7 +90,7 @@ mod tests { }; let fingerprint = AccountId::new([8; 32]); let new_acc_with_metadata = - AccountWithMetadata::new(account.clone(), true, fingerprint.clone()); + AccountWithMetadata::new(account.clone(), true, fingerprint); assert_eq!(new_acc_with_metadata.account, account); assert!(new_acc_with_metadata.is_authorized); assert_eq!(new_acc_with_metadata.account_id, fingerprint); diff --git a/nssa/core/src/address.rs b/nssa/core/src/address.rs index 14a3018f..bbfc6f2b 100644 --- a/nssa/core/src/address.rs +++ b/nssa/core/src/address.rs @@ -1,10 +1,7 @@ -use risc0_zkvm::sha::{Impl, Sha256}; use std::{fmt::Display, str::FromStr}; use serde::{Deserialize, Serialize}; -use crate::account::AccountId; - #[derive(Serialize, Deserialize, Clone, PartialEq, Eq)] #[cfg_attr( any(feature = "host", test), @@ -62,7 +59,7 @@ impl Display for Address { #[cfg(test)] mod tests { - use crate::account::AccountId; + use super::{Address, AddressError}; diff --git a/nssa/src/lib.rs b/nssa/src/lib.rs index bf905980..21defa9d 100644 --- a/nssa/src/lib.rs +++ b/nssa/src/lib.rs @@ -7,8 +7,8 @@ pub mod public_transaction; mod signature; mod state; -pub use nssa_core::address::Address; pub use nssa_core::account::{Account, AccountId}; +pub use nssa_core::address::Address; pub use privacy_preserving_transaction::{ PrivacyPreservingTransaction, circuit::execute_and_prove, }; diff --git a/nssa/src/state.rs b/nssa/src/state.rs index ff7431a8..d9bff5a2 100644 --- a/nssa/src/state.rs +++ b/nssa/src/state.rs @@ -4,7 +4,10 @@ use crate::{ public_transaction::PublicTransaction, }; use nssa_core::{ - account::Account, address::Address, program::{ProgramId, DEFAULT_PROGRAM_ID}, Commitment, CommitmentSetDigest, MembershipProof, Nullifier + Commitment, CommitmentSetDigest, MembershipProof, Nullifier, + account::Account, + address::Address, + program::{DEFAULT_PROGRAM_ID, ProgramId}, }; use std::collections::{HashMap, HashSet};