toBytes method

List<int> toBytes([
  1. PubKeyModes mode = PubKeyModes.compressed
])

Retrieves the raw bytes of the public key.

Implementation

List<int> toBytes([PubKeyModes mode = PubKeyModes.compressed]) {
  if (mode == PubKeyModes.uncompressed) {
    return _publicKey.uncompressed;
  }
  return _publicKey.compressed;
}