use rstest::fixture;
use crate::identity::{KeyPair, PublicKey};
use crate::test_utils::constants::PRIVATE_KEY;
#[fixture]
pub fn private_key() -> String {
PRIVATE_KEY.into()
}
#[fixture]
pub fn public_key() -> PublicKey {
let key_pair = KeyPair::from_private_key_str(PRIVATE_KEY).unwrap();
key_pair.public_key().to_owned()
}
#[fixture]
pub fn key_pair(#[default(PRIVATE_KEY)] private_key: &str) -> KeyPair {
KeyPair::from_private_key_str(private_key).unwrap()
}
#[fixture]
pub fn random_key_pair() -> KeyPair {
KeyPair::new()
}