NebulousLabs/Sia — pull request #181 by JoshVorick (2014-07-26 23:34:23+00:00)
Title: Client

This PR splits the cli into two sections. In the first you can connect, create wallets, list wallets, save your current wallets as "walletID.id" (e.g. "a31e9f68b.id"), and 'enter' a wallet. Entering a wallet takes you to the second state where you can perform wallet-specific actions like uploading or transferring funds.

Config File
Structure:

directories:
ID/
ids/
absolute/paths/also/work/

wallet:
52f8c106

For now, the .config file must be stored in the directory you run client-cli from. "wallet:" is optional, but if you have it, you need the blank line. Also, all white space besides '\n' is ignored. The client loads all files "*.id" from the directories in .config (if they're not absolute, it appends the path to the current filepath). Then, if the user wants, they can opt to automatically load into a certain wallet (in this case 52f8c106).

For now pressing 's' to save wallets doesn't do any checking at all to see if the file is already saved. It also saves the files to your current directory. Unless you have the absolute path to your current directory in .config, these saved wallets won't get loaded the next time you run load the client.