
Project template for hardware wallet workshop
Dependencies: mbed QSPI_DISCO_F469NI BSP_DISCO_F469NI
Diff: main.cpp
- Revision:
- 3:f9462bf83c56
- Parent:
- 2:8b42ea8491ae
--- a/main.cpp Wed Jul 31 12:22:15 2019 +0000 +++ b/main.cpp Wed Jul 31 13:15:45 2019 +0000 @@ -51,13 +51,16 @@ /*********** functions to complete **************/ -// generates a new mnemonic +// IF YOU GET BORED: +// - add an option to mix in user input into generated mnemonic +// - add testnet / mainnet switch +// - add address type configuration (native or nested segwit) + +// generates a new mnemonic, called from newMnemonicCallback string generateNewMnemonic(){ // TODO: // - generate random buffer (16 or 32 bytes) - getRandomBuffer(buf, size) // - create a new mnemonic from it - generateMnemonic(buf, size) - // - save this mnemonic - // - display it to the user return ""; } @@ -65,9 +68,13 @@ // checks if entered mnemonic is valid static lv_res_t checkMnemonicCallback(lv_obj_t * btn){ // TODO: - // - check mnemonic + // - check mnemonic (stored in global scope string mnemonic) // - if ok, init keys and show success message - // - otherwise erase the whole mnemonic + // - otherwise erase the whole mnemonic and update dataLbl text + // OPTIONAL: + // - display not only the mnemonic but xpub / xprv as well + // - ask the user what address type to use - nested or native segwit + // - ask if we want to use testnet or mainnet return LV_RES_OK; }