Class BlockMarshaler
Marshaling and unmarshaling block data.
Inheritance
BlockMarshaler
Assembly: Libplanet.dll
Syntax
public static class BlockMarshaler : object
Methods
|
Improve this Doc
View Source
AppendTxToMarshaledBlock<T>(Dictionary, Transaction<T>)
Declaration
public static Dictionary AppendTxToMarshaledBlock<T>(Dictionary marshaledBlock, Transaction<T> tx)
where T : IAction, new()
Parameters
Type |
Name |
Description |
Dictionary |
marshaledBlock |
|
Transaction<T> |
tx |
|
Returns
Type |
Description |
Dictionary |
|
Type Parameters
|
Improve this Doc
View Source
MarshalBlock(Dictionary, List)
Declaration
public static Dictionary MarshalBlock(Dictionary marshaledBlockHeader, List marshaledTransactions)
Parameters
Type |
Name |
Description |
Dictionary |
marshaledBlockHeader |
|
List |
marshaledTransactions |
|
Returns
Type |
Description |
Dictionary |
|
|
Improve this Doc
View Source
MarshalBlock<T>(Block<T>)
Declaration
public static Dictionary MarshalBlock<T>(this Block<T> block)
where T : IAction, new()
Parameters
Type |
Name |
Description |
Block<T> |
block |
|
Returns
Type |
Description |
Dictionary |
|
Type Parameters
|
Improve this Doc
View Source
Declaration
public static Dictionary MarshalBlockHeader(Dictionary marshaledPreEvaluatedBlockHeader, HashDigest<SHA256> stateRootHash, ImmutableArray<byte>? signature, BlockHash hash)
Parameters
Returns
Type |
Description |
Dictionary |
|
|
Improve this Doc
View Source
Declaration
public static Dictionary MarshalBlockHeader(this IBlockHeader header)
Parameters
Returns
Type |
Description |
Dictionary |
|
|
Improve this Doc
View Source
Declaration
public static Dictionary MarshalBlockMetadata(IBlockMetadata metadata)
Parameters
Returns
Type |
Description |
Dictionary |
|
|
Improve this Doc
View Source
Declaration
public static Dictionary MarshalPreEvaluationBlockHeader(Dictionary marshaledMetadata, Nonce nonce, ImmutableArray<byte> preEvaluationHash)
Parameters
Type |
Name |
Description |
Dictionary |
marshaledMetadata |
|
Nonce |
nonce |
|
ImmutableArray<Byte> |
preEvaluationHash |
|
Returns
Type |
Description |
Dictionary |
|
|
Improve this Doc
View Source
Declaration
public static Dictionary MarshalPreEvaluationBlockHeader(IPreEvaluationBlockHeader header)
Parameters
Returns
Type |
Description |
Dictionary |
|
|
Improve this Doc
View Source
MarshalTransactions<T>(IReadOnlyList<Transaction<T>>)
Declaration
public static List MarshalTransactions<T>(this IReadOnlyList<Transaction<T>> txs)
where T : IAction, new()
Parameters
Type |
Name |
Description |
IReadOnlyList<Transaction<T>> |
txs |
|
Returns
Type Parameters
|
Improve this Doc
View Source
UnmarshalBlock<T>(HashAlgorithmGetter, Dictionary)
Declaration
public static Block<T> UnmarshalBlock<T>(HashAlgorithmGetter hashAlgorithmGetter, Dictionary marshaled)
where T : IAction, new()
Parameters
Returns
Type |
Description |
Block<T> |
|
Type Parameters
|
Improve this Doc
View Source
Declaration
public static BlockHeader UnmarshalBlockHeader(HashAlgorithmGetter hashAlgorithmGetter, Dictionary marshaled)
Parameters
Returns
|
Improve this Doc
View Source
Declaration
public static BlockHash UnmarshalBlockHeaderHash(Dictionary marshaledBlockHeader)
Parameters
Type |
Name |
Description |
Dictionary |
marshaledBlockHeader |
|
Returns
|
Improve this Doc
View Source
Declaration
public static ImmutableArray<byte>? UnmarshalBlockHeaderSignature(Dictionary marshaledBlockHeader)
Parameters
Type |
Name |
Description |
Dictionary |
marshaledBlockHeader |
|
Returns
|
Improve this Doc
View Source
Declaration
public static HashDigest<SHA256> UnmarshalBlockHeaderStateRootHash(Dictionary marshaledBlockHeader)
Parameters
Type |
Name |
Description |
Dictionary |
marshaledBlockHeader |
|
Returns
|
Improve this Doc
View Source
Declaration
public static BlockMetadata UnmarshalBlockMetadata(Dictionary marshaled)
Parameters
Type |
Name |
Description |
Dictionary |
marshaled |
|
Returns
|
Improve this Doc
View Source
Declaration
public static long UnmarshalBlockMetadataIndex(Dictionary marshaledMetadata)
Parameters
Type |
Name |
Description |
Dictionary |
marshaledMetadata |
|
Returns
|
Improve this Doc
View Source
UnmarshalBlockTransactions<T>(Dictionary)
Declaration
public static IReadOnlyList<Transaction<T>> UnmarshalBlockTransactions<T>(Dictionary marshaledBlock)
where T : IAction, new()
Parameters
Type |
Name |
Description |
Dictionary |
marshaledBlock |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Declaration
public static (BlockMetadata Metadata, Nonce Nonce, ImmutableArray<byte>? PreEvaluationHash) UnmarshalPreEvaluationBlockHeader(Dictionary marshaled)
Parameters
Type |
Name |
Description |
Dictionary |
marshaled |
|
Returns
|
Improve this Doc
View Source
Declaration
public static PreEvaluationBlockHeader UnmarshalPreEvaluationBlockHeader(HashAlgorithmGetter hashAlgorithmGetter, Dictionary marshaled)
Parameters
Returns
|
Improve this Doc
View Source
UnmarshalTransactions<T>(List)
Declaration
public static IReadOnlyList<Transaction<T>> UnmarshalTransactions<T>(List marshaled)
where T : IAction, new()
Parameters
Type |
Name |
Description |
List |
marshaled |
|
Returns
Type Parameters