Ejemplo n.º 1
0
        /// <summary>
        /// Returns true if StateDelta instances are equal
        /// </summary>
        /// <param name="input">Instance of StateDelta to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(StateDelta input)
        {
            if (input == null)
            {
                return(false);
            }

            return(base.Equals(input));
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="AccountStateDelta" /> class.
 /// </summary>
 /// <param name="address">address (required).</param>
 /// <param name="delta">delta (required).</param>
 public AccountStateDelta(string address = default(string), StateDelta delta = default(StateDelta))
 {
     // to ensure "address" is required (not null)
     if (address == null)
     {
         throw new InvalidDataException("address is a required property for AccountStateDelta and cannot be null");
     }
     else
     {
         this.Address = address;
     }
     // to ensure "delta" is required (not null)
     if (delta == null)
     {
         throw new InvalidDataException("delta is a required property for AccountStateDelta and cannot be null");
     }
     else
     {
         this.Delta = delta;
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DryrunTxnResult" /> class.
 /// </summary>
 /// <param name="disassembly">Disassembled program line by line. (required).</param>
 /// <param name="logicSigTrace">logicSigTrace.</param>
 /// <param name="logicSigMessages">logicSigMessages.</param>
 /// <param name="appCallTrace">appCallTrace.</param>
 /// <param name="appCallMessages">appCallMessages.</param>
 /// <param name="globalDelta">globalDelta.</param>
 /// <param name="localDeltas">localDeltas.</param>
 public DryrunTxnResult(List <string> disassembly = default(List <string>), List <DryrunState> logicSigTrace = default(List <DryrunState>), List <string> logicSigMessages = default(List <string>), List <DryrunState> appCallTrace = default(List <DryrunState>), List <string> appCallMessages = default(List <string>), StateDelta globalDelta = default(StateDelta), List <AccountStateDelta> localDeltas = default(List <AccountStateDelta>))
 {
     // to ensure "disassembly" is required (not null)
     if (disassembly == null)
     {
         throw new InvalidDataException("disassembly is a required property for DryrunTxnResult and cannot be null");
     }
     else
     {
         this.Disassembly = disassembly;
     }
     this.LogicSigTrace    = logicSigTrace;
     this.LogicSigMessages = logicSigMessages;
     this.AppCallTrace     = appCallTrace;
     this.AppCallMessages  = appCallMessages;
     this.GlobalDelta      = globalDelta;
     this.LocalDeltas      = localDeltas;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PendingTransactionResponse" /> class.
 /// </summary>
 /// <param name="assetIndex">The asset index if the transaction was found and it created an asset..</param>
 /// <param name="applicationIndex">The application index if the transaction was found and it created an application..</param>
 /// <param name="closeRewards">Rewards in microalgos applied to the close remainder to account..</param>
 /// <param name="closingAmount">Closing amount for the transaction..</param>
 /// <param name="confirmedRound">The round where this transaction was confirmed, if present..</param>
 /// <param name="poolError">Indicates that the transaction was kicked out of this node&#39;s transaction pool (and specifies why that happened).  An empty string indicates the transaction wasn&#39;t kicked out of this node&#39;s txpool due to an error.  (required).</param>
 /// <param name="receiverRewards">Rewards in microalgos applied to the receiver account..</param>
 /// <param name="senderRewards">Rewards in microalgos applied to the sender account..</param>
 /// <param name="localStateDelta">\\[ld\\] Local state key/value changes for the application being executed by this transaction..</param>
 /// <param name="globalStateDelta">\\[gd\\] Global state key/value changes for the application being executed by this transaction..</param>
 /// <param name="txn">The raw signed transaction. (required).</param>
 public PendingTransactionResponse(long?assetIndex = default, long?applicationIndex = default, long?closeRewards = default, long?closingAmount = default, long?confirmedRound = default, string poolError = default(string), long?receiverRewards = default, long?senderRewards = default, List <AccountStateDelta> localStateDelta = default(List <AccountStateDelta>), StateDelta globalStateDelta = default(StateDelta), Object txn = default(Object))
 {
     // to ensure "poolError" is required (not null)
     if (poolError == null)
     {
         throw new InvalidDataException("poolError is a required property for PendingTransactionResponse and cannot be null");
     }
     else
     {
         this.PoolError = poolError;
     }
     // to ensure "txn" is required (not null)
     if (txn == null)
     {
         throw new InvalidDataException("txn is a required property for PendingTransactionResponse and cannot be null");
     }
     else
     {
         this.Txn = txn;
     }
     this.AssetIndex       = assetIndex;
     this.ApplicationIndex = applicationIndex;
     this.CloseRewards     = closeRewards;
     this.ClosingAmount    = closingAmount;
     this.ConfirmedRound   = confirmedRound;
     this.ReceiverRewards  = receiverRewards;
     this.SenderRewards    = senderRewards;
     this.LocalStateDelta  = localStateDelta;
     this.GlobalStateDelta = globalStateDelta;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="Transaction" /> class.
 /// </summary>
 /// <param name="applicationTransaction">applicationTransaction.</param>
 /// <param name="assetConfigTransaction">assetConfigTransaction.</param>
 /// <param name="assetFreezeTransaction">assetFreezeTransaction.</param>
 /// <param name="assetTransferTransaction">assetTransferTransaction.</param>
 /// <param name="authAddr">\\[sgnr\\] The address used to sign the transaction. This is used for rekeyed accounts to indicate that the sender address did not sign the transaction..</param>
 /// <param name="closeRewards">\\[rc\\] rewards applied to close-remainder-to account..</param>
 /// <param name="closingAmount">\\[ca\\] closing amount for transaction..</param>
 /// <param name="confirmedRound">Round when the transaction was confirmed..</param>
 /// <param name="createdApplicationIndex">Specifies an application index (ID) if an application was created with this transaction..</param>
 /// <param name="createdAssetIndex">Specifies an asset index (ID) if an asset was created with this transaction..</param>
 /// <param name="fee">\\[fee\\] Transaction fee. (required).</param>
 /// <param name="firstValid">\\[fv\\] First valid round for this transaction. (required).</param>
 /// <param name="genesisHash">\\[gh\\] Hash of genesis block..</param>
 /// <param name="genesisId">\\[gen\\] genesis block ID..</param>
 /// <param name="globalStateDelta">globalStateDelta.</param>
 /// <param name="group">\\[grp\\] Base64 encoded byte array of a sha512/256 digest. When present indicates that this transaction is part of a transaction group and the value is the sha512/256 hash of the transactions in that group..</param>
 /// <param name="id">Transaction ID (required).</param>
 /// <param name="intraRoundOffset">Offset into the round where this transaction was confirmed..</param>
 /// <param name="keyregTransaction">keyregTransaction.</param>
 /// <param name="lastValid">\\[lv\\] Last valid round for this transaction. (required).</param>
 /// <param name="lease">\\[lx\\] Base64 encoded 32-byte array. Lease enforces mutual exclusion of transactions.  If this field is nonzero, then once the transaction is confirmed, it acquires the lease identified by the (Sender, Lease) pair of the transaction until the LastValid round passes.  While this transaction possesses the lease, no other transaction specifying this lease can be confirmed..</param>
 /// <param name="localStateDelta">\\[ld\\] Local state key/value changes for the application being executed by this transaction..</param>
 /// <param name="note">\\[note\\] Free form data..</param>
 /// <param name="paymentTransaction">paymentTransaction.</param>
 /// <param name="receiverRewards">\\[rr\\] rewards applied to receiver account..</param>
 /// <param name="rekeyTo">\\[rekey\\] when included in a valid transaction, the accounts auth addr will be updated with this value and future signatures must be signed with the key represented by this address..</param>
 /// <param name="roundTime">Time when the block this transaction is in was confirmed..</param>
 /// <param name="sender">\\[snd\\] Sender&#x27;s address. (required).</param>
 /// <param name="senderRewards">\\[rs\\] rewards applied to sender account..</param>
 /// <param name="signature">signature (required).</param>
 /// <param name="txType">\\[type\\] Indicates what type of transaction this is. Different types have different fields.  Valid types, and where their fields are stored: * \\[pay\\] payment-transaction * \\[keyreg\\] keyreg-transaction * \\[acfg\\] asset-config-transaction * \\[axfer\\] asset-transfer-transaction * \\[afrz\\] asset-freeze-transaction * \\[appl\\] application-transaction (required).</param>
 public Transaction(TransactionApplication applicationTransaction = default(TransactionApplication), TransactionAssetConfig assetConfigTransaction = default(TransactionAssetConfig), TransactionAssetFreeze assetFreezeTransaction = default(TransactionAssetFreeze), TransactionAssetTransfer assetTransferTransaction = default(TransactionAssetTransfer), string authAddr = default(string), long?closeRewards = default, long?closingAmount = default, long?confirmedRound = default, long?createdApplicationIndex = default, long?createdAssetIndex = default, long?fee = default, long?firstValid = default, byte[] genesisHash = default(byte[]), string genesisId = default(string), StateDelta globalStateDelta = default, byte[] group = default(byte[]), string id = default(string), long?intraRoundOffset = default, TransactionKeyreg keyregTransaction = default(TransactionKeyreg), long?lastValid = default, byte[] lease = default(byte[]), List <AccountStateDelta> localStateDelta = default(List <AccountStateDelta>), byte[] note = default(byte[]), TransactionPayment paymentTransaction = default(TransactionPayment), long?receiverRewards = default, string rekeyTo = default(string), long?roundTime = default, string sender = default(string), long?senderRewards = default, TransactionSignature signature = default(TransactionSignature), TxTypeEnum txType = default(TxTypeEnum))
 {
     // to ensure "fee" is required (not null)
     if (fee == null)
     {
         throw new InvalidDataException("fee is a required property for Transaction and cannot be null");
     }
     else
     {
         this.Fee = fee;
     }
     // to ensure "firstValid" is required (not null)
     if (firstValid == null)
     {
         throw new InvalidDataException("firstValid is a required property for Transaction and cannot be null");
     }
     else
     {
         this.FirstValid = firstValid;
     }
     // to ensure "id" is required (not null)
     if (id == null)
     {
         throw new InvalidDataException("id is a required property for Transaction and cannot be null");
     }
     else
     {
         this.Id = id;
     }
     // to ensure "lastValid" is required (not null)
     if (lastValid == null)
     {
         throw new InvalidDataException("lastValid is a required property for Transaction and cannot be null");
     }
     else
     {
         this.LastValid = lastValid;
     }
     // to ensure "sender" is required (not null)
     if (sender == null)
     {
         throw new InvalidDataException("sender is a required property for Transaction and cannot be null");
     }
     else
     {
         this.Sender = sender;
     }
     // to ensure "signature" is required (not null)
     if (signature == null)
     {
         throw new InvalidDataException("signature is a required property for Transaction and cannot be null");
     }
     else
     {
         this.Signature = signature;
     }
     // to ensure "txType" is required (not null)
     if (txType == null)
     {
         throw new InvalidDataException("txType is a required property for Transaction and cannot be null");
     }
     else
     {
         this.TxType = txType;
     }
     this.ApplicationTransaction   = applicationTransaction;
     this.AssetConfigTransaction   = assetConfigTransaction;
     this.AssetFreezeTransaction   = assetFreezeTransaction;
     this.AssetTransferTransaction = assetTransferTransaction;
     this.AuthAddr                = authAddr;
     this.CloseRewards            = closeRewards;
     this.ClosingAmount           = closingAmount;
     this.ConfirmedRound          = confirmedRound;
     this.CreatedApplicationIndex = createdApplicationIndex;
     this.CreatedAssetIndex       = createdAssetIndex;
     this.GenesisHash             = genesisHash;
     this.GenesisId               = genesisId;
     this.GlobalStateDelta        = globalStateDelta;
     this.Group             = group;
     this.IntraRoundOffset  = intraRoundOffset;
     this.KeyregTransaction = keyregTransaction;
     this.Lease             = lease;
     this.LocalStateDelta   = localStateDelta;
     this.Note = note;
     this.PaymentTransaction = paymentTransaction;
     this.ReceiverRewards    = receiverRewards;
     this.RekeyTo            = rekeyTo;
     this.RoundTime          = roundTime;
     this.SenderRewards      = senderRewards;
 }