Remove get_new_keypair

This commit is contained in:
NicolasCantu 2025-03-12 10:30:39 +01:00
parent 544e8989c6
commit 4c558589d0

View File

@ -270,22 +270,6 @@ pub fn get_member() -> ApiResult<Member> {
Ok(us)
}
#[wasm_bindgen]
pub fn get_new_keypair() -> NewKey {
let secp = Secp256k1::new();
let mut rng = thread_rng();
let keypair = Keypair::new(&secp, &mut rng);
let secret_hex = keypair.secret_bytes().to_lower_hex_string();
let (xonly, parity) = keypair.x_only_public_key();
NewKey {
private_key: secret_hex,
x_only_public_key: xonly.to_string(),
key_parity: if parity == Parity::Even { true } else { false }
}
}
#[wasm_bindgen]
pub fn restore_device(device_str: String) -> ApiResult<()> {
let device: Device = serde_json::from_str(&device_str)?;