How to use the ethereumjs-wallet.fromEthSale 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 MyEtherWallet / MyEtherWallet / src / wallets / software / basicWallet.js View on Github external
getWalletFromPrivKeyFile(strjson, password) {
    let jsonArr;
    if (typeof strjson === 'string') {
      jsonArr = JSON.parse(strjson);
    } else {
      jsonArr = strjson;
    }
    // eslint-disable-next-line new-cap
    if (jsonArr.encseed != null)
      return new EthereumWallet.fromEthSale(strjson, password);
    // eslint-disable-next-line new-cap
    else if (jsonArr.Crypto != null || jsonArr.crypto != null)
      return new EthereumWallet.fromV3(strjson, password, true);
    else if (jsonArr.hash != null)
      return this.fromMyEtherWallet(strjson, password);
    else if (jsonArr.publisher === 'MyEtherWallet')
      return this.fromMyEtherWalletV2(strjson);

    throw Error('Error decoding wallet from file');
  }
github MyCryptoHQ / MyCrypto / common / v2 / services / WalletService / non-deterministic / wallets.ts View on Github external
const PresaleWallet = (keystore: string, password: string) =>
  signWrapper(fromEthSale(keystore, password));
github ethfinex / community-gateway / src / services / keystoreService.js View on Github external
const PresaleWallet = (keystore, password) => signWrapper(fromEthSale(keystore, password));
github LoopringSecondary / circulr / src / ethereum / keystore.js View on Github external
export function decryptPresaleToPrivKey (keystore, password)
{
    return fromEthSale(keystore, password).getPrivateKey();
}
github MyCryptoHQ / MyCrypto / common / libs / wallet / non-deterministic / wallets.ts View on Github external
const PresaleWallet = (keystore: string, password: string) =>
  signWrapper(fromEthSale(keystore, password));