mirror of
https://github.com/bitcoin/bips.git
synced 2025-03-03 18:57:18 +01:00
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.
This commit is contained in:
parent
6f15f98b12
commit
116129c687
1 changed files with 4 additions and 4 deletions
|
@ -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.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue