C# Class BitSharp.Core.DataEncoder

显示文件 Open project: pmlyon/BitSharp Class Usage Examples

Public Methods

Method Description
EncodeBlock ( BitSharp.Core.Domain.Block block ) : byte[]
EncodeBlock ( BinaryWriter writer, BitSharp.Core.Domain.Block block ) : void
EncodeBlockHeader ( BlockHeader blockHeader ) : byte[]
EncodeBlockHeader ( UInt32 Version, UInt256 PreviousBlock, UInt256 MerkleRoot, DateTimeOffset Time, UInt32 Bits, UInt32 Nonce ) : byte[]
EncodeBlockHeader ( BinaryWriter writer, BlockHeader blockHeader ) : void
EncodeBlockSpentTxes ( BlockSpentTxes blockSpentTxes ) : byte[]
EncodeBlockSpentTxes ( BinaryWriter writer, BlockSpentTxes blockSpentTxes ) : void
EncodeBlockTxNode ( BlockTxNode blockTx ) : byte[]
EncodeBlockTxNode ( BinaryWriter writer, BlockTxNode blockTx ) : void
EncodeChainedHeader ( ChainedHeader chainedHeader ) : byte[]
EncodeChainedHeader ( BinaryWriter writer, ChainedHeader chainedHeader ) : void
EncodeOutputStates ( OutputStates outputStates ) : byte[]
EncodePrevTxOutput ( PrevTxOutput txOutput ) : byte[]
EncodePrevTxOutput ( BinaryWriter writer, PrevTxOutput txOutput ) : void
EncodePrevTxOutputList ( ImmutableArray txOutputs ) : byte[]
EncodePrevTxOutputList ( BinaryWriter writer, ImmutableArray txOutputs ) : void
EncodeSpentTx ( SpentTx spentTx ) : byte[]
EncodeSpentTx ( BinaryWriter writer, SpentTx spentTx ) : void
EncodeTotalWork ( System.Numerics.BigInteger totalWork ) : byte[]
EncodeTotalWork ( BinaryWriter writer, System.Numerics.BigInteger totalWork ) : void
EncodeTransaction ( BitSharp.Core.Domain.Transaction tx ) : DecodedTx
EncodeTransaction ( UInt32 Version, ImmutableArray Inputs, ImmutableArray Outputs, UInt32 LockTime ) : DecodedTx
EncodeTransaction ( BinaryWriter writer, BitSharp.Core.Domain.Transaction tx ) : void
EncodeTxInput ( BitSharp.Core.Domain.TxInput txInput ) : byte[]
EncodeTxInput ( BinaryWriter writer, BitSharp.Core.Domain.TxInput txInput ) : void
EncodeTxLookupKey ( TxLookupKey txLookupKey ) : byte[]
EncodeTxLookupKey ( BinaryWriter writer, TxLookupKey txLookupKey ) : void
EncodeTxOutput ( TxOutput txOutput ) : byte[]
EncodeTxOutput ( BinaryWriter writer, TxOutput txOutput ) : void
EncodeTxOutputKey ( BitSharp.Core.Domain.TxOutputKey txOutputKey ) : byte[]
EncodeTxOutputKey ( BinaryWriter writer, BitSharp.Core.Domain.TxOutputKey txOutputKey ) : void
EncodeTxOutputList ( ImmutableArray txOutputs ) : byte[]
EncodeTxOutputList ( BinaryWriter writer, ImmutableArray txOutputs ) : void
EncodeUInt256 ( BinaryWriter writer, UInt256 value ) : void
EncodeUnmintedTx ( UnmintedTx unmintedTx ) : byte[]
EncodeUnmintedTx ( BinaryWriter writer, UnmintedTx unmintedTx ) : void
EncodeUnmintedTxList ( IImmutableList unmintedTxes ) : byte[]
EncodeUnmintedTxList ( BinaryWriter writer, IImmutableList unmintedTxes ) : void
EncodeUnspentTx ( UnspentTx unspentTx ) : byte[]
EncodeUnspentTx ( BinaryWriter writer, UnspentTx unspentTx ) : void
EncodeVarString ( string s ) : byte[]
EncodeVarString ( BinaryWriter writer, string s ) : void
VarIntSize ( System.UInt64 value ) : int

Method Details

EncodeBlock() public static method

public static EncodeBlock ( BitSharp.Core.Domain.Block block ) : byte[]
block BitSharp.Core.Domain.Block
return byte[]

EncodeBlock() public static method

public static EncodeBlock ( BinaryWriter writer, BitSharp.Core.Domain.Block block ) : void
writer System.IO.BinaryWriter
block BitSharp.Core.Domain.Block
return void

