BlockHeader

data class BlockHeader(    val version: Long,     val hashPreviousBlock: ByteVector32,     val hashMerkleRoot: ByteVector32,     val time: Long,     val bits: Long,     val nonce: Long) : BtcSerializable<BlockHeader>

Parameters

version

Block version information, based upon the software version creating this block

hashPreviousBlock

The hash value of the previous block this particular block references. Please note that this hash is not reversed (as opposed to Block.hash)

hashMerkleRoot

The reference to a Merkle tree collection which is a hash of all transactions related to this block

time

A timestamp recording when this block was created (Will overflow in 21062)

bits

The calculated difficulty target being used for this block

nonce

The nonce used to generate this block… to allow variations of the header and compute different hashes

Constructors

Link copied to clipboard
fun BlockHeader(    version: Long,     hashPreviousBlock: ByteVector32,     hashMerkleRoot: ByteVector32,     time: Long,     bits: Long,     nonce: Long)

Types

Link copied to clipboard
object Companion : BtcSerializer<BlockHeader>

Functions

Link copied to clipboard
open override fun serializer(): BtcSerializer<BlockHeader>
Link copied to clipboard
fun setBits(input: Long): BlockHeader
Link copied to clipboard
fun setHashMerkleRoot(input: ByteVector32): BlockHeader
Link copied to clipboard
fun setHashPreviousBlock(input: ByteVector32): BlockHeader
Link copied to clipboard
fun setNonce(input: Long): BlockHeader
Link copied to clipboard
fun setTime(input: Long): BlockHeader
Link copied to clipboard
fun setVersion(input: Long): BlockHeader

Properties

Link copied to clipboard
val bits: Long
Link copied to clipboard
val blockId: ByteVector32
Link copied to clipboard
val hash: ByteVector32
Link copied to clipboard
val hashMerkleRoot: ByteVector32
Link copied to clipboard
val hashPreviousBlock: ByteVector32
Link copied to clipboard
val nonce: Long
Link copied to clipboard
val time: Long
Link copied to clipboard
val version: Long