mirror of https://github.com/zcash/zips.git
ZIP-321 Add detail about amount semantics and memo field contents.
This commit is contained in:
parent
9b5f4824d1
commit
312ef45964
42
zip-0321.rst
42
zip-0321.rst
|
@ -50,11 +50,11 @@ wallet vendors may support so that human intervention is required only for
|
|||
approval, not creation, of such a payment transaction.
|
||||
|
||||
In Bitcoin, two different standards exist which permit vendors to issue payment
|
||||
requests which are understood by wallets: BIP-0021 and BIP-0070. BIP-0021
|
||||
provides a URI format which can be interpreted by a wallet to construct simple,
|
||||
single-recipient transactions while BIP-0070 uses a protobuf-based protocol
|
||||
which permits payment requests to specify the creation of transactions of
|
||||
arbitrary complexity.
|
||||
requests which are understood by wallets: BIP-0021 [#BIP0021]_ and BIP-0070
|
||||
[#BIP0070]_. BIP-0021 provides a URI format which can be interpreted by a
|
||||
wallet to construct simple, single-recipient transactions while BIP-0070 uses a
|
||||
protobuf-based protocol which permits payment requests to specify the creation
|
||||
of transactions of arbitrary complexity.
|
||||
|
||||
The format proposed in this ZIP seeks a middle ground between these approaches:
|
||||
to provide a URI-based format which supports both the trivial use case and
|
||||
|
@ -94,6 +94,7 @@ URI Syntax:
|
|||
addrparam = "address" [paramindex] "=" zcashaddress
|
||||
amountparam = "amount" [paramindex] "=" *DIGIT [ "." *DIGIT ]
|
||||
labelparam = "label" [paramindex] "=" *qchar
|
||||
memoparam = "memo" [paramindex] "=" *qchar
|
||||
messageparam = "message" [paramindex] "=" *qchar
|
||||
paramname = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
|
||||
reqparam = "req-" paramname [ "=" *qchar ]
|
||||
|
@ -101,7 +102,7 @@ URI Syntax:
|
|||
qchar = unreserved / pct-encoded / allowed-delims / ":" / "@"
|
||||
allowed-delims = "!" / "$" / "'" / "(" / ")" / "*" / "+" / "," / ";"
|
||||
|
||||
Here, "unreserved" and "pct-encoded" are as defined in RFC 3986. "base58" is
|
||||
Here, ``unreserved`` and ``pct-encoded`` are as defined in [#RFC3986]_. "base58" is
|
||||
defined as in [#base58check]_
|
||||
|
||||
A ZIP-321 URI represents a request for the construction of a transaction having
|
||||
|
@ -122,6 +123,32 @@ instance of ``zcashaddress``.
|
|||
If there are any non-address parameters having a given ``paramindex``, then
|
||||
the URI MUST contain an address parameter having that ``paramindex``.
|
||||
|
||||
Transfer amount
|
||||
--------------------
|
||||
|
||||
If an amount is provided, it MUST be specified in decimal ZEC. All amounts MUST
|
||||
contain no commas and use a period (.) as the separating character to separate
|
||||
whole numbers and decimal fractions. I.e. ``amount=50.00`` or ``amount=50`` is treated
|
||||
as 50 ZEC, and ``amount=50,000.00`` is invalid.
|
||||
|
||||
Query Keys
|
||||
----------
|
||||
|
||||
label
|
||||
Label for an address (e.g. name of receiver)
|
||||
|
||||
address
|
||||
Zcash address (shielded or transparent)
|
||||
|
||||
memo
|
||||
Contents for the zcash shielded memo field. MUST not exceed 512 bytes.
|
||||
Parsers MUST consider the entire URI invalid if the address associated with
|
||||
the same ``paramindex`` is not a valid shielded address.
|
||||
|
||||
message
|
||||
Message that clients can display for the purpose of presenting descriptive
|
||||
information about the transaction to the user.
|
||||
|
||||
Forward compatibility
|
||||
---------------------
|
||||
|
||||
|
@ -143,4 +170,7 @@ developers to release new versions, and users of old clients to upgrade.
|
|||
References
|
||||
==========
|
||||
|
||||
.. [#BIP0021] `BIP-0021 <https://en.bitcoin.it/wiki/BIP_0021>`_
|
||||
.. [#BIP0070] `BIP-0070 <https://en.bitcoin.it/wiki/BIP_0070>`_
|
||||
.. [#RFC3986] `RFC 3986 <https://tools.ietf.org/html/rfc3986#appendix-A>`_
|
||||
.. [#base58check] `Base58Check encoding <https://en.bitcoin.it/wiki/Base58Check_encoding>`_
|
||||
|
|
Loading…
Reference in New Issue