EncodeTransaction() public static method

public static EncodeTransaction ( BitSharp.Core.Domain.Transaction tx ) : DecodedTx
tx BitSharp.Core.Domain.Transaction
return BitSharp.Core.Domain.DecodedTx
Exemplo n.º 1
0
        public static UInt256 CalculateTransactionHash(UInt32 Version, ImmutableArray <TxInput> Inputs, ImmutableArray <TxOutput> Outputs, UInt32 LockTime)
        {
            var sha256 = new SHA256Managed();

            return(new UInt256(sha256.ComputeDoubleHash(DataEncoder.EncodeTransaction(Version, Inputs, Outputs, LockTime))));
        }
Exemplo n.º 2
0
        public static UInt256 CalculateTransactionHash(Transaction tx)
        {
            var sha256 = new SHA256Managed();

            return(new UInt256(sha256.ComputeDoubleHash(DataEncoder.EncodeTransaction(tx))));
        }