Module sapio_bitcoin::util::amount

source ·
Expand description

Bitcoin amounts.

This module mainly introduces the Amount and SignedAmount types. We refer to the documentation on the types for more information.

Modules

  • serdeserde
    This module adds serde serialization and deserialization support for Amounts. Since there is not a default way to serialize and deserialize Amounts, multiple ways are supported and it’s up to the user to decide which serialiation to use. The provided modules can be used as follows:

Structs

Enums

  • An amount of Bitcoin in either Satoshis (sats) or Bitcoin (btc).
  • A set of denominations in which amounts can be expressed.
  • An error during amount parsing.

Traits

  • Calculate the sum over the iterator using checked arithmetic.