use crate::prelude::*;
use casper_types::account::AccountHash;
use casper_types::{PublicKey, SecretKey};
pub fn generate_key_pairs(amount: u8) -> BTreeMap<Address, (SecretKey, PublicKey)> {
let mut accounts = BTreeMap::new();
for i in 0..amount {
let secret_key = SecretKey::ed25519_from_bytes([i; 32]).unwrap_or_else(|_| {
panic!(
"Couldn't construct a secret key from {}. This shouldn't happen!",
i
)
});
let public_key = PublicKey::from(&secret_key);
let account_addr = AccountHash::from(&public_key);
accounts.insert(account_addr.into(), (secret_key, public_key));
}
accounts
}