XRPPrivateKey.fromBytes constructor

XRPPrivateKey.fromBytes(
  1. List<int> keyBytes, {
  2. XRPKeyAlgorithm? algorithm,
})

Factory constructor for creating an XRP private key from a byte representation.

keyBytes is the byte representation of the private key. algorithm is the cryptographic algorithm used for the private key.

Implementation

factory XRPPrivateKey.fromBytes(List<int> keyBytes,
    {XRPKeyAlgorithm? algorithm}) {
  algorithm ??= findAlgorithm(keyBytes);
  final privateKey = _toPrivateKey(keyBytes, algorithm);
  return XRPPrivateKey._(privateKey, algorithm);
}