snippetbashTip
bitcoin-cli — Client to interact with the Bitcoin Core daemon via RPC calls. Uses the configuration defined in `bi
Viewed 0 times
thebitcoin-clicommandclientinteractcliwithbitcoin
Problem
How to use the
bitcoin-cli command: Client to interact with the Bitcoin Core daemon via RPC calls. Uses the configuration defined in bitcoin.conf. More information: <https://en.bitcoin.it/wiki/Running_Bitcoin#Command-line_arguments>.Solution
bitcoin-cli — Client to interact with the Bitcoin Core daemon via RPC calls. Uses the configuration defined in bitcoin.conf. More information: <https://en.bitcoin.it/wiki/Running_Bitcoin#Command-line_arguments>.Send a transaction to a given address:
bitcoin-cli sendtoaddress "{{address}}" {{amount}}Generate one or more blocks:
bitcoin-cli generate {{num_blocks}}Print high-level information about the wallet:
bitcoin-cli getwalletinfoList all outputs from previous transactions available to fund outgoing transactions:
bitcoin-cli listunspentExport the wallet information to a text file:
bitcoin-cli dumpwallet "{{path/to/file}}"Get blockchain information:
bitcoin-cli getblockchaininfoGet network information:
bitcoin-cli getnetworkinfoStop the Bitcoin Core daemon:
bitcoin-cli stopCode Snippets
Send a transaction to a given address
bitcoin-cli sendtoaddress "{{address}}" {{amount}}Generate one or more blocks
bitcoin-cli generate {{num_blocks}}Print high-level information about the wallet
bitcoin-cli getwalletinfoList all outputs from previous transactions available to fund outgoing transactions
bitcoin-cli listunspentExport the wallet information to a text file
bitcoin-cli dumpwallet "{{path/to/file}}"Context
tldr-pages: common/bitcoin-cli
Revisions (0)
No revisions yet.