unmarshal static method
Creates an EcdsaPrivateKey from its protobuf bytes
Implementation
static Future<p2pkeys.PrivateKey> unmarshal(Uint8List bytes) async {
final pbKey = pb.PrivateKey.fromBuffer(bytes);
if (pbKey.type != pb.KeyType.ECDSA) {
throw FormatException('Not an ECDSA private key');
}
return fromRawBytes(Uint8List.fromList(pbKey.data));
}