diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-10-13 07:43:48 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-10-13 08:05:39 +0800 |
commit | cd2c00a31873490c9129023abb35dd7983604b60 (patch) | |
tree | 9cd27be7355b9528c080bee33dc877ec43dccc86 /app/scripts/keyring-controller.js | |
parent | 93ed918caa668951a5b28fd9c7683b4f19b65220 (diff) | |
download | tangerine-wallet-browser-cd2c00a31873490c9129023abb35dd7983604b60.tar.gz tangerine-wallet-browser-cd2c00a31873490c9129023abb35dd7983604b60.tar.zst tangerine-wallet-browser-cd2c00a31873490c9129023abb35dd7983604b60.zip |
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) { |