Skip to main content

getbestblockhash

Command#

pacprotocol-cli getbestblockhash

Returns the hash of the best (tip) block in the longest blockchain.

Examples#

pacprotocol-cli getbestblockhash
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbestblockhash", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:1111/

Result#

"hex" #(string) the block hash hex encoded

Running following help command

pacprotocol-cli help getbestblockhash

Will produce following output:

getbestblockhash
Returns the hash of the best (tip) block in the longest blockchain.
Result:
"hex" (string) the block hash hex encoded
Examples:
> pacprotocol-cli getbestblockhash
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbestblockhash", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:1111/