Class MoneyMan

java.lang.Object
foundation.omni.net.MoneyMan

public class MoneyMan extends Object
Definitions for MoneyMan address functionality on TestNet and RegTest
  • Field Details

    • willettsPerSatoshi

      public static final long willettsPerSatoshi
      Exchange rate for MoneyMan transactions: 100 Omni per BTC
      See Also:
  • Constructor Details

    • MoneyMan

      public MoneyMan()
  • Method Details

    • toOmni

      public static OmniDivisibleValue toOmni(org.bitcoinj.base.Coin bitcoin)
      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

      public static org.bitcoinj.base.Coin requiredBitcoin(OmniDivisibleValue omni)
      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