unmarshal static method
Creates an EcdsaPublicKey from its protobuf bytes
Implementation
static p2pkeys.PublicKey unmarshal(Uint8List bytes) {
final pbKey = pb.PublicKey.fromBuffer(bytes);
if (pbKey.type != pb.KeyType.ECDSA) {
throw FormatException('Not an ECDSA public key');
}
return EcdsaPublicKey.fromRawBytes(Uint8List.fromList(pbKey.data));
}