How to use the ethereumjs-wallet.fromV1 function in ethereumjs-wallet

To help you get started, we’ve selected a few ethereumjs-wallet examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github floating / frame / main / signers / hot / RingSigner / index.js View on Github external
addKeystore (keystore, keystorePassword, password, cb) {
    let wallet
    // Try to generate wallet from keystore
    try {
      if (keystore.version === 1) wallet = fromV1(keystore, keystorePassword)
      else if (keystore.version === 3) wallet = fromV3(keystore, keystorePassword)
      else return cb(new Error('Invalid keystore version'))
    } catch (e) { return cb(e) }

    // Add private key
    this.addPrivateKey(wallet._privKey.toString('hex'), password, cb)
  }
github LoopringSecondary / circulr / src / ethereum / keystore.js View on Github external
export function decryptMewV1ToPrivKey (keystore, password)
{
    return fromV1(keystore, password).getPrivateKey();
}