Experimenting further with bitcoin-cli
As we've seen so far, bitcoin-cli is a powerful and feature-rich command-line interface available with the Bitcoin Core client and can be used to perform various functions using the RPC interface provided by the Bitcoin Core client.
We will now see how to send Bitcoin to an address using the command line. For this, we will use the Bitcoin command-line interface on the Bitcoin regtest:
- Generate a new address using the following command:
bitcoin-cli -regtest getnewaddress 2NC31WFFRwRkwd3S4TpyjN5GGDY7E63GSVd
- Send 20 BTC to the newly generated address:
bitcoin-cli -regtest sendtoaddress \ 2NC31WFFRwRkwd3S4TpyjN5GGDY7E63GSVd 20.00
- We can now generate a few more blocks to get some confirmation for this: