Crate bitcoin_payment_instructions

Source
Expand description

These days, there are many possible ways to communicate Bitcoin payment instructions. This crate attempts to unify them into a simple parser which can read text provided directly by a payer or via a QR code scan/URI open and convert it into payment instructions.

See the PaymentInstructions type for the supported instruction formats.

This crate doesn’t actually help you pay these instructions, but provides a unified way to parse them.

Modules§

amount
Because lightning uses “milli-satoshis” rather than satoshis for its native currency amount, parsing payment instructions requires amounts with sub-satoshi precision.

Structs§

HrnResolution
The resolution of a Human Readable Name
HumanReadableName
A struct containing the two parts of a BIP 353 Human Readable Name - the user and domain parts.
PaymentInstructions
Parsed payment instructions representing a set of possible ways to pay, as well as some associated metadata.

Enums§

ParseError
An error when parsing payment instructions into PaymentInstructions.
PaymentMethod
A method which can be used to make a payment

Constants§

MAX_AMOUNT_DIFFERENCE
The maximum amount requested that we will allow individual payment methods to differ in satoshis.

Traits§

HrnResolver
An arbitrary resolver for a Human Readable Name.

Type Aliases§

HrnResolutionFuture
A future which resolves to a HrnResolution.