diff --git a/accounts/Cargo.toml b/accounts/Cargo.toml index e7e9708..682d8ac 100644 --- a/accounts/Cargo.toml +++ b/accounts/Cargo.toml @@ -15,6 +15,7 @@ rand.workspace = true elliptic-curve.workspace = true hex.workspace = true aes-gcm.workspace = true +lazy_static.workspace = true [dependencies.utxo] path = "../utxo" diff --git a/accounts/src/key_management/constants_types.rs b/accounts/src/key_management/constants_types.rs index b139874..cc435be 100644 --- a/accounts/src/key_management/constants_types.rs +++ b/accounts/src/key_management/constants_types.rs @@ -3,15 +3,12 @@ use elliptic_curve::{ generic_array::GenericArray, }; use sha2::digest::typenum::{UInt, UTerm}; +use lazy_static::lazy_static; -pub const NULLIFIER_SECRET_CONST: [u8; 32] = [ - 38, 29, 97, 210, 148, 172, 75, 220, 36, 249, 27, 111, 73, 14, 250, 38, 55, 87, 164, 169, 95, - 101, 135, 28, 212, 241, 107, 46, 162, 60, 59, 93, -]; -pub const VIEVING_SECRET_CONST: [u8; 32] = [ - 97, 23, 175, 117, 11, 48, 215, 162, 150, 103, 46, 195, 179, 178, 93, 52, 137, 190, 202, 60, - 254, 87, 112, 250, 57, 242, 117, 206, 195, 149, 213, 206, -]; +lazy_static! { + pub static ref NULLIFIER_SECRET_CONST: [u8; 32] = hex::decode(std::env::var("NULLIFIER_SECRET_CONST").unwrap()).unwrap().try_into().unwrap(); + pub static ref VIEWING_SECRET_CONST: [u8; 32] = hex::decode(std::env::var("VIEWING_SECRET_CONST").unwrap()).unwrap().try_into().unwrap(); +} pub type CipherText = Vec; pub type Nonce = GenericArray, B1>, B0>, B0>>;