diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-03-18 17:22:17 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-03-18 17:22:17 +0100 |
commit | a3fe3270ace5994865a7ac4cd01097747a20f9f6 (patch) | |
tree | 937164429a3e84aa7352aea08bc9717c4d880b21 /bip-0021.mediawiki | |
parent | 0505c84b4836604b789bdb38647baa44f2c85d3c (diff) | |
parent | 116129c6878a14415afba89e90b8ddd3a12b477e (diff) | |
download | bips-a3fe3270ace5994865a7ac4cd01097747a20f9f6.tar.xz |
Merge pull request #30 from swansontec/master
Fix BIP 21 and BIP 72 ambiguities & mistakes
Diffstat (limited to 'bip-0021.mediawiki')
-rw-r--r-- | bip-0021.mediawiki | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/bip-0021.mediawiki b/bip-0021.mediawiki index 8f2201b..e64a71e 100644 --- a/bip-0021.mediawiki +++ b/bip-0021.mediawiki @@ -26,19 +26,29 @@ They SHOULD require the user to manually approve each payment individually, thou === Operating system integration === Graphical bitcoin clients SHOULD register themselves as the handler for the "bitcoin:" URI scheme by default, if no other handler is already registered. If there is already a registered handler, they MAY prompt the user to change it once when they first run the client. -=== BNF grammar === +=== General Format === + +Bitcoin URIs follow the general format for URIs as set forth in RFC 3986. The path component consists of a bitcoin address, and the query component provides additional payment options. + +Elements of the query component may contain characters outside the valid range. These must first be encoded according to UTF-8, and then each octet of the corresponding UTF-8 sequence must be percent-encoded as described in RFC 3986. + +=== ABNF grammar === (See also [[#Simpler syntax|a simpler representation of syntax]]) bitcoinurn = "bitcoin:" bitcoinaddress [ "?" bitcoinparams ] - bitcoinaddress = base58 *base58 - bitcoinparams = *bitcoinparam - bitcoinparam = amountparam | labelparam | messageparam | otherparam | reqparam + bitcoinaddress = *base58 + bitcoinparams = bitcoinparam [ "&" bitcoinparams ] + bitcoinparam = [ amountparam / labelparam / messageparam / otherparam / reqparam ] amountparam = "amount=" *digit [ "." *digit ] - labelparam = "label=" *pchar - messageparam = "message=" *pchar - otherparam = pchar *pchar "=" *pchar - reqparam = "req-" pchar *pchar "=" *pchar + labelparam = "label=" *qchar + messageparam = "message=" *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. + +The scheme component ("bitcoin:") is case-insensitive, and implementations must accept any combination of uppercase and lowercase letters. The rest of the URI is case-sensitive, including the query parameter keys. === Query Keys === |