Proof.java

  1. package com.syntifi.near.api.model.transaction;

  2. import com.fasterxml.jackson.annotation.JsonProperty;
  3. import com.fasterxml.jackson.annotation.JsonValue;
  4. import com.syntifi.near.api.model.common.EncodedHash;
  5. import lombok.AllArgsConstructor;
  6. import lombok.Builder;
  7. import lombok.Getter;
  8. import lombok.NoArgsConstructor;
  9. import lombok.Setter;

  10. /**
  11.  * Proof
  12.  *
  13.  * @author Alexandre Carvalho
  14.  * @author Andre Bertolace
  15.  * @since 0.0.1
  16.  */
  17. @Getter
  18. @Setter
  19. @NoArgsConstructor
  20. @AllArgsConstructor
  21. @Builder
  22. public class Proof {
  23.     public enum Direction {
  24.         RIGHT("Right"),
  25.         LEFT("Left");

  26.         @Getter
  27.         @JsonValue
  28.         private final String name;

  29.         Direction(String name) {
  30.             this.name = name;
  31.         }
  32.     }

  33.     @JsonProperty("hash")
  34.     private EncodedHash hash;

  35.     @JsonProperty("direction")
  36.     private Direction direction;
  37. }