How does it work?
Bitcoin Core includes a ton of functionality that is not shown to the user in the GUI, this functionality must be accessed by using the command line aka CLI, doing so can be quite tedious where tiny typos will return errors. Fully Noded does the hard work of issuing the CLI commands to your node in a programmatic and reliable way powered by the taps you make on your iPhone. The purpose of Fully Noded is to allow users a secure and private way to connect to and control their node, unlocking all the powerful features Bitcoin Core has to offer without needing to use CLI.
Fully Noded needs to connect to the computer that your node is running on in order to issue commands to your node. It does this using Tor.
Connecting to your nodes computer is the first part, once connected Fully Noded then needs to be able to issue RPC commands to your node. It issues these commands to your local host over curl. In order to be able to do that Fully Noded needs to know your RPC credentials, rpcusername
and rpcpassword
.
Once Fully Noded is connected it will start issuing commands one at a time, here are some from the home table:
curl --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listwallets", "params":[] }' -H 'content-type: text/plain;' http://user:password@nwfwjfwjbefiu.onion:18443/
curl --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbalance", "params":["*", 0, false] }' -H 'content-type: text/plain;' http://user:password@wfwjfwjbefiu.onion:18443/
curl --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listtransactions", "params":["*", 50, 0, true] }' -H 'content-type: text/plain;' http://user:password@wfwjfwjbefiu.onion:18443/
The method
is a bitcoin-cli
command and you can use this great resource to dive deeper into what they all do.
This is the code in Fully Noded from the Node Logic class which issues the above commands, if you look at it you will see a lot of commands that look like this:
reducer.makeCommand(command: .listunspent, param: "0", completion: getResult)
The .listunspent
directly represents the bitcoin-cli
commands we linked to just above and the params
represent the options you can pass with those commands. You can get the same functionality copying and pasting these commands into a terminal or using the Bitcoin-Qt console.