Class Header

  • All Implemented Interfaces:

    public final class Header
    
                        

    Bitcoin block header. Contains all the block’s information except the actual transactions, but including a root of a merkle tree committing to all transactions in the block.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Integer getVersion() Block version, now repurposed for soft fork signalling.
      final Unit setVersion(Integer version) Block version, now repurposed for soft fork signalling.
      final String getPrevBlockhash() Reference to the previous block in the chain.
      final Unit setPrevBlockhash(String prevBlockhash) Reference to the previous block in the chain.
      final String getMerkleRoot() The root hash of the merkle tree of transactions in the block.
      final Unit setMerkleRoot(String merkleRoot) The root hash of the merkle tree of transactions in the block.
      final UInt getTime() The timestamp of the block, as claimed by the miner.
      final Unit setTime(UInt time) The timestamp of the block, as claimed by the miner.
      final UInt getBits() The target value below which the blockhash must lie.
      final Unit setBits(UInt bits) The target value below which the blockhash must lie.
      final UInt getNonce() The nonce, selected to obtain a low enough blockhash.
      final Unit setNonce(UInt nonce) The nonce, selected to obtain a low enough blockhash.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getVersion

         final Integer getVersion()

        Block version, now repurposed for soft fork signalling.

      • setVersion

         final Unit setVersion(Integer version)

        Block version, now repurposed for soft fork signalling.

      • getMerkleRoot

         final String getMerkleRoot()

        The root hash of the merkle tree of transactions in the block.

      • setMerkleRoot

         final Unit setMerkleRoot(String merkleRoot)

        The root hash of the merkle tree of transactions in the block.

      • getTime

         final UInt getTime()

        The timestamp of the block, as claimed by the miner.

      • setTime

         final Unit setTime(UInt time)

        The timestamp of the block, as claimed by the miner.

      • getBits

         final UInt getBits()

        The target value below which the blockhash must lie.

      • setBits

         final Unit setBits(UInt bits)

        The target value below which the blockhash must lie.

      • getNonce

         final UInt getNonce()

        The nonce, selected to obtain a low enough blockhash.

      • setNonce

         final Unit setNonce(UInt nonce)

        The nonce, selected to obtain a low enough blockhash.