Miscellaneous functions, types and constants¶
API reference¶
-
class
monero.numbers.
PaymentID
(payment_id)¶ A class that validates Monero payment ID.
Payment IDs can be used as str or int across the module, however this class offers validation as well as simple conversion and comparison to those two primitive types.
Parameters: payment_id – the payment ID as integer or hexadecimal string -
is_short
()¶ Returns True if payment ID is short enough to be included in
IntegratedAddress
.
-
-
monero.numbers.
as_monero
(amount)¶ Return the amount rounded to maximal Monero precision.
-
monero.numbers.
from_atomic
(amount)¶ Convert atomic integer of piconero to Monero decimal.
-
monero.numbers.
to_atomic
(amount)¶ Convert Monero decimal to atomic integer of piconero.