toBytes method
Converts the public key to its byte representation.
If withPrefix
is true (default), includes the prefix byte.
Otherwise, excludes the prefix byte.
Implementation
List<int> toBytes([bool withPrefix = true]) {
if (withPrefix) {
return _publicKey.compressed;
}
return _publicKey.compressed.sublist(1);
}