Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ApplicationLocalState" /> class.
 /// </summary>
 /// <param name="id">The application which this local state is for. (required).</param>
 /// <param name="schema">\\[hsch\\] schema. (required).</param>
 /// <param name="keyValue">\\[tkv\\] storage..</param>
 public ApplicationLocalState(long?id = default, ApplicationStateSchema schema = default(ApplicationStateSchema), TealKeyValueStore keyValue = default(TealKeyValueStore))
 {
     // to ensure "id" is required (not null)
     if (id == null)
     {
         throw new InvalidDataException("id is a required property for ApplicationLocalState and cannot be null");
     }
     else
     {
         this.Id = id;
     }
     // to ensure "schema" is required (not null)
     if (schema == null)
     {
         throw new InvalidDataException("schema is a required property for ApplicationLocalState and cannot be null");
     }
     else
     {
         this.Schema = schema;
     }
     this.KeyValue = keyValue;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ApplicationParams" /> class.
 /// </summary>
 /// <param name="creator">The address that created this application. This is the address where the parameters and global state for this application can be found. (required).</param>
 /// <param name="approvalProgram">\\[approv\\] approval program. (required).</param>
 /// <param name="clearStateProgram">\\[clearp\\] approval program. (required).</param>
 /// <param name="localStateSchema">[\\lsch\\] local schema.</param>
 /// <param name="globalStateSchema">[\\lsch\\] global schema.</param>
 /// <param name="globalState">[\\gs\\] global schema.</param>
 public ApplicationParams(string creator = default(string), byte[] approvalProgram = default(byte[]), byte[] clearStateProgram = default(byte[]), ApplicationStateSchema localStateSchema = default(ApplicationStateSchema), ApplicationStateSchema globalStateSchema = default(ApplicationStateSchema), TealKeyValueStore globalState = default(TealKeyValueStore))
 {
     // to ensure "creator" is required (not null)
     if (creator == null)
     {
         throw new InvalidDataException("creator is a required property for ApplicationParams and cannot be null");
     }
     else
     {
         this.Creator = creator;
     }
     // to ensure "approvalProgram" is required (not null)
     if (approvalProgram == null)
     {
         throw new InvalidDataException("approvalProgram is a required property for ApplicationParams and cannot be null");
     }
     else
     {
         this.ApprovalProgram = approvalProgram;
     }
     // to ensure "clearStateProgram" is required (not null)
     if (clearStateProgram == null)
     {
         throw new InvalidDataException("clearStateProgram is a required property for ApplicationParams and cannot be null");
     }
     else
     {
         this.ClearStateProgram = clearStateProgram;
     }
     this.LocalStateSchema  = localStateSchema;
     this.GlobalStateSchema = globalStateSchema;
     this.GlobalState       = globalState;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="Account" /> class.
 /// </summary>
 /// <param name="address">the account public key (required).</param>
 /// <param name="amount">\\[algo\\] total number of MicroAlgos in the account (required).</param>
 /// <param name="amountWithoutPendingRewards">specifies the amount of MicroAlgos in the account, without the pending rewards. (required).</param>
 /// <param name="appsLocalState">\\[appl\\] applications local data stored in this account.  Note the raw object uses &#x60;map[int] -&gt; AppLocalState&#x60; for this type..</param>
 /// <param name="appsTotalSchema">\\[tsch\\] stores the sum of all of the local schemas and global schemas in this account.  Note: the raw account uses &#x60;StateSchema&#x60; for this type..</param>
 /// <param name="assets">\\[asset\\] assets held by this account.  Note the raw object uses &#x60;map[int] -&gt; AssetHolding&#x60; for this type..</param>
 /// <param name="createdApps">\\[appp\\] parameters of applications created by this account including app global data.  Note: the raw account uses &#x60;map[int] -&gt; AppParams&#x60; for this type..</param>
 /// <param name="createdAssets">\\[apar\\] parameters of assets created by this account.  Note: the raw account uses &#x60;map[int] -&gt; Asset&#x60; for this type..</param>
 /// <param name="participation">participation.</param>
 /// <param name="pendingRewards">amount of MicroAlgos of pending rewards in this account. (required).</param>
 /// <param name="rewardBase">\\[ebase\\] used as part of the rewards computation. Only applicable to accounts which are participating..</param>
 /// <param name="rewards">\\[ern\\] total rewards of MicroAlgos the account has received, including pending rewards. (required).</param>
 /// <param name="round">The round for which this information is relevant. (required).</param>
 /// <param name="status">\\[onl\\] delegation status of the account&#39;s MicroAlgos * Offline - indicates that the associated account is delegated. *  Online  - indicates that the associated account used as part of the delegation pool. *   NotParticipating - indicates that the associated account is neither a delegator nor a delegate. (required).</param>
 /// <param name="sigType">Indicates what type of signature is used by this account, must be one of: * sig * msig * lsig.</param>
 /// <param name="authAddr">\\[spend\\] the address against which signing should be checked. If empty, the address of the current account is used. This field can be updated in any transaction by setting the RekeyTo field..</param>
 public Account(string address = default(string), long?amount = default, long?amountWithoutPendingRewards = default, List <ApplicationLocalState> appsLocalState = default(List <ApplicationLocalState>), ApplicationStateSchema appsTotalSchema = default(ApplicationStateSchema), List <AssetHolding> assets = default(List <AssetHolding>), List <Application> createdApps = default(List <Application>), List <Asset> createdAssets = default(List <Asset>), AccountParticipation participation = default(AccountParticipation), long?pendingRewards = default, long?rewardBase = default, long?rewards = default, long?round = default, string status = default(string), SigTypeEnum?sigType = default(SigTypeEnum?), string authAddr = default(string))
 {
     // to ensure "address" is required (not null)
     if (address == null)
     {
         throw new InvalidDataException("address is a required property for Account and cannot be null");
     }
     else
     {
         this.Address = address;
     }
     // to ensure "amount" is required (not null)
     if (amount == null)
     {
         throw new InvalidDataException("amount is a required property for Account and cannot be null");
     }
     else
     {
         this.Amount = amount;
     }
     // to ensure "amountWithoutPendingRewards" is required (not null)
     if (amountWithoutPendingRewards == null)
     {
         throw new InvalidDataException("amountWithoutPendingRewards is a required property for Account and cannot be null");
     }
     else
     {
         this.AmountWithoutPendingRewards = amountWithoutPendingRewards;
     }
     // to ensure "pendingRewards" is required (not null)
     if (pendingRewards == null)
     {
         throw new InvalidDataException("pendingRewards is a required property for Account and cannot be null");
     }
     else
     {
         this.PendingRewards = pendingRewards;
     }
     // to ensure "rewards" is required (not null)
     if (rewards == null)
     {
         throw new InvalidDataException("rewards is a required property for Account and cannot be null");
     }
     else
     {
         this.Rewards = rewards;
     }
     // to ensure "round" is required (not null)
     if (round == null)
     {
         throw new InvalidDataException("round is a required property for Account and cannot be null");
     }
     else
     {
         this.Round = round;
     }
     // to ensure "status" is required (not null)
     if (status == null)
     {
         throw new InvalidDataException("status is a required property for Account and cannot be null");
     }
     else
     {
         this.Status = status;
     }
     this.AppsLocalState  = appsLocalState;
     this.AppsTotalSchema = appsTotalSchema;
     this.Assets          = assets;
     this.CreatedApps     = createdApps;
     this.CreatedAssets   = createdAssets;
     this.Participation   = participation;
     this.RewardBase      = rewardBase;
     this.SigType         = sigType;
     this.AuthAddr        = authAddr;
 }