Class Seed

java.lang.Object
org.xrpl.xrpl4j.crypto.core.keys.Seed
All Implemented Interfaces:
Destroyable

public class Seed extends Object implements Destroyable
A compact value that is used to derive the actual private and public keys for an account.
See Also:
  • "https://xrpl.org/cryptographic-keys.html#seed"
  • Method Details

    • ed25519SeedFromPassphrase

      public static Seed ed25519SeedFromPassphrase(Passphrase passphrase)
      Construct an Ed25519-compatible Seed from the supplied passphrase.
      Parameters:
      passphrase - A Passphrase to generate a seed from.
      Returns:
      A Seed.
    • secp256k1SeedFromPassphrase

      public static Seed secp256k1SeedFromPassphrase(Passphrase passphrase)
      Construct an SECP256K1-compatible Seed from the supplied Passphrase.
      Parameters:
      passphrase - A Passphrase to generate a seed from.
      Returns:
      A Seed.
    • ed25519SeedFromEntropy

      public static Seed ed25519SeedFromEntropy(Entropy entropy)
      Construct an Ed25519-compatible Seed from the supplied passphrase.
      Parameters:
      entropy - A Entropy to generate a Seed from.
      Returns:
      A Seed.
    • secp256k1SeedFromEntropy

      public static Seed secp256k1SeedFromEntropy(Entropy entropy)
      Construct an SECP256K1-compatible Seed from the supplied Passphrase.
      Parameters:
      entropy - A Entropy to generate a Seed from.
      Returns:
      A Seed.
    • fromBase58EncodedSecret

      public static Seed fromBase58EncodedSecret(String base58EncodedSecret)
      Construct a Seed from the supplied base58EncodedSecret. Values for this function are most commonly found from an XRP Faucet, for example for the XRP devnet or testnet. On the xrpl.org documentation page, this value is often referred to as an account "secret", but it is actually just a base58-encoded string that contains an encoded 16-bytes of entropy, in addition to other binary padding and identification data.
      Parameters:
      base58EncodedSecret - A base58-encoded String that represents an encoded seed.
      Returns:
      A Seed.
      See Also:
      • "https://xrpl.org/xrp-testnet-faucet.html"
    • decodedSeed

      public Decoded decodedSeed()
      The decoded details of this seed.
      Returns:
      An instance of Decoded.
    • destroy

      public final void destroy()
      Specified by:
      destroy in interface Destroyable
    • isDestroyed

      public final boolean isDestroyed()
      Specified by:
      isDestroyed in interface Destroyable
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object