TronVerifier.fromKeyBytes constructor

TronVerifier.fromKeyBytes(
  1. List<int> keyBytes
)

Factory method to create a TronVerifier from a byte representation of a public key.

Implementation

factory TronVerifier.fromKeyBytes(List<int> keyBytes) {
  final point = ProjectiveECCPoint.fromBytes(
      curve: ETHSignerConst.secp256.curve, data: keyBytes, order: null);
  final verifyingKey = ECDSAPublicKey(ETHSignerConst.secp256, point);
  return TronVerifier._(ECDSAVerifyKey(verifyingKey));
}