validateDecoding method

  1. @override
EncodingValidation validateDecoding(
  1. String encoded, {
  2. String? receiverPublicKey,
})
override

Implementation

@override
EncodingValidation validateDecoding(
  String encoded, {
  String? receiverPublicKey,
}) {
  final EncodingParams deserialized = deserialize(encoded);
  final String? senderPublicKey = deserialized.senderPublicKey != null
      ? hex.encode(deserialized.senderPublicKey!)
      : null;
  return validateEncoding(
    type: deserialized.type,
    senderPublicKey: senderPublicKey,
    receiverPublicKey: receiverPublicKey,
  );
}