Package org.starcoin.types
Class BlockMetadata
- java.lang.Object
-
- org.starcoin.types.BlockMetadata
-
public final class BlockMetadata extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBlockMetadata.Builder
-
Field Summary
Fields Modifier and Type Field Description AccountAddressauthorOptional<AuthenticationKey>author_auth_keyChainIdchain_idLongnumberLongparent_gas_usedHashValueparent_hashLongtimestampLonguncles
-
Constructor Summary
Constructors Constructor Description BlockMetadata(HashValue parent_hash, Long timestamp, AccountAddress author, Optional<AuthenticationKey> author_auth_key, Long uncles, Long number, ChainId chain_id, Long parent_gas_used)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BlockMetadatabcsDeserialize(byte[] input)byte[]bcsSerialize()static BlockMetadatadeserialize(Deserializer deserializer)booleanequals(Object obj)inthashCode()voidserialize(Serializer serializer)
-
-
-
Field Detail
-
parent_hash
public final HashValue parent_hash
-
timestamp
public final Long timestamp
-
author
public final AccountAddress author
-
author_auth_key
public final Optional<AuthenticationKey> author_auth_key
-
uncles
public final Long uncles
-
number
public final Long number
-
chain_id
public final ChainId chain_id
-
parent_gas_used
public final Long parent_gas_used
-
-
Constructor Detail
-
BlockMetadata
public BlockMetadata(HashValue parent_hash, Long timestamp, AccountAddress author, Optional<AuthenticationKey> author_auth_key, Long uncles, Long number, ChainId chain_id, Long parent_gas_used)
-
-
Method Detail
-
deserialize
public static BlockMetadata deserialize(Deserializer deserializer) throws DeserializationError
- Throws:
DeserializationError
-
bcsDeserialize
public static BlockMetadata bcsDeserialize(byte[] input) throws DeserializationError
- Throws:
DeserializationError
-
serialize
public void serialize(Serializer serializer) throws SerializationError
- Throws:
SerializationError
-
bcsSerialize
public byte[] bcsSerialize() throws SerializationError- Throws:
SerializationError
-
-