java.lang.Object
java.lang.Record
tech.deplant.java4ever.framework.Seed
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The constant DEFAULT_WORD_COUNT.static final String
The constant HD_PATH.static final int
The 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.MnemonicDictionary
Returns the value of thedictionary
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.static Seed
ofRandom
(int contextId) Generates random 12-words seed phrasestatic Seed
ofRandomTon
(int contextId) Of random ton seed.phrase()
Returns the value of thephrase
record component.final String
toString()
Returns a string representation of this record class.boolean
verifySeedPhrase
(int contextId) Verify seed phrase boolean.int
words()
Returns the value of thewords
record 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 aSeed
record class.- Parameters:
phrase
- the value for thephrase
record componentwords
- the value for thewords
record componentdictionary
- the value for thedictionary
record 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 thephrase
record component.- Returns:
- the value of the
phrase
record component
-
words
public int words()Returns the value of thewords
record component.- Returns:
- the value of the
words
record component
-
dictionary
public tech.deplant.java4ever.binding.Crypto.MnemonicDictionary dictionary()Returns the value of thedictionary
record component.- Returns:
- the value of the
dictionary
record component
-