Class JsonBlockHeader
- java.lang.Object
-
- com.syntifi.casper.sdk.model.block.JsonBlockHeader
-
public class JsonBlockHeader extends java.lang.Object
Holds the header data of a Casper block- Since:
- 0.0.1
- See Also:
JsonBlock
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JsonBlockHeader.JsonBlockHeaderBuilder
-
Constructor Summary
Constructors Constructor Description JsonBlockHeader()
JsonBlockHeader(long height, java.lang.String stateRootHash, boolean randomBit, JsonEraEnd eraEnd, java.lang.String bodyHash, java.lang.String parentHash, java.lang.String accumulatedSeed, java.util.Date timeStamp, long eraId, java.lang.String protocolVersion)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JsonBlockHeader.JsonBlockHeaderBuilder
builder()
java.lang.String
getAccumulatedSeed()
Hex-encoded hash digestjava.lang.String
getBodyHash()
Hex-encoded hash digestJsonEraEnd
getEraEnd()
long
getEraId()
Era ID newtypelong
getHeight()
Block heightjava.lang.String
getParentHash()
Hex-encoded hash digest.java.lang.String
getProtocolVersion()
Casper Platform protocol versionjava.lang.String
getStateRootHash()
Hex-encoded hash digestjava.util.Date
getTimeStamp()
Timestamp formatted as per RFC 3339boolean
isRandomBit()
booleanvoid
setAccumulatedSeed(java.lang.String accumulatedSeed)
Hex-encoded hash digestvoid
setBodyHash(java.lang.String bodyHash)
Hex-encoded hash digestvoid
setEraEnd(JsonEraEnd eraEnd)
void
setEraId(long eraId)
Era ID newtypevoid
setHeight(long height)
Block heightvoid
setParentHash(java.lang.String parentHash)
Hex-encoded hash digest.void
setProtocolVersion(java.lang.String protocolVersion)
Casper Platform protocol versionvoid
setRandomBit(boolean randomBit)
booleanvoid
setStateRootHash(java.lang.String stateRootHash)
Hex-encoded hash digestvoid
setTimeStamp(java.util.Date timeStamp)
Timestamp formatted as per RFC 3339
-
-
-
Constructor Detail
-
JsonBlockHeader
public JsonBlockHeader(long height, java.lang.String stateRootHash, boolean randomBit, JsonEraEnd eraEnd, java.lang.String bodyHash, java.lang.String parentHash, java.lang.String accumulatedSeed, java.util.Date timeStamp, long eraId, java.lang.String protocolVersion)
-
JsonBlockHeader
public JsonBlockHeader()
-
-
Method Detail
-
builder
public static JsonBlockHeader.JsonBlockHeaderBuilder builder()
-
getHeight
public long getHeight()
Block height
-
getStateRootHash
public java.lang.String getStateRootHash()
Hex-encoded hash digest
-
isRandomBit
public boolean isRandomBit()
boolean
-
getEraEnd
public JsonEraEnd getEraEnd()
- See Also:
JsonEraEnd
-
getBodyHash
public java.lang.String getBodyHash()
Hex-encoded hash digest
-
getParentHash
public java.lang.String getParentHash()
Hex-encoded hash digest.
-
getAccumulatedSeed
public java.lang.String getAccumulatedSeed()
Hex-encoded hash digest
-
getTimeStamp
public java.util.Date getTimeStamp()
Timestamp formatted as per RFC 3339
-
getEraId
public long getEraId()
Era ID newtype
-
getProtocolVersion
public java.lang.String getProtocolVersion()
Casper Platform protocol version
-
setHeight
public void setHeight(long height)
Block height
-
setStateRootHash
public void setStateRootHash(java.lang.String stateRootHash)
Hex-encoded hash digest
-
setRandomBit
public void setRandomBit(boolean randomBit)
boolean
-
setEraEnd
public void setEraEnd(JsonEraEnd eraEnd)
- See Also:
JsonEraEnd
-
setBodyHash
public void setBodyHash(java.lang.String bodyHash)
Hex-encoded hash digest
-
setParentHash
public void setParentHash(java.lang.String parentHash)
Hex-encoded hash digest.
-
setAccumulatedSeed
public void setAccumulatedSeed(java.lang.String accumulatedSeed)
Hex-encoded hash digest
-
setTimeStamp
public void setTimeStamp(java.util.Date timeStamp)
Timestamp formatted as per RFC 3339
-
setEraId
public void setEraId(long eraId)
Era ID newtype
-
setProtocolVersion
public void setProtocolVersion(java.lang.String protocolVersion)
Casper Platform protocol version
-
-