/// <summary>
 /// Initializes a new instance of the <see cref="SecretProofTransaction"/> class.
 /// </summary>
 /// <param name="deadline">The deadline.</param>
 /// <param name="hashAlgo">The hash algo.</param>
 /// <param name="secret">The secret.</param>
 /// <param name="proof">The proof.</param>
 /// <param name="networkType">Type of the network.</param>
 public SecretProofTransaction(NetworkType.Types networkType, int version, Deadline deadline, ulong fee, HashType.Types hashAlgo, string secret, string proof, string signature, PublicAccount signer, TransactionInfo transactionInfo)
 {
     Deadline        = deadline;
     Version         = version;
     Fee             = fee;
     NetworkType     = networkType;
     HashAlgo        = hashAlgo;
     Secret          = secret.FromHex();
     Proof           = proof.FromHex();
     TransactionType = TransactionTypes.Types.SecretProof;
     Signer          = signer;
     Signature       = signature;
     TransactionInfo = transactionInfo;
 }
示例#2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SecretLockTransaction"/> class.
        /// </summary>
        /// <param name="networkType">Type of the network.</param>
        /// <param name="deadline">The deadline.</param>
        /// <param name="fee">The fee.</param>
        /// <param name="mosaic">The mosaic.</param>
        /// <param name="duration">The duration.</param>
        /// <param name="hashAlgo">The hash algo.</param>
        /// <param name="secret">The secret.</param>
        /// <param name="recipient">The recipient.</param>
        /// <param name="signature">The signature.</param>
        /// <param name="signer">The signer.</param>
        /// <param name="transactionInfo">The transaction information.</param>
        /// <exception cref="ArgumentException">invalid secret</exception>
        public SecretLockTransaction(NetworkType.Types networkType, int version, Deadline deadline, ulong fee, Mosaic mosaic, ulong duration, HashType.Types hashAlgo, string secret, Address recipient, string signature, PublicAccount signer, TransactionInfo transactionInfo)
        {
            if (hashAlgo.GetHashTypeValue() == 0 && secret.Length != 128)
            {
                throw new ArgumentException("invalid secret");
            }

            Deadline        = deadline;
            Version         = version;
            Fee             = fee;
            Duration        = duration;
            Mosaic          = mosaic;
            NetworkType     = networkType;
            HashAlgo        = hashAlgo;
            Secret          = secret.FromHex();
            Recipient       = recipient;
            TransactionType = TransactionTypes.Types.SecretLock;
            Signer          = signer;
            Signature       = signature;
            TransactionInfo = transactionInfo;
        }
示例#3
0
 /// <summary>
 /// Creates the specified deadline.
 /// </summary>
 /// <param name="deadline">The deadline.</param>
 /// <param name="mosaic">The mosaic.</param>
 /// <param name="duration">The duration.</param>
 /// <param name="fee">The fee.</param>
 /// <param name="hashAlgo">The hash algo.</param>
 /// <param name="secret">The secret.</param>
 /// <param name="recipient">The recipient.</param>
 /// <param name="netowrkType">Type of the netowrk.</param>
 /// <returns>SecretLockTransaction.</returns>
 public static SecretLockTransaction Create(NetworkType.Types netowrkType, int version, Deadline deadline, ulong fee, Mosaic mosaic, ulong duration, HashType.Types hashAlgo, string secret, Address recipient)
 {
     return(new SecretLockTransaction(netowrkType, version, deadline, fee, mosaic, duration, hashAlgo, secret, recipient, null, null, null));
 }
示例#4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SecretLockTransaction"/> class.
 /// </summary>
 /// <param name="networkType">Type of the network.</param>
 /// <param name="deadline">The deadline.</param>
 /// <param name="fee">The fee.</param>
 /// <param name="mosaic">The mosaic.</param>
 /// <param name="duration">The duration.</param>
 /// <param name="hashAlgo">The hash algo.</param>
 /// <param name="secret">The secret.</param>
 /// <param name="recipient">The recipient.</param>
 public SecretLockTransaction(NetworkType.Types networkType, int version, Deadline deadline, ulong fee, Mosaic mosaic, ulong duration, HashType.Types hashAlgo, string secret, Address recipient)
     : this(networkType, version, deadline, fee, mosaic, duration, hashAlgo, secret, recipient, null, null, null)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SecretProofTransaction"/> class.
 /// </summary>
 /// <param name="version">The transaction version</param>
 /// <param name="deadline">The deadline.</param>
 /// <param name="hashAlgo">The hash algo.</param>
 /// <param name="secret">The secret.</param>
 /// <param name="proof">The proof.</param>
 /// <param name="networkType">Type of the network.</param>
 public SecretProofTransaction(NetworkType.Types networkType, int version, Deadline deadline, ulong fee, HashType.Types hashAlgo, string secret, string proof)
     : this(networkType, 3, deadline, fee, hashAlgo, secret, proof, null, null, null)
 {
 }
 /// <summary>
 /// Creates the specified <see cref="SecretProofTransaction"/>.
 /// </summary>
 /// <param name="deadline">The deadline.</param>
 /// <param name="hashAlgo">The hash algo.</param>
 /// <param name="secret">The secret.</param>
 /// <param name="proof">The proof.</param>
 /// <param name="netowrkType">Type of the netowrk.</param>
 /// <returns><see cref="SecretProofTransaction"/></returns>
 public static SecretProofTransaction Create(NetworkType.Types netowrkType, Deadline deadline, ulong fee, HashType.Types hashAlgo, string secret, string proof)
 {
     return(new SecretProofTransaction(netowrkType, 3, deadline, fee, hashAlgo, secret, proof));
 }