Package foundation.omni.net
Class MoneyMan
java.lang.Object
foundation.omni.net.MoneyMan
Definitions for MoneyMan address functionality on TestNet and RegTest
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
Exchange rate for MoneyMan transactions: 100 Omni per BTC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bitcoinj.base.Coin
Calculate Bitcoin required for a MoneyMan exchange.static OmniDivisibleValue
toOmni
(org.bitcoinj.base.Coin bitcoin) Calculate Omni returned in a MoneyMan exchange.
-
Field Details
-
willettsPerSatoshi
public static final long willettsPerSatoshiExchange rate for MoneyMan transactions: 100 Omni per BTC- See Also:
-
-
Constructor Details
-
MoneyMan
public MoneyMan()
-
-
Method Details
-
toOmni
Calculate Omni returned in a MoneyMan exchange.- Parameters:
bitcoin
- An amount of bitcoin- Returns:
- the amount of Omni the MoneyMan will exchange it for
-
requiredBitcoin
Calculate Bitcoin required for a MoneyMan exchange. Note that the number of OMNI/TOMNI returned may be greater than the amount requested, because this calculation ensures at least the amount requested will be returned.- Parameters:
omni
- A desired amount of Omni- Returns:
- the amount of Bitcoin the MoneyMan will require for it
-