diff options
Add minimal method signatures to new keyring controller
Diffstat (limited to 'app/scripts/keyring-controller.js')
-rw-r--r-- | app/scripts/keyring-controller.js | 62 |
1 files changed, 61 insertions, 1 deletions
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js index b61242973..d96b9c101 100644 --- a/app/scripts/keyring-controller.js +++ b/app/scripts/keyring-controller.js @@ -1,11 +1,14 @@ const scrypt = require('scrypt-async') const bitcore = require('bitcore-lib') const configManager = require('./lib/config-manager') +const EventEmitter = require('events').EventEmitter -module.exports = class KeyringController { +module.exports = class KeyringController extends EventEmitter { constructor (opts) { + super() this.configManager = opts.configManager + this.ethStore = opts.ethStore this.keyChains = [] } @@ -35,6 +38,63 @@ module.exports = class KeyringController { scrypt(password, salt, logN, r, dkLen, interruptStep, cb, null) } + getState() { + return {} + } + + setStore(ethStore) { + this.ethStore = ethStore + } + + createNewVault(password, entropy, cb) { + cb() + } + + submitPassword(password, cb) { + cb() + } + + setSelectedAddress(address, cb) { + this.selectedAddress = address + cb(null, address) + } + + approveTransaction(txId, cb) { + cb() + } + + cancelTransaction(txId, cb) { + if (cb && typeof cb === 'function') { + cb() + } + } + + signMessage(msgParams, cb) { + cb() + } + + cancelMessage(msgId, cb) { + if (cb && typeof cb === 'function') { + cb() + } + } + + setLocked(cb) { + cb() + } + + exportAccount(address, cb) { + cb(null, '0xPrivateKey') + } + + saveAccountLabel(account, label, cb) { + cb(/* null, label */) + } + + tryPassword(password, cb) { + cb() + } + } function generateSalt (byteCount) { |