sign method
Sign the given bytes with the secret key.
Implementation
Future<crypto.Signature> sign(Uint8List bytes) async {
// Sign the transaction with secret key
final signature = await Ed25519().sign(
bytes,
keyPair: keyPair,
);
return crypto.Signature(bytes: Uint8List.fromList(signature.bytes));
}