Difference between revisions of "BIP 0020"

From Bitcoin Wiki
Jump to: navigation, search
(Created page with "I propose a scheme like this: () means optional, $* are placeholders <pre> bitcoin:($label@)$address(?$query)(#$message) </pre> === Variables === <pre> label: Label for that ...")
 
(Fix URI compliance)
Line 3: Line 3:
 
() means optional, $* are placeholders
 
() means optional, $* are placeholders
  
<pre>
+
bitcoin://($host)/$address?amount=$size$unit(&label=$label)(&message=$message)
bitcoin:($label@)$address(?$query)(#$message)
 
</pre>
 
  
 
=== Variables ===
 
=== Variables ===
  
<pre>
+
*label: Label for that address (e.g. name of receiver)
label: Label for that address (e.g. name of receiver)
+
*address: bitcoin address
address: bitcoin address
+
*message: optional message that is shown to the user after scanning the QR code
query: pairs of key=value seperated by &
+
*size: amount of $unit
message: optional message that is shown to the user after scanning the QR code
+
*unit: BTC, [ᵗˢᵐᵇ]TBC[ᵗˢᵐᵇ], or null/omitted (which refers to the base unit)
</pre>
 
  
=== Query keys ===
 
<pre>
 
amount: amount of BTC
 
 
</pre>
 
 
== Examples ==
 
== Examples ==
  
 
Just the address:
 
Just the address:
<pre>
+
bitcoin:///18pnDgDYFMAKsHTA3ZqyAi6t8q9ztaWWXt
bitcoin:18pnDgDYFMAKsHTA3ZqyAi6t8q9ztaWWXt
 
</pre>
 
  
 
Address with name:
 
Address with name:
<pre>
+
bitcoin:///18pnDgDYFMAKsHTA3ZqyAi6t8q9ztaWWXt?label=tcatm
bitcoin:tcatm@18pnDgDYFMAKsHTA3ZqyAi6t8q9ztaWWXt
 
</pre>
 
  
 
Request to send 20.30 BTC to me:
 
Request to send 20.30 BTC to me:
<pre>
+
bitcoin:///18pnDgDYFMAKsHTA3ZqyAi6t8q9ztaWWXt?amount=20.30&label=tcatm
bitcoin:tcatm@18pnDgDYFMAKsHTA3ZqyAi6t8q9ztaWWXt?amount=20.30
 
</pre>
 
  
 
Request to send 50 BTC with message:
 
Request to send 50 BTC with message:
<pre>
+
bitcoin:///18pnDgDYFMAKsHTA3ZqyAi6t8q9ztaWWXt?amount=50&label=tcatm&message=Payment%20for%20product%20xyz
bitcoin:18pnDgDYFMAKsHTA3ZqyAi6t8q9ztaWWXt?amount=50#Payment%20for%20product%20xyz
 
</pre>
 
  
Characters must be URI encoded.
+
Characters must be URI encoded properly.

Revision as of 00:49, 10 January 2011

I propose a scheme like this:

() means optional, $* are placeholders

bitcoin://($host)/$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:

bitcoin:///18pnDgDYFMAKsHTA3ZqyAi6t8q9ztaWWXt?label=tcatm

Request to send 20.30 BTC to me:

bitcoin:///18pnDgDYFMAKsHTA3ZqyAi6t8q9ztaWWXt?amount=20.30&label=tcatm

Request to send 50 BTC with message:

bitcoin:///18pnDgDYFMAKsHTA3ZqyAi6t8q9ztaWWXt?amount=50&label=tcatm&message=Payment%20for%20product%20xyz

Characters must be URI encoded properly.