btck::BlockHeader

Owning wrapper over a btck_BlockHeader.

Synopsis

Declared in <kernel/bitcoinkernel_wrapper.h>

class BlockHeader
    : public Handle<btck_BlockHeader, btck_block_header_copy, btck_block_header_destroy>
    , public BlockHeaderApi<BlockHeader>

Base Classes

NameDescription
Handle<btck_BlockHeader, btck_block_header_copy, btck_block_header_destroy>Owning RAII handle for a copyable C object of type CType.
BlockHeaderApi<BlockHeader>CRTP mixin adding block-header accessors shared by the view and owning types.

Member Functions

NameDescription
BlockHeader [constructor]Constructors
operator= Assignment operators
Bits Returns the compact difficulty target.
Hash Returns the hash of this header's block.
Nonce Returns the proof-of-work nonce.
PrevHash Returns the hash of the previous block.
Timestamp Returns the header timestamp.
ToBytes Serializes the header to its 80-byte form.
Version Returns the block version.
get Returns the owned C handle.

Protected Data Members

NameDescription
m_ptr The owned C handle.