The configuration files
The configration files are in a directory named .smartbtc in the home directory of the user.There are 2 types of configurationfiless:
- one global configuration file: global.conf
- one for every bitcoinaddress.
The global.conf
The configurationfile global.conf consists of 2 types of lines: – comments, beginning with #
or:
– <keyword>=<value>
Keywords (case sensitive) are:
– Transactionfee
– Provider-Url
– SendTx-Url
– MaxUnspentLines
– BTCtransactionsDir
Example:
# global configurationfile for SmartBtc
#
# how many miliBTC we want to pay as a fee for a simple transaction
# for a complex transaction (with more inputs) it will be 2..3 times higher
Transactionfee=0.1
#
# the Provider URL
# the url where to get the unspent info for the test- and main-network
Provider-Url-Testnet=http://tbtc.blockr.io/api/v1/address/unspent/
Provider-Url-Mainnet=http://blockr.io/api/v1/address/unspent/
#
# the Transaction URL
# the url where to push the transaction for the test- and main- network
SendTx-Url-Testnet=http://tbtc.blockr.io/api/v1/tx/push
SendTx-Url-Mainnet=http://blockr.io/api/v1/tx/push
# SendTx-Url-Testnet=http://test.webbtc.com/relay_tx.json
# SendTx-Url-Mainnet=http://webbtc.com/relay_tx.json
# How many unspent lines on display
MaxUnspentLines = 5
# The directotyname for the transactionfiles (base is homedir)
BTCtransactionsDir = Bitcointransactions
The configuration files (one per key)
The configurationfile consists of 2 types of lines:
– comments, beginning with #
or:
– <keyword>=<value>
Keywords (case sensitive) are:
– Public-key
– Bitcoinadress
– Network
– Key-ID
Example:
# configurationfile for SmartBtc
#
# Public-key: belongs to the ECC private key
Public-key=0454b0420321eabd49c0bab923c0d25a0a8347b8763387f1151e7f14b505519a1fd88df8301603ad8890ae1df5928f7a5de12dac31ea7c21887eeef588aebe0be0
# your bitcoinaddress for the test- or main-bitcoinnetwork
Bitcoinaddress=mjekJXJHCi8BtPmsVeaN8do5jSmbsJ74Eb
# netwok: testnet or mainnet?
Network=testnet
# key-id, find this with 'pkcs15-tool -D'.
# Should point to the private ECC key on your smartcard
Key-ID=21
The configuration filename should have ending .conf:
<config-id>.conf
When starting the programm, it asks for the config-id, that is the filename without the ending .conf. You can name the config-ids like your corresponding key-names, e.g. EC0, EC1 etc., the corresponding config filenames should be EC0.conf, EC1.conf, etc.
The smartbtc.py programm
Navigate to Smartbtc Programm, cut & paste the python code in your favorite editor, look if you have everything from "#!/usr/bin/env python3" till "root.mainloop()". If everything is OK, save it as smartbtc.py and make it executable with the commandline "chmod u+x smartbtc.py". You get debugging information in the terminal window if you set "debug = 1" in the sourcecode ("debug = 0" will suppress it).
To start get some (free) bitcoins from Testnet for your generated testnet Bitcoinaddres. You can get Testnet Bitcoins for free from a Bitcoin Faucet. Search for "Testnet bitcoin faucet" to find one or look at: en.bitcoin.it/wiki/Testnet#Faucets. If you start smartbtc.py after you got the unspents from the faucet (on the same address that is is also in the config-file) you should see them in the unspent list! Now you can generate another key with bitcoin address, and make -signed- transactions from one to the other address. And so on...