signTxData method

Uint8List signTxData(
  1. List<int> data
)

Signs the given data using the associated privateKey and encodes the signature bytes to be included inside a transaction.

Implementation

Uint8List signTxData(List<int> data) {
  final uint8List = Uint8List.fromList(data);
  final hash = SHA256Digest().process(uint8List);
  return TransactionSigner.deriveFrom(hash, _ecPrivateKey, ecPublicKey);
}