EncodeBlockHeader() public static method

public static EncodeBlockHeader ( BlockHeader blockHeader ) : byte[]
blockHeader BitSharp.Core.Domain.BlockHeader
return byte[]

EncodeBlockHeader() public static method

public static EncodeBlockHeader ( UInt32 Version, UInt256 PreviousBlock, UInt256 MerkleRoot, DateTimeOffset Time, UInt32 Bits, UInt32 Nonce ) : byte[]
Version System.UInt32
PreviousBlock UInt256
MerkleRoot UInt256
Time DateTimeOffset
Bits System.UInt32
Nonce System.UInt32
return byte[]

EncodeBlockHeader() public static method

public static EncodeBlockHeader ( BinaryWriter writer, BlockHeader blockHeader ) : void
writer System.IO.BinaryWriter
blockHeader BitSharp.Core.Domain.BlockHeader
return void

EncodeBlockSpentTxes() public static method

public static EncodeBlockSpentTxes ( BlockSpentTxes blockSpentTxes ) : byte[]
blockSpentTxes BlockSpentTxes
return byte[]

EncodeBlockSpentTxes() public static method

public static EncodeBlockSpentTxes ( BinaryWriter writer, BlockSpentTxes blockSpentTxes ) : void
writer System.IO.BinaryWriter
blockSpentTxes BlockSpentTxes
return void

EncodeBlockTxNode() public static method

public static EncodeBlockTxNode ( BlockTxNode blockTx ) : byte[]
blockTx BlockTxNode
return byte[]

EncodeBlockTxNode() public static method

public static EncodeBlockTxNode ( BinaryWriter writer, BlockTxNode blockTx ) : void
writer System.IO.BinaryWriter
blockTx BlockTxNode
return void

EncodeChainedHeader() public static method

public static EncodeChainedHeader ( ChainedHeader chainedHeader ) : byte[]
chainedHeader BitSharp.Core.Domain.ChainedHeader
return byte[]

EncodeChainedHeader() public static method

public static EncodeChainedHeader ( BinaryWriter writer, ChainedHeader chainedHeader ) : void
writer System.IO.BinaryWriter
chainedHeader BitSharp.Core.Domain.ChainedHeader
return void

EncodeOutputStates() public static method

public static EncodeOutputStates ( OutputStates outputStates ) : byte[]
outputStates OutputStates
return byte[]

EncodePrevTxOutput() public static method

public static EncodePrevTxOutput ( PrevTxOutput txOutput ) : byte[]
txOutput BitSharp.Core.Domain.PrevTxOutput
return byte[]

EncodePrevTxOutput() public static method

public static EncodePrevTxOutput ( BinaryWriter writer, PrevTxOutput txOutput ) : void
writer System.IO.BinaryWriter
txOutput BitSharp.Core.Domain.PrevTxOutput
return void

EncodePrevTxOutputList() public static method

public static EncodePrevTxOutputList ( ImmutableArray txOutputs ) : byte[]
txOutputs ImmutableArray
return byte[]

EncodePrevTxOutputList() public static method

public static EncodePrevTxOutputList ( BinaryWriter writer, ImmutableArray txOutputs ) : void
writer System.IO.BinaryWriter
txOutputs ImmutableArray
return void

EncodeSpentTx() public static method

public static EncodeSpentTx ( SpentTx spentTx ) : byte[]
spentTx BitSharp.Core.Domain.SpentTx
return byte[]

EncodeSpentTx() public static method

public static EncodeSpentTx ( BinaryWriter writer, SpentTx spentTx ) : void
writer System.IO.BinaryWriter
spentTx BitSharp.Core.Domain.SpentTx
return void

EncodeTotalWork() public static method

public static EncodeTotalWork ( System.Numerics.BigInteger totalWork ) : byte[]
totalWork System.Numerics.BigInteger
return byte[]

EncodeTotalWork() public static method

public static EncodeTotalWork ( BinaryWriter writer, System.Numerics.BigInteger totalWork ) : void
writer System.IO.BinaryWriter
totalWork System.Numerics.BigInteger
return void

EncodeTransaction() public static method

public static EncodeTransaction ( BitSharp.Core.Domain.Transaction tx ) : DecodedTx
tx BitSharp.Core.Domain.Transaction
return BitSharp.Core.Domain.DecodedTx

EncodeTransaction() public static method

