pub fn read_key(
path: &PathBuf,
require_secp256k1: bool,
) -> Result<IotaKeyPair, Error>Expand description
Read an IotaKeyPair from a file. The content could be any of the following:
- Base64 encoded
flag || privkeyfor ECDSA key - Base64 encoded
privkeyfor Raw key - Bech32 encoded private key prefixed with
iotaprivkey - Hex encoded
privkeyfor Raw key
If require_secp256k1 is true, it will return an error if the key is not
Secp256k1.