pub struct GetBlockHeaderVerbose {Show 15 fields
pub hash: String,
pub confirmations: i64,
pub height: i64,
pub version: i32,
pub version_hex: String,
pub merkle_root: String,
pub time: i64,
pub median_time: i64,
pub nonce: i64,
pub bits: String,
pub difficulty: f64,
pub chain_work: String,
pub n_tx: u32,
pub previous_block_hash: Option<String>,
pub next_block_hash: Option<String>,
}Expand description
Result of JSON-RPC method getblockheader with verbosity set to true.
If verbose is false, returns a string that is serialized, hex-encoded data for blockheader ‘hash’. If verbose is true, returns an Object with information about blockheader
<hash>.Arguments:
- “hash” (string, required) The block hash
- verbose (boolean, optional, default=true) true for a json object, false for the hex encoded data
Fields§
§hash: StringThe block hash (same as provided).
confirmations: i64The number of confirmations, or -1 if the block is not on the main chain.
height: i64The block height or index.
version: i32The block version.
version_hex: StringThe block version formatted in hexadecimal.
merkle_root: StringThe merkle root.
time: i64The block time in seconds since epoch (Jan 1 1970 GMT).
median_time: i64The median block time in seconds since epoch (Jan 1 1970 GMT).
nonce: i64The nonce.
bits: StringThe bits.
difficulty: f64The difficulty.
chain_work: StringExpected number of hashes required to produce the current chain (in hex).
n_tx: u32The number of transactions in the block.
previous_block_hash: Option<String>The hash of the previous block (if available).
next_block_hash: Option<String>The hash of the next block (if available).
Implementations§
Source§impl GetBlockHeaderVerbose
impl GetBlockHeaderVerbose
Sourcepub fn into_model(
self,
) -> Result<GetBlockHeaderVerbose, GetBlockHeaderVerboseError>
pub fn into_model( self, ) -> Result<GetBlockHeaderVerbose, GetBlockHeaderVerboseError>
Converts version specific type to a version in-specific, more strongly typed type.
Sourcepub fn block_header(self) -> Result<Header, HexToArrayError>
pub fn block_header(self) -> Result<Header, HexToArrayError>
Converts json straight to a bitcoin::BlockHeader.
Trait Implementations§
Source§impl Clone for GetBlockHeaderVerbose
impl Clone for GetBlockHeaderVerbose
Source§fn clone(&self) -> GetBlockHeaderVerbose
fn clone(&self) -> GetBlockHeaderVerbose
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more