Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
eth-keyring-controller
Advanced tools
A module for managing various keyrings of Ethereum accounts, encrypting them, and using them.
A module for managing groups of Ethereum accounts called "Keyrings", defined originally for MetaMask's multiple-account-type feature.
To add new account types to a KeyringController
, just make sure it follows The Keyring Class Protocol.
The KeyringController has three main responsibilities:
yarn install eth-keyring-controller --save
const KeyringController = require('eth-keyring-controller')
const SimpleKeyring = require('eth-simple-keyring')
const keyringController = new KeyringController({
keyringTypes: [SimpleKeyring], // optional array of types to support.
initState: initState.KeyringController, // Last emitted persisted state.
encryptor: { // An optional object for defining encryption schemes:
// Defaults to Browser-native SubtleCrypto.
encrypt (password, object) {
return new Promise('encrypted!')
},
decrypt (password, encryptedString) {
return new Promise({ foo: 'bar' })
},
},
})
// The KeyringController is also an event emitter:
this.keyringController.on('newAccount', (address) => {
console.log(`New account created: ${address}`)
})
this.keyringController.on('removedAccount', handleThat)
yarn test
Currently the methods are heavily commented in the source code, so it's the best place to look until we aggregate it here as well.
FAQs
A module for managing various keyrings of Ethereum accounts, encrypting them, and using them.
The npm package eth-keyring-controller receives a total of 299 weekly downloads. As such, eth-keyring-controller popularity was classified as not popular.
We found that eth-keyring-controller demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.