private void validateSecretProofTx(SecretProofTransaction transaction, string transactionDTO)
        {
            var tx = JsonConvert.DeserializeObject <SecretProofTransactionInfoDTO>(transactionDTO);

            Assert.IsTrue(HashType.GetRawValue(tx.Transaction.HashAlgorithm) == transaction.HashAlgo);
            Assert.AreEqual(transaction.SecretString(), tx.Transaction.Secret);
            Assert.AreEqual(tx.Transaction.Proof, transaction.ProofString());
        }
        public new SecretProofTransaction Apply(string input)
        {
            var tx = JsonConvert.DeserializeObject <SecretProofTransactionInfoDTO>(input);
            var transactionInfo = TransactionInfo.Create(tx.Meta.Height, tx.Meta.Index, tx.Meta.Id, tx.Meta.Hash, tx.Meta.MerkleComponentHash);
            var transaction     = tx.Transaction;

            return(new SecretProofTransaction(
                       ExtractNetworkType(tx.Transaction.Version),
                       ExtractTransactionVersion(tx.Transaction.Version),
                       new Deadline(transaction.Deadline),
                       transaction.Fee,
                       HashType.GetRawValue(transaction.HashAlgorithm),
                       transaction.Secret,
                       transaction.Proof,
                       transaction.Signature,
                       new PublicAccount(transaction.Signer, ExtractNetworkType(tx.Transaction.Version)),
                       transactionInfo
                       ));
        }
        internal new SecretLockTransaction Apply(string input)
        {
            var tx = JsonConvert.DeserializeObject <SecretLockTransactionInfoDTO>(input);
            var transactionInfo = TransactionInfo.Create(tx.Meta.Height, tx.Meta.Index, tx.Meta.Id, tx.Meta.Hash, tx.Meta.MerkleComponentHash);
            var transaction     = tx.Transaction;

            var mosaic = new Mosaic(new MosaicId(transaction.MosaicId), transaction.Amount);

            return(new SecretLockTransaction(
                       ExtractNetworkType(tx.Transaction.Version),
                       ExtractTransactionVersion(tx.Transaction.Version),
                       new Deadline(transaction.Deadline),
                       transaction.Fee,
                       mosaic,
                       transaction.Duration,
                       HashType.GetRawValue(transaction.HashAlgorithm),
                       transaction.Secret,
                       Address.CreateFromHex(transaction.Recipient),
                       transaction.Signature,
                       new PublicAccount(transaction.Signer, ExtractNetworkType(tx.Transaction.Version)),
                       transactionInfo
                       ));
        }