Account.java

  1. package com.syntifi.casper.sdk.model.account;

  2. import com.fasterxml.jackson.annotation.JsonProperty;
  3. import com.syntifi.casper.sdk.model.contract.NamedKey;
  4. import lombok.AllArgsConstructor;
  5. import lombok.Builder;
  6. import lombok.Getter;
  7. import lombok.NoArgsConstructor;
  8. import lombok.Setter;

  9. import java.util.List;

  10. /**
  11.  * Structure representing a user's account, stored in global state.
  12.  *
  13.  * @author Alexandre Carvalho
  14.  * @author Andre Bertolace
  15.  * @since 0.0.1
  16.  */
  17. @Getter
  18. @Setter
  19. @Builder
  20. @NoArgsConstructor
  21. @AllArgsConstructor
  22. public class Account {

  23.     /**
  24.      * account_hash(String) Hex-encoded account hash.
  25.      */
  26.     @JsonProperty("account_hash")
  27.     private String hash;

  28.     /**
  29.      * {@link ActionThresholds} that have to be met
  30.      * when executing an action of a certain type.
  31.      */
  32.     @JsonProperty("action_thresholds")
  33.     private ActionThresholds deployment;

  34.     /**
  35.      * a list of {@link AssociatedKey}
  36.      */
  37.     @JsonProperty("associated_keys")
  38.     private List<AssociatedKey> associatedKeys;

  39.     /**
  40.      * main_purse(String) Hex-encoded, formatted URef.
  41.      */
  42.     @JsonProperty("main_purse")
  43.     private String mainPurse;

  44.     /**
  45.      * named_keys (@link NamedKey)
  46.      */
  47.     @JsonProperty("named_keys")
  48.     private List<NamedKey> namedKeys;
  49. }