Open adamierymenko opened 1 year ago
it's pretty simple to implement your own restoration function. here's an example of how you can do so:
// src/api.rs
impl Keypair {
// -- snip --
pub fn restore(pub_bytes: Vec<u8>, sec_bytes: Vec<u8>) -> Self {
Self {
public: pub_bytes.try_into().unwrap(),
secret: sec_bytes.try_into().unwrap(),
}
}
}
though, it would be really useful if this was included by default (and honestly i'm confused as to why it's not).
It looks like there's no way to save/restore a Keypair. I guess this is nowhere even near production ready right?