validateEncoding method
Implementation
@override
EncodingValidation validateEncoding({
int? type,
String? senderPublicKey,
String? receiverPublicKey,
}) {
final int t = type ?? EncodeOptions.TYPE_0;
if (t == EncodeOptions.TYPE_1) {
if (senderPublicKey == null) {
throw const ReownCoreError(
code: -1, message: 'Missing sender public key');
}
if (receiverPublicKey == null) {
throw const ReownCoreError(
code: -1, message: 'Missing receiver public key');
}
}
return EncodingValidation(
t,
senderPublicKey: senderPublicKey,
receiverPublicKey: receiverPublicKey,
);
}