Show / Hide Table of Contents

Class BlockMarshaler

Marshaling and unmarshaling block data.

Inheritance
Object
BlockMarshaler
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Libplanet.Blocks
Assembly: Libplanet.dll
Syntax
public static class BlockMarshaler

Methods

| Improve this Doc View Source

MarshalBlock(Dictionary, List)

Declaration
public static Dictionary MarshalBlock(Dictionary marshaledBlockHeader, List marshaledTransactions)
Parameters
Type Name Description
System.Collections.Generic.Dictionary marshaledBlockHeader
System.Collections.Generic.List marshaledTransactions
Returns
Type Description
System.Collections.Generic.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
System.Collections.Generic.Dictionary
Type Parameters
Name Description
T
| Improve this Doc View Source

MarshalBlockHeader(IBlockHeader)

Declaration
public static Dictionary MarshalBlockHeader(this IBlockHeader header)
Parameters
Type Name Description
IBlockHeader header
Returns
Type Description
System.Collections.Generic.Dictionary
| Improve this Doc View Source

MarshalBlockHeader(Dictionary, HashDigest<SHA256>, Nullable<ImmutableArray<Byte>>, BlockHash)

Declaration
public static Dictionary MarshalBlockHeader(Dictionary marshaledPreEvaluatedBlockHeader, HashDigest<SHA256> stateRootHash, ImmutableArray<byte>? signature, BlockHash hash)
Parameters
Type Name Description
System.Collections.Generic.Dictionary marshaledPreEvaluatedBlockHeader
HashDigest<SHA256> stateRootHash
Nullable<ImmutableArray<Byte>> signature
BlockHash hash
Returns
Type Description
System.Collections.Generic.Dictionary
| Improve this Doc View Source

MarshalBlockMetadata(IBlockMetadata)

Declaration
public static Dictionary MarshalBlockMetadata(IBlockMetadata metadata)
Parameters
Type Name Description
IBlockMetadata metadata
Returns
Type Description
System.Collections.Generic.Dictionary
| Improve this Doc View Source

MarshalPreEvaluationBlockHeader(IPreEvaluationBlockHeader)

Declaration
public static Dictionary MarshalPreEvaluationBlockHeader(IPreEvaluationBlockHeader header)
Parameters
Type Name Description
IPreEvaluationBlockHeader header
Returns
Type Description
System.Collections.Generic.Dictionary
| Improve this Doc View Source

MarshalPreEvaluationBlockHeader(Dictionary, Nonce, ImmutableArray<Byte>)

Declaration
public static Dictionary MarshalPreEvaluationBlockHeader(Dictionary marshaledMetadata, Nonce nonce, ImmutableArray<byte> preEvaluationHash)
Parameters
Type Name Description
System.Collections.Generic.Dictionary marshaledMetadata
Nonce nonce
ImmutableArray<Byte> preEvaluationHash
Returns
Type Description
System.Collections.Generic.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 Description
System.Collections.Generic.List
Type Parameters
Name Description
T
| 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
Type Name Description
HashAlgorithmGetter hashAlgorithmGetter
System.Collections.Generic.Dictionary marshaled
Returns
Type Description
Block<T>
Type Parameters
Name Description
T
| Improve this Doc View Source

UnmarshalBlockHeader(HashAlgorithmGetter, Dictionary)

Declaration
public static BlockHeader UnmarshalBlockHeader(HashAlgorithmGetter hashAlgorithmGetter, Dictionary marshaled)
Parameters
Type Name Description
HashAlgorithmGetter hashAlgorithmGetter
System.Collections.Generic.Dictionary marshaled
Returns
Type Description
BlockHeader
| Improve this Doc View Source

UnmarshalBlockHeaderHash(Dictionary)

Declaration
public static BlockHash UnmarshalBlockHeaderHash(Dictionary marshaledBlockHeader)
Parameters
Type Name Description
System.Collections.Generic.Dictionary marshaledBlockHeader
Returns
Type Description
BlockHash
| Improve this Doc View Source

UnmarshalBlockHeaderSignature(Dictionary)

Declaration
public static ImmutableArray<byte>? UnmarshalBlockHeaderSignature(Dictionary marshaledBlockHeader)
Parameters
Type Name Description
System.Collections.Generic.Dictionary marshaledBlockHeader
Returns
Type Description
Nullable<ImmutableArray<Byte>>
| Improve this Doc View Source

UnmarshalBlockHeaderStateRootHash(Dictionary)

Declaration
public static HashDigest<SHA256> UnmarshalBlockHeaderStateRootHash(Dictionary marshaledBlockHeader)
Parameters
Type Name Description
System.Collections.Generic.Dictionary marshaledBlockHeader
Returns
Type Description
HashDigest<SHA256>
| Improve this Doc View Source

UnmarshalBlockMetadata(Dictionary)

Declaration
public static BlockMetadata UnmarshalBlockMetadata(Dictionary marshaled)
Parameters
Type Name Description
System.Collections.Generic.Dictionary marshaled
Returns
Type Description
BlockMetadata
| Improve this Doc View Source

UnmarshalBlockMetadataIndex(Dictionary)

Declaration
public static long UnmarshalBlockMetadataIndex(Dictionary marshaledMetadata)
Parameters
Type Name Description
System.Collections.Generic.Dictionary marshaledMetadata
Returns
Type Description
Int64
| 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
System.Collections.Generic.Dictionary marshaledBlock
Returns
Type Description
IReadOnlyList<Transaction<T>>
Type Parameters
Name Description
T
| Improve this Doc View Source

UnmarshalPreEvaluationBlockHeader(HashAlgorithmGetter, Dictionary)

Declaration
public static PreEvaluationBlockHeader UnmarshalPreEvaluationBlockHeader(HashAlgorithmGetter hashAlgorithmGetter, Dictionary marshaled)
Parameters
Type Name Description
HashAlgorithmGetter hashAlgorithmGetter
System.Collections.Generic.Dictionary marshaled
Returns
Type Description
PreEvaluationBlockHeader
| Improve this Doc View Source

UnmarshalPreEvaluationBlockHeader(Dictionary)

Declaration
public static (BlockMetadata Metadata, Nonce Nonce, ImmutableArray<byte>? PreEvaluationHash) UnmarshalPreEvaluationBlockHeader(Dictionary marshaled)
Parameters
Type Name Description
System.Collections.Generic.Dictionary marshaled
Returns
Type Description
(T1, T2, T3)<BlockMetadata, Nonce, Nullable<ImmutableArray<Byte>>>
| 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
System.Collections.Generic.List marshaled
Returns
Type Description
IReadOnlyList<Transaction<T>>
Type Parameters
Name Description
T
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2021 Planetarium