java.lang.Object
java.lang.Record
tech.deplant.java4ever.framework.crypto.Seed

public record Seed(String phrase, int words) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Seed(String phrase, int words)
    Creates an instance of a Seed record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the phrase record component.
    static Seed
    RANDOM(Sdk sdk)
    Generates random 12-words seed phrase
    static Seed
     
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the words record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • Seed

      public Seed(String phrase, int words)
      Creates an instance of a Seed record class.
      Parameters:
      phrase - the value for the phrase record component
      words - the value for the words record component
  • Method Details

    • RANDOM

      public static Seed RANDOM(Sdk sdk) throws tech.deplant.java4ever.binding.EverSdkException
      Generates random 12-words seed phrase
      Parameters:
      sdk -
      Returns:
      Throws:
      tech.deplant.java4ever.binding.EverSdkException
    • RANDOM24

      public static Seed RANDOM24(Sdk sdk) throws tech.deplant.java4ever.binding.EverSdkException
      Throws:
      tech.deplant.java4ever.binding.EverSdkException
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • phrase

      public String phrase()
      Returns the value of the phrase record component.
      Returns:
      the value of the phrase record component
    • words

      public int words()
      Returns the value of the words record component.
      Returns:
      the value of the words record component