The majority of bitmonerod RPC calls use the daemon's `json_rpc` interface to request various bits of information. These methods all follow a similar structure, for example:
Block header information can be retrieved using either a block's hash or height. This method includes a block's hash as an input parameter to retrieve basic information about the block.
Inputs:
**hash*- string; The block's sha256 hash.
Outputs:
**block_header*- A structure containing block header information. See [getlastblockheader](#getlastblockheader).
In this example, block 912345 is looked up by its hash:
Full block information can be retrieved by either block height or hash, like with the above block header calls. For full block information, both lookups use the same method, but with different input parameters.
Inputs (pick one of the following):
**height*- unsigned int; The block's height.
**hash*- string; The block's hash.
Outputs:
**blob*- string; Hexadecimal blob of block information.
**block_header*- A structure containing block header information. See [getlastblockheader](#getlastblockheader).
* *prev_id* - Same as `prev_hash` in block header.
* *nonce* - Same as in block header.
* *miner_tx* - Miner transaction information
* *version* - Transaction version number.
* *unlock_time* - The block height when the coinbase transaction becomes spendable.
* *vin* - List of transaction inputs:
**gen*- Miner txs are coinbase txs, or "gen".
* *height* - This block height, a.k.a. when the coinbase is generated.
* *vout* - List of transaction outputs. Each output contains:
**amount*- The amount of the output, in atomic units.
* *target* -
* *key* -
* *extra* - Usually called the "transaction ID" but can be used to include any random 32 byte/64 character hex string.
* *signatures* - Contain signatures of tx signers. Coinbased txs do not have signatures.
* *tx_hashes* - List of hashes of non-coinbase transactions in the block. If there are no other transactions, this will be an empty list.
**status*- string; General RPC error code. "OK" means everything looks good.
**Lookup by height:**
In the following example, block 912345 is looked up by its height. Note that block 912345 does not have any non-coinbase transactions. (See the next example for a block with extra transactions):
Look up information regarding hard fork voting and readiness.
Inputs:*None*.
Outputs:
**earliest_height*- unsigned int; Block height at which hard fork would be enabled if voted in.
**enabled*- boolean; Tells if hard fork is enforced.
* *state* - unsigned int; Current hard fork state:0 (There is likely a hard fork), 1 (An update is needed to fork properly), or 2 (Everything looks good).
**status*- string; General RPC error code. "OK" means everything looks good.
**threshold*- unsigned int; Minimum percent of votes to trigger hard fork. Default is 80.
**version*- unsigned int; The major block version for the fork.
**votes*- unsigned int; Number of votes towards hard fork.
**voting*- unsigned int; Hard fork voting status.
**window*- unsigned int; Number of blocks over which current votes are cast. Default is 10080 blocks.