Skip to content

Commit 732b137

Browse files
committed
add field table under MPT amounts, minor updates
1 parent e276d90 commit 732b137

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

docs/references/protocol/data-types/currency-formats.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ XRP amounts cannot be negative.
5555

5656
### Token Amounts
5757

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.
5959

6060
| `Field` | Type | Description |
6161
|:-----------|:---------------------------|:-----------------------------------|
@@ -78,7 +78,14 @@ For example, to represent $153.75 US dollars issued by account `r9cZA1mLK5R5Am25
7878
```
7979
### MPT Amounts
8080

81-
Specify the amount of MPTs using the `Amount` field. For example, to specify 1 million units of an MPT you would specify:
81+
Specify the amount of MPTs using the `value` field.
82+
83+
| `Field` | Type | Description |
84+
|:-----------|:---------------------------|:-----------------------------------|
85+
| `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:
8289

8390
```json
8491
{
@@ -129,7 +136,17 @@ When sending token amounts in the XRP Ledger's peer-to-peer network, servers [se
129136

130137
## MPT Precision
131138

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.
132140

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.
142+
143+
```json
144+
"Amount": {
145+
"mpt_issuance_id":
146+
"0000012FFD9EE5DA93AC614B4DB94D7E0FCE415CA51BED47",
147+
"value": "131"
148+
}
149+
```
133150

134151
## Currency Codes
135152
[Currency Code]: #currency-codes

0 commit comments

Comments
 (0)