|
|
@@ -30,7 +30,7 @@ use pasta_curves::{
|
|
|
};
|
|
|
use rand_core::{CryptoRng, RngCore};
|
|
|
|
|
|
-use super::{constants::NullifierK, util::mod_r_p, Address};
|
|
|
+use super::{constants::NullifierK, util::mod_r_p};
|
|
|
use crate::error::ContractError;
|
|
|
|
|
|
/// Keypair structure holding a `SecretKey` and its respective `PublicKey`
|
|
|
@@ -181,13 +181,3 @@ impl core::fmt::Display for PublicKey {
|
|
|
write!(f, "{}", disp)
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-impl TryFrom<Address> for PublicKey {
|
|
|
- type Error = ContractError;
|
|
|
-
|
|
|
- fn try_from(address: Address) -> Result<Self, Self::Error> {
|
|
|
- let mut bytes = [0u8; 32];
|
|
|
- bytes.copy_from_slice(&address.inner()[1..33]);
|
|
|
- Self::from_bytes(bytes)
|
|
|
- }
|
|
|
-}
|