PublicKey.fromHex constructor

PublicKey.fromHex(
  1. String hex
)

Implementation

factory PublicKey.fromHex(String hex) {
  if (hex.length != 64) {
    throw ArgumentError.value(hex, 'hex', 'invalid key length');
  }
  final bytes = hex64ToBytes(hex);
  return PublicKey(bytes);
}