mirror of https://github.com/zcash/zips.git
Add sample URLs
This commit is contained in:
parent
61338366a3
commit
5e30adb94e
40
zip-0321.rst
40
zip-0321.rst
|
@ -88,7 +88,7 @@ URI Syntax:
|
||||||
addrparam = "address" [ paramindex ] "=" zcashaddress
|
addrparam = "address" [ paramindex ] "=" zcashaddress
|
||||||
amountparam = "amount" [ paramindex ] "=" 1*DIGIT [ "." 1*DIGIT ]
|
amountparam = "amount" [ paramindex ] "=" 1*DIGIT [ "." 1*DIGIT ]
|
||||||
labelparam = "label" [ paramindex ] "=" *qchar
|
labelparam = "label" [ paramindex ] "=" *qchar
|
||||||
memoparam = "memo" [ paramindex ] "=" *qchar
|
memoparam = "memo" [ paramindex ] "=" *base64url
|
||||||
messageparam = "message" [ paramindex ] "=" *qchar
|
messageparam = "message" [ paramindex ] "=" *qchar
|
||||||
paramname = ALPHA *( ALPHA / DIGIT / "+" / "-" )
|
paramname = ALPHA *( ALPHA / DIGIT / "+" / "-" )
|
||||||
reqparam = "req-" paramname [ paramindex ] [ "=" *qchar ]
|
reqparam = "req-" paramname [ paramindex ] [ "=" *qchar ]
|
||||||
|
@ -97,7 +97,8 @@ URI Syntax:
|
||||||
allowed-delims = "!" / "$" / "'" / "(" / ")" / "*" / "+" / "," / ";"
|
allowed-delims = "!" / "$" / "'" / "(" / ")" / "*" / "+" / "," / ";"
|
||||||
|
|
||||||
Here, ``ALPHA``, ``unreserved`` and ``pct-encoded`` are as defined in
|
Here, ``ALPHA``, ``unreserved`` and ``pct-encoded`` are as defined in
|
||||||
[#RFC3986]_. "base58" is defined as in [#base58check]_
|
[#RFC3986]_. "base58" is defined as in [#base58check]_. "base64url" is defined
|
||||||
|
as in [#base64url]_ with padding omitted.
|
||||||
|
|
||||||
A ZIP-321 URI represents a request for the construction of a transaction having
|
A ZIP-321 URI represents a request for the construction of a transaction having
|
||||||
one or more *payments*. In the case that only a single payment is being
|
one or more *payments*. In the case that only a single payment is being
|
||||||
|
@ -152,6 +153,40 @@ message
|
||||||
Message that clients can display for the purpose of presenting descriptive
|
Message that clients can display for the purpose of presenting descriptive
|
||||||
information about the transaction to the user.
|
information about the transaction to the user.
|
||||||
|
|
||||||
|
Examples
|
||||||
|
--------
|
||||||
|
|
||||||
|
Valid examples
|
||||||
|
~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
zcash:ztestsapling10yy2ex5dcqkclhc7z7yrnjq2z6feyjad56ptwlfgmy77dmaqqrl9gyhprdx59qgmsnyfska2kez?amount=1&memo=VGhpcyBpcyBhIHNpbXBsZSBtZW1vLg&message=Thank%20you%20for%20your%20purchase
|
||||||
|
|
||||||
|
A valid payment request for a payment of 1 ZEC to a single shielded address, with a base64url-encoded memo and a message for display by the wallet.
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
zcash:?address=tmEZhbWHTpdKMw5it8YDspUXSMGQyFwovpU&amount=123.456&memo=eyAia2V5IjogIlRoaXMgaXMgYSBKU09OLXN0cnVjdHVyZWQgbWVtby4iIH0&address.1=ztestsapling10yy2ex5dcqkclhc7z7yrnjq2z6feyjad56ptwlfgmy77dmaqqrl9gyhprdx59qgmsnyfska2kez&amount.1=0.789&memo.1=VGhpcyBpcyBhIHVuaWNvZGUgbWVtbyDinKjwn6aE8J-PhvCfjok
|
||||||
|
|
||||||
|
A valid payment request with one transparent and one shielded recipient address, with encoded JSON and unicode memos.
|
||||||
|
|
||||||
|
Invalid Examples
|
||||||
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
zcash:?amount=3491405.05201255&address.1=ztestsapling10yy2ex5dcqkclhc7z7yrnjq2z6feyjad56ptwlfgmy77dmaqqrl9gyhprdx59qgmsnyfska2kez&amount.1=5740296.87793245
|
||||||
|
|
||||||
|
An invalid payment request; this is missing a payment address for the 0th payment index..
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
zcash:?address=tmEZhbWHTpdKMw5it8YDspUXSMGQyFwovpU&amount=1&address=ztestsapling10yy2ex5dcqkclhc7z7yrnjq2z6feyjad56ptwlfgmy77dmaqqrl9gyhprdx59qgmsnyfska2kez&amount.1=2
|
||||||
|
zcash:?address.1=tmEZhbWHTpdKMw5it8YDspUXSMGQyFwovpU&amount=1&address.0=ztestsapling10yy2ex5dcqkclhc7z7yrnjq2z6feyjad56ptwlfgmy77dmaqqrl9gyhprdx59qgmsnyfska2kez&amount.1=2
|
||||||
|
|
||||||
|
Invalid payment requests; this contains more than one value for the 0th and 1st payment addresses, respectively.
|
||||||
|
|
||||||
Forward compatibility
|
Forward compatibility
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
|
@ -179,3 +214,4 @@ References
|
||||||
.. [#bip-0021] `BIP 21: URI Scheme <https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki>`_
|
.. [#bip-0021] `BIP 21: URI Scheme <https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki>`_
|
||||||
.. [#bip-0070] `BIP 70: Payment Protocol <https://github.com/bitcoin/bips/blob/master/bip-0070.mediawiki>`_
|
.. [#bip-0070] `BIP 70: Payment Protocol <https://github.com/bitcoin/bips/blob/master/bip-0070.mediawiki>`_
|
||||||
.. [#base58check] `Base58Check encoding <https://en.bitcoin.it/wiki/Base58Check_encoding>`_
|
.. [#base58check] `Base58Check encoding <https://en.bitcoin.it/wiki/Base58Check_encoding>`_
|
||||||
|
.. [#base64url] `RFC 4648 section 5: Base64 Encoding with URL and Filename Safe Alphabet <https://tools.ietf.org/html/rfc4648#section-5>`_
|
||||||
|
|
Loading…
Reference in New Issue