Class Amount

  • All Implemented Interfaces:
    java.lang.AutoCloseable , org.bitcoindevkit.AmountInterface , org.bitcoindevkit.Disposable

    public class Amount
     implements Disposable, AutoCloseable, AmountInterface
                        

    The Amount type can be used to express Bitcoin amounts that support arithmetic and conversion to various denominations. The operations that Amount implements will panic when overflow or underflow occurs. Also note that since the internal representation of amounts is unsigned, subtracting below zero is considered an underflow and will cause a panic.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public class Amount.Companion
    • Constructor Summary

      Constructors 
      Constructor Description
      Amount(Pointer pointer)
      Amount(NoPointer noPointer) This constructor can be used to instantiate a fake object.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Unit destroy()
      Unit close()
      final Pointer uniffiClonePointer()
      Double toBtc() Express this Amount as a floating-point value in Bitcoin.
      ULong toSat() Get the number of satoshis in this Amount.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Amount

        Amount(Pointer pointer)
      • Amount

        Amount(NoPointer noPointer)
        This constructor can be used to instantiate a fake object.