Exemple #1
0
 /// <summary>
 /// Creates an instance of MultisigAggregateModificationTransaction.
 /// </summary>
 /// <param name="network">The network.</param>
 /// <param name="deadline">The deadline.</param>
 /// <param name="fee">The fee.</param>
 /// <param name="relativeChange">The relative change.</param>
 /// <param name="modifications">The modifications.</param>
 /// <returns>MultisigAggregateModificationTransaction.</returns>
 public static MultisigAggregateModificationTransaction Create(NetworkType.Types network, Deadline deadline, ulong fee, int relativeChange, List <MultisigModification> modifications)
 {
     return(new MultisigAggregateModificationTransaction(network, 2, deadline, fee, relativeChange, modifications));
 }
 /// <summary>
 /// Initializes a new signed instance of the <see cref="MultisigTransaction"/> class.
 /// </summary>
 /// <param name="networkType">Type of the network.</param>
 /// <param name="version">The version.</param>
 /// <param name="networkTime">The networkTime.</param>
 /// <param name="deadline">The deadline.</param>
 /// <param name="fee">The fee.</param>
 /// <param name="innerTransaction">The inner transaction.</param>
 /// <param name="signature">The signature.</param>
 /// <param name="signer">The signer.</param>
 /// <param name="transactionInfo">The transaction information.</param>
 public MultisigTransaction(NetworkType.Types networkType, int version, NetworkTime networkTime, Deadline deadline, ulong fee, Transaction innerTransaction, string signature, PublicAccount signer, TransactionInfo transactionInfo)
 {
     TransactionType  = TransactionTypes.Types.Multisig;
     NetworkType      = networkType;
     Version          = version;
     NetworkTime      = networkTime;
     Deadline         = deadline;
     Fee              = fee == 0 ? 150000 : fee;
     InnerTransaction = innerTransaction;
     Signer           = signer;
     Signature        = signature;
     TransactionInfo  = transactionInfo;
 }
 /// <summary>
 /// Initializes a new signed instance of the <see cref="SupplyChangeTransaction"/> class.
 /// </summary>
 /// <param name="networkType">Type of the network.</param>
 /// <param name="version">The version.</param>
 /// <param name="networkTime">The networkTime.</param>
 /// <param name="deadline">The deadline.</param>
 /// <param name="fee">The fee.</param>
 /// <param name="delta">The delta.</param>
 /// <param name="mosaicId">The mosaic identifier.</param>
 /// <param name="supplyType">Type of the supply.</param>
 /// <param name="signature">The signature.</param>
 /// <param name="signer">The signer.</param>
 /// <param name="transactionInfo">The transaction information.</param>
 public SupplyChangeTransaction(NetworkType.Types networkType, int version, NetworkTime networkTime, Deadline deadline, ulong fee, ulong delta, MosaicId mosaicId, int supplyType, string signature, PublicAccount signer, TransactionInfo transactionInfo)
 {
     TransactionType = TransactionTypes.Types.SupplyChange;
     Version         = version;
     NetworkTime     = networkTime;
     Deadline        = deadline;
     NetworkType     = networkType;
     Signature       = signature;
     Signer          = signer;
     TransactionInfo = transactionInfo;
     Fee             = fee == 0 ? 150000 : fee;
     Delta           = delta;
     MosaicId        = mosaicId;
     SupplyType      = supplyType;
 }
 /// <summary>
 /// Initializes a new signed instance of the <see cref="CosignatureTransaction"/> class.
 /// </summary>
 /// <param name="networkType">Type of the network.</param>
 /// <param name="version">The version.</param>
 /// <param name="networkTime">The networkTime.</param>
 /// <param name="deadline">The deadline.</param>
 /// <param name="fee">The fee.</param>
 /// <param name="hash">The hash of the transaction to sign.</param>
 /// <param name="multisigAddress">The multisig address.</param>
 /// <param name="signature">The signature.</param>
 /// <param name="signer">The signer.</param>
 /// <param name="transactionInfo">The transaction information.</param>
 public CosignatureTransaction(NetworkType.Types networkType, int version, NetworkTime networkTime, Deadline deadline, ulong fee, string hash, Address multisigAddress, string signature, PublicAccount signer, TransactionInfo transactionInfo)
 {
     TransactionType = TransactionTypes.Types.SignatureTransaction;
     Version         = version;
     NetworkTime     = networkTime;
     Deadline        = deadline;
     NetworkType     = networkType;
     Signature       = signature;
     Signer          = signer;
     TransactionInfo = transactionInfo;
     Fee             = fee == 0 ? 150000 : fee;
     OtherHash       = hash;
     MultisigAddress = multisigAddress;
 }
 /// <summary>
 /// Initializes a new signed instance of the <see cref="TransferTransaction"/> class.
 /// </summary>
 /// <param name="networkType">Type of the network.</param>
 /// <param name="version">The version.</param>
 /// <param name="networkTime">The networkTime.</param>
 /// <param name="deadline">The deadline.</param>
 /// <param name="fee">The fee.</param>
 /// <param name="recipient">The recipient.</param>
 /// <param name="mosaics">The mosaics.</param>
 /// <param name="message">The message.</param>
 /// <param name="signature">The signature.</param>
 /// <param name="signer">The signer.</param>
 /// <param name="transactionInfo">The transaction information.</param>
 /// <exception cref="System.ArgumentNullException">recipient</exception>
 internal TransferTransaction(NetworkType.Types networkType, int version, NetworkTime networkTime, Deadline deadline, ulong fee, Address recipient, List <MosaicAmount> mosaics, IMessage message, string signature, PublicAccount signer, TransactionInfo transactionInfo)
 {
     Address         = recipient ?? throw new ArgumentNullException(nameof(recipient));
     Mosaics         = mosaics ?? new List <MosaicAmount>();
     TransactionType = TransactionTypes.Types.Transfer;
     Version         = version;
     NetworkTime     = networkTime;
     Deadline        = deadline;
     Message         = message ?? EmptyMessage.Create();
     NetworkType     = networkType;
     Signature       = signature;
     Signer          = signer;
     TransactionInfo = transactionInfo;
     Fee             = fee == 0 ? CalculateFee() : fee;
 }