Maciej Hirsz 307e941684 Parity Signer (#1349)
* Parity Signer Squashed

* ParitySigner to be a container

* Parity Signer: style and polish

* target blank on appstore links

* PR fixes

* Move QrSignerModal to SendTransaction container

* Rework redux, use signing saga

* Cleanup

* Use new logo, change helpLink

* Rework finalize actions and types a bit

* Webcam info + wiki link on unlock screen

* Make the Parity QR Signer its own component, that has error messaging and ismore robust about adding / removing cameras.

* Unneded l10n
2018-04-06 16:32:25 -05:00

33 lines
1.1 KiB
TypeScript

import { fromPrivateKey, fromEthSale } from 'ethereumjs-wallet';
import { fromEtherWallet } from 'ethereumjs-wallet/thirdparty';
import { signWrapper } from './helpers';
import { decryptPrivKey } from 'libs/decrypt';
import { fromV3 } from 'libs/web-workers';
import Web3Wallet from './web3';
import AddressOnlyWallet from './address';
import ParitySignerWallet from './parity';
const EncryptedPrivateKeyWallet = (encryptedPrivateKey: string, password: string) =>
signWrapper(fromPrivateKey(decryptPrivKey(encryptedPrivateKey, password)));
const PresaleWallet = (keystore: string, password: string) =>
signWrapper(fromEthSale(keystore, password));
const MewV1Wallet = (keystore: string, password: string) =>
signWrapper(fromEtherWallet(keystore, password));
const PrivKeyWallet = (privkey: Buffer) => signWrapper(fromPrivateKey(privkey));
const UtcWallet = (keystore: string, password: string) => fromV3(keystore, password, true);
export {
EncryptedPrivateKeyWallet,
PresaleWallet,
MewV1Wallet,
PrivKeyWallet,
UtcWallet,
Web3Wallet,
AddressOnlyWallet,
ParitySignerWallet
};