Show / Hide Table of Contents

Class BlockMarshaler

Marshaling and unmarshalling block data.

Inheritance
Object
BlockMarshaler
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
System.Object.ToString()
Namespace: Libplanet.Types.Blocks
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

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

Marshaling and unmarshalling block data.

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

MarshalBlockHeader(IBlockHeader)

Marshaling and unmarshalling block data.

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

MarshalBlockMetadata(IBlockMetadata)

Marshaling and unmarshalling block data.

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

MarshalPreEvaluationBlockHeader(Dictionary, HashDigest<SHA256>)

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

MarshalPreEvaluationBlockHeader(IPreEvaluationBlockHeader)

Marshaling and unmarshalling block data.

Declaration
public static Dictionary MarshalPreEvaluationBlockHeader(IPreEvaluationBlockHeader header)
Parameters
Type Name Description
IPreEvaluationBlockHeader header
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
Type Name Description
Transaction tx
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
Type Name Description
IReadOnlyList<Transaction> txs
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
Type Description
Block
| 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
Type Description
BlockHash
| Improve this Doc View Source

UnmarshalBlockHeader(Dictionary)

Marshaling and unmarshalling block data.

Declaration
public static BlockHeader UnmarshalBlockHeader(Dictionary marshaled)
Parameters
Type Name Description
Bencodex.Types.Dictionary marshaled
Returns
Type Description
BlockHeader
| Improve this Doc View Source

UnmarshalBlockHeaderHash(Dictionary)

Marshaling and unmarshalling block data.

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

UnmarshalBlockHeaderSignature(Dictionary)

Marshaling and unmarshalling block data.

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

UnmarshalBlockHeaderStateRootHash(Dictionary)

Marshaling and unmarshalling block data.

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

UnmarshalBlockMetadata(Dictionary)

Marshaling and unmarshalling block data.

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

UnmarshalBlockMetadataIndex(Dictionary)

Marshaling and unmarshalling block data.

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

UnmarshalPreEvaluationBlockHeader(Dictionary)

Marshaling and unmarshalling block data.

Declaration
public static PreEvaluationBlockHeader UnmarshalPreEvaluationBlockHeader(Dictionary marshaled)
Parameters
Type Name Description
Bencodex.Types.Dictionary marshaled
Returns
Type Description
PreEvaluationBlockHeader
| 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
Type Description
HashDigest<SHA256>
| 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
Type Description
IReadOnlyList<Transaction>
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2023 Planetarium