diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-04-07 03:01:10 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-04-07 03:01:10 +0800 |
commit | 874d9c1ab825c5bd0b6b5d05d0136bb9b77b4638 (patch) | |
tree | 3ba3d9936bebcc7e957f45c6315f2a24cfac581a | |
parent | 8258ab2da13177862bb098f7fedb4187bb2832dc (diff) | |
download | tangerine-wallet-browser-874d9c1ab825c5bd0b6b5d05d0136bb9b77b4638.tar tangerine-wallet-browser-874d9c1ab825c5bd0b6b5d05d0136bb9b77b4638.tar.gz tangerine-wallet-browser-874d9c1ab825c5bd0b6b5d05d0136bb9b77b4638.tar.bz2 tangerine-wallet-browser-874d9c1ab825c5bd0b6b5d05d0136bb9b77b4638.tar.lz tangerine-wallet-browser-874d9c1ab825c5bd0b6b5d05d0136bb9b77b4638.tar.xz tangerine-wallet-browser-874d9c1ab825c5bd0b6b5d05d0136bb9b77b4638.tar.zst tangerine-wallet-browser-874d9c1ab825c5bd0b6b5d05d0136bb9b77b4638.zip |
Add ability to export private keys
-rw-r--r-- | CHANGELOG.md | 3 | ||||
-rw-r--r-- | app/scripts/background.js | 1 | ||||
-rw-r--r-- | app/scripts/lib/idStore.js | 9 |
3 files changed, 13 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index d5c4f82c1..aa9dd5f50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ ## Current Master - Removed extra entropy text field for simplified vault creation. +- Now supports exporting an account's private key. +- Unified button and input styles across the app. +- Removed some non-working placeholder UI until it works. ## 1.3.2 2016-04-04 diff --git a/app/scripts/background.js b/app/scripts/background.js index 14293ab05..850a7bc6e 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -124,6 +124,7 @@ function linkDnode(stream){ cancelTransaction: idStore.cancelTransaction.bind(idStore), setLocked: idStore.setLocked.bind(idStore), clearSeedWordCache: idStore.clearSeedWordCache.bind(idStore), + exportAccount: idStore.exportAccount.bind(idStore), }) stream.pipe(connection).pipe(stream) connection.on('remote', function(remote){ diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js index 8ac5185db..f44300273 100644 --- a/app/scripts/lib/idStore.js +++ b/app/scripts/lib/idStore.js @@ -123,6 +123,11 @@ IdentityStore.prototype.submitPassword = function(password, cb){ }) } +IdentityStore.prototype.exportAccount = function(address, cb) { + var privateKey = this._idmgmt.exportPrivateKey(address) + cb(null, privateKey) +} + // comes from dapp via zero-client hooked-wallet provider IdentityStore.prototype.addUnconfirmedTransaction = function(txParams, cb){ @@ -337,6 +342,10 @@ function IdManagement(opts) { this.getSeed = function(){ return this.keyStore.getSeed(this.derivedKey) } + + this.exportPrivateKey = function(address) { + return this.keyStore.exportPrivateKey(address, this.derivedKey, this.hdPathString) + } } |