Class ZephyrReserveInfo

java.lang.Object
zephyr.wallet.model.ZephyrReserveInfo

public class ZephyrReserveInfo extends Object
The reserve info of the Zephyr network at the current height, as the core's get_reserve_info reports it. Amounts are in atomic units and arrive from the native bridge as decimal strings (the core computes them as 128-bit integers); the two ratios are dimensionless and keep the full double precision of the core. The JSON keys are snake_case, exactly as the bridge emits them.
  • Constructor Details

  • Method Details

    • getZephReserve

      public BigInteger getZephReserve()
      Returns the amount of ZPH held in the reserve, in atomic units.
      Returns:
      the amount of ZPH held in the reserve, in atomic units
    • setZephReserve

      public void setZephReserve(BigInteger zephReserve)
      Sets the amount of ZPH held in the reserve, in atomic units.
      Parameters:
      zephReserve - is the amount of ZPH held in the reserve, in atomic units
    • getNumStables

      public BigInteger getNumStables()
      Returns the circulating amount of the stable asset, in atomic units.
      Returns:
      the circulating amount of the stable asset, in atomic units
    • setNumStables

      public void setNumStables(BigInteger numStables)
      Sets the circulating amount of the stable asset, in atomic units.
      Parameters:
      numStables - is the circulating amount of the stable asset, in atomic units
    • getNumReserves

      public BigInteger getNumReserves()
      Returns the circulating amount of the reserve asset, in atomic units.
      Returns:
      the circulating amount of the reserve asset, in atomic units
    • setNumReserves

      public void setNumReserves(BigInteger numReserves)
      Sets the circulating amount of the reserve asset, in atomic units.
      Parameters:
      numReserves - is the circulating amount of the reserve asset, in atomic units
    • getAssets

      public BigInteger getAssets()
      Returns the value of the reserve assets, in atomic units.
      Returns:
      the value of the reserve assets, in atomic units
    • setAssets

      public void setAssets(BigInteger assets)
      Sets the value of the reserve assets, in atomic units.
      Parameters:
      assets - is the value of the reserve assets, in atomic units
    • getAssetsMa

      public BigInteger getAssetsMa()
      Returns the moving average of the reserve assets, in atomic units.
      Returns:
      the moving average of the reserve assets, in atomic units
    • setAssetsMa

      public void setAssetsMa(BigInteger assetsMa)
      Sets the moving average of the reserve assets, in atomic units.
      Parameters:
      assetsMa - is the moving average of the reserve assets, in atomic units
    • getLiabilities

      public BigInteger getLiabilities()
      Returns the liabilities of the reserve, in atomic units.
      Returns:
      the liabilities of the reserve, in atomic units
    • setLiabilities

      public void setLiabilities(BigInteger liabilities)
      Sets the liabilities of the reserve, in atomic units.
      Parameters:
      liabilities - is the liabilities of the reserve, in atomic units
    • getEquity

      public BigInteger getEquity()
      Returns the equity of the reserve, in atomic units.
      Returns:
      the equity of the reserve, in atomic units
    • setEquity

      public void setEquity(BigInteger equity)
      Sets the equity of the reserve, in atomic units.
      Parameters:
      equity - is the equity of the reserve, in atomic units
    • getEquityMa

      public BigInteger getEquityMa()
      Returns the moving average of the equity, in atomic units.
      Returns:
      the moving average of the equity, in atomic units
    • setEquityMa

      public void setEquityMa(BigInteger equityMa)
      Sets the moving average of the equity, in atomic units.
      Parameters:
      equityMa - is the moving average of the equity, in atomic units
    • getReserveRatio

      public BigDecimal getReserveRatio()
      Returns the reserve ratio (dimensionless).
      Returns:
      the reserve ratio (dimensionless)
    • setReserveRatio

      public void setReserveRatio(BigDecimal reserveRatio)
      Sets the reserve ratio (dimensionless).
      Parameters:
      reserveRatio - is the reserve ratio (dimensionless)
    • getReserveRatioMa

      public BigDecimal getReserveRatioMa()
      Returns the moving average of the reserve ratio (dimensionless).
      Returns:
      the moving average of the reserve ratio (dimensionless)
    • setReserveRatioMa

      public void setReserveRatioMa(BigDecimal reserveRatioMa)
      Sets the moving average of the reserve ratio (dimensionless).
      Parameters:
      reserveRatioMa - is the moving average of the reserve ratio (dimensionless)
    • getHfVersion

      public Integer getHfVersion()
      Returns the hard fork version at which the reserve info was computed.
      Returns:
      the hard fork version at which the reserve info was computed
    • setHfVersion

      public void setHfVersion(Integer hfVersion)
      Sets the hard fork version at which the reserve info was computed.
      Parameters:
      hfVersion - is the hard fork version at which the reserve info was computed
    • getZyieldCirc

      public BigInteger getZyieldCirc()
      Returns the circulating amount of the yield asset, in atomic units.
      Returns:
      the circulating amount of the yield asset, in atomic units
    • setZyieldCirc

      public void setZyieldCirc(BigInteger zyieldCirc)
      Sets the circulating amount of the yield asset, in atomic units.
      Parameters:
      zyieldCirc - is the circulating amount of the yield asset, in atomic units
    • getZyieldRsv

      public BigInteger getZyieldRsv()
      Returns the amount held in the yield reserve, in atomic units.
      Returns:
      the amount held in the yield reserve, in atomic units
    • setZyieldRsv

      public void setZyieldRsv(BigInteger zyieldRsv)
      Sets the amount held in the yield reserve, in atomic units.
      Parameters:
      zyieldRsv - is the amount held in the yield reserve, in atomic units
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toString

      public String toString(int indent)
      Returns one line per field.
      Parameters:
      indent - indents the lines
      Returns:
      the human-readable string
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object