Package zephyr.wallet.model
Class ZephyrDestination
java.lang.Object
zephyr.wallet.model.ZephyrDestination
Models an outgoing transfer destination.
-
Constructor Summary
ConstructorsConstructorDescriptionZephyrDestination(String address) ZephyrDestination(String address, BigInteger amount) ZephyrDestination(ZephyrDestination destination) -
Method Summary
Modifier and TypeMethodDescriptioncopy()booleanReturns the amount of this destination in atomic units.Returns the asset of this destination as the core reports it on transfers.inthashCode()voidsetAddress(String address) voidsetAmount(BigInteger amount) Sets the amount of this destination; on a send it is the amount in the source currency.voidsetAssetType(String assetType) Sets the asset of this destination.toString()toString(int indent)
-
Constructor Details
-
ZephyrDestination
public ZephyrDestination() -
ZephyrDestination
-
ZephyrDestination
-
ZephyrDestination
-
-
Method Details
-
getAddress
-
setAddress
-
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
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
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
Sets the asset of this destination.- Parameters:
assetType- is the asset name (seeZephyrAssets)
-
copy
-
toString
-
toString
-
hashCode
public int hashCode() -
equals
-