SolAddress.uncheckBytes constructor

SolAddress.uncheckBytes(
  1. List<int> keyBytes
)

Constructs a Solana address without checking the curve of the bytes.

Implementation

factory SolAddress.uncheckBytes(List<int> keyBytes) {
  if (keyBytes.length != 32) {
    throw const MessageException(
        "The public key must have a length of 32 bytes.");
  }
  return SolAddress._(Base58Encoder.encode(keyBytes));
}