Members
Methods
(inner) genKeypair(seed, pathIndexopt) → {Object}
Generate stellar Keypair object from a given seed and a pathIndex.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
seed |
String
|
|||
pathIndex |
Number
|
<optional> |
0 |
Returns:
- Type:
-
Object
(inner) genMnemonic(languageopt, entropyopt) → {String}
Generate mnemonic. BIP39 implementation.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
language |
String
|
<optional> |
LANGUAGE.EN | |
entropy |
Number
|
<optional> |
ENTROPY.HIGH |
Returns:
- Type:
-
String
(inner) mnemonicToSeedHex(mnemonic, passphraseopt) → {String}
Generate hex seed from a given mnemonic and passphrase.
BIP39 implementation.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
mnemonic |
String
|
|||
passphrase |
String
|
<optional> |
"" |
Returns:
- Type:
-
String
(inner) newAccount(passphraseopt, pathIndexopt, languageopt) → {Object}
Randomly generate object with mnemonic,
passphrase, pathIndex, seed and keypair.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
passphrase |
String
|
<optional> |
"" | |
pathIndex |
Number
|
<optional> |
0 | |
language |
String
|
<optional> |
LANGUAGE.EN |
Returns:
- Type:
-
Object
(inner) validateMnemonic(mnemonic, languageopt) → {Boolean}
Check mnemonic validity. BIP39 implementation.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
mnemonic |
String
|
|||
language |
String
|
<optional> |
LANGUAGE.EN |
Returns:
- Type:
-
Boolean
true if mnemonic checksum is ok, false otherwise