Skip to content

Latest commit

 

History

History
224 lines (109 loc) · 5.19 KB

peculium_core_block_header.md

File metadata and controls

224 lines (109 loc) · 5.19 KB

Module peculium_core_block_header

Bitcoin Block Header Utilities. Copyright (c) 2013 Alexander Færøy

Authors: Alexander Færøy (ahf@0x90.dk).

Description

This module contains utilities for manipulating and using Block Header objects.

Data Types

Function Index

bits/1Returns the bits of a given block header.
block_work/1Returns the block work for the given block header.
difficulty/1Returns the difficulty for the given block header.
from_block/1Create Bitcoin Block Header from a given Block.
merkle_root/1Returns the root hash of the merkle tree of a given block header.
nonce/1Returns the nonce of a given block header.
previous/1Returns the hash of the previous block of a given block header.
timestamp/1Returns the timestamp of a given block header.
transaction_count/1Returns the transaction count (always 0) of a given block header.
version/1Returns the version of a given block header.

Function Details

bits/1


bits(BlockHeader::block_header()) -> uint32_t()



Returns the bits of a given block header.

block_work/1


block_work(BlockHeader::block_header()) -> number()



Returns the block work for the given block header.

difficulty/1


difficulty(BlockHeader::block_header()) -> number()



Returns the difficulty for the given block header.

from_block/1


from_block(Block::block()) -> block_header()



Create Bitcoin Block Header from a given Block.

merkle_root/1


merkle_root(BlockHeader::block_header()) -> hash()



Returns the root hash of the merkle tree of a given block header.

nonce/1


nonce(Blockheader::block_header()) -> uint32_t()



Returns the nonce of a given block header.

previous/1


previous(BlockHeader::block_header()) -> hash()



Returns the hash of the previous block of a given block header.

timestamp/1


timestamp(BlockHeader::block_header()) -> uint32_t()



Returns the timestamp of a given block header.

transaction_count/1


transaction_count(BlockHeader::block_header()) -> uint8_t()



Returns the transaction count (always 0) of a given block header.

version/1


version(BlockHeader::block_header()) -> uint32_t()



Returns the version of a given block header.