Class SeedCodec

java.lang.Object
org.xrpl.xrpl4j.codec.addresses.SeedCodec

public class SeedCodec extends Object
A Codec for encoding/decoding various seed primitives.
  • Constructor Details

    • SeedCodec

      public SeedCodec()
  • Method Details

    • getInstance

      public static SeedCodec getInstance()
    • decodeSeed

      public Decoded decodeSeed(String base58EncodedSeed) throws EncodingFormatException
      Decodes a Base58Check encoded XRPL secret key base58EncodedSeed value. Works for ed25519 and secp256k1 seeds.
      Parameters:
      base58EncodedSeed - A Base58Check encoded XRPL keypair base58EncodedSeed.
      Returns:
      The decoded base58EncodedSeed, base58EncodedSeed type, and algorithm used to encode the base58EncodedSeed.
      Throws:
      EncodingFormatException
      See Also:
      • "https://xrpl.org/cryptographic-keys.html#seed"
    • encodeSeed

      public String encodeSeed(UnsignedByteArray entropy, KeyType type)
      Encodes a byte array to a Base58Check String using the given KeyType.
      Parameters:
      entropy - An UnsignedByteArray containing the seed entropy to encode.
      type - The cryptographic algorithm type to be encoded in the resulting seed.
      Returns:
      A Base58Check encoded XRPL keypair seed.