Author

Topic: restoring wallet (Read 1188 times)

newbie
Activity: 5
Merit: 0
April 20, 2016, 08:16:08 AM
#5
Thanks mocacinno.
I am using bitcoinj library to write my wallet app and in bitcoinj library there is method given to restore wallet from seed. So i thought restore wallet functionality can be achieved using bitcoinj.

DeterministicSeed seed = new DeterministicSeed(seedwords, null, passphrase, creationtime);

// The wallet class provides an easy fromSeed() function that loads a new wallet from a given seed.

Wallet wallet = Wallet.fromSeed(params, seed);

Now in that context, as you can see creation time and seed words are both required to fetch seed so both of them should also be visible to user.

And yes i just confirmed that Multibit HD shows creation time along with seed words.

legendary
Activity: 3346
Merit: 4911
https://merel.mobi => buy facemasks with BTC/LTC
April 20, 2016, 04:19:59 AM
#4
Thanks mocacinno for quick reply. Well if users would not be able to restore wallet without seed creation time, then how other wallet apps like Electrum or Multibit are restoring wallets of their users because i can see only seed word of my wallet in these wallet apps and if i need to restore my wallet, it just asks me to enter seed words but not seed creation time.

Further I want to ask one more question. While restoring wallet, should i delete wallet and block chain files both and re-create them or just one them should be deleted and if so then which one. Actually I am beginner to bitcoin and just confused how to deal with wallet and block chain files while performing restoring operation. Your help would be much appreciated.

Disclaimer: the next explanation was given by me... I have a lot of experience writing php/mysql scripts, enough experience using bitcoin and loads of experience in database management. I did not, however, use bitcoinj to write my own apps, neither did i ever read the full electrum sourcecode. My explanation might be off at times, if a more senior and experienced member finds any flaws in my logic, he's free to say so Smiley

Bitcoinj is a java library intended to create wallet apps. As far as i know (read the disclaimer!!!), bitcoinj is not a fully implemented deterministic wallet* (like electrum and multibit).
If you want to create a deterministic wallet using bitcoinj, you can do so (if you wish), but the deterministic part of the wallet will have to be coded by you (or you can possibly use other librarys to do so).
When you started your OP, you said you were writing a wallet app using bitcoinj, and that next to the seed words, the seed creation time was needed, so i assumed you were building your own kind of deterministic wallet using seed words plus a timestamp.
As far as i know, electrum doesn't need a timestamp in order to create their private keys.

* https://en.bitcoin.it/wiki/Deterministic_wallet
newbie
Activity: 5
Merit: 0
April 19, 2016, 02:20:35 PM
#3
Thanks mocacinno for quick reply. Well if users would not be able to restore wallet without seed creation time, then how other wallet apps like Electrum or Multibit are restoring wallets of their users because i can see only seed word of my wallet in these wallet apps and if i need to restore my wallet, it just asks me to enter seed words but not seed creation time.

Further I want to ask one more question. While restoring wallet, should i delete wallet and block chain files both and re-create them or just one them should be deleted and if so then which one. Actually I am beginner to bitcoin and just confused how to deal with wallet and block chain files while performing restoring operation. Your help would be much appreciated.
legendary
Activity: 3346
Merit: 4911
https://merel.mobi => buy facemasks with BTC/LTC
April 19, 2016, 08:15:47 AM
#2
Hi,  
I am creating a wallet app. After wallet creation user can see his wallet words. While restoring wallet from seed words, seed creation time is also required. So my question is do i need to show seed creation time along with seed words? so that user can record both seed words and time and when restoring required, user can provide both of them.



If you need the seed creation time AND the seed words in order to restore a wallet, it would be wise to show both indeed... Otherwise your users won't be able to restore their wallets (if i understand correctly).
newbie
Activity: 5
Merit: 0
April 19, 2016, 08:14:01 AM
#1
Hi, 
I am creating a wallet app. After wallet creation user can see his wallet words. While restoring wallet from seed words, seed creation time is also required. So my question is do i need to show seed creation time along with seed words? so that user can record both seed words and time and when restoring required, user can provide both of them.

Jump to: