比特币(Bitcoin) RPC Wallet API中getwalletinfo的用法及代码示例。
用法:
getwalletinfo
返回一个包含各种钱包状态信息的对象。
返回结果
{
"walletname": xxxxx, (string) the wallet name
"walletversion": xxxxx, (numeric) the wallet version
"balance": xxxxxxx, (numeric) the total confirmed balance of the wallet in BTC
"unconfirmed_balance": xxx, (numeric) the total unconfirmed balance of the wallet in BTC
"immature_balance": xxxxxx, (numeric) the total immature balance of the wallet in BTC
"txcount": xxxxxxx, (numeric) the total number of transactions in the wallet
"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 (only counts external keys)
"keypoolsize_hd_internal": xxxx, (numeric) how many new keys are pre-generated for internal use (used for change outputs, only appears if the wallet is using this feature, otherwise external keys are used)
"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 configuration, set in BTC/kB
"hdseedid": "<hash160>" (string, optional) the Hash160 of the HD seed (only present when HD is enabled)
"private_keys_enabled": true|false (boolean) false if privatekeys are disabled for this wallet (enforced watch-only wallet)
}
示例
bitcoin-cli getwalletinfo
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getwalletinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
相关用法
- Bitcoin abandontransaction用法及代码示例
- Bitcoin abortrescan用法及代码示例
- Bitcoin addmultisigaddress用法及代码示例
- Bitcoin backupwallet用法及代码示例
- Bitcoin bumpfee用法及代码示例
- Bitcoin createwallet用法及代码示例
- Bitcoin dumpprivkey用法及代码示例
- Bitcoin dumpwallet用法及代码示例
- Bitcoin encryptwallet用法及代码示例
- Bitcoin getaddressesbylabel用法及代码示例
- Bitcoin getaddressinfo用法及代码示例
- Bitcoin getbalance用法及代码示例
- Bitcoin getnewaddress用法及代码示例
- Bitcoin getrawchangeaddress用法及代码示例
- Bitcoin getreceivedbyaddress用法及代码示例
- Bitcoin getreceivedbylabel用法及代码示例
- Bitcoin gettransaction用法及代码示例
- Bitcoin importaddress用法及代码示例
- Bitcoin importmulti用法及代码示例
- Bitcoin importprivkey用法及代码示例
- Bitcoin importpubkey用法及代码示例
- Bitcoin importwallet用法及代码示例
- Bitcoin keypoolrefill用法及代码示例
- Bitcoin listaddressgroupings用法及代码示例
- Bitcoin listlabels用法及代码示例
注:本文由纯净天空筛选整理自bitcoin.org大神的英文原创作品 Bitcoin getwalletinfo。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。