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: docs/references/protocol/data-types/currency-formats.md
+19-2Lines changed: 19 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ XRP amounts cannot be negative.
55
55
56
56
### Token Amounts
57
57
58
-
To specify an amount of a [(fungible) token](../../../concepts/tokens/index.md), use an Amount object. This is a JSON object with three fields:
58
+
To specify an amount of a [(fungible) token](../../../concepts/tokens/index.md), use an `Amount` object. Tokens use the `currency`, `value`, and `issuer` fields.
|`mpt_issuance_id`| String | Arbitrary unique identifier for a Multi-purpose Token. |
86
+
|`value`|[String Number][]| A string representing a positive integer value. Valid values for this field are between 0x0 and 0x7FFFFFFFFFFFFFFF. Use `AssetScale` to enable values as fractions of the MPT value. See [MPT Precision](#mpt-precision). |
87
+
88
+
For example, to specify 1 million units of an MPT you would specify:
82
89
83
90
```json
84
91
{
@@ -129,7 +136,17 @@ When sending token amounts in the XRP Ledger's peer-to-peer network, servers [se
129
136
130
137
## MPT Precision
131
138
139
+
MPTs are always expressed in whole integers. You can change the `AssetScale` of your MPT to express the basic unit as a fraction of an MPT. The XRP Ledger doesn't use the `AssetScale` on-chain: this is for your convenience in specifying the basic unit.
132
140
141
+
For example, to express a value of 13.1 MPT, the MPT would require that the `AssetScale` be set to 1, and the `value` of the MPT set to 131.
0 commit comments