Open ghost opened 8 years ago
This is great! We should script this as well and also put the example code inside this repository. That way when we clone and install the fullnode, everything is there for the user.
More example scripts can be found in https://github.com/OpenProvenance/python-bitcoinlib-scripting so if we could script the installation of the python-bitcoinlibs then the repo could also be cloned
Getting Started - Bitcoin Fullnode and Python Programming
OK so you have your #fullnode but now what? You want to be able to program with it of course.
You can use the Bitcoin RPC directly however it can be a bit slow on the Rasberry Pi 2 (http://bitcoinupdates.net/bitcoin-cli-very-slow-to-respond-to-rpc-calls-raspberry-pi/) but with some additional libraries interfacing with bitcoin becomes faster and quite simple.
Step 1
Assuming you have complied and installed bitcoin, use the following commands to download and install the latest python-bitcoinlib from Peter Todds repository on Github
git clone https://github.com/petertodd/python-bitcoinlib
Then run the following commands as root to install
cd python-bitcoinlib
python setup.py build
python setup.py install
Congratulatons, you are now able to interface with the bitcoin RPC at higher speed, using the simple commands from this python library.
Here are two very basic example scripts you are able to run on your #fullnode
balance.py
send.py