Class BlockMarshaler
Marshaling and unmarshalling block data.
Inheritance
System.Object
BlockMarshaler
Assembly: Libplanet.Types.dll
Syntax
public static class BlockMarshaler : object
Methods
|
Improve this Doc
View Source
MarshalBlock(Dictionary, List, List)
Marshaling and unmarshalling block data.
Declaration
public static Dictionary MarshalBlock(Dictionary marshaledBlockHeader, List marshaledTransactions, List marshaledEvidence)
Parameters
Type |
Name |
Description |
Dictionary |
marshaledBlockHeader |
|
List |
marshaledTransactions |
|
List |
marshaledEvidence |
|
Returns
Type |
Description |
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 |
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
Type |
Name |
Description |
Dictionary |
marshaledPreEvaluatedBlockHeader |
|
HashDigest<SHA256> |
stateRootHash |
|
System.Nullable<ImmutableArray<System.Byte>> |
signature |
|
BlockHash |
hash |
|
Returns
Type |
Description |
Dictionary |
|
|
Improve this Doc
View Source
Marshaling and unmarshalling block data.
Declaration
public static Dictionary MarshalBlockHeader(this IBlockHeader header)
Parameters
Returns
Type |
Description |
Dictionary |
|
|
Improve this Doc
View Source
Marshaling and unmarshalling block data.
Declaration
public static Dictionary MarshalBlockMetadata(IBlockMetadata metadata)
Parameters
Returns
Type |
Description |
Dictionary |
|
|
Improve this Doc
View Source
MarshalEvidence(IReadOnlyList<EvidenceBase>)
Marshaling and unmarshalling block data.
Declaration
public static List MarshalEvidence(this IReadOnlyList<EvidenceBase> evidence)
Parameters
Returns
|
Improve this Doc
View Source
MarshalEvidence(EvidenceBase)
Marshaling and unmarshalling block data.
Declaration
public static Binary MarshalEvidence(this EvidenceBase evidence)
Parameters
Returns
|
Improve this Doc
View Source
Marshaling and unmarshalling block data.
Declaration
public static Dictionary MarshalPreEvaluationBlockHeader(Dictionary marshaledMetadata, HashDigest<SHA256> preEvaluationHash)
Parameters
Type |
Name |
Description |
Dictionary |
marshaledMetadata |
|
HashDigest<SHA256> |
preEvaluationHash |
|
Returns
Type |
Description |
Dictionary |
|
|
Improve this Doc
View Source
Marshaling and unmarshalling block data.
Declaration
public static Dictionary MarshalPreEvaluationBlockHeader(IPreEvaluationBlockHeader header)
Parameters
Returns
Type |
Description |
Dictionary |
|
|
Improve this Doc
View Source
MarshalTransaction(Transaction)
Marshaling and unmarshalling block data.
Declaration
public static Binary MarshalTransaction(this Transaction tx)
Parameters
Returns
|
Improve this Doc
View Source
MarshalTransactions(IReadOnlyList<Transaction>)
Marshaling and unmarshalling block data.
Declaration
public static List MarshalTransactions(this IReadOnlyList<Transaction> txs)
Parameters
Returns
|
Improve this Doc
View Source
UnmarshalBlock(Dictionary)
Marshaling and unmarshalling block data.
Declaration
public static Block UnmarshalBlock(Dictionary marshaled)
Parameters
Type |
Name |
Description |
Dictionary |
marshaled |
|
Returns
|
Improve this Doc
View Source
UnmarshalBlockEvidence(Dictionary)
Marshaling and unmarshalling block data.
Declaration
public static IReadOnlyList<EvidenceBase> UnmarshalBlockEvidence(Dictionary marshaledBlock)
Parameters
Type |
Name |
Description |
Dictionary |
marshaledBlock |
|
Returns
|
Improve this Doc
View Source
UnmarshalBlockHash(Dictionary)
Marshaling and unmarshalling block data.
Declaration
public static BlockHash UnmarshalBlockHash(Dictionary marshaledBlock)
Parameters
Type |
Name |
Description |
Dictionary |
marshaledBlock |
|
Returns
|
Improve this Doc
View Source
Marshaling and unmarshalling block data.
Declaration
public static BlockHeader UnmarshalBlockHeader(Dictionary marshaled)
Parameters
Type |
Name |
Description |
Dictionary |
marshaled |
|
Returns
|
Improve this Doc
View Source
Marshaling and unmarshalling block data.
Declaration
public static BlockHash UnmarshalBlockHeaderHash(Dictionary marshaledBlockHeader)
Parameters
Type |
Name |
Description |
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 |
Dictionary |
marshaledBlockHeader |
|
Returns
Type |
Description |
System.Nullable<ImmutableArray<System.Byte>> |
|
|
Improve this Doc
View Source
Marshaling and unmarshalling block data.
Declaration
public static HashDigest<SHA256> UnmarshalBlockHeaderStateRootHash(Dictionary marshaledBlockHeader)
Parameters
Type |
Name |
Description |
Dictionary |
marshaledBlockHeader |
|
Returns
|
Improve this Doc
View Source
Marshaling and unmarshalling block data.
Declaration
public static BlockMetadata UnmarshalBlockMetadata(Dictionary marshaled)
Parameters
Type |
Name |
Description |
Dictionary |
marshaled |
|
Returns
|
Improve this Doc
View Source
Marshaling and unmarshalling block data.
Declaration
public static long UnmarshalBlockMetadataIndex(Dictionary marshaledMetadata)
Parameters
Type |
Name |
Description |
Dictionary |
marshaledMetadata |
|
Returns
Type |
Description |
System.Int64 |
|
|
Improve this Doc
View Source
UnmarshalBlockTransactions(Dictionary)
Marshaling and unmarshalling block data.
Declaration
public static IReadOnlyList<Transaction> UnmarshalBlockTransactions(Dictionary marshaledBlock)
Parameters
Type |
Name |
Description |
Dictionary |
marshaledBlock |
|
Returns
|
Improve this Doc
View Source
UnmarshalEvidence(List)
Marshaling and unmarshalling block data.
Declaration
public static IReadOnlyList<EvidenceBase> UnmarshalEvidence(List marshaled)
Parameters
Type |
Name |
Description |
List |
marshaled |
|
Returns
|
Improve this Doc
View Source
Marshaling and unmarshalling block data.
Declaration
public static PreEvaluationBlockHeader UnmarshalPreEvaluationBlockHeader(Dictionary marshaled)
Parameters
Type |
Name |
Description |
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 |
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 |
List |
marshaled |
|
Returns