public static EncodeTransaction ( UInt32 Version, ImmutableArray Inputs, ImmutableArray Outputs, UInt32 LockTime ) : DecodedTx
Version System.UInt32
Inputs ImmutableArray
Outputs ImmutableArray
LockTime System.UInt32
return BitSharp.Core.Domain.DecodedTx

EncodeTransaction() public static method

public static EncodeTransaction ( BinaryWriter writer, BitSharp.Core.Domain.Transaction tx ) : void
writer System.IO.BinaryWriter
tx BitSharp.Core.Domain.Transaction
return void

EncodeTxInput() public static method

public static EncodeTxInput ( BitSharp.Core.Domain.TxInput txInput ) : byte[]
txInput BitSharp.Core.Domain.TxInput
return byte[]

EncodeTxInput() public static method

public static EncodeTxInput ( BinaryWriter writer, BitSharp.Core.Domain.TxInput txInput ) : void
writer System.IO.BinaryWriter
txInput BitSharp.Core.Domain.TxInput
return void

EncodeTxLookupKey() public static method

public static EncodeTxLookupKey ( TxLookupKey txLookupKey ) : byte[]
txLookupKey BitSharp.Core.Domain.TxLookupKey
return byte[]

EncodeTxLookupKey() public static method

public static EncodeTxLookupKey ( BinaryWriter writer, TxLookupKey txLookupKey ) : void
writer System.IO.BinaryWriter
txLookupKey BitSharp.Core.Domain.TxLookupKey
return void

EncodeTxOutput() public static method

public static EncodeTxOutput ( TxOutput txOutput ) : byte[]
txOutput BitSharp.Core.Domain.TxOutput
return byte[]

EncodeTxOutput() public static method

public static EncodeTxOutput ( BinaryWriter writer, TxOutput txOutput ) : void
writer System.IO.BinaryWriter
txOutput BitSharp.Core.Domain.TxOutput
return void

EncodeTxOutputKey() public static method

public static EncodeTxOutputKey ( BitSharp.Core.Domain.TxOutputKey txOutputKey ) : byte[]
txOutputKey BitSharp.Core.Domain.TxOutputKey
return byte[]

EncodeTxOutputKey() public static method

public static EncodeTxOutputKey ( BinaryWriter writer, BitSharp.Core.Domain.TxOutputKey txOutputKey ) : void
writer System.IO.BinaryWriter
txOutputKey BitSharp.Core.Domain.TxOutputKey
return void

EncodeTxOutputList() public static method

public static EncodeTxOutputList ( ImmutableArray txOutputs ) : byte[]
txOutputs ImmutableArray
return byte[]

EncodeTxOutputList() public static method

public static EncodeTxOutputList ( BinaryWriter writer, ImmutableArray txOutputs ) : void
writer System.IO.BinaryWriter
txOutputs ImmutableArray
return void

EncodeUInt256() public static method

public static EncodeUInt256 ( BinaryWriter writer, UInt256 value ) : void
writer System.IO.BinaryWriter
value UInt256
return void

EncodeUnmintedTx() public static method

public static EncodeUnmintedTx ( UnmintedTx unmintedTx ) : byte[]
unmintedTx BitSharp.Core.Domain.UnmintedTx
return byte[]

EncodeUnmintedTx() public static method

public static EncodeUnmintedTx ( BinaryWriter writer, UnmintedTx unmintedTx ) : void
writer System.IO.BinaryWriter
unmintedTx BitSharp.Core.Domain.UnmintedTx
return void

EncodeUnmintedTxList() public static method

public static EncodeUnmintedTxList ( IImmutableList unmintedTxes ) : byte[]
unmintedTxes IImmutableList
return byte[]

EncodeUnmintedTxList() public static method

public static EncodeUnmintedTxList ( BinaryWriter writer, IImmutableList unmintedTxes ) : void
writer System.IO.BinaryWriter
unmintedTxes IImmutableList
return void

EncodeUnspentTx() public static method

public static EncodeUnspentTx ( UnspentTx unspentTx ) : byte[]
unspentTx BitSharp.Core.Domain.UnspentTx
return byte[]

EncodeUnspentTx() public static method

public static EncodeUnspentTx ( BinaryWriter writer, UnspentTx unspentTx ) : void
writer System.IO.BinaryWriter
unspentTx BitSharp.Core.Domain.UnspentTx
return void

EncodeVarString() public static method

public static EncodeVarString ( string s ) : byte[]
s string
return byte[]

EncodeVarString() public static method

public static EncodeVarString ( BinaryWriter writer, string s ) : void
writer System.IO.BinaryWriter
s string
return void

VarIntSize() public static method

public static VarIntSize ( System.UInt64 value ) : int
value System.UInt64
return int