# The wallet challenge ### Overview One of the core functionalities of a wallet application is to manage a set of user keys, especially allowing the user to save them in a safe place and restore the wallet from a previously saved key. All of that needs to be done in the most user-friendly way as well as in accordance with industry standards - thus allowing given keys to be used in different wallet applications. The BIP-39 mnemonic (seed phrase) is a user-friendly representation of the seed of a [HD wallet](https://coinsutra.com/hd-wallets-deterministic-wallet/) master key, which the user can write down on a piece of paper (aka cold wallet) and restore the wallet from it in the future. ### Task Your task is to implement these 3 functionalities: 1. Generate a BIP-39 mnemonic and hd wallet master key 2. Restore hd wallet master key from a BIP-39 mnemonic 3. After restoring OR generating master key -> derive and display its default Ethereum address and private key ##### Your solution will be judged in terms of: * Ability to go through complete flow (generate new keys -> see the private key and address -> reset state -> restore from BIP-39 mnemonic -> see the same private key and address) * User Experience; the ease of restoring the wallet from its seed phrase * Usability on the desktop - a mobile solution is not important * Code organization * Ease of running the app with standard JS/TS tools already installed, that is: latest Node.JS, latest npm / latest yarn * Conformance with standards and best practices Since most of our frontend code is written in TypeScript and React we prefer your solution to also be written using these technologies. We also do not want you to spend more than a couple of hours on the solution, so be careful in what you choose to implement. ### !Send the complete source code in a zip archive. In case you find it hard to start, here are couple of hints: * wallet.ts library (https://github.com/petejkim/wallet.ts) has a simple and complete API to deal with requirements of this challenge - feel free to use this library for the assignment * Original texts of BIP-32, BIP-39 and BIP-44 can be found there: BIP-32 https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki BIP-39 https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki BIP-44 https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki