pub fn read_keypair<R: Read>(reader: &mut R) -> Result<Keypair, Box<dyn error::Error>> {
    let bytes: Vec<u8> = serde_json::from_reader(reader)?;
    let dalek_keypair = ed25519_dalek::Keypair::from_bytes(&bytes)
        .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))?;
    Ok(Keypair(dalek_keypair))
}
/// Reads a JSON-encoded `Keypair` from a `Reader` implementor
Reads a JSON-encoded `Keypair` from a `Reader` implementor
Reads a JSON - encoded ` Keypair ` from a ` Reader ` implementor
pub fn read_keypair<R: Read>(reader: &mut R) -> Result<Keypair, Box<dyn error::Error>> {
    let bytes: Vec<u8> = serde_json::from_reader(reader)?;
    let dalek_keypair = ed25519_dalek::Keypair::from_bytes(&bytes)
        .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))?;
    Ok(Keypair(dalek_keypair))
}
pub fn read_keypair < R : Read > ( reader : & mut R ) -> Result < Keypair , Box < dyn error :: Error > > { let bytes : Vec < u8 > = serde_json :: from_reader ( reader ) ? ; let dalek_keypair = ed25519_dalek :: Keypair :: from_bytes ( & bytes ) . map_err ( | e | std :: io :: Error :: new ( std :: io :: ErrorKind :: Other , e . to_string ( ) ) ) ? ; Ok ( Keypair ( dalek_keypair ) ) }
Reads a JSON-encoded `Keypair` from a `Reader` implementor
Reads a JSON - encoded ` Keypair ` from a ` Reader ` implementor
reader
&mut R