signPersonalMessage method

  1. @override
SignatureWithBytes signPersonalMessage(
  1. Uint8List bytes
)
override

Returns the raw message as bytes, not the BCS form that is signed.

Implementation

@override
SignatureWithBytes signPersonalMessage(Uint8List bytes) {
  final signed = signWithIntent(
    Bcs.vector(Bcs.u8()).serialize(bytes).toBytes(),
    IntentScope.personalMessage,
  );
  return SignatureWithBytes(signed.signature, base64Encode(bytes));
}