Class NemesisBlockHeaderBuilder

    • Constructor Detail

      • NemesisBlockHeaderBuilder

        protected NemesisBlockHeaderBuilder​(java.io.DataInputStream stream)
        Constructor - Creates an object from stream.
        Parameters:
        stream - Byte stream to use to serialize the object.
      • NemesisBlockHeaderBuilder

        protected NemesisBlockHeaderBuilder​(SignatureDto signature,
                                            KeyDto signerPublicKey,
                                            byte version,
                                            NetworkTypeDto network,
                                            EntityTypeDto type,
                                            HeightDto height,
                                            TimestampDto timestamp,
                                            DifficultyDto difficulty,
                                            VrfProofBuilder generationHashProof,
                                            Hash256Dto previousBlockHash,
                                            Hash256Dto transactionsHash,
                                            Hash256Dto receiptsHash,
                                            Hash256Dto stateHash,
                                            AddressDto beneficiaryAddress,
                                            BlockFeeMultiplierDto feeMultiplier,
                                            int votingEligibleAccountsCount,
                                            long harvestingEligibleAccountsCount,
                                            AmountDto totalVotingBalance,
                                            Hash256Dto previousImportanceBlockHash)
        Constructor.
        Parameters:
        signature - Entity signature.
        signerPublicKey - Entity signer's public key.
        version - Entity version.
        network - Entity network.
        type - Entity type.
        height - Block height.
        timestamp - Number of milliseconds elapsed since creation of nemesis block.
        difficulty - Block difficulty.
        generationHashProof - Generation hash proof.
        previousBlockHash - Previous block hash.
        transactionsHash - Hash of the transactions in this block.
        receiptsHash - Hash of the receipts generated by this block.
        stateHash - Hash of the global chain state at this block.
        beneficiaryAddress - Beneficiary address designated by harvester.
        feeMultiplier - Fee multiplier applied to block transactions.
        votingEligibleAccountsCount - Number of voting eligible accounts.
        harvestingEligibleAccountsCount - Number of harvesting eligible accounts.
        totalVotingBalance - Total balance eligible for voting.
        previousImportanceBlockHash - Previous importance block hash.
    • Method Detail

      • loadFromBinary

        public static NemesisBlockHeaderBuilder loadFromBinary​(java.io.DataInputStream stream)
        Creates an instance of NemesisBlockHeaderBuilder from a stream.
        Parameters:
        stream - Byte stream to use to serialize the object.
        Returns:
        Instance of NemesisBlockHeaderBuilder.
      • create

        public static NemesisBlockHeaderBuilder create​(SignatureDto signature,
                                                       KeyDto signerPublicKey,
                                                       byte version,
                                                       NetworkTypeDto network,
                                                       EntityTypeDto type,
                                                       HeightDto height,
                                                       TimestampDto timestamp,
                                                       DifficultyDto difficulty,
                                                       VrfProofBuilder generationHashProof,
                                                       Hash256Dto previousBlockHash,
                                                       Hash256Dto transactionsHash,
                                                       Hash256Dto receiptsHash,
                                                       Hash256Dto stateHash,
                                                       AddressDto beneficiaryAddress,
                                                       BlockFeeMultiplierDto feeMultiplier,
                                                       int votingEligibleAccountsCount,
                                                       long harvestingEligibleAccountsCount,
                                                       AmountDto totalVotingBalance,
                                                       Hash256Dto previousImportanceBlockHash)
        Creates an instance of NemesisBlockHeaderBuilder.
        Parameters:
        signature - Entity signature.
        signerPublicKey - Entity signer's public key.
        version - Entity version.
        network - Entity network.
        type - Entity type.
        height - Block height.
        timestamp - Number of milliseconds elapsed since creation of nemesis block.
        difficulty - Block difficulty.
        generationHashProof - Generation hash proof.
        previousBlockHash - Previous block hash.
        transactionsHash - Hash of the transactions in this block.
        receiptsHash - Hash of the receipts generated by this block.
        stateHash - Hash of the global chain state at this block.
        beneficiaryAddress - Beneficiary address designated by harvester.
        feeMultiplier - Fee multiplier applied to block transactions.
        votingEligibleAccountsCount - Number of voting eligible accounts.
        harvestingEligibleAccountsCount - Number of harvesting eligible accounts.
        totalVotingBalance - Total balance eligible for voting.
        previousImportanceBlockHash - Previous importance block hash.
        Returns:
        Instance of NemesisBlockHeaderBuilder.
      • getVotingEligibleAccountsCount

        public int getVotingEligibleAccountsCount()
        Gets number of voting eligible accounts.
        Returns:
        Number of voting eligible accounts.
      • getHarvestingEligibleAccountsCount

        public long getHarvestingEligibleAccountsCount()
        Gets number of harvesting eligible accounts.
        Returns:
        Number of harvesting eligible accounts.
      • getTotalVotingBalance

        public AmountDto getTotalVotingBalance()
        Gets total balance eligible for voting.
        Returns:
        Total balance eligible for voting.
      • getPreviousImportanceBlockHash

        public Hash256Dto getPreviousImportanceBlockHash()
        Gets previous importance block hash.
        Returns:
        Previous importance block hash.