How to use eth-keyring-controller - 2 common examples

To help you get started, we’ve selected a few eth-keyring-controller 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 status-im / status-js-desktop / app / utils / keyManagement.js View on Github external
export const createVault = async (password, mnemonic) => {
  const keyRingController = new KeyringController({});
  const controller = await keyRingController.createNewVaultAndRestore(password, mnemonic);
  const vault = keyRingController.store.getState();
  storeKeyData(JSON.stringify(vault));
  return keyRingController;
}
github status-im / status-js-desktop / app / utils / keyManagement.js View on Github external
export const restoreVault = async (password) => {
  const keyStore = JSON.parse(getKeyData());
  const keyRingController = new KeyringController({
    initState: keyStore
  });
  const controller = await keyRingController.submitPassword(password);
  return keyRingController;
}

eth-keyring-controller

A module for managing various keyrings of Ethereum accounts, encrypting them, and using them.

ISC
Latest version published 2 years ago

Package Health Score

51 / 100
Full package analysis

Popular eth-keyring-controller functions