-
Notifications
You must be signed in to change notification settings - Fork 189
bx fetch header
evoskuil edited this page Oct 18, 2014
·
22 revisions
Get the block header from the specified hash or height. Height is ignored if both are specified.
$ bx fetch-header [-h] [--config VALUE] [--format VALUE] [--hash
VALUE] [--height VALUE] Info: Get the block header from the specified hash or height. Height is
ignored if both are specified. Requires an Obelisk server connection.
Options (named):
-c [--config] The path to the configuration settings file.
-f [--format] The output format. Options are 'json', 'xml', 'info'
or 'native', defaults to native.
-h [--help] Get a description and instructions for this command.
-s [--hash] The Base16 block hash.
-t [--height] The block height.
--height 0
$ bx fetch-headerheader
{
bits 486604799
hash 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
merkle_tree_hash 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
nonce 2083236893
previous_block_hash 0000000000000000000000000000000000000000000000000000000000000000
time_stamp 1231006505
version 1
}--height 1
$ bx fetch-header -t 1header
{
bits 486604799
hash 00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048
merkle_tree_hash 0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098
nonce 2573394689
previous_block_hash 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
time_stamp 1231469665
version 1
}--hash [genesis block]
$ bx fetch-header -s 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26fheader
{
bits 486604799
hash 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
merkle_tree_hash 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
nonce 2083236893
previous_block_hash 0000000000000000000000000000000000000000000000000000000000000000
time_stamp 1231006505
version 1
}--height 1 --hash [genesis block]
$ bx fetch-header -t 1 -s 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26fheader
{
bits 486604799
hash 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
merkle_tree_hash 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
nonce 2083236893
previous_block_hash 0000000000000000000000000000000000000000000000000000000000000000
time_stamp 1231006505
version 1
}The genesis block is height 0. Notice that when both hash and height are specified height is ignored.
Users | Developers | License | Copyright © 2011-2024 libbitcoin developers
- Home
- Build BX
- General Information
- Developer Information
- Configuration Settings
- Tutorials
- Meta Commands
- Wallet Commands
- Key Encryption Commands
- Stealth Commands
- Messaging Commands
- Transaction Commands
- Online Commands
- Encoding Commands
- Hash Commands
- Math Commands