Author Topic: How to import .json?  (Read 2533 times)

0 Members and 1 Guest are viewing this topic.

bitbro

  • Guest
Any idea when will the windows wallet be idiot proof, please?

Offline bytemaster

Good practice is to never delete any wallet ever.  Just in case


Sent from my iPhone using Tapatalk
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline ripplexiaoshan

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 2300
    • View Profile
  • BitShares: jademont
Your wallet is gone because you didn't log in the correct wallet.

Actually, there are two wallets on your PC, one is the default wallet(blank), the other is the one you just created. However, the wallet client always goes to the default wallet. So, you need to find the directory of wallet and change the wallet name of the newly created wallet to "default" after deleting the previous "default" wallet
BTS committee member:jademont

Offline gamey

  • Hero Member
  • *****
  • Posts: 2253
    • View Profile
Today I realized that my balance is gone after restarting the client.

When I try to reimport the wallet again I get the message: 20003 wallet_already_exists: wallet already exists

When I import the wallet again (with the same parameter) it works and the client shows my balance. But after restarting the client the balance is gone and I have to import the wallet twice again.

Do I have to do something like save the balance?

EDIT: Ok, once again I found the solution while testing. I had to rename my new created wallet folder to "default". Now the account is available (including the balance) when starting the client.

I'm trying to work up a list of questions about how wallets work together etc.  I've had similar issues.  I import from json, quit the client then my balance isn't there until I reimport from my backup.  It makes it that I do not want to do any transactions and thus vote because of my concerns.


Is there one database file per wallet ?
Can bitshares x client have more than one wallet open at one time ?
Briefly, what does it mean to import a wallet into your client? 
How does the new wallet interact with the previous one?  Are they merged?  Do you need to switch to the new wallet? 
What happens after the reboot/quitting of the client.  Which wallet is chosen as default ?

Maybe I can ask Dan during the dev hangout tomorrow but this sort of thing does't make compelling radio content.
I speak for myself and only myself.

Offline tm22

  • Newbie
  • *
  • Posts: 4
    • View Profile
Today I realized that my balance is gone after restarting the client.

When I try to reimport the wallet again I get the message: 20003 wallet_already_exists: wallet already exists

When I import the wallet again (with the same parameter) it works and the client shows my balance. But after restarting the client the balance is gone and I have to import the wallet twice again.

Do I have to do something like save the balance?

EDIT: Ok, once again I found the solution while testing. I had to rename my new created wallet folder to "default". Now the account is available (including the balance) when starting the client.
« Last Edit: July 31, 2014, 06:33:29 am by tm22 »

38PTSWarrior

  • Guest

Offline tm22

  • Newbie
  • *
  • Posts: 4
    • View Profile
Thanks. I think reached the next step.

Now the message is:
20015 password_too_short: password too short
Password too short!
    {"size":0}
    bitshares  wallet.cpp:1064 bts::wallet::wallet::create
Unable to create wallet 'my_walletname'
    {"wallet_name":"my_walletname"}
    bitshares  wallet.cpp:1077 bts::wallet::wallet::create

    {"filename":"c:/BTSXWA~1.JSO","wallet_name":"my_walletname"}
    bitshares  wallet.cpp:1241 bts::wallet::wallet::create_from_json

    {}
    bitshares  common_api_client.cpp:723 bts::rpc_stubs::common_api_client::wallet_create_from_json

    {"command":"wallet_create_from_json"}
    bitshares  cli.cpp:540 bts::cli::detail::cli_impl::execute_command

As the password I entered the one I used for the first wallet which I now try to import. It has more than 16 digits and it is definitely the one I used earlier.


EDIT: Found the solution here: http://wiki.bitshares.org/index.php/BitShares_X_Solutions#Importing_a_JSON_export_from_BitShares_X
You have to put the password in "". Now it worked.

Thanks again.
« Last Edit: July 30, 2014, 02:15:16 pm by tm22 »

Offline tm22

  • Newbie
  • *
  • Posts: 4
    • View Profile
Hi svk,

Thank you for your response.

I already tried this. Maybe I am doing something wrong.

When I first started the new installed client it asked me for a new password and a name for the new wallet.
Then I opened the console and entered: wallet_create_from_json c:\users\***\desktop\btsx_wallet.json Password where *** is my username.

I am getting this error message:

20019 file_not_found: file not found
Filename to import from could not be found!
    {"filename":"C:Users***Desktopbtsx_wallet.json"}
    bitshares  wallet.cpp:1223 bts::wallet::wallet::create_from_json

    {"filename":"C:Users***Desktopbtsx_wallet.json","wallet_name":"my_walletname"}
    bitshares  wallet.cpp:1241 bts::wallet::wallet::create_from_json

    {}
    bitshares  common_api_client.cpp:723 bts::rpc_stubs::common_api_client::wallet_create_from_json

    {"command":"wallet_create_from_json"}
    bitshares  cli.cpp:540 bts::cli::detail::cli_impl::execute_command

Any idea?




Offline svk

Hi,

You should be able to use the command "wallet_create_from_json":

Code: [Select]
Usage:
wallet_create_from_json <json_filename> <wallet_name> <imported_wallet_passphrase>
Creates a new wallet from an exported JSON file

Parameters:
  json_filename (filename, required): the full path and filename of JSON wallet to import
  wallet_name (wallet_name, required): name of the wallet to create
  imported_wallet_passphrase (passphrase, required): passphrase of the imported wallet

Returns:
  void
Worker: dev.bitsharesblocks

Offline tm22

  • Newbie
  • *
  • Posts: 4
    • View Profile
Hi,

I hope you can help me.

Today, I installed the BTSX-Client in an virtual machine running Windows 7 and imported my PTS-wallet. I got about 40k BTSX from the genesis-block.
Unfortunately the VM crashed and now I am getting an error when starting the client: "An error occured while trying to start."

Fortunately I created an export of the wallet as .json before this happened.

I reinstalled the client and now I am looking for a way to import that json-wallet.

Hope you can help me.

Thanks and best regards,
Toni