XRPPrivateKey.fromSeed constructor

XRPPrivateKey.fromSeed(
  1. String seed
)

Factory constructor for creating an XRP private key from a seed.

seed is the seed value for generating the private key.

Implementation

factory XRPPrivateKey.fromSeed(String seed) {
  /// Decode the seed to retrieve entropy and algorithm
  final entropy = XrpSeedUtils.decodeSeed(seed);

  /// Create an XRPPrivateKey from the entropy and specified algorithm
  return XRPPrivateKey.fromEntropy(BytesUtils.toHexString(entropy.item1),
      algorithm: entropy.item2);
}