serialize method
Implementation
@override
String serialize(
int type,
Uint8List sealed,
Uint8List iv, {
Uint8List? senderPublicKey,
}) {
List<int> l = [type];
if (type == EncodeOptions.TYPE_2) {
l.addAll(sealed);
return base64Url.encode(l);
}
if (type == EncodeOptions.TYPE_1) {
if (senderPublicKey == null) {
throw const ReownCoreError(
code: -1,
message: 'Missing sender public key for type 1 envelope',
);
}
l.addAll(senderPublicKey);
}
// l.addAll(iv);
l.addAll(sealed);
return base64Encode(l);
}