sign method

void sign(
  1. ETHPrivateKey privateKey
)

Signs the transaction using the provided ETHPrivateKey.

Generates a signature and sets it as the transaction's signature.

Implementation

void sign(ETHPrivateKey privateKey) {
  final serialized = _transaction.serialized;
  final signature = privateKey.sign(serialized);
  setSignature(signature);
}