You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: TAIPs/taip-3.md
+7-14Lines changed: 7 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,9 +72,7 @@ are defined:
72
72
-`@type` - REQUIRED the JSON-LD type `https://tap.rsvp/schema/1.0#Transfer`
73
73
(provisional)
74
74
-`asset` - REQUIRED the [CAIP-19](CAIP-19) identifier of the asset
75
-
-`amountSubunits` - OPTIONAL for NFTs and REQUIRED for fungible tokens.
76
-
Specified as a string with the full amount in integer in the smallest subunit
77
-
of a token
75
+
-`amount` - OPTIONAL for NFTs and REQUIRED for fungible tokens. Specified as a string with the full amount as a decimal representation of the token
78
76
-`originator` - OPTIONAL an object representing the originating (aka the
79
77
sender) party (see [TAIP-6](TAIP-6))
80
78
-`beneficiary` - OPTIONAL an object representing the beneficiary (aka the
@@ -91,14 +89,9 @@ be expanded and modified collaboratively by the agents of a transaction.
91
89
92
90
#### Transfer Amounts
93
91
94
-
The amount of a transfer is specified as `amountSubunits` as it is the most
95
-
precise representation of an amount and is, in most cases, the same as used in
96
-
the underlying blockchain protocol. For many application developers, this can be
97
-
error-prone. It is the responsibility of library and tool developers to help
98
-
educate and help convert between commonly used decimal amounts and the
99
-
underlying sub-unit.
92
+
The amount of a transfer is specified as `amount` and represents the decimal value of the asset. This approach is more intuitive for most users and application developers. It is the responsibility of library and tool developers to handle any necessary conversions when interacting with blockchain protocols that may require amounts in their smallest units.
100
93
101
-
As an example `ETH 1.23` should be encoded as `1230000000000000000`.
94
+
As an example,`ETH 1.23` should be encoded as `"1.23"`.
102
95
103
96
#### `settlementId`
104
97
@@ -170,7 +163,7 @@ firm to the ethereum wallet with the address
170
163
"originator": {
171
164
"@id": "did:web:originator.sample"
172
165
},
173
-
"amountSubunits": "1230000000000000000",
166
+
"amount": "1.23",
174
167
"agents": [
175
168
{
176
169
"@id": "did:web:originator.sample"
@@ -204,7 +197,7 @@ from a customer to the ethereum wallet with the address
0 commit comments