Class ZephyrTxConfig

java.lang.Object
zephyr.wallet.model.ZephyrTxConfig

public class ZephyrTxConfig extends Object
Configures a transaction to send, sweep, or create a payment URI.
  • Constructor Details

    • ZephyrTxConfig

      public ZephyrTxConfig()
  • Method Details

    • copy

      public ZephyrTxConfig copy()
    • setAddress

      public ZephyrTxConfig setAddress(String address)
      Set the address of a single-destination configuration.
      Parameters:
      address - - the address to set for the single destination
      Returns:
      ZephyrTxConfig this configuration for chaining
    • getAddress

      public String getAddress()
      Get the address of a single-destination configuration.
      Returns:
      String the address of the single destination
    • setAmount

      public ZephyrTxConfig setAmount(BigInteger amount)
      Set the amount of a single-destination configuration.
      Parameters:
      amount - - the amount to set for the single destination
      Returns:
      ZephyrTxConfig this configuration for chaining
    • setAmount

      public ZephyrTxConfig setAmount(String amount)
      Set the amount of a single-destination configuration.
      Parameters:
      amount - - the amount to set for the single destination in atomic units as a string
      Returns:
      ZephyrTxConfig this configuration for chaining
    • getAmount

      public BigInteger getAmount()
      Get the amount of a single-destination configuration.
      Returns:
      BigInteger the amount of the single destination
    • addDestination

      public ZephyrTxConfig addDestination(String address, BigInteger amount)
    • addDestination

      public ZephyrTxConfig addDestination(ZephyrDestination destination)
    • getDestinations

      public List<ZephyrDestination> getDestinations()
    • setDestinations

      public ZephyrTxConfig setDestinations(List<ZephyrDestination> destinations)
    • setDestinations

      public ZephyrTxConfig setDestinations(ZephyrDestination... destinations)
    • getPaymentId

      public String getPaymentId()
    • setPaymentId

      public ZephyrTxConfig setPaymentId(String paymentId)
    • getPriority

      public ZephyrTxPriority getPriority()
    • setPriority

      public ZephyrTxConfig setPriority(ZephyrTxPriority priority)
    • getFee

      public BigInteger getFee()
    • setFee

      public ZephyrTxConfig setFee(BigInteger fee)
    • getAccountIndex

      public Integer getAccountIndex()
    • setAccountIndex

      public ZephyrTxConfig setAccountIndex(Integer accountIndex)
    • getSubaddressIndices

      public List<Integer> getSubaddressIndices()
    • setSubaddressIndex

      public ZephyrTxConfig setSubaddressIndex(int subaddressIndex)
    • setSubaddressIndices

      public ZephyrTxConfig setSubaddressIndices(List<Integer> subaddressIndices)
    • setSubaddressIndices

      public ZephyrTxConfig setSubaddressIndices(Integer... subaddressIndices)
    • getUnlockHeight

      public Long getUnlockHeight()
      Get the minimum height for the transaction to unlock. The transaction will unlock on the maximum of the returned unlock height and the confirmation height + 10.
      Returns:
      the minimum height for the transaction to unlock
    • setUnlockHeight

      public ZephyrTxConfig setUnlockHeight(Long unlockHeight)
      Set the minimum height for the transaction to unlock. The transaction will unlock on the maximum of the given unlock height and the confirmation height + 10.
      Parameters:
      unlockHeight - the minimum height for the transaction to unlock
      Returns:
      this configuration for chaining
    • getCanSplit

      public Boolean getCanSplit()
    • setCanSplit

      public ZephyrTxConfig setCanSplit(Boolean canSplit)
    • getRelay

      public Boolean getRelay()
    • setRelay

      public ZephyrTxConfig setRelay(Boolean relay)
    • getNote

      public String getNote()
    • setNote

      public ZephyrTxConfig setNote(String note)
    • getRecipientName

      public String getRecipientName()
    • setRecipientName

      public ZephyrTxConfig setRecipientName(String recipientName)
    • getBelowAmount

      public BigInteger getBelowAmount()
    • setBelowAmount

      public ZephyrTxConfig setBelowAmount(BigInteger belowAmount)
    • getSweepEachSubaddress

      public Boolean getSweepEachSubaddress()
    • setSweepEachSubaddress

      public ZephyrTxConfig setSweepEachSubaddress(Boolean sweepEachSubaddress)
    • getKeyImage

      public String getKeyImage()
    • setKeyImage

      public ZephyrTxConfig setKeyImage(String keyImage)
    • getSourceCurrency

      public String getSourceCurrency()
      Get the asset that the transaction spends.
      Returns:
      String the source currency (see ZephyrAssets)
    • setSourceCurrency

      public ZephyrTxConfig setSourceCurrency(String sourceCurrency)
      Set the asset that the transaction spends. Required for every send, together with the destination currency: a plain transfer sets both to the same asset, a conversion (mint or redeem) sets the pair of its transaction type, for example ZPH to ZSD to mint the stable asset. The pair holds for the whole transaction and all its destinations. No check is made here; the core and the chain decide which pairs are valid.
      Parameters:
      sourceCurrency - is the asset that the transaction spends (see ZephyrAssets)
      Returns:
      ZephyrTxConfig this configuration for chaining
    • getDestinationCurrency

      public String getDestinationCurrency()
      Get the asset that the destinations receive.
      Returns:
      String the destination currency (see ZephyrAssets)
    • setDestinationCurrency

      public ZephyrTxConfig setDestinationCurrency(String destinationCurrency)
      Set the asset that the destinations receive. Required for every send, together with the source currency: a plain transfer sets both to the same asset, a conversion (mint or redeem) sets the pair of its transaction type, for example ZPH to ZSD to mint the stable asset. The pair holds for the whole transaction and all its destinations; the asset type of a destination does not override it. No check is made here; the core and the chain decide which pairs are valid.
      Parameters:
      destinationCurrency - is the asset that the destinations receive (see ZephyrAssets)
      Returns:
      ZephyrTxConfig this configuration for chaining
    • toString

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

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

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