btck::BlockHeaderView

Non-owning view over a btck_BlockHeader.

Synopsis

Declared in <kernel/bitcoinkernel_wrapper.h>

class BlockHeaderView
    : public View<btck_BlockHeader>
    , public BlockHeaderApi<BlockHeaderView>

Base Classes

NameDescription
View<btck_BlockHeader>Non-owning view over a const C handle of type CType.
BlockHeaderApi<BlockHeaderView>CRTP mixin adding block-header accessors shared by the view and owning types.

Member Functions

NameDescription
BlockHeaderView [constructor]Constructs a view over ptr.
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 borrowed C handle.

Protected Data Members

NameDescription
m_ptr The borrowed C handle.