Amount

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.

Constructors

Link copied to clipboard
constructor(pointer: Pointer)
constructor(noPointer: NoPointer)

This constructor can be used to instantiate a fake object. Only used for tests. Any attempt to actually use an object constructed this way will fail as there is no connected Rust object.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun destroy()
Link copied to clipboard
open override 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
open override fun toSat(): ULong

Get the number of satoshis in this Amount.

Link copied to clipboard
fun uniffiClonePointer(): Pointer