Gocoin‎ > ‎User Manual‎ > ‎

Setup wallet

Run wallet -h to see all available command line switches.

Setup your seed

Wallet is deterministic and the only thing you need to set it up is the seed password.
As long as you remember the password, you do not need to backup the wallet ever.
You can either enter this password each time when running the wallet, or you can store it in a file called .secret and never be asked to enter it again.

You do not need to use a memorable password. Instead you can create a random secret seed, e.g. using a command like this:
    cat /dev/urandom | tr -cd a-zA-Z0-9 | head -c 43 > .secret
Note: using a password that you cannot memorize, make sure to have a backup of your .secret file. 

Export public addresses

After you setup your wallet in a secured environment, you should export its public addresses.
In order to do this, just run wallet -l and your wallet's public addresses will be written to wallet.txt.

Security precautions

Make sure that the disk with .secret file is encrypted.

Keep in mind that .secret should not contain any non-printable characters, nor new line characters, because they count while calculating the seed.
Since you do not see such characters on screen, you may have problems re-creating the same file after you would loose it.

The seed password is the key to your entire wallet and the function used to calculate it is double SHA256, which is pretty easy to compute.
That is why it is very important for you to make sure that the password you're choosing will be resistant to brute force and dictionary attacks.

Are brain wallets less secure from those based on a random number generator?
It is debatable.
There are people claiming that brain wallets aren't secure because brains cannot possibly be a good source of entropy.
If you have such a brain, make sure to consider this risk (e.g. use a random generator to create the content of the .secret file).
Otherwise coming out with a memorable though uncrackable seed, gives you a more secured solution, because you get rid of backups which are a week point of any wallet's security

Importing other private keys

You can import keys from your existing bitcoin wallet, as well as keys generated by other tools (all kind of key/address generators).

The key that you want to import must be in base58 encoded format, which looks somehow like 5KJvsngHeMpm884wtkJNzQGaCErckhHJBGFsvd3VyK5qMZXj3hS. To export a private key from the official bitcoin wallet use dumprivkey RPC command. To import such a key into your Gocoin wallet, just store the base58 encoded value in a text file named .others (each key must be in a separate line). You can also place a key's label in each line, after a space.

The imported keys will extend the key pool of the deterministic ones (that come from your password-seed). After Importing each new key, you should redo wallet -l to get an updated wallet.txt for your client.

Optional: setup your node with the wallet file

Having wallet.txt file generated at the wallet machine, take this file to your client's PC and place it in the folder where it looks for wallet files (i.e. ~/.bitcoin/gocoin/btcnet/wallet/).

It is advised to rename your wallet.txt to DEFAULT - this will be the wallet that is always loaded at start up.

Multiple wallets

In the node's wallet folder you can have multiple text files that contain public addresses from different wallets.
You can quickly switch between the wallets, using WebUI's Wallets tab.
The tab allows you to also edit your wallets, as well as to create new ones.

Note: the node allows you to include a content of one wallet into another (use @filename in place of a public address).