#bitcoin #instructions #wallet #resolution #methods #attempt #ons #qr-scan

no-std bitcoin-payment-instructions

A parser for arbitrary bitcoin payment instructions

11 releases (7 breaking)

0.7.0 Jan 21, 2026
0.6.0 Dec 9, 2025
0.5.1 Dec 8, 2025
0.5.0 Sep 2, 2025
0.3.1 Mar 31, 2025

#25 in #resolution

Download history 1147/week @ 2025-10-16 667/week @ 2025-10-23 740/week @ 2025-10-30 809/week @ 2025-11-06 1131/week @ 2025-11-13 783/week @ 2025-11-20 718/week @ 2025-11-27 1263/week @ 2025-12-04 740/week @ 2025-12-11 464/week @ 2025-12-18 267/week @ 2025-12-25 575/week @ 2026-01-01 959/week @ 2026-01-08 1219/week @ 2026-01-15 1105/week @ 2026-01-22 973/week @ 2026-01-29

4,416 downloads per month
Used in bip353-rs

MIT/Apache

190KB
4K SLoC

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.

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

Payment instructions come in two versions -

In general, you should resolve a string (received either from a QR code scan, a system URI open call, a "recipient" text box, or a pasted "recipient" instruction) through PaymentInstructions::parse.

From there, if you receive a PaymentInstructions::FixedAmount you should check that you support at least one of the FixedAmountPaymentInstructions::methods and request approval from the wallet owner to complete the payment.

If you receive a PaymentInstructions::ConfigurableAmount instead, you should similarly check that that you support one of the ConfigurableAmountPaymentInstructions::methods using PossiblyResolvedPaymentMethod::method_type, then display an amount selection UI to the wallet owner. Once they've selected an amount, you should proceed with ConfigurableAmountPaymentInstructions::set_amount to fetch a finalized FixedAmountPaymentInstructions before moving to confirmation and payment.


This crate contains a parser for Bitcoin Payment Instructions.

It supports nearly all encodings which you might encounter in QR codes, typed/pasted into a text box, or opened via a system URI handler.

Any missing Payment Instruction formats should be added as soon as there is a standard encoding for address formats, ideally using a Rust crate that (a) has very minimal dependencies, (b) has a fairly conservative MSRV policy, and (c) has regular contribution from more than one individual.

Dependencies

~18–29MB
~349K SLoC