Crypto
_isNode
Determines if the current environment is node
Returns boolean True if current environment is node
generatePhrase
Generate a new phrase.
Parameters
sizestring The new phrase size. (optional, default12)
Returns string The generated phrase based on the size.
validatePhrase
Validate the given phrase.
Parameters
phrasestring
Returns boolean true or false
getSeed
Get the seed from the given phrase.
Parameters
-
phrasestring -
Throws
"Invalid BIP39 phrase"Thrown if phrase is an invalid one.
Returns Buffer The seed from the given phrase.
encryptToKeyStore
Get the Keystore interface from the given phrase and password.
Parameters
Returns Keystore The keystore interface generated from the given phrase and password.
decryptFromKeystore
Get the phrase from the keystore
Parameters
keystoreKeystore-
passwordstring - Throws
"Invalid password"Thrown if password is an incorrect one.
Returns Keystore The phrase from the keystore.