java.lang.Object
java.lang.Record
tech.deplant.java4ever.framework.Seed
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe constant DEFAULT_WORD_COUNT.static final StringThe constant HD_PATH.static final intThe constant TON_WORD_COUNT. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionderiveCredentials(int contextId) Derive credentials credentials.deriveCredentials(int contextId, String path) Derive credentials credentials.tech.deplant.java4ever.binding.Crypto.MnemonicDictionaryReturns the value of thedictionaryrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static SeedofRandom(int contextId) Generates random 12-words seed phrasestatic SeedofRandomTon(int contextId) Of random ton seed.phrase()Returns the value of thephraserecord component.final StringtoString()Returns a string representation of this record class.booleanverifySeedPhrase(int contextId) Verify seed phrase boolean.intwords()Returns the value of thewordsrecord component.
-
Field Details
-
DEFAULT_WORD_COUNT
public static final int DEFAULT_WORD_COUNTThe constant DEFAULT_WORD_COUNT.- See Also:
-
TON_WORD_COUNT
public static final int TON_WORD_COUNTThe constant TON_WORD_COUNT.- See Also:
-
HD_PATH
-
-
Constructor Details
-
Seed
Instantiates a new Seed.- Parameters:
phrase- the phrasewords- the words
-
Seed
public Seed(String phrase, int words, tech.deplant.java4ever.binding.Crypto.MnemonicDictionary dictionary) Creates an instance of aSeedrecord class.- Parameters:
phrase- the value for thephraserecord componentwords- the value for thewordsrecord componentdictionary- the value for thedictionaryrecord component
-
-
Method Details
-
ofRandom
Generates random 12-words seed phrase- Parameters:
contextId- the context id- Returns:
- seed
- Throws:
tech.deplant.java4ever.binding.EverSdkException- the ever sdk exception
-
ofRandomTon
public static Seed ofRandomTon(int contextId) throws tech.deplant.java4ever.binding.EverSdkException Of random ton seed.- Parameters:
contextId- the context id- Returns:
- the seed
- Throws:
tech.deplant.java4ever.binding.EverSdkException- the ever sdk exception
-
verifySeedPhrase
public boolean verifySeedPhrase(int contextId) throws tech.deplant.java4ever.binding.EverSdkException Verify seed phrase boolean.- Parameters:
contextId- the context id- Returns:
- the boolean
- Throws:
tech.deplant.java4ever.binding.EverSdkException- the ever sdk exception
-
deriveCredentials
public Credentials deriveCredentials(int contextId, String path) throws tech.deplant.java4ever.binding.EverSdkException Derive credentials credentials.- Parameters:
contextId- the context idpath- the path- Returns:
- the credentials
- Throws:
tech.deplant.java4ever.binding.EverSdkException- the ever sdk exception
-
deriveCredentials
public Credentials deriveCredentials(int contextId) throws tech.deplant.java4ever.binding.EverSdkException Derive credentials credentials.- Parameters:
contextId- the context id- Returns:
- the credentials
- Throws:
tech.deplant.java4ever.binding.EverSdkException- the ever sdk exception
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
phrase
Returns the value of thephraserecord component.- Returns:
- the value of the
phraserecord component
-
words
public int words()Returns the value of thewordsrecord component.- Returns:
- the value of the
wordsrecord component
-
dictionary
public tech.deplant.java4ever.binding.Crypto.MnemonicDictionary dictionary()Returns the value of thedictionaryrecord component.- Returns:
- the value of the
dictionaryrecord component
-