From 116129c6878a14415afba89e90b8ddd3a12b477e Mon Sep 17 00:00:00 2001 From: William Swanson Date: Mon, 10 Mar 2014 18:10:27 -0700 Subject: [PATCH] BIP 21: Allow empty addresses and query parameters Empty addresses should be valid for compatibility with BIP 72. Empty query parameters should also be valid, since they are harmless, and clients already accept them. With these changes, bitcoin:?& would be a valid (but useless) URI. --- bip-0021.mediawiki | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bip-0021.mediawiki b/bip-0021.mediawiki index 44cca1f9..e64a71e7 100644 --- a/bip-0021.mediawiki +++ b/bip-0021.mediawiki @@ -37,14 +37,14 @@ Elements of the query component may contain characters outside the valid range. (See also [[#Simpler syntax|a simpler representation of syntax]]) bitcoinurn = "bitcoin:" bitcoinaddress [ "?" bitcoinparams ] - bitcoinaddress = base58 *base58 + bitcoinaddress = *base58 bitcoinparams = bitcoinparam [ "&" bitcoinparams ] - bitcoinparam = amountparam | labelparam | messageparam | otherparam | reqparam + bitcoinparam = [ amountparam / labelparam / messageparam / otherparam / reqparam ] amountparam = "amount=" *digit [ "." *digit ] labelparam = "label=" *qchar messageparam = "message=" *qchar - otherparam = qchar *qchar "=" *qchar - reqparam = "req-" qchar *qchar "=" *qchar + otherparam = qchar *qchar [ "=" *qchar ] + reqparam = "req-" qchar *qchar [ "=" *qchar ] Here, "qchar" corresponds to valid characters of an RFC 3986 URI query component, excluding the "=" and "&" characters, which this BIP takes as separators.