Class Block

java.lang.Object
org.symbol.sdk.CatbufferType
org.symbol.sdk.symbol.models.Block
All Implemented Interfaces:

Serializer

Direct Known Subclasses:

ImportanceBlockV1, NemesisBlockV1, NormalBlockV1


public sealed class Block extends CatbufferType permits ImportanceBlockV1, NemesisBlockV1, NormalBlockV1
  • Field Details

    • signature

      protected Signature signature
    • signerPublicKey

      protected PublicKey signerPublicKey
    • version

      protected int version
    • network

      protected NetworkType network
    • type

      protected BlockType type
    • height

      protected Height height
    • timestamp

      protected Timestamp timestamp
    • difficulty

      protected Difficulty difficulty
    • generationHashProof

      protected VrfProof generationHashProof
    • previousBlockHash

      protected Hash256 previousBlockHash
    • transactionsHash

      protected Hash256 transactionsHash
    • receiptsHash

      protected Hash256 receiptsHash
    • stateHash

      protected Hash256 stateHash
    • beneficiaryAddress

      protected Address beneficiaryAddress
    • feeMultiplier

      protected BlockFeeMultiplier feeMultiplier
    • verifiableEntityHeaderReserved_1

      protected final long verifiableEntityHeaderReserved_1
      See Also:
    • entityBodyReserved_1

      protected final long entityBodyReserved_1
      See Also:
    • TYPE_HINTS

      public static final Map<String,String> TYPE_HINTS
  • Constructor Details

    • Block

      public Block()
      Creates a new Block.
  • Method Details

    • typeHints

      public Map<String,String> typeHints()
      Block.typeHints

      Returns the type-hint map driving the rule-based descriptor pipeline.

      Overrides:

      typeHints in class CatbufferType

      Returns:

      Field-name → rule-key map.

    • setField

      public void setField(String name, Object value)
      Block.setField

      Sets a named field. Used by the rule-based descriptor pipeline.

      Overrides:

      setField in class CatbufferType

      Parameters:

      name - Field name (descriptor key).

      value - Value to assign.

    • getField

      public Object getField(String name)
      Block.getField

      Reads a named field. Used by the facade-level entity inspection helpers.

      Overrides:

      getField in class CatbufferType

      Parameters:

      name - Field name.

      Returns:

      Field value.

    • sort

      public void sort()
      Block.sort

      Sorts the collections of this object so that it can be serialized canonically.

      Overrides:

      sort in class CatbufferType

    • getSignature

      public Signature getSignature()
      Block.getSignature

      Gets the signature field.

      Returns:

      The signature field.

    • setSignature

      public void setSignature(Signature value)
      Block.setSignature

      Sets the signature field.

      Parameters:

      value - New signature value.

    • getSignerPublicKey

      public PublicKey getSignerPublicKey()
      Block.getSignerPublicKey

      Gets the signerPublicKey field.

      Returns:

      The signerPublicKey field.

    • setSignerPublicKey

      public void setSignerPublicKey(PublicKey value)
      Block.setSignerPublicKey

      Sets the signerPublicKey field.

      Parameters:

      value - New signerPublicKey value.

    • getVersion

      public int getVersion()
      Block.getVersion

      Gets the version field.

      Returns:

      The version field.

    • setVersion

      public void setVersion(int value)
      Block.setVersion

      Sets the version field.

      Parameters:

      value - New version value.

    • getNetwork

      public NetworkType getNetwork()
      Block.getNetwork

      Gets the network field.

      Returns:

      The network field.

    • setNetwork

      public void setNetwork(NetworkType value)
      Block.setNetwork

      Sets the network field.

      Parameters:

      value - New network value.

    • getType

      public BlockType getType()
      Block.getType

      Gets the type field.

      Returns:

      The type field.

    • setType

      public void setType(BlockType value)
      Block.setType

      Sets the type field.

      Parameters:

      value - New type value.

    • getHeight

      public Height getHeight()
      Block.getHeight

      Gets the height field.

      Returns:

      The height field.

    • setHeight

      public void setHeight(Height value)
      Block.setHeight

      Sets the height field.

      Parameters:

      value - New height value.

    • getTimestamp

      public Timestamp getTimestamp()
      Block.getTimestamp

      Gets the timestamp field.

      Returns:

      The timestamp field.

    • setTimestamp

      public void setTimestamp(Timestamp value)
      Block.setTimestamp

      Sets the timestamp field.

      Parameters:

      value - New timestamp value.

    • getDifficulty

      public Difficulty getDifficulty()
      Block.getDifficulty

      Gets the difficulty field.

      Returns:

      The difficulty field.

    • setDifficulty

      public void setDifficulty(Difficulty value)
      Block.setDifficulty

      Sets the difficulty field.

      Parameters:

      value - New difficulty value.

    • getGenerationHashProof

      public VrfProof getGenerationHashProof()
      Block.getGenerationHashProof

      Gets the generationHashProof field.

      Returns:

      The generationHashProof field.

    • setGenerationHashProof

      public void setGenerationHashProof(VrfProof value)
      Block.setGenerationHashProof

      Sets the generationHashProof field.

      Parameters:

      value - New generationHashProof value.

    • getPreviousBlockHash

      public Hash256 getPreviousBlockHash()
      Block.getPreviousBlockHash

      Gets the previousBlockHash field.

      Returns:

      The previousBlockHash field.

    • setPreviousBlockHash

      public void setPreviousBlockHash(Hash256 value)
      Block.setPreviousBlockHash

      Sets the previousBlockHash field.

      Parameters:

      value - New previousBlockHash value.

    • getTransactionsHash

      public Hash256 getTransactionsHash()
      Block.getTransactionsHash

      Gets the transactionsHash field.

      Returns:

      The transactionsHash field.

    • setTransactionsHash

      public void setTransactionsHash(Hash256 value)
      Block.setTransactionsHash

      Sets the transactionsHash field.

      Parameters:

      value - New transactionsHash value.

    • getReceiptsHash

      public Hash256 getReceiptsHash()
      Block.getReceiptsHash

      Gets the receiptsHash field.

      Returns:

      The receiptsHash field.

    • setReceiptsHash

      public void setReceiptsHash(Hash256 value)
      Block.setReceiptsHash

      Sets the receiptsHash field.

      Parameters:

      value - New receiptsHash value.

    • getStateHash

      public Hash256 getStateHash()
      Block.getStateHash

      Gets the stateHash field.

      Returns:

      The stateHash field.

    • setStateHash

      public void setStateHash(Hash256 value)
      Block.setStateHash

      Sets the stateHash field.

      Parameters:

      value - New stateHash value.

    • getBeneficiaryAddress

      public Address getBeneficiaryAddress()
      Block.getBeneficiaryAddress

      Gets the beneficiaryAddress field.

      Returns:

      The beneficiaryAddress field.

    • setBeneficiaryAddress

      public void setBeneficiaryAddress(Address value)
      Block.setBeneficiaryAddress

      Sets the beneficiaryAddress field.

      Parameters:

      value - New beneficiaryAddress value.

    • getFeeMultiplier

      public BlockFeeMultiplier getFeeMultiplier()
      Block.getFeeMultiplier

      Gets the feeMultiplier field.

      Returns:

      The feeMultiplier field.

    • setFeeMultiplier

      public void setFeeMultiplier(BlockFeeMultiplier value)
      Block.setFeeMultiplier

      Sets the feeMultiplier field.

      Parameters:

      value - New feeMultiplier value.

    • size

      public int size()
      Block.size

      Calculates the size of the object.

      Returns:

      Size of this object in bytes.

    • serializeInto

      protected void serializeInto(Writer buffer)
      Block.serializeInto

      Writes this object's fields into the supplied buffer.

      Specified by:

      serializeInto in class CatbufferType

      Parameters:

      buffer - Output writer.

    • toString

      public String toString()
      Block.toString

      Returns a string representation of this object.

      Overrides:

      toString in class Object

      Returns:

      String representation of this object.

    • toJson

      public Map<String,Object> toJson()
      Block.toJson

      Converts this object to a JSON-serializable representation.

      Specified by:

      toJson in class CatbufferType

      Returns:

      JSON-serializable representation of this object.