BitShares Forum

Main => Technical Support => Topic started by: carson on November 20, 2014, 08:18:34 am

Title: can i get BTS privite key if I have publick key and the orginral PTS wallet.dat?
Post by: carson on November 20, 2014, 08:18:34 am
how can i get my privite key back if I only know publick key and the orginral PTS wallet.dat?

I lost my privite key of BTS by accident, can i get it back?

Please give my help!
Title: Re: can i get BTS privite key if I have publick key and the orginral PTS wallet.dat?
Post by: pc on November 20, 2014, 08:29:46 am
If you have moved the genesis stake you received from importing the PTS wallet, the answer is no you can't. The account key and the PTS keys are not related.

I you have not moved your genesis stake you can simply create a new account and import your PTS wallet again. (You should do that in any case, just to be sure.)
Title: Re: can i get BTS privite key if I have publick key and the orginral PTS wallet.dat?
Post by: carson on November 20, 2014, 08:41:35 am
If you have moved the genesis stake you received from importing the PTS wallet, the answer is no you can't. The account key and the PTS keys are not related.

I you have not moved your genesis stake you can simply create a new account and import your PTS wallet again. (You should do that in any case, just to be sure.)

I didn't moved any BTS since i get BTSX by improting PTS wallet.dat. After i import PTS wallet again and found the balance is 0.  :( :(
Title: Re: can i get BTS privite key if I have publick key and the orginral PTS wallet.dat?
Post by: xeroc on November 20, 2014, 08:50:48 am
If you have moved the genesis stake you received from importing the PTS wallet, the answer is no you can't. The account key and the PTS keys are not related.

I you have not moved your genesis stake you can simply create a new account and import your PTS wallet again. (You should do that in any case, just to be sure.)

I didn't moved any BTS since i get BTSX by improting PTS wallet.dat. After i import PTS wallet again and found the balance is 0.  :( :(
Have you synced the whole blockchain? "console"->"getinfo" .. or "console"->"blockchain_is_synced"
Do you see outgoing transactions?
Title: Re: can i get BTS privite key if I have publick key and the orginral PTS wallet.dat?
Post by: carson on November 20, 2014, 09:27:35 am
 "console"->"blockchain_is_synced" it returns true
Title: Re: can i get BTS privite key if I have publick key and the orginral PTS wallet.dat?
Post by: xeroc on November 20, 2014, 09:37:18 am
"console"->"blockchain_is_synced" it returns true
you have outgoing transactions?
Title: Re: can i get BTS privite key if I have publick key and the orginral PTS wallet.dat?
Post by: pc on November 20, 2014, 09:40:41 am
I didn't moved any BTS since i get BTSX by improting PTS wallet.dat. After i import PTS wallet again and found the balance is 0.  :( :(

Are you sure? Have you done *anything* after importing the PTS wallet, like voting for delegates for example?
Does your newly created wallet show any transactions after importing the wallet again?
Title: Re: can i get BTS privite key if I have publick key and the orginral PTS wallet.dat?
Post by: xeroc on November 20, 2014, 10:03:31 am
Please also issue a "wallet_account_list_public_keys" .. and try to find YOUR PTS address in there ... to make sure the import didn't somehow "fail"
Title: Re: can i get BTS privite key if I have publick key and the orginral PTS wallet.dat?
Post by: carson on November 21, 2014, 02:26:52 am
>> wallet_list_accounts

NAME (* delegate)                  KEY                                                             REGISTERED            FAVORITE       APPROVAL       
btc38-btsx-octo-72722              BTSX7okMm96YR7pgkHD64Taz5B69zH7QZkvfg5BEWFsA3GVfiwSPsG          2014-10-01T04:40:40   NO             1         
bts.coin *                         BTSX6RLAEj4aw5FeJCuamZg9g6muQhU1V3hG9auWek5VBfd49uEXSK          2014-07-31T05:21:50   NO             0         
carson                             BTSX7tKcBPbS6FxVRqrwv2fUuTRZR2khJzHXZBeP24FUuWHfJ92H5W          NO                    NO             0         
carson                             BTSX5nvZH7x99iV2nmhqseMqpmWJixBWgoZs44qDGEbAmaG9gVaQaF          2014-07-24T11:12:50   YES            0         

>> wallet_account_list_public_keys carson

10 assert_exception: Assert Exception
my->is_unique_account(account_name):
    {}
    bitshares  wallet.cpp:3745 bts::wallet::wallet::get_account_public_key

    {"account_name":"carson"}
    bitshares  wallet.cpp:3757 bts::wallet::wallet::get_account_public_key

    {}
    bitshares  common_api_client.cpp:1571 bts::rpc_stubs::common_api_client::wallet_account_list_public_keys

    {"command":"wallet_account_list_public_keys"}
    bitshares  cli.cpp:556 bts::cli::detail::cli_impl::execute_command

right now I have two account with same name~
Title: Re: can i get BTS privite key if I have publick key and the orginral PTS wallet.dat?
Post by: xeroc on November 21, 2014, 09:33:42 am
wow .. how did that happen ..

paging @vikram .. could you help us out here?

The issue is, that from here, there's no way to tell which of the public keys for "carson" the BTS are in ... so you can't just "delete" the local account ..
maybe you should try dump the private keys for both accounts using the two different public keys to dump the corresponding private keys

AT LEAST MAKE SURE TO HAVE A BACKUP!!!!
Title: Re: can i get BTS privite key if I have publick key and the orginral PTS wallet.dat?
Post by: carson on November 24, 2014, 02:22:24 am
wow .. how did that happen ..

paging @vikram .. could you help us out here?

The issue is, that from here, there's no way to tell which of the public keys for "carson" the BTS are in ... so you can't just "delete" the local account ..
maybe you should try dump the private keys for both accounts using the two different public keys to dump the corresponding private keys

AT LEAST MAKE SURE TO HAVE A BACKUP!!!!


can't dump the private.. :( :( :( :(  I also check the backup file and found the encrypted_private_key is empty
{
  "type": "key_record_type",
  "data": {
    "index": 222,
    "account_address": "BTSX46CPjUr6Cgx1u1Eah9Ke9mcVNaTZche7H",
    "public_key": "BTSX5nvZH7x99iV2nmhqseMqpmWJixBWgoZs44qDGEbAmaG9gVaQaF",
    "encrypted_private_key": "",
    "valid_from_signature": false,
    "memo": null,
    "gen_seq_number": 0
  }
},
Title: Re: can i get BTS privite key if I have publick key and the orginral PTS wallet.dat?
Post by: xeroc on November 24, 2014, 07:38:36 am
Nothing is lost!

   wallet_regenerate_keys ACCOUNT-NAME 1000

http://wiki.bitshares.org/index.php/RecoveringFunds
Title: Re: can i get BTS privite key if I have publick key and the orginral PTS wallet.dat?
Post by: carson on November 24, 2014, 08:26:11 am
Nothing is lost!

   wallet_regenerate_keys ACCOUNT-NAME 1000



>> wallet_regenerate_keys carson 1000

10 assert_exception: Assert Exception
account_record.valid() && account_record->is_my_account:
    {}
    bitshares  wallet.cpp:2023 bts::wallet::wallet::regenerate_keys

    {}
    bitshares  wallet.cpp:2127 bts::wallet::wallet::regenerate_keys

    {}
    bitshares  common_api_client.cpp:2083 bts::rpc_stubs::common_api_client::wallet_regenerate_keys

    {"command":"wallet_regenerate_keys"}
    bitshares  cli.cpp:556 bts::cli::detail::cli_impl::execute_command
Title: Re: can i get BTS privite key if I have publick key and the orginral PTS wallet.dat?
Post by: xeroc on November 24, 2014, 08:30:11 am
The odd thing here is that you have TWO accounts "carson" .. where (obviously) only one is registered on the blockchain ..
If you have a backup maybe you can remove the local contact "carson" (the one that is not registered)
maybe you can modify your backup (make a backup of you backup!!) .. and remove one of both accounts manually ..

Your wallet seems to be a mess!

paging @vikram !
Title: Re: can i get BTS privite key if I have publick key and the orginral PTS wallet.dat?
Post by: carson on November 25, 2014, 04:40:20 am
Oh, I get my wallet back!
Here's my method:
1. modify my backup manually. delect all counts which is sth like ' "type": "account_record_type",'
2. import the backup again then it will show sth like GENESIS  ->  BTSXBiLTEu8f8.....
3. goback to backup again and search for 'BTSXBiLTEu8f8...' then you will find sth like
    "account_address": "BTSXBiLTEu8f8Wfu...",
    "public_key": "BTSX8LQcFJCa...N",
    "encrypted_private_key": "9477348519fcb...."
4. go to console -> wallet_dump_private_key BTSX8LQcFJCa...N
   then you will get your prive_key and apply for a new account and import the private_key and rescan.

 :):)
Title: Re: can i get BTS privite key if I have publick key and the orginral PTS wallet.dat?
Post by: xeroc on November 25, 2014, 09:54:20 am
And your funds are also back completely? Blockchain synced and rescan completed? Just to be sure!