EthereumAccountKeyring - ARitz-Cracker/arc-web3 GitHub Wiki
This class won't be available unless the arc-web3-keyring addon is installed!
Before using this class, InitializeWeb3 must be called! See the following example:
{EthereumAccountKeyring, InitializeWeb3} = require("arc-web3");
await InitializeWeb3(); // The EthereumAccountKeyring constructor will throw an error until this resolves
let account = new EthereumAccountKeyring(...);
An EthereumAccountKeyring allows you to derive accounts from a mnemonic seed. This library mimics Metamask's behaviour.
Properties:
- (Buffer
entropy: Entropy that can be used to re-create the mnemonic seed.
Methods:
new EthereumAccountKeyring(String || Buffer entropyOrSeed [,Array wordlist])
entropyOrSeeda 32-byte long Buffer containing (hopefully) random values or the mnemonic seed.wordlistCustom word list if you're into that sort of thing.
// No example. (Feel free to suggest one!)
String EthereumAccountKeyring.seedWords()
Generates the mnemonic seed using this object's entropy property. Key-word is "generate" since the mnemonic seed string isn't stored.
// No example. (Feel free to suggest one!)
EthereumAccountSignable EthereumAccountKeyring.createAccount(Web3Connection, Number index)
Creates the index'th account associated with the mnemonic seed.
// No example. (Feel free to suggest one!)