From 6e3221b021227ff5272772a7a9acd519b9b6777b Mon Sep 17 00:00:00 2001 From: Kumulynja <92805150+kumulynja@users.noreply.github.com> Date: Mon, 30 Jun 2025 18:50:49 +0200 Subject: [PATCH] BIP 77: Propose percent-encoding of + in pj query parameter in Bitcoin URIs --- bip-0077.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bip-0077.md b/bip-0077.md index 25f73b2666..5c976399ee 100644 --- a/bip-0077.md +++ b/bip-0077.md @@ -233,8 +233,10 @@ fragment of the Bitcoin URI. These session-specific parameters use a bech32-inspired encoding. The HRP is used as the parameter key, followed by the '1' separator, followed by the parameter value encoded using the bech32 character set in -[uppercase](#uppercase-url). No checksum is used. Parameters are separated -by a `+` character. +[uppercase](#uppercase-url). No checksum is used. Parameters are separated by a + character, +which must be [RFC 3986 +percent-encoded](https://datatracker.ietf.org/doc/html/rfc3986#section-2.1) as `%2B` to avoid it being interpreted as a space in Bitcoin URI query parameters. +To preserve QR alphanumeric mode compatibility, `%2B` ([uppercase](#uppercase-url)) should be used instead of `%2b`. The following parameters are defined, and must be provided in reverse lexicographical order: @@ -253,7 +255,7 @@ lexicographical order: time](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16). For example, a properly encoded endpoint Bitcoin URI looks like this -`bitcoin:tb1q6q6de88mj8qkg0q5lupmpfexwnqjsr4d2gvx2p?amount=0.00666666&pjos=0&pj=HTTPS://PAYJO.IN/TXJCGKTKXLUUZ%23RK1Q0DJS3VVDXWQQTLQ8022QGXSX7ML9PHZ6EDSF6AKEWQG758JPS2EV+OH1QYPM59NK2LXXS4890SUAXXYT25Z2VAPHP0X7YEYCJXGWAG6UG9ZU6NQ+EX1WKV8CEC` +`bitcoin:tb1q6q6de88mj8qkg0q5lupmpfexwnqjsr4d2gvx2p?amount=0.00666666&pjos=0&pj=HTTPS://PAYJO.IN/TXJCGKTKXLUUZ%23RK1Q0DJS3VVDXWQQTLQ8022QGXSX7ML9PHZ6EDSF6AKEWQG758JPS2EV%2BOH1QYPM59NK2LXXS4890SUAXXYT25Z2VAPHP0X7YEYCJXGWAG6UG9ZU6NQ%2BEX1WKV8CEC` ### Sender Original PSBT Messaging