关于比特币系列钱包的bitcoin-cli 命令全集。
Note
在使用bitcoin-cli命令时,钱包不在默认路径需要使用绝对路径配置
1 | ./bitcoin-cli --datadir=/www/bitcoin/data/ |
查看钱包支持的命令
./bitcoind help
A、一般性的命令
1 | stop |
B、钱包、账户、地址、转帐、发消息
1 | getwalletinfo |
1 | listaccounts ( minconf ) |
1 | getbalance ( "account" minconf ) |
1 | getrawchangeaddress |
1 | signmessage "bitcoinaddress" "message" |
C、Tx、Block、Ming
1 | createrawtransaction [{"txid":"id","vout":n},...] {"address":amount,...} |
1 | gettransaction "txid" |
1 | getrawmempool ( verbose ) |
1 | getblockchaininfo |
1 | getmininginfo |
1 | getgenerate |
bulwark-cli命令
== Blockchain ==
getbestblockhash
getblock “hash” ( verbose )
getblockchaininfo
getblockcount
getblockhash index
getblockheader “hash” ( verbose )
getchaintips
getdifficulty
getmempoolinfo
getrawmempool ( verbose )
gettxout “txid” n ( includemempool )
gettxoutsetinfo
verifychain ( checklevel numblocks )
== Bulwark ==
checkbudgets
createmasternodekey
getbudgetinfo ( “proposal” )
getbudgetprojection
getbudgetvotes “proposal-name”
getmasternodecount
getmasternodeoutputs
getmasternodescores ( blocks )
getmasternodestatus
getmasternodewinners ( blocks “filter” )
getnextsuperblock
getpoolinfo
listmasternodeconf ( “filter” )
listmasternodes ( “filter” )
masternode “command”…
masternodeconnect “address”
masternodecurrent
masternodedebug
mnbudget “command”… ( “passphrase” )
mnbudgetrawvote “masternode-tx-hash” masternode-tx-index “proposal-hash” yes|no time “vote-sig”
mnbudgetvote “local|many|alias” “votehash” “yes|no” ( “alias” )
mnfinalbudget “command”… ( “passphrase” )
mnsync “status|reset”
obfuscation
preparebudget “proposal-name” “url” payment-count block-start “bulwark-address” monthy-payment
spork
startmasternode “local|all|many|missing|disabled|alias” lockwallet ( “alias” )
submitbudget “proposal-name” “url” payment-count block-start “bulwark-address” monthy-payment “fee-tx”
== Control ==
getinfo
help ( “command” )
stop
== Generating ==
getgenerate
gethashespersec
setgenerate generate ( genproclimit )
== Mining ==
getblocktemplate ( “jsonrequestobject” )
getmininginfo
getnetworkhashps ( blocks height )
prioritisetransaction
reservebalance ( reserve amount )
submitblock “hexdata” ( “jsonparametersobject” )
== Network ==
addnode “node” “add|remove|onetry”
clearbanned
getaddednodeinfo dns ( “node” )
getconnectioncount
getnettotals
getnetworkinfo
getpeerinfo
listbanned
ping
setban “ip(/netmask)” “add|remove” (bantime) (absolute)
== Rawtransactions ==
createrawtransaction [{“txid”:”id”,”vout”:n},…] {“address”:amount,…}
decoderawtransaction “hexstring”
decodescript “hex”
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
validateaddress “bulwarkaddress”
verifymessage “bulwarkaddress” “signature” “message”
== Wallet ==
addmultisigaddress nrequired [“key”,…] ( “account” )
autocombinerewards true|false ( threshold )
backupwallet “destination”
bip38decrypt “bulwarkaddress”
bip38encrypt “bulwarkaddress”
dumpprivkey “bulwarkaddress”
dumpwallet “filename”
getaccount “bulwarkaddress”
getaccountaddress “account”
getaddressesbyaccount “account”
getbalance ( “account” minconf includeWatchonly )
getnewaddress ( “account” )
getrawchangeaddress
getreceivedbyaccount “account” ( minconf )
getreceivedbyaddress “bulwarkaddress” ( minconf )
getstakesplitthreshold
getstakingstatus
gettransaction “txid” ( includeWatchonly )
getunconfirmedbalance
getwalletinfo
importaddress “address” ( “label” rescan )
importprivkey “bulwarkprivkey” ( “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” )
multisend
sendfrom “fromaccount” “tobulwarkaddress” amount ( minconf “comment” “comment-to” )
sendmany “fromaccount” {“address”:amount,…} ( minconf “comment” )
sendtoaddress “bulwarkaddress” amount ( “comment” “comment-to” )
sendtoaddressix “bulwarkaddress” amount ( “comment” “comment-to” )
setaccount “bulwarkaddress” “account”
setstakesplitthreshold value
settxfee amount
signmessage “bulwarkaddress” “message”
walletlock
walletpassphrase “passphrase” timeout ( anonymizeonly )
其中第一个参数yourpassword为之前设定的密码;第二个可变参数为需要解锁的时间,单位是秒。最后一个参数true表示只解锁挖矿功能,用该命令解锁后,钱包可以正常挖矿,但其他资金安全相关操作仍被禁止,只有完全解锁后才能使用。
walletpassphrasechange “oldpassphrase” “newpassphrase”