BIP 0020: Difference between revisions
Jump to navigation
Jump to search
see main discussion page |
distinguished between tcatm's proposal and LukeJr's changes |
||
Line 1: | Line 1: | ||
==tcatm== | |||
I propose a scheme like this: | |||
() means optional, $* are placeholders | |||
<pre> | |||
bitcoin:($label@)$address(?$query)(#$message) | |||
</pre> | |||
=== Variables === | |||
<pre> | |||
label: Label for that address (e.g. name of receiver) | |||
address: bitcoin address | |||
query: pairs of key=value seperated by & | |||
message: optional message that is shown to the user after scanning the QR code | |||
</pre> | |||
=== Query keys === | |||
<pre> | |||
amount: amount of BTC | |||
</pre> | |||
=== Examples === | |||
Just the address: | |||
<pre> | |||
bitcoin:18pnDgDYFMAKsHTA3ZqyAi6t8q9ztaWWXt | |||
</pre> | |||
Address with name: | |||
<pre> | |||
bitcoin:tcatm@18pnDgDYFMAKsHTA3ZqyAi6t8q9ztaWWXt | |||
</pre> | |||
Request to send 20.30 BTC to me: | |||
<pre> | |||
bitcoin:tcatm@18pnDgDYFMAKsHTA3ZqyAi6t8q9ztaWWXt?amount=20.30 | |||
</pre> | |||
Request to send 50 BTC with message: | |||
<pre> | |||
bitcoin:18pnDgDYFMAKsHTA3ZqyAi6t8q9ztaWWXt?amount=50#Payment%20for%20product%20xyz | |||
</pre> | |||
Characters must be URI encoded. | |||
==tcatm, modified by LukeJr== | |||
I propose a scheme like this: | I propose a scheme like this: | ||
Line 13: | Line 65: | ||
*unit: BTC, [ᵗˢᵐᵇ]TBC[ᵗˢᵐᵇ], or null/omitted (which refers to the base unit) | *unit: BTC, [ᵗˢᵐᵇ]TBC[ᵗˢᵐᵇ], or null/omitted (which refers to the base unit) | ||
== Examples == | === Examples === | ||
Just the address: | Just the address: | ||
Line 35: | Line 87: | ||
Characters must be URI encoded properly. | Characters must be URI encoded properly. | ||
== BNF syntax == | === BNF syntax === | ||
bitcoinurn = "bitcoin:" bitcoinaddress [ ";version=" bitcoinversion ] [ "?" bitcoinparams ] | bitcoinurn = "bitcoin:" bitcoinaddress [ ";version=" bitcoinversion ] [ "?" bitcoinparams ] |
Revision as of 11:58, 10 January 2011
tcatm
I propose a scheme like this:
() means optional, $* are placeholders
bitcoin:($label@)$address(?$query)(#$message)
Variables
label: Label for that address (e.g. name of receiver) address: bitcoin address query: pairs of key=value seperated by & message: optional message that is shown to the user after scanning the QR code
Query keys
amount: amount of BTC
Examples
Just the address:
bitcoin:18pnDgDYFMAKsHTA3ZqyAi6t8q9ztaWWXt
Address with name:
bitcoin:tcatm@18pnDgDYFMAKsHTA3ZqyAi6t8q9ztaWWXt
Request to send 20.30 BTC to me:
bitcoin:tcatm@18pnDgDYFMAKsHTA3ZqyAi6t8q9ztaWWXt?amount=20.30
Request to send 50 BTC with message:
bitcoin:18pnDgDYFMAKsHTA3ZqyAi6t8q9ztaWWXt?amount=50#Payment%20for%20product%20xyz
Characters must be URI encoded.
tcatm, modified by LukeJr
I propose a scheme like this:
[] means optional, <> are placeholders
bitcoin:<address>?amount=<size><unit>[&label=<label>][&message=<message>]
Variables
- label: Label for that address (e.g. name of receiver)
- address: bitcoin address
- message: optional message that is shown to the user after scanning the QR code
- size: amount of $unit
- unit: BTC, [ᵗˢᵐᵇ]TBC[ᵗˢᵐᵇ], or null/omitted (which refers to the base unit)
Examples
Just the address:
bitcoin:18pnDgDYFMAKsHTA3ZqyAi6t8q9ztaWWXt
Address with name:BTC
bitcoin:18pnDgDYFMAKsHTA3ZqyAi6t8q9ztaWWXt?label=tcatm
Request to send 20.30 BTC to tcatm:
bitcoin:18pnDgDYFMAKsHTA3ZqyAi6t8q9ztaWWXt?amount=20.30BTC&label=tcatm
Request to send 400 TBC to Luke:
bitcoin:1KczVqwopWXQdFLe5sNQbpCq7yGSmXx2oo?amount=400TBC
Request to send 5 uBTC:
bitcoin:18pnDgDYFMAKsHTA3ZqyAi6t8q9ztaWWXt?amount=500
Request to send 50 BTC with message:
bitcoin:18pnDgDYFMAKsHTA3ZqyAi6t8qztaWWXt?amount=50BTC&label=tcatm&message=Payment%20for%20product%20xyz
Characters must be URI encoded properly.
BNF syntax
bitcoinurn = "bitcoin:" bitcoinaddress [ ";version=" bitcoinversion ] [ "?" bitcoinparams ] bitcoinaddress = FIXME :) bitcoinversion = "1.0" bitcoinparams = *bitcoinparam bitcoinparam = amountparam | labelparam | messageparam amountparam = "amount=" amount amount = amountdecimal | amounthex | amounttonal amountdecimal = digits btcunits amounthex = "x" hexdigits bitcoinunit amounttonal = tonaldigits tbcunits bitcoinunit = btcunits | tbcunits btcunits = "BTC" | "BTCents" | "uBTC" | "uBTCents" tbcunits = tbcunitsunicode | tbcunitsascii | tbcunitsfull tbcunitsunicode = "ᵇTBC" | "ᵐTBC" | "ˢTBC" | "ᵗTBC" | "TBC" | "TBCᵗ" | "TBCˢ" | "TBCᵐ" | "TBCᵇ" tbcunitsascii = "bTBC" | "mTBC" | "sTBC" | "tTBC" | "TBC" | "TBCt" | "TBCs" | "TBCm" | "TBCb" tbcunitsfull = "tran-TBC" | "song-TBC" | "tam-TBC" | "bong-TBC" | "mill-TBC" | "san-TBC" | "ton-TBC" | "TBC" | "TBC-ton" | "TBC-san" | "TBC-mill" | "TBC-bong" labelparam = "label=" *uchar messageparam = "label=" *uchar