コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TransferTransaction"/> class.
 /// </summary>
 /// <param name="networkType">Type of the network.</param>
 /// <param name="version">The version.</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, Deadline deadline, ulong fee, Address recipient, List <Mosaic> mosaics, IMessage message, string signature, PublicAccount signer, TransactionInfo transactionInfo)
 {
     Address         = recipient ?? throw new ArgumentNullException(nameof(recipient));
     Mosaics         = mosaics ?? new List <Mosaic>();
     TransactionType = TransactionTypes.Types.Transfer;
     Version         = version;
     Deadline        = deadline;
     Message         = message ?? EmptyMessage.Create();
     NetworkType     = networkType;
     Signature       = signature;
     Signer          = signer;
     TransactionInfo = transactionInfo;
     Fee             = fee == 0 ? CalculateFee() : fee;
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SupplyChangeTransaction"/> class.
 /// </summary>
 /// <param name="networkType">Type of the network.</param>
 /// <param name="version">The version.</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, Deadline deadline, ulong fee, ulong delta, MosaicId mosaicId, int supplyType, string signature, PublicAccount signer, TransactionInfo transactionInfo)
 {
     TransactionType = TransactionTypes.Types.SupplyChange;
     Version         = version;
     Deadline        = deadline;
     NetworkType     = networkType;
     Signature       = signature;
     Signer          = signer;
     TransactionInfo = transactionInfo;
     Fee             = fee == 0 ? 150000 : fee;
     Delta           = delta;
     MosaicId        = mosaicId;
     SupplyType      = supplyType;
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new signed instance of the <see cref="MosaicDefinitionTransaction"/> 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="properties">The properties.</param>
 /// <param name="mosaic">The mosaic.</param>
 /// <param name="mosaicLevy">The mosaic levy.</param>
 /// <param name="creator">The creator.</param>
 /// <param name="description">The description.</param>
 /// <param name="signature">The signature.</param>
 /// <param name="signer">The signer.</param>
 /// <param name="transactionInfo">The transaction information.</param>
 /// <exception cref="System.ArgumentNullException">
 /// properties
 /// or
 /// mosaic
 /// or
 /// creator
 /// </exception>
 public MosaicDefinitionTransaction(NetworkType.Types networkType, int version, NetworkTime networkTime, Deadline deadline, ulong fee, MosaicProperties properties, MosaicId mosaic, MosaicLevy mosaicLevy, PublicAccount creator, string description, string signature, PublicAccount signer, TransactionInfo transactionInfo)
 {
     TransactionType = TransactionTypes.Types.MosaicDefinition;
     Version         = version;
     NetworkTime     = networkTime;
     Deadline        = deadline;
     NetworkType     = networkType;
     Fee             = fee == 0 ? 150000 : fee;
     Properties      = properties ?? throw new ArgumentNullException(nameof(properties));
     Mosaic          = mosaic ?? throw new ArgumentNullException(nameof(mosaic));
     Creator         = creator ?? throw new ArgumentNullException(nameof(creator));
     Description     = description;
     MosaicLevy      = mosaicLevy;
     Signature       = signature;
     Signer          = signer;
     TransactionInfo = transactionInfo;
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProvisionNamespaceTransaction"/> class.
 /// </summary>
 /// <param name="networkType">Type of the network.</param>
 /// <param name="version">The version.</param>
 /// <param name="deadline">The deadline.</param>
 /// <param name="fee">The fee.</param>
 /// <param name="newPart">The new part.</param>
 /// <param name="parent">The parent.</param>
 /// <param name="signature">The signature.</param>
 /// <param name="signer">The signer.</param>
 /// <param name="transactionInfo">The transaction information.</param>
 public ProvisionNamespaceTransaction(NetworkType.Types networkType, int version, Deadline deadline, ulong fee, string newPart, string parent, string signature, PublicAccount signer, TransactionInfo transactionInfo)
 {
     TransactionType = TransactionTypes.Types.ProvisionNamespace;
     Version         = version;
     Deadline        = deadline;
     NetworkType     = networkType;
     Signature       = signature;
     Signer          = signer;
     TransactionInfo = transactionInfo;
     Fee             = fee == 0 ? 150000 : fee;
     Parent          = parent;
     NewPart         = newPart;
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MultisigTransaction"/> class.
 /// </summary>
 /// <param name="networkType">Type of the network.</param>
 /// <param name="version">The version.</param>
 /// <param name="deadline">The deadline.</param>
 /// <param name="fee">The fee.</param>
 /// <param name="innerTransaction">The inner transaction.</param>
 /// <param name="cosignatures">The cosignatures.</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, Deadline deadline, ulong fee, Transaction innerTransaction, List <CosignatureTransaction> cosignatures, string signature, PublicAccount signer, TransactionInfo transactionInfo)
 {
     TransactionType  = TransactionTypes.Types.Multisig;
     NetworkType      = networkType;
     Version          = version;
     Deadline         = deadline;
     Fee              = fee == 0 ? 150000 : fee;
     InnerTransaction = innerTransaction;
     Signer           = signer;
     Signature        = signature;
     TransactionInfo  = transactionInfo;
     Cosignatures     = cosignatures;
 }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CosignatureTransaction"/> class.
 /// </summary>
 /// <param name="networkType">Type of the network.</param>
 /// <param name="version">The version.</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, Deadline deadline, ulong fee, string hash, Address multisigAddress, string signature, PublicAccount signer, TransactionInfo transactionInfo)
 {
     TransactionType = TransactionTypes.Types.SignatureTransaction;
     Version         = version;
     Deadline        = deadline;
     NetworkType     = networkType;
     Signature       = signature;
     Signer          = signer;
     TransactionInfo = transactionInfo;
     Fee             = fee == 0 ? 150000 : fee;
     OtherHash       = hash;
     MultisigAddress = multisigAddress;
 }
コード例 #7
0
 /// <summary>
 /// Initializes a new signed instance of the <see cref="ImportanceTransferTransaction"/> 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="mode">The mode.</param>
 /// <param name="remoteAccount">The remote account.</param>
 /// <param name="signature">The signature.</param>
 /// <param name="signer">The signer.</param>
 /// <param name="transactionInfo">The transaction information.</param>
 public ImportanceTransferTransaction(NetworkType.Types networkType, int version, NetworkTime networkTime, Deadline deadline, ulong fee, ImportanceTransferMode.Mode mode, PublicAccount remoteAccount, string signature, PublicAccount signer, TransactionInfo transactionInfo)
 {
     TransactionType = TransactionTypes.Types.ImportanceTransfer;
     Version         = version;
     NetworkTime     = networkTime;
     Deadline        = deadline;
     NetworkType     = networkType;
     Signature       = signature;
     Signer          = signer;
     TransactionInfo = transactionInfo;
     Fee             = fee == 0 ? 150000 : fee;
     RemoteAccount   = remoteAccount;
     Mode            = mode;
 }
コード例 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MultisigAggregateModificationTransaction"/> class.
 /// </summary>
 /// <param name="networkType">Type of the network.</param>
 /// <param name="version">The version.</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>
 /// <param name="signature">The signature.</param>
 /// <param name="signer">The signer.</param>
 /// <param name="transactionInfo">The transaction information.</param>
 public MultisigAggregateModificationTransaction(NetworkType.Types networkType, int version, Deadline deadline, ulong fee, int relativeChange, List <MultisigModification> modifications, string signature, PublicAccount signer, TransactionInfo transactionInfo)
 {
     TransactionType = TransactionTypes.Types.MultisigAggregateModification;
     Version         = version;
     Deadline        = deadline;
     NetworkType     = networkType;
     Signature       = signature;
     Signer          = signer;
     TransactionInfo = transactionInfo;
     Fee             = fee == 0 ? 500000 : fee;
     RelativeChange  = relativeChange;
     Modifications   = modifications;
 }