sign method

Future<Uint8List> sign(
  1. int accountId,
  2. int? signatureId,
  3. List<int> message
)

Method to sign data. It's called from rust

Implementation

Future<Uint8List> sign(
  int accountId,
  int? signatureId,
  List<int> message,
) async {
  try {
    return await _handler.sign(
      accountId: accountId,
      message: message,
      signatureId: signatureId,
    );
  } on LedgerOperationCancelledException {
    throw ErrorCode.cancelled;
  } catch (error) {
    throw ErrorCode.generic;
  }
}