P2pkAddress constructor

P2pkAddress({
  1. required String publicKey,
})

Implementation

P2pkAddress({required String publicKey}) {
  final toBytes = hexToBytes(publicKey);
  if (!ecc.isPoint(toBytes)) {
    throw ArgumentError("The public key is wrong");
  }
  publicHex = publicKey;
}