mirror of
				https://github.com/ChristopherA/Learning-Bitcoin-from-the-Command-Line.git
				synced 2025-10-31 02:17:24 +00:00 
			
		
		
		
	0e: Get Help
This commit is contained in:
		
							parent
							
								
									f8d4730f69
								
							
						
					
					
						commit
						4166c4214f
					
				| @ -103,5 +103,150 @@ You shouldn't mess with most of these directories, particularly the blocks and c | ||||
| 
 | ||||
| ### Get Help | ||||
| 
 | ||||
| Most of your work will be done with the "bitcoin-cli" command. Need more help on it? Just use the help argument. Without any other arguments, it shows you ever possible command: | ||||
| ``` | ||||
| $ bitcoin-cli help | ||||
| == Blockchain == | ||||
| getbestblockhash | ||||
| getblock "hash" ( verbose ) | ||||
| getblockchaininfo | ||||
| getblockcount | ||||
| getblockhash index | ||||
| getblockheader "hash" ( verbose ) | ||||
| getchaintips | ||||
| getdifficulty | ||||
| getmempoolancestors txid (verbose) | ||||
| getmempooldescendants txid (verbose) | ||||
| getmempoolentry txid | ||||
| getmempoolinfo | ||||
| getrawmempool ( verbose ) | ||||
| gettxout "txid" n ( includemempool ) | ||||
| gettxoutproof ["txid",...] ( blockhash ) | ||||
| gettxoutsetinfo | ||||
| verifychain ( checklevel numblocks ) | ||||
| verifytxoutproof "proof" | ||||
| 
 | ||||
| == Control == | ||||
| getinfo | ||||
| help ( "command" ) | ||||
| stop | ||||
| 
 | ||||
| == Generating == | ||||
| generate numblocks ( maxtries ) | ||||
| generatetoaddress numblocks address (maxtries) | ||||
| 
 | ||||
| == Mining == | ||||
| getblocktemplate ( TemplateRequest ) | ||||
| getmininginfo | ||||
| getnetworkhashps ( blocks height ) | ||||
| prioritisetransaction <txid> <priority delta> <fee delta> | ||||
| submitblock "hexdata" ( "jsonparametersobject" ) | ||||
| 
 | ||||
| == Network == | ||||
| addnode "node" "add|remove|onetry" | ||||
| clearbanned | ||||
| disconnectnode "node"  | ||||
| getaddednodeinfo dummy ( "node" ) | ||||
| getconnectioncount | ||||
| getnettotals | ||||
| getnetworkinfo | ||||
| getpeerinfo | ||||
| listbanned | ||||
| ping | ||||
| setban "ip(/netmask)" "add|remove" (bantime) (absolute) | ||||
| 
 | ||||
| == Rawtransactions == | ||||
| createrawtransaction [{"txid":"id","vout":n},...] {"address":amount,"data":"hex",...} ( locktime ) | ||||
| decoderawtransaction "hexstring" | ||||
| decodescript "hex" | ||||
| fundrawtransaction "hexstring" ( options ) | ||||
| getrawtransaction "txid" ( verbose ) | ||||
| sendrawtransaction "hexstring" ( allowhighfees ) | ||||
| signrawtransaction "hexstring" ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] ["privatekey1",...] sighashtype ) | ||||
| 
 | ||||
| == Util == | ||||
| createmultisig nrequired ["key",...] | ||||
| estimatefee nblocks | ||||
| estimatepriority nblocks | ||||
| estimatesmartfee nblocks | ||||
| estimatesmartpriority nblocks | ||||
| signmessagewithprivkey "privkey" "message" | ||||
| validateaddress "bitcoinaddress" | ||||
| verifymessage "bitcoinaddress" "signature" "message" | ||||
| 
 | ||||
| == Wallet == | ||||
| abandontransaction "txid" | ||||
| addmultisigaddress nrequired ["key",...] ( "account" ) | ||||
| addwitnessaddress "address" | ||||
| backupwallet "destination" | ||||
| dumpprivkey "bitcoinaddress" | ||||
| dumpwallet "filename" | ||||
| encryptwallet "passphrase" | ||||
| getaccount "bitcoinaddress" | ||||
| getaccountaddress "account" | ||||
| getaddressesbyaccount "account" | ||||
| getbalance ( "account" minconf includeWatchonly ) | ||||
| getnewaddress ( "account" ) | ||||
| getrawchangeaddress | ||||
| getreceivedbyaccount "account" ( minconf ) | ||||
| getreceivedbyaddress "bitcoinaddress" ( minconf ) | ||||
| gettransaction "txid" ( includeWatchonly ) | ||||
| getunconfirmedbalance | ||||
| getwalletinfo | ||||
| importaddress "address" ( "label" rescan p2sh ) | ||||
| importprivkey "bitcoinprivkey" ( "label" rescan ) | ||||
| importprunedfunds | ||||
| importpubkey "pubkey" ( "label" rescan ) | ||||
| importwallet "filename" | ||||
| keypoolrefill ( newsize ) | ||||
| listaccounts ( minconf includeWatchonly) | ||||
| listaddressgroupings | ||||
| listlockunspent | ||||
| listreceivedbyaccount ( minconf includeempty includeWatchonly) | ||||
| listreceivedbyaddress ( minconf includeempty includeWatchonly) | ||||
| listsinceblock ( "blockhash" target-confirmations includeWatchonly) | ||||
| listtransactions ( "account" count from includeWatchonly) | ||||
| listunspent ( minconf maxconf  ["address",...] ) | ||||
| lockunspent unlock ([{"txid":"txid","vout":n},...]) | ||||
| move "fromaccount" "toaccount" amount ( minconf "comment" ) | ||||
| removeprunedfunds "txid" | ||||
| sendfrom "fromaccount" "tobitcoinaddress" amount ( minconf "comment" "comment-to" ) | ||||
| sendmany "fromaccount" {"address":amount,...} ( minconf "comment" ["address",...] ) | ||||
| sendtoaddress "bitcoinaddress" amount ( "comment" "comment-to" subtractfeefromamount ) | ||||
| setaccount "bitcoinaddress" "account" | ||||
| settxfee amount | ||||
| signmessage "bitcoinaddress" "message" | ||||
| ``` | ||||
| You can also type "bitcoin help [command]" to get even more extensive info on that command. For example: | ||||
| ``` | ||||
| $ bitcoin-cli help getinfo | ||||
| getinfo | ||||
| Returns an object containing various state info. | ||||
| 
 | ||||
| Result: | ||||
| { | ||||
|   "version": xxxxx,           (numeric) the server version | ||||
|   "protocolversion": xxxxx,   (numeric) the protocol version | ||||
|   "walletversion": xxxxx,     (numeric) the wallet version | ||||
|   "balance": xxxxxxx,         (numeric) the total bitcoin balance of the wallet | ||||
|   "blocks": xxxxxx,           (numeric) the current number of blocks processed in the server | ||||
|   "timeoffset": xxxxx,        (numeric) the time offset | ||||
|   "connections": xxxxx,       (numeric) the number of connections | ||||
|   "proxy": "host:port",     (string, optional) the proxy used by the server | ||||
|   "difficulty": xxxxxx,       (numeric) the current difficulty | ||||
|   "testnet": true|false,      (boolean) if the server is using testnet or not | ||||
|   "keypoololdest": xxxxxx,    (numeric) the timestamp (seconds since Unix epoch) of the oldest pre-generated key in the key pool | ||||
|   "keypoolsize": xxxx,        (numeric) how many new keys are pre-generated | ||||
|   "unlocked_until": ttt,      (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked | ||||
|   "paytxfee": x.xxxx,         (numeric) the transaction fee set in BTC/kB | ||||
|   "relayfee": x.xxxx,         (numeric) minimum relay fee for non-free transactions in BTC/kB | ||||
|   "errors": "..."           (string) any error messages | ||||
| } | ||||
| 
 | ||||
| Examples: | ||||
| > bitcoin-cli getinfo  | ||||
| > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ | ||||
| ``` | ||||
| 
 | ||||
| ## Part One: The State of the Chain and the Wallet | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user