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.

Inheritors

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun toBtc(): Double

Express this Amount as a floating-point value in Bitcoin. Please be aware of the risk of using floating-point numbers.

Link copied to clipboard
abstract fun toSat(): ULong

Get the number of satoshis in this Amount.