public SecretProofTransaction(NetworkType networkType, int version, Deadline deadline, ulong?maxFee, HashType hashType, Recipient recipient, string secret, string proof, string signature = null, PublicAccount signer = null, TransactionInfo transactionInfo = null) : base(networkType, version, EntityType.SECRET_PROOF, deadline, maxFee, signature, signer, transactionInfo) { Guard.NotNullOrEmpty(secret, "Secret must not be null"); Guard.NotNullOrEmpty(proof, "Proof must not be null"); Guard.NotNull(recipient, "Recipient must not be null"); if (!hashType.Validate(secret)) { throw new ArgumentOutOfRangeException( "HashType and Secret have incompatible length or not hexadecimal string"); } HashType = hashType; Proof = proof; Secret = secret; Recipient = recipient; }
/// <summary> /// Constructor /// </summary> /// <param name="networkType"></param> /// <param name="version"></param> /// <param name="deadline"></param> /// <param name="maxFee"></param> /// <param name="mosaic"></param> /// <param name="duration"></param> /// <param name="hashType"></param> /// <param name="secret"></param> /// <param name="recipient"></param> /// <param name="signature"></param> /// <param name="signer"></param> /// <param name="transactionInfo"></param> /// <exception cref="ArgumentOutOfRangeException"></exception> public SecretLockTransaction(NetworkType networkType, int version, Deadline deadline, ulong?maxFee, Mosaic mosaic, ulong duration, HashType hashType, string secret, Address recipient, string signature = null, PublicAccount signer = null, TransactionInfo transactionInfo = null) : base(networkType, version, EntityType.SECRET_LOCK, deadline, maxFee, signature, signer, transactionInfo) { Guard.NotNull(mosaic, "Mosaic must not be null"); Guard.NotNull(secret, "Secret must not be null"); Guard.NotNull(recipient, "Recipient must not be null"); if (!hashType.Validate(secret)) { throw new ArgumentOutOfRangeException( "HashType and Secret have incompatible length or not hexadecimal string"); } Mosaic = mosaic; Duration = duration; HashType = hashType; Secret = secret; Recipient = recipient; }