Class ZephyrDestination

java.lang.Object
zephyr.wallet.model.ZephyrDestination

public class ZephyrDestination extends Object
Models an outgoing transfer destination.
  • Constructor Details

    • ZephyrDestination

      public ZephyrDestination()
    • ZephyrDestination

      public ZephyrDestination(String address)
    • ZephyrDestination

      public ZephyrDestination(String address, BigInteger amount)
    • ZephyrDestination

      public ZephyrDestination(ZephyrDestination destination)
  • Method Details

    • getAddress

      public String getAddress()
    • setAddress

      public void setAddress(String address)
    • getAmount

      public BigInteger getAmount()
      Returns the amount of this destination in atomic units. For a conversion the meaning depends on where the destination comes from: on the transaction that createTxs or sweepUnlocked returns it is the source amount (in the source currency); in getTxs() after confirmation it is the destination amount (in the destination currency, from the core's dest_amount). The outgoing transfer's own amount stays the source amount.
      Returns:
      the amount in atomic units
    • setAmount

      public void setAmount(BigInteger amount)
      Sets the amount of this destination; on a send it is the amount in the source currency.
      Parameters:
      amount - is the amount in atomic units
    • getAssetType

      public String getAssetType()
      Returns the asset of this destination as the core reports it on transfers. On a send this field does not decide what is sent: the currency pair of the tx config (source and destination currency) holds for the whole transaction.
      Returns:
      the asset name (see ZephyrAssets), null if not reported
    • setAssetType

      public void setAssetType(String assetType)
      Sets the asset of this destination.
      Parameters:
      assetType - is the asset name (see ZephyrAssets)
    • copy

      public ZephyrDestination copy()
    • toString

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

      public String toString(int indent)
    • hashCode

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

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