util

Methods




(inner) isEntropy(entropy) → {Boolean}

Check if a given string is a BIP39 Entropy string.

Parameters:
Name Type Description
entropy string

The Entropy string to check

Source:
Returns:
Type:
Boolean



(inner) isMnemonic(mnemonic) → {Boolean}

Check if a given string is in a BIP39 Mnemonic format (is a string, and is at least 2 words long). Please note that this does not validate if the Mnemonic is a valid BIP39 Mnemonic (i.e. defined from Entropy vs a Brain Wallet)

Parameters:
Name Type Description
mnemonic string

BIP39 Mnemonic to check

Source:
Returns:
Type:
Boolean



(inner) isValidPublicAddress(address, network) → {Boolean}

Check if a Public Address is valid for a specific CoinNetwork

Parameters:
Name Type Description
address string

Base58 Public Address

network CoinNetwork
Source:
Returns:
Type:
Boolean



(inner) isValidWIF(key, network) → {Boolean}

Check if a WIF is valid for a specific CoinNetwork

Parameters:
Name Type Description
key string

Base58 WIF Private Key

network CoinNetwork
Source:
Returns:
Type:
Boolean



(inner) toBase58(key, version) → {string}

Parameters:
Name Type Description
key Buffer

The buffer for the Private/Public Key to encode

version number

The specific "version" byte to prepend

Source:
Returns:

Returns the Base58 encoded Key

Type:
string