Class BlockMarshaler
Marshaling and unmarshalling block data.
Inheritance
BlockMarshaler
Assembly: Libplanet.Types.dll
Syntax
public static class BlockMarshaler
Methods
|
Improve this Doc
View Source
MarshalBlock(Dictionary, List)
Marshaling and unmarshalling block data.
Declaration
public static Dictionary MarshalBlock(Dictionary marshaledBlockHeader, List marshaledTransactions)
Parameters
Type |
Name |
Description |
Bencodex.Types.Dictionary |
marshaledBlockHeader |
|
Bencodex.Types.List |
marshaledTransactions |
|
Returns
Type |
Description |
Bencodex.Types.Dictionary |
|
|
Improve this Doc
View Source
MarshalBlock(Block)
Marshaling and unmarshalling block data.
Declaration
public static Dictionary MarshalBlock(this Block block)
Parameters
Type |
Name |
Description |
Block |
block |
|
Returns
Type |
Description |
Bencodex.Types.Dictionary |
|
|
Improve this Doc
View Source
Marshaling and unmarshalling block data.
Declaration
public static Dictionary MarshalBlockHeader(Dictionary marshaledPreEvaluatedBlockHeader, HashDigest<SHA256> stateRootHash, ImmutableArray<byte>? signature, BlockHash hash)
Parameters
Returns
Type |
Description |
Bencodex.Types.Dictionary |
|
|
Improve this Doc
View Source
Marshaling and unmarshalling block data.
Declaration
public static Dictionary MarshalBlockHeader(this IBlockHeader header)
Parameters
Returns
Type |
Description |
Bencodex.Types.Dictionary |
|
|
Improve this Doc
View Source
Marshaling and unmarshalling block data.
Declaration
public static Dictionary MarshalBlockMetadata(IBlockMetadata metadata)
Parameters
Returns
Type |
Description |
Bencodex.Types.Dictionary |
|
|
Improve this Doc
View Source
Marshaling and unmarshalling block data.
Declaration
public static Dictionary MarshalPreEvaluationBlockHeader(Dictionary marshaledMetadata, HashDigest<SHA256> preEvaluationHash)
Parameters
Type |
Name |
Description |
Bencodex.Types.Dictionary |
marshaledMetadata |
|
HashDigest<SHA256> |
preEvaluationHash |
|
Returns
Type |
Description |
Bencodex.Types.Dictionary |
|
|
Improve this Doc
View Source
Marshaling and unmarshalling block data.
Declaration
public static Dictionary MarshalPreEvaluationBlockHeader(IPreEvaluationBlockHeader header)
Parameters
Returns
Type |
Description |
Bencodex.Types.Dictionary |
|
|
Improve this Doc
View Source
MarshalTransaction(Transaction)
Marshaling and unmarshalling block data.
Declaration
public static Binary MarshalTransaction(this Transaction tx)
Parameters
Returns
Type |
Description |
Bencodex.Types.Binary |
|
|
Improve this Doc
View Source
MarshalTransactions(IReadOnlyList<Transaction>)
Marshaling and unmarshalling block data.
Declaration
public static List MarshalTransactions(this IReadOnlyList<Transaction> txs)
Parameters
Returns
Type |
Description |
Bencodex.Types.List |
|
|
Improve this Doc
View Source
UnmarshalBlock(Dictionary)
Marshaling and unmarshalling block data.
Declaration
public static Block UnmarshalBlock(Dictionary marshaled)
Parameters
Type |
Name |
Description |
Bencodex.Types.Dictionary |
marshaled |
|
Returns
|
Improve this Doc
View Source
UnmarshalBlockHash(Dictionary)
Marshaling and unmarshalling block data.
Declaration
public static BlockHash UnmarshalBlockHash(Dictionary marshaledBlock)
Parameters
Type |
Name |
Description |
Bencodex.Types.Dictionary |
marshaledBlock |
|
Returns
|
Improve this Doc
View Source
Marshaling and unmarshalling block data.
Declaration
public static BlockHeader UnmarshalBlockHeader(Dictionary marshaled)
Parameters
Type |
Name |
Description |
Bencodex.Types.Dictionary |
marshaled |
|
Returns
|
Improve this Doc
View Source
Marshaling and unmarshalling block data.
Declaration
public static BlockHash UnmarshalBlockHeaderHash(Dictionary marshaledBlockHeader)
Parameters
Type |
Name |
Description |
Bencodex.Types.Dictionary |
marshaledBlockHeader |
|
Returns
|
Improve this Doc
View Source
Marshaling and unmarshalling block data.
Declaration
public static ImmutableArray<byte>? UnmarshalBlockHeaderSignature(Dictionary marshaledBlockHeader)
Parameters
Type |
Name |
Description |
Bencodex.Types.Dictionary |
marshaledBlockHeader |
|
Returns
|
Improve this Doc
View Source
Marshaling and unmarshalling block data.
Declaration
public static HashDigest<SHA256> UnmarshalBlockHeaderStateRootHash(Dictionary marshaledBlockHeader)
Parameters
Type |
Name |
Description |
Bencodex.Types.Dictionary |
marshaledBlockHeader |
|
Returns
|
Improve this Doc
View Source
Marshaling and unmarshalling block data.
Declaration
public static BlockMetadata UnmarshalBlockMetadata(Dictionary marshaled)
Parameters
Type |
Name |
Description |
Bencodex.Types.Dictionary |
marshaled |
|
Returns
|
Improve this Doc
View Source
Marshaling and unmarshalling block data.
Declaration
public static long UnmarshalBlockMetadataIndex(Dictionary marshaledMetadata)
Parameters
Type |
Name |
Description |
Bencodex.Types.Dictionary |
marshaledMetadata |
|
Returns
|
Improve this Doc
View Source
UnmarshalBlockTransactions(Dictionary)
Marshaling and unmarshalling block data.
Declaration
public static IReadOnlyList<Transaction> UnmarshalBlockTransactions(Dictionary marshaledBlock)
Parameters
Type |
Name |
Description |
Bencodex.Types.Dictionary |
marshaledBlock |
|
Returns
|
Improve this Doc
View Source
Marshaling and unmarshalling block data.
Declaration
public static PreEvaluationBlockHeader UnmarshalPreEvaluationBlockHeader(Dictionary marshaled)
Parameters
Type |
Name |
Description |
Bencodex.Types.Dictionary |
marshaled |
|
Returns
|
Improve this Doc
View Source
UnmarshalPreEvaluationHash(Dictionary)
Marshaling and unmarshalling block data.
Declaration
public static HashDigest<SHA256> UnmarshalPreEvaluationHash(Dictionary marshaled)
Parameters
Type |
Name |
Description |
Bencodex.Types.Dictionary |
marshaled |
|
Returns
|
Improve this Doc
View Source
UnmarshalTransactions(List)
Marshaling and unmarshalling block data.
Declaration
public static IReadOnlyList<Transaction> UnmarshalTransactions(List marshaled)
Parameters
Type |
Name |
Description |
Bencodex.Types.List |
marshaled |
|
Returns