The most important commands in bitcoin-cli is subjective and depends on your specific needs and goals. However, here are some essential commands categorized by their function, along with brief explanations:
**Wallet Management:**
1. **getbalance:** Shows the balance of your wallet in different units (confirmed, unconfirmed, spendable).
2. **listunspent:** Lists all unspent outputs in your wallet, useful for creating transactions.
3. **gettransaction:** Retrieves a specific transaction by its ID, allowing you to examine details.
4. **sendtoaddress:** Sends bitcoins to a specified address from your wallet.
**Network and Blockchain:**
5. **getblockchaininfo:** Provides general information about the Bitcoin blockchain, including its height, difficulty, and estimated verification time.
6. **getblock:** Retrieves a specific block by its hash or height, offering detailed information about it.
7. **getrawmempool:** Lists all transactions currently in the mempool, waiting to be confirmed.
**Utility:**
8. **getinfo:** Displays general information about your Bitcoin Core node, including its version, uptime, and connection status.
9. **help:** Provides a list of all available commands and basic documentation.
10. **exit:** Closes the Bitcoin Core RPC console.
**Bonus:**
* **createrawtransaction:** Allows you to manually construct a transaction using inputs and outputs.
* **decoderawtransaction:** Decodes a raw transaction in hexadecimal format, providing human-readable details.
Remember, these are just a starting point. Bitcoin-cli offers a vast array of commands for advanced users, allowing you to control your wallet, interact with the network, and even debug node issues. It's crucial to understand each command's functionality and potential risks before using it to avoid mistakes.
For further exploration, refer to the official Bitcoin Core documentation (