BitShares Forum

Main => General Discussion => Topic started by: Mateusz on March 15, 2015, 01:13:18 pm

Title: How to move your account to another wallet?
Post by: Mateusz on March 15, 2015, 01:13:18 pm
Hello, in order to split the risk and diversify my funds I wanted to move my registered account name and all funds associated with it to another wallet file. Is it possible with BitShares and if so, what is the process?
Title: Re: How to move your account to another wallet?
Post by: btswildpig on March 15, 2015, 01:35:01 pm
Hello, in order to split the risk and diversify my funds I wanted to move my registered account name and all funds associated with it to another wallet file. Is it possible with BitShares and if so, what is the process?

Export wallet ? 
In the file menu ....
Then you can store this file to another place .
Title: Re: How to move your account to another wallet?
Post by: Mateusz on March 15, 2015, 01:59:30 pm
I don't believe so. There is a difference between a wallet and an account:

Quote
Account: An account is similar to a deposit box and should be registered on the blockchain
Every transactions to your account name is sent to an address which is
controlled by a derived key from the account private key

Wallet: The wallet is a set of account names and corresponding private keys.
When you first created an account name, the private key for that account key
is derived from the wallet private key and can thus be recalculated from the wallet private key.

What I'm essentially asking is if it's possible to decouple a registered account from the wallet file and transfer it into another, newly created wallet file.
Title: Re: How to move your account to another wallet?
Post by: fundomatic on March 15, 2015, 02:16:44 pm
It is easier to create and register a new account in the other wallet.
And then transfer funds into it.

My best guess it that account names are not transferable.

You can juggle the account keys like in https://bitsharestalk.org/index.php?topic=14344.0
But whether it will serve your purpose I don't know. (I wouldn't recommend until you know what your are doing).
Title: Re: How to move your account to another wallet?
Post by: btswildpig on March 15, 2015, 02:17:34 pm
I don't believe so. There is a difference between a wallet and an account:

Quote
Account: An account is similar to a deposit box and should be registered on the blockchain
Every transactions to your account name is sent to an address which is
controlled by a derived key from the account private key

Wallet: The wallet is a set of account names and corresponding private keys.
When you first created an account name, the private key for that account key
is derived from the wallet private key and can thus be recalculated from the wallet private key.

What I'm essentially asking is if it's possible to decouple a registered account from the wallet file and transfer it into another, newly created wallet file.

possible . assuming you have 2 accounts , rabbit and dog ,

Step 1 : File menu , export wallet , save it to somewhere safe .
Step 2 : export all of the private keys of each account .
go to Advanced option  under the menu of account names , select the tab of "Console" ,  type the following instructions and hit Enter on keyboard
wallet_dump_private_key rabbit

then you'll get a long address , copy and save it , that's the private key for "rabbit" . Assuming it's XXXXXXXXXXXXXXXXXXXXXXX.

Do the above operation again for account "dog"
wallet_dump_private_key dog

then you'll get a long address , copy and save it , that's the private key for "dog"  . . Assuming it's YYYYYYYYYYYYYYYYYY.

Now , you have two private keys for 2 accounts .

Step3 :  Find the datadir of BitShares . If you're using Windows system , hit Start ----Run-----  , type in   %appdata%/bitshares  , click ok .
Then you'll be in the datadir .  rename the "wallet" file folder to another name like "wallet-original" .

Step4 : Restart the BitShares wallet , and set an password for the new empty wallet .

Step5 : Go to the console like in step 2. But input the following instruction instead  , and hit Enter
wallet_import_private_key XXXXXXXXXXXXXXXXXXXXXXXX
xxxxxxxxxxxx  is the private key of the first account "rabbit" . If you see OK , then you can check if the name is in the wallet . If is , wait for the scanning .When it's finished , check if the balance is right . If is , then it's ok to export from File menu , save as "rabbit.json"  . Finally , exit the wallet from file menu .

Step6: Find the datadir of BitShares . If you're using Windows system , hit Start ----Run-----  , type in   %appdata%/bitshares  , click ok .
Then you'll be in the datadir .  rename the "wallet" file folder to another name like "wallet-rabbit" .

Step 7 : Restart the BitShares wallet , and set an password for the new empty wallet .

Step8 : Go to the console input the following instruction , and hit Enter
wallet_import_private_key YYYYYYYYYYYYYYYYYYYYYYYYY
YYYYYYYYYYYYYYYY  is the private key of the second account "dog" . If you see OK , then you can check if the name is in the wallet . If is , wait for the scanning .When it's finished , check if the balance is right . If is , then it's ok to export from File menu , save as "dog.json"  . Finally , exit the wallet from file menu .

Now , you have 3 json wallet backups . Each contains different accounts . And the current running wallet is "dog" . 

Title: Re: How to move your account to another wallet?
Post by: abit on March 16, 2015, 03:28:55 am

Step 2 : export all of the private keys of each account .
go to Advanced option  under the menu of account names , select the tab of "Console" ,  type the following instructions and hit Enter on keyboard
wallet_dump_private_key rabbit

then you'll get a long address , copy and save it , that's the private key for "rabbit" . Assuming it's XXXXXXXXXXXXXXXXXXXXXXX.
A good tutorial.
Just a remind, we need to use wallet_dump_account_private_key instead of wallet_dump_private_key with client version 0.6.x.

BTW it's best if someone could update the wiki and post a link here, rather than reply in every posts.
Title: Re: How to move your account to another wallet?
Post by: xeroc on March 16, 2015, 06:52:15 am

Step 2 : export all of the private keys of each account .
go to Advanced option  under the menu of account names , select the tab of "Console" ,  type the following instructions and hit Enter on keyboard
wallet_dump_private_key rabbit

then you'll get a long address , copy and save it , that's the private key for "rabbit" . Assuming it's XXXXXXXXXXXXXXXXXXXXXXX.
A good tutorial.
Just a remind, we need to use wallet_dump_account_private_key instead of wallet_dump_private_key with client version 0.6.x.

BTW it's best if someone could update the wiki and post a link here, rather than reply in every posts.
Also note that there is a difference between owner_key and active_key:

From
http://wiki.bitshares.org/index.php/Best_Practices/SecuringFunds

Quote
owner_key

    'owns' the account on the blockchain.
    it's like the master of everything.
    all keys are derived from this. Comparable with the seed of HD wallets from Bitcoin.
    can NOT be updated/changed on the blockchain

active_key

    derived from owner_key
    used for (TITAN and non-TITAN) transaction to a registered account name
    used to derive market keys .. (at least that's my understanding)
    can be updated/changed on the blockchain