Hello dear readers. This post will let you breafly understand what is Bitcoin Core and how to use it via RPC. So let’s get started.
It is the basic block validator, your personal, completley anonimous bitcoin wallet and network node in the Bitcoin network. Whith bitcoin core you can simply:
– Receive bitcoins
– Send bitcoins
– Store bitcoins
– Help bitcoin running
– Verify bitcoin transactions
Bitcoin Core comes with GUI (a graphical user interface, also called bitcoin-qt) and a command line interface (daemon). If you install the graphic interface in Windows, Linux or MacOS you have to make additional settings to work with the command line and automate some of the Bitcoin Core processes. All you have to do is:
Configuring Bitcoin Core for RPC access
1. Open the configuration file. Normally it is present in the main directory of your Bitcoin installation and it’s called bitcoin.conf
2. In the bitcoin.conf you have to add the following lines:
rpcuser=(your_user_name)
rpcpassword=(your_plane_password)
server=1
rpcuser – this is the user, whit who you will access the cli (the deamon)
rpcpassword – this is the password whit who you will access the cli (the deamon)
server=1 – this is telling the program to start as server and activate the RPC interface
Done. Now you have to restart your bitcoin-QT
Connect to Bitcoin Core with RPC
Now we have to test our setup, find the bitcoin-cli program, notmally you can find it in /Bitcoin/daemon/ folder and type:
bitcoin-cli -rpcuser=(username) -rpcpassword=(password) getbalance
The core program has to return something like this:
10.00009888
I wish you so! :))
Thanks for reading! If you have some questions, ask below!
If you find this post helpful, please leave a comment! Thanks 🙂