Binary format: edits per review

This commit is contained in:
mDuo13
2025-07-07 14:33:40 -07:00
parent 81d7531c41
commit 08558478e4
4 changed files with 677 additions and 239 deletions

View File

@@ -407,8 +407,8 @@ def uint192_to_bytes(i):
def uint384_to_bytes(i):
b = hex_to_bytes(i)
if len(b) != 8: # 8 bytes = 64 bits
raise ValueError("UInt64 is not 64 bits long")
if len(b) != 48: # 48 bytes = 384 bits
raise ValueError("UInt384 is not 384 bits long")
return b
def vector256_to_bytes(strlist):

View File

@@ -5,7 +5,7 @@
<id>UMLClass</id>
<coordinates>
<x>40</x>
<y>270</y>
<y>560</y>
<w>20</w>
<h>30</h>
</coordinates>
@@ -16,7 +16,7 @@
<id>UMLClass</id>
<coordinates>
<x>70</x>
<y>270</y>
<y>560</y>
<w>20</w>
<h>30</h>
</coordinates>
@@ -27,7 +27,7 @@
<id>UMLClass</id>
<coordinates>
<x>100</x>
<y>270</y>
<y>560</y>
<w>150</w>
<h>30</h>
</coordinates>
@@ -38,7 +38,7 @@
<id>UMLClass</id>
<coordinates>
<x>260</x>
<y>270</y>
<y>560</y>
<w>190</w>
<h>30</h>
</coordinates>
@@ -49,7 +49,7 @@
<id>Relation</id>
<coordinates>
<x>70</x>
<y>290</y>
<y>580</y>
<w>50</w>
<h>60</h>
</coordinates>
@@ -60,7 +60,7 @@
<id>Text</id>
<coordinates>
<x>100</x>
<y>320</y>
<y>610</y>
<w>260</w>
<h>30</h>
</coordinates>
@@ -72,12 +72,12 @@ style=wordwrap</panel_attributes>
<id>Text</id>
<coordinates>
<x>80</x>
<y>350</y>
<y>640</y>
<w>160</w>
<h>60</h>
</coordinates>
<panel_attributes>"Not XRP" bit
(0=XRP, 1=not XRP)
<panel_attributes>Amount type bit
(0=XRP or MPT, 1=fungible token)
style=wordwrap</panel_attributes>
<additional_attributes/>
</element>
@@ -85,7 +85,7 @@ style=wordwrap</panel_attributes>
<id>Relation</id>
<coordinates>
<x>40</x>
<y>290</y>
<y>580</y>
<w>50</w>
<h>90</h>
</coordinates>
@@ -96,7 +96,7 @@ style=wordwrap</panel_attributes>
<id>UMLClass</id>
<coordinates>
<x>460</x>
<y>270</y>
<y>560</y>
<w>200</w>
<h>30</h>
</coordinates>
@@ -107,18 +107,18 @@ style=wordwrap</panel_attributes>
<id>UMLClass</id>
<coordinates>
<x>670</x>
<y>270</y>
<w>200</w>
<y>560</y>
<w>220</w>
<h>30</h>
</coordinates>
<panel_attributes>issuer AccountID (160 bits)</panel_attributes>
<panel_attributes>issuer's AccountID (160 bits)</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>40</x>
<y>510</y>
<y>800</y>
<w>20</w>
<h>30</h>
</coordinates>
@@ -129,7 +129,7 @@ style=wordwrap</panel_attributes>
<id>Relation</id>
<coordinates>
<x>40</x>
<y>520</y>
<y>810</y>
<w>60</w>
<h>70</h>
</coordinates>
@@ -140,7 +140,7 @@ style=wordwrap</panel_attributes>
<id>Text</id>
<coordinates>
<x>80</x>
<y>560</y>
<y>850</y>
<w>300</w>
<h>40</h>
</coordinates>
@@ -152,29 +152,29 @@ style=wordwrap</panel_attributes>
<id>UMLClass</id>
<coordinates>
<x>70</x>
<y>510</y>
<y>800</y>
<w>220</w>
<h>30</h>
</coordinates>
<panel_attributes>Reserved (88 bits)</panel_attributes>
<panel_attributes>reserved (88 bits)</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>460</x>
<y>510</y>
<y>800</y>
<w>180</w>
<h>30</h>
</coordinates>
<panel_attributes>Reserved (40 bits)</panel_attributes>
<panel_attributes>reserved (40 bits)</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>300</x>
<y>510</y>
<y>800</y>
<w>150</w>
<h>30</h>
</coordinates>
@@ -185,7 +185,7 @@ style=wordwrap</panel_attributes>
<id>Relation</id>
<coordinates>
<x>310</x>
<y>530</y>
<y>820</y>
<w>40</w>
<h>50</h>
</coordinates>
@@ -196,7 +196,7 @@ style=wordwrap</panel_attributes>
<id>Text</id>
<coordinates>
<x>330</x>
<y>550</y>
<y>840</y>
<w>130</w>
<h>30</h>
</coordinates>
@@ -207,7 +207,7 @@ style=wordwrap</panel_attributes>
<id>Relation</id>
<coordinates>
<x>20</x>
<y>290</y>
<y>580</y>
<w>460</w>
<h>230</h>
</coordinates>
@@ -218,7 +218,7 @@ style=wordwrap</panel_attributes>
<id>Relation</id>
<coordinates>
<x>640</x>
<y>290</y>
<y>580</y>
<w>40</w>
<h>230</h>
</coordinates>
@@ -228,7 +228,7 @@ style=wordwrap</panel_attributes>
<element>
<id>UMLClass</id>
<coordinates>
<x>40</x>
<x>30</x>
<y>60</y>
<w>20</w>
<h>30</h>
@@ -239,7 +239,7 @@ style=wordwrap</panel_attributes>
<element>
<id>UMLClass</id>
<coordinates>
<x>70</x>
<x>60</x>
<y>60</y>
<w>20</w>
<h>30</h>
@@ -247,11 +247,192 @@ style=wordwrap</panel_attributes>
<panel_attributes>1</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>90</x>
<y>120</y>
<w>260</w>
<h>30</h>
</coordinates>
<panel_attributes>Sign bit (always 1 for positive)
style=wordwrap</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>60</x>
<y>80</y>
<w>50</w>
<h>70</h>
</coordinates>
<panel_attributes>lt=&lt;&lt;-</panel_attributes>
<additional_attributes>10.0;10.0;10.0;50.0;30.0;50.0</additional_attributes>
</element>
<element>
<id>Text</id>
<coordinates>
<x>70</x>
<y>140</y>
<w>160</w>
<h>60</h>
</coordinates>
<panel_attributes>Amount type bit
(0=XRP or MPT, 1=fungible token)
style=wordwrap</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>30</x>
<y>80</y>
<w>60</w>
<h>110</h>
</coordinates>
<panel_attributes>lt=&lt;&lt;-</panel_attributes>
<additional_attributes>10.0;10.0;10.0;90.0;40.0;90.0</additional_attributes>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>120</x>
<y>60</y>
<w>510</w>
<h>30</h>
</coordinates>
<panel_attributes>integer drops (61 bits)</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>20</x>
<y>50</y>
<w>620</w>
<h>50</h>
</coordinates>
<panel_attributes/>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>20</x>
<y>20</y>
<w>190</w>
<h>30</h>
</coordinates>
<panel_attributes>*XRP Amount Format*</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>30</x>
<y>520</y>
<w>310</w>
<h>30</h>
</coordinates>
<panel_attributes>*Fungible Token Amount Format*</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>30</x>
<y>550</y>
<w>870</w>
<h>50</h>
</coordinates>
<panel_attributes/>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>90</x>
<y>760</y>
<w>240</w>
<h>30</h>
</coordinates>
<panel_attributes>Standard Currency Code Format</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>30</x>
<y>790</y>
<w>620</w>
<h>50</h>
</coordinates>
<panel_attributes/>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>20</x>
<y>240</y>
<w>190</w>
<h>30</h>
</coordinates>
<panel_attributes>*MPT Amount Format*</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>30</x>
<y>270</y>
<w>670</w>
<h>50</h>
</coordinates>
<panel_attributes/>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>40</x>
<y>280</y>
<w>20</w>
<h>30</h>
</coordinates>
<panel_attributes>0</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>80</x>
<y>380</y>
<w>160</w>
<h>60</h>
</coordinates>
<panel_attributes>Amount type bit
(0=XRP or MPT, 1=fungible token)
style=wordwrap</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>40</x>
<y>300</y>
<w>60</w>
<h>130</h>
</coordinates>
<panel_attributes>lt=&lt;&lt;-</panel_attributes>
<additional_attributes>10.0;10.0;10.0;110.0;40.0;110.0</additional_attributes>
</element>
<element>
<id>Text</id>
<coordinates>
<x>100</x>
<y>110</y>
<y>350</y>
<w>260</w>
<h>30</h>
</coordinates>
@@ -263,7 +444,52 @@ style=wordwrap</panel_attributes>
<id>Relation</id>
<coordinates>
<x>70</x>
<y>80</y>
<y>300</y>
<w>50</w>
<h>80</h>
</coordinates>
<panel_attributes>lt=&lt;&lt;-</panel_attributes>
<additional_attributes>10.0;10.0;10.0;60.0;30.0;60.0</additional_attributes>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>70</x>
<y>280</y>
<w>20</w>
<h>30</h>
</coordinates>
<panel_attributes>1</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>100</x>
<y>280</y>
<w>20</w>
<h>30</h>
</coordinates>
<panel_attributes>1</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>130</x>
<y>330</y>
<w>260</w>
<h>30</h>
</coordinates>
<panel_attributes>MPT indicator bit (1=MPT, 0=XRP)
style=wordwrap</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>100</x>
<y>300</y>
<w>50</w>
<h>60</h>
</coordinates>
@@ -271,104 +497,136 @@ style=wordwrap</panel_attributes>
<additional_attributes>10.0;10.0;10.0;40.0;30.0;40.0</additional_attributes>
</element>
<element>
<id>Text</id>
<id>UMLClass</id>
<coordinates>
<x>80</x>
<y>140</y>
<w>160</w>
<h>60</h>
<x>90</x>
<y>60</y>
<w>20</w>
<h>30</h>
</coordinates>
<panel_attributes>"Not XRP" bit
(0=XRP, 1=not XRP)
style=wordwrap</panel_attributes>
<panel_attributes>0</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>40</x>
<x>90</x>
<y>80</y>
<w>50</w>
<h>90</h>
<h>50</h>
</coordinates>
<panel_attributes>lt=&lt;&lt;-</panel_attributes>
<additional_attributes>10.0;10.0;10.0;70.0;30.0;70.0</additional_attributes>
<additional_attributes>10.0;10.0;10.0;30.0;30.0;30.0</additional_attributes>
</element>
<element>
<id>UMLClass</id>
<id>Text</id>
<coordinates>
<x>100</x>
<y>60</y>
<w>540</w>
<x>120</x>
<y>100</y>
<w>260</w>
<h>30</h>
</coordinates>
<panel_attributes>integer drops (62 bits)</panel_attributes>
<panel_attributes>MPT indicator bit (1=MPT, 0=XRP)
style=wordwrap</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>30</x>
<y>50</y>
<w>620</w>
<x>130</x>
<y>280</y>
<w>140</w>
<h>30</h>
</coordinates>
<panel_attributes>reserved (5 bits)</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>280</x>
<y>280</y>
<w>190</w>
<h>30</h>
</coordinates>
<panel_attributes>integer quantity (64 bits)</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>480</x>
<y>280</y>
<w>210</w>
<h>30</h>
</coordinates>
<panel_attributes>MPT issuance ID (192 bits)</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>390</x>
<y>390</y>
<w>510</w>
<h>50</h>
</coordinates>
<panel_attributes/>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<id>Relation</id>
<coordinates>
<x>30</x>
<y>20</y>
<w>160</w>
<x>380</x>
<y>300</y>
<w>120</w>
<h>110</h>
</coordinates>
<panel_attributes>lt=..</panel_attributes>
<additional_attributes>10.0;90.0;100.0;10.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>680</x>
<y>300</y>
<w>210</w>
<h>110</h>
</coordinates>
<panel_attributes>lt=..</panel_attributes>
<additional_attributes>190.0;90.0;10.0;10.0</additional_attributes>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>400</x>
<y>400</y>
<w>210</w>
<h>30</h>
</coordinates>
<panel_attributes>XRP Amount Format</panel_attributes>
<panel_attributes>Sequence number (32 bits)</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>620</x>
<y>400</y>
<w>270</w>
<h>30</h>
</coordinates>
<panel_attributes>issuer's AccountID (160 bits)</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>30</x>
<y>230</y>
<x>430</x>
<y>360</y>
<w>240</w>
<h>30</h>
</coordinates>
<panel_attributes>Token Amount Format</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>30</x>
<y>260</y>
<w>850</w>
<h>50</h>
</coordinates>
<panel_attributes/>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>90</x>
<y>470</y>
<w>240</w>
<h>30</h>
</coordinates>
<panel_attributes>Standard Currency Code Format</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>30</x>
<y>500</y>
<w>620</w>
<h>50</h>
</coordinates>
<panel_attributes/>
<panel_attributes>MPT Issuance ID Format</panel_attributes>
<additional_attributes/>
</element>
</diagram>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN'
'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
<svg fill-opacity="1" xmlns:xlink="http://www.w3.org/1999/xlink" color-rendering="auto" color-interpolation="auto" text-rendering="auto" stroke="black" stroke-linecap="square" width="900" stroke-miterlimit="10" shape-rendering="auto" stroke-opacity="1" fill="black" stroke-dasharray="none" font-weight="normal" stroke-width="1" viewBox="0 0 900 620" height="620" xmlns="http://www.w3.org/2000/svg" font-family="'Dialog'" font-style="normal" stroke-linejoin="miter" font-size="12px" stroke-dashoffset="0" image-rendering="auto"
<svg fill-opacity="1" xmlns:xlink="http://www.w3.org/1999/xlink" color-rendering="auto" color-interpolation="auto" text-rendering="auto" stroke="black" stroke-linecap="square" width="920" stroke-miterlimit="10" shape-rendering="auto" stroke-opacity="1" fill="black" stroke-dasharray="none" font-weight="normal" stroke-width="1" viewBox="10 0 920 910" height="910" xmlns="http://www.w3.org/2000/svg" font-family="'Dialog'" font-style="normal" stroke-linejoin="miter" font-size="12px" stroke-dashoffset="0" image-rendering="auto"
><!--Generated by the Batik Graphics2D SVG Generator--><defs id="genericDefs"
/><g
><defs id="defs1"
@@ -9,22 +9,22 @@
><path d="M0 0 L2147483647 0 L2147483647 2147483647 L0 2147483647 L0 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath2"
><path d="M0 0 L0 50 L620 50 L620 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath3"
><path d="M0 0 L0 30 L240 30 L240 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath3"
><path d="M0 0 L0 30 L270 30 L270 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath4"
><path d="M0 0 L0 50 L850 50 L850 0 Z"
><path d="M0 0 L0 30 L210 30 L210 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath5"
><path d="M0 0 L0 30 L160 30 L160 0 Z"
><path d="M0 0 L0 50 L510 50 L510 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath6"
><path d="M0 0 L0 30 L540 30 L540 0 Z"
><path d="M0 0 L0 30 L190 30 L190 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath7"
><path d="M0 0 L0 60 L160 60 L160 0 Z"
><path d="M0 0 L0 30 L140 30 L140 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath8"
><path d="M0 0 L0 30 L260 30 L260 0 Z"
@@ -33,90 +33,240 @@
><path d="M0 0 L0 30 L20 30 L20 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath10"
><path d="M0 0 L0 30 L130 30 L130 0 Z"
><path d="M0 0 L0 60 L160 60 L160 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath11"
><path d="M0 0 L0 30 L150 30 L150 0 Z"
><path d="M0 0 L0 50 L670 50 L670 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath12"
><path d="M0 0 L0 30 L180 30 L180 0 Z"
><path d="M0 0 L0 50 L620 50 L620 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath13"
><path d="M0 0 L0 30 L220 30 L220 0 Z"
><path d="M0 0 L0 50 L870 50 L870 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath14"
><path d="M0 0 L0 40 L300 40 L300 0 Z"
><path d="M0 0 L0 30 L310 30 L310 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath15"
><path d="M0 0 L0 30 L200 30 L200 0 Z"
><path d="M0 0 L0 30 L510 30 L510 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath16"
><path d="M0 0 L0 30 L190 30 L190 0 Z"
><path d="M0 0 L0 30 L130 30 L130 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath17"
><path d="M0 0 L0 90 L50 90 L50 0 Z"
><path d="M0 0 L0 30 L150 30 L150 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath18"
><path d="M0 0 L0 60 L50 60 L50 0 Z"
><path d="M0 0 L0 30 L180 30 L180 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath19"
><path d="M0 0 L0 230 L40 230 L40 0 Z"
><path d="M0 0 L0 30 L220 30 L220 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath20"
><path d="M0 0 L0 230 L460 230 L460 0 Z"
><path d="M0 0 L0 40 L300 40 L300 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath21"
><path d="M0 0 L0 50 L40 50 L40 0 Z"
><path d="M0 0 L0 30 L200 30 L200 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath22"
><path d="M0 0 L0 110 L210 110 L210 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath23"
><path d="M0 0 L0 110 L120 110 L120 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath24"
><path d="M0 0 L0 50 L50 50 L50 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath25"
><path d="M0 0 L0 60 L50 60 L50 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath26"
><path d="M0 0 L0 80 L50 80 L50 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath27"
><path d="M0 0 L0 130 L60 130 L60 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath28"
><path d="M0 0 L0 110 L60 110 L60 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath29"
><path d="M0 0 L0 70 L50 70 L50 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath30"
><path d="M0 0 L0 230 L40 230 L40 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath31"
><path d="M0 0 L0 230 L460 230 L460 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath32"
><path d="M0 0 L0 50 L40 50 L40 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath33"
><path d="M0 0 L0 70 L60 70 L60 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath34"
><path d="M0 0 L0 90 L50 90 L50 0 Z"
/></clipPath
></defs
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(30,500)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="618.5" height="48.5" y="0.5" clip-path="url(#clipPath2)" stroke="none"
><g font-family="sans-serif" font-size="14px" transform="translate(440,360)"
><text x="5" xml:space="preserve" y="18.1094" clip-path="url(#clipPath2)" stroke="none"
>MPT Issuance ID Format</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(630,400)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="268.5" height="28.5" y="0.5" clip-path="url(#clipPath3)" stroke="none"
/></g
><g transform="translate(30,500)"
><rect fill="none" x="0.5" width="618.5" height="48.5" y="0.5" clip-path="url(#clipPath2)"
><g transform="translate(630,400)"
><rect fill="none" x="0.5" width="268.5" height="28.5" y="0.5" clip-path="url(#clipPath3)"
/><text x="34" font-size="14px" y="18.1094" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
>issuer's AccountID (160 bits)</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(410,400)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="208.5" height="28.5" y="0.5" clip-path="url(#clipPath4)" stroke="none"
/></g
><g font-family="sans-serif" font-size="14px" transform="translate(90,470)"
><text x="5" xml:space="preserve" y="18.1094" clip-path="url(#clipPath3)" stroke="none"
><g transform="translate(410,400)"
><rect fill="none" x="0.5" width="208.5" height="28.5" y="0.5" clip-path="url(#clipPath4)"
/><text x="9" font-size="14px" y="18.1094" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Sequence number (32 bits)</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(400,390)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="508.5" height="48.5" y="0.5" clip-path="url(#clipPath5)" stroke="none"
/></g
><g transform="translate(400,390)"
><rect fill="none" x="0.5" width="508.5" height="48.5" y="0.5" clip-path="url(#clipPath5)"
/></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(490,280)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="208.5" height="28.5" y="0.5" clip-path="url(#clipPath4)" stroke="none"
/></g
><g transform="translate(490,280)"
><rect fill="none" x="0.5" width="208.5" height="28.5" y="0.5" clip-path="url(#clipPath4)"
/><text x="11" font-size="14px" y="18.1094" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>MPT issuance ID (192 bits)</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(290,280)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="188.5" height="28.5" y="0.5" clip-path="url(#clipPath6)" stroke="none"
/></g
><g transform="translate(290,280)"
><rect fill="none" x="0.5" width="188.5" height="28.5" y="0.5" clip-path="url(#clipPath6)"
/><text x="6" font-size="14px" y="18.1094" clip-path="url(#clipPath6)" font-family="sans-serif" stroke="none" xml:space="preserve"
>integer quantity (64 bits)</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(140,280)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="138.5" height="28.5" y="0.5" clip-path="url(#clipPath7)" stroke="none"
/></g
><g transform="translate(140,280)"
><rect fill="none" x="0.5" width="138.5" height="28.5" y="0.5" clip-path="url(#clipPath7)"
/><text x="11" font-size="14px" y="18.1094" clip-path="url(#clipPath7)" font-family="sans-serif" stroke="none" xml:space="preserve"
>reserved (5 bits)</text
></g
><g font-family="sans-serif" font-size="14px" transform="translate(130,100)"
><text x="5" xml:space="preserve" y="18.1094" clip-path="url(#clipPath8)" stroke="none"
>MPT indicator bit (1=MPT, 0=XRP)</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(100,60)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="18.5" height="28.5" y="0.5" clip-path="url(#clipPath9)" stroke="none"
/></g
><g transform="translate(100,60)"
><rect fill="none" x="0.5" width="18.5" height="28.5" y="0.5" clip-path="url(#clipPath9)"
/><text x="5" font-size="14px" y="18.1094" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" xml:space="preserve"
>0</text
></g
><g font-family="sans-serif" font-size="14px" transform="translate(140,330)"
><text x="5" xml:space="preserve" y="18.1094" clip-path="url(#clipPath8)" stroke="none"
>MPT indicator bit (1=MPT, 0=XRP)</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(110,280)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="18.5" height="28.5" y="0.5" clip-path="url(#clipPath9)" stroke="none"
/></g
><g transform="translate(110,280)"
><rect fill="none" x="0.5" width="18.5" height="28.5" y="0.5" clip-path="url(#clipPath9)"
/><text x="5" font-size="14px" y="18.1094" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" xml:space="preserve"
>1</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(80,280)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="18.5" height="28.5" y="0.5" clip-path="url(#clipPath9)" stroke="none"
/></g
><g transform="translate(80,280)"
><rect fill="none" x="0.5" width="18.5" height="28.5" y="0.5" clip-path="url(#clipPath9)"
/><text x="5" font-size="14px" y="18.1094" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" xml:space="preserve"
>1</text
></g
><g font-family="sans-serif" font-size="14px" transform="translate(110,350)"
><text x="5" xml:space="preserve" y="18.1094" clip-path="url(#clipPath8)" stroke="none"
>Sign bit (always 1 for positive)</text
></g
><g font-family="sans-serif" font-size="14px" transform="translate(90,380)"
><text x="5" xml:space="preserve" y="18.1094" clip-path="url(#clipPath10)" stroke="none"
>Amount type bit</text
><text x="5" xml:space="preserve" y="34.2188" clip-path="url(#clipPath10)" stroke="none"
>(0=XRP or MPT,</text
><text x="5" xml:space="preserve" y="50.3281" clip-path="url(#clipPath10)" stroke="none"
>1=fungible token)</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(50,280)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="18.5" height="28.5" y="0.5" clip-path="url(#clipPath9)" stroke="none"
/></g
><g transform="translate(50,280)"
><rect fill="none" x="0.5" width="18.5" height="28.5" y="0.5" clip-path="url(#clipPath9)"
/><text x="5" font-size="14px" y="18.1094" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" xml:space="preserve"
>0</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(40,270)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="668.5" height="48.5" y="0.5" clip-path="url(#clipPath11)" stroke="none"
/></g
><g transform="translate(40,270)"
><rect fill="none" x="0.5" width="668.5" height="48.5" y="0.5" clip-path="url(#clipPath11)"
/></g
><g font-size="14px" font-weight="bold" font-family="sans-serif" transform="translate(30,240)"
><text x="5" xml:space="preserve" y="18.1094" clip-path="url(#clipPath6)" stroke="none"
>MPT Amount Format</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(40,790)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="618.5" height="48.5" y="0.5" clip-path="url(#clipPath12)" stroke="none"
/></g
><g transform="translate(40,790)"
><rect fill="none" x="0.5" width="618.5" height="48.5" y="0.5" clip-path="url(#clipPath12)"
/></g
><g font-family="sans-serif" font-size="14px" transform="translate(100,760)"
><text x="5" xml:space="preserve" y="18.1094" clip-path="url(#clipPath2)" stroke="none"
>Standard Currency Code Format</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(30,260)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="848.5" height="48.5" y="0.5" clip-path="url(#clipPath4)" stroke="none"
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(40,550)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="868.5" height="48.5" y="0.5" clip-path="url(#clipPath13)" stroke="none"
/></g
><g transform="translate(30,260)"
><rect fill="none" x="0.5" width="848.5" height="48.5" y="0.5" clip-path="url(#clipPath4)"
><g transform="translate(40,550)"
><rect fill="none" x="0.5" width="868.5" height="48.5" y="0.5" clip-path="url(#clipPath13)"
/></g
><g font-family="sans-serif" font-size="14px" transform="translate(30,230)"
><text x="5" xml:space="preserve" y="18.1094" clip-path="url(#clipPath3)" stroke="none"
>Token Amount Format</text
><g font-size="14px" font-weight="bold" font-family="sans-serif" transform="translate(40,520)"
><text x="5" xml:space="preserve" y="18.1094" clip-path="url(#clipPath14)" stroke="none"
>Fungible Token Amount Format</text
></g
><g font-family="sans-serif" font-size="14px" transform="translate(30,20)"
><text x="5" xml:space="preserve" y="18.1094" clip-path="url(#clipPath5)" stroke="none"
><g font-size="14px" font-weight="bold" font-family="sans-serif" transform="translate(30,20)"
><text x="5" xml:space="preserve" y="18.1094" clip-path="url(#clipPath6)" stroke="none"
>XRP Amount Format</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(30,50)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="618.5" height="48.5" y="0.5" clip-path="url(#clipPath2)" stroke="none"
><rect x="0.5" width="618.5" height="48.5" y="0.5" clip-path="url(#clipPath12)" stroke="none"
/></g
><g transform="translate(30,50)"
><rect fill="none" x="0.5" width="618.5" height="48.5" y="0.5" clip-path="url(#clipPath2)"
><rect fill="none" x="0.5" width="618.5" height="48.5" y="0.5" clip-path="url(#clipPath12)"
/></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(100,60)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="538.5" height="28.5" y="0.5" clip-path="url(#clipPath6)" stroke="none"
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(130,60)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="508.5" height="28.5" y="0.5" clip-path="url(#clipPath15)" stroke="none"
/></g
><g transform="translate(100,60)"
><rect fill="none" x="0.5" width="538.5" height="28.5" y="0.5" clip-path="url(#clipPath6)"
/><text x="191" font-size="14px" y="18.1094" clip-path="url(#clipPath6)" font-family="sans-serif" stroke="none" xml:space="preserve"
>integer drops (62 bits)</text
><g transform="translate(130,60)"
><rect fill="none" x="0.5" width="508.5" height="28.5" y="0.5" clip-path="url(#clipPath15)"
/><text x="176" font-size="14px" y="18.1094" clip-path="url(#clipPath15)" font-family="sans-serif" stroke="none" xml:space="preserve"
>integer drops (61 bits)</text
></g
><g font-family="sans-serif" font-size="14px" transform="translate(80,140)"
><text x="5" xml:space="preserve" y="18.1094" clip-path="url(#clipPath7)" stroke="none"
>"Not XRP" bit</text
><text x="5" xml:space="preserve" y="34.2188" clip-path="url(#clipPath7)" stroke="none"
>(0=XRP, 1=not XRP)</text
><text x="5" xml:space="preserve" y="18.1094" clip-path="url(#clipPath10)" stroke="none"
>Amount type bit</text
><text x="5" xml:space="preserve" y="34.2188" clip-path="url(#clipPath10)" stroke="none"
>(0=XRP or MPT,</text
><text x="5" xml:space="preserve" y="50.3281" clip-path="url(#clipPath10)" stroke="none"
>1=fungible token)</text
></g
><g font-family="sans-serif" font-size="14px" transform="translate(100,110)"
><g font-family="sans-serif" font-size="14px" transform="translate(100,120)"
><text x="5" xml:space="preserve" y="18.1094" clip-path="url(#clipPath8)" stroke="none"
>Sign bit (always 1 for positive)</text
></g
@@ -136,145 +286,177 @@
/><text x="5" font-size="14px" y="18.1094" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" xml:space="preserve"
>0</text
></g
><g font-family="sans-serif" font-size="14px" transform="translate(330,550)"
><text x="5" xml:space="preserve" y="18.1094" clip-path="url(#clipPath10)" stroke="none"
><g font-family="sans-serif" font-size="14px" transform="translate(340,840)"
><text x="5" xml:space="preserve" y="18.1094" clip-path="url(#clipPath16)" stroke="none"
>3 chars of ASCII</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(300,510)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="148.5" height="28.5" y="0.5" clip-path="url(#clipPath11)" stroke="none"
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(310,800)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="148.5" height="28.5" y="0.5" clip-path="url(#clipPath17)" stroke="none"
/></g
><g transform="translate(300,510)"
><rect fill="none" x="0.5" width="148.5" height="28.5" y="0.5" clip-path="url(#clipPath11)"
/><text x="12" font-size="14px" y="18.1094" clip-path="url(#clipPath11)" font-family="sans-serif" stroke="none" xml:space="preserve"
><g transform="translate(310,800)"
><rect fill="none" x="0.5" width="148.5" height="28.5" y="0.5" clip-path="url(#clipPath17)"
/><text x="12" font-size="14px" y="18.1094" clip-path="url(#clipPath17)" font-family="sans-serif" stroke="none" xml:space="preserve"
>ISO code (24 bits)</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(460,510)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="178.5" height="28.5" y="0.5" clip-path="url(#clipPath12)" stroke="none"
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(470,800)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="178.5" height="28.5" y="0.5" clip-path="url(#clipPath18)" stroke="none"
/></g
><g transform="translate(460,510)"
><rect fill="none" x="0.5" width="178.5" height="28.5" y="0.5" clip-path="url(#clipPath12)"
/><text x="25" font-size="14px" y="18.1094" clip-path="url(#clipPath12)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Reserved (40 bits)</text
><g transform="translate(470,800)"
><rect fill="none" x="0.5" width="178.5" height="28.5" y="0.5" clip-path="url(#clipPath18)"
/><text x="27" font-size="14px" y="18.1094" clip-path="url(#clipPath18)" font-family="sans-serif" stroke="none" xml:space="preserve"
>reserved (40 bits)</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(70,510)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="218.5" height="28.5" y="0.5" clip-path="url(#clipPath13)" stroke="none"
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(80,800)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="218.5" height="28.5" y="0.5" clip-path="url(#clipPath19)" stroke="none"
/></g
><g transform="translate(70,510)"
><rect fill="none" x="0.5" width="218.5" height="28.5" y="0.5" clip-path="url(#clipPath13)"
/><text x="45" font-size="14px" y="18.1094" clip-path="url(#clipPath13)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Reserved (88 bits)</text
><g transform="translate(80,800)"
><rect fill="none" x="0.5" width="218.5" height="28.5" y="0.5" clip-path="url(#clipPath19)"
/><text x="47" font-size="14px" y="18.1094" clip-path="url(#clipPath19)" font-family="sans-serif" stroke="none" xml:space="preserve"
>reserved (88 bits)</text
></g
><g font-family="sans-serif" font-size="14px" transform="translate(80,560)"
><text x="5" xml:space="preserve" y="18.1094" clip-path="url(#clipPath14)" stroke="none"
><g font-family="sans-serif" font-size="14px" transform="translate(90,850)"
><text x="5" xml:space="preserve" y="18.1094" clip-path="url(#clipPath20)" stroke="none"
>Type code (8 bits)</text
><text x="5" xml:space="preserve" y="34.2188" clip-path="url(#clipPath14)" stroke="none"
><text x="5" xml:space="preserve" y="34.2188" clip-path="url(#clipPath20)" stroke="none"
>0x00 for ISO 4217/pseudo-ISO currency</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(40,510)" stroke-opacity="0" stroke="rgb(255,255,255)"
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(50,800)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="18.5" height="28.5" y="0.5" clip-path="url(#clipPath9)" stroke="none"
/></g
><g transform="translate(40,510)"
><g transform="translate(50,800)"
><rect fill="none" x="0.5" width="18.5" height="28.5" y="0.5" clip-path="url(#clipPath9)"
/><text x="1" font-size="14px" y="18.1094" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" xml:space="preserve"
>00</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(670,270)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="198.5" height="28.5" y="0.5" clip-path="url(#clipPath15)" stroke="none"
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(680,560)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="218.5" height="28.5" y="0.5" clip-path="url(#clipPath19)" stroke="none"
/></g
><g transform="translate(670,270)"
><rect fill="none" x="0.5" width="198.5" height="28.5" y="0.5" clip-path="url(#clipPath15)"
/><text x="5" font-size="14px" y="18.1094" clip-path="url(#clipPath15)" font-family="sans-serif" stroke="none" xml:space="preserve"
>issuer AccountID (160 bits)</text
><g transform="translate(680,560)"
><rect fill="none" x="0.5" width="218.5" height="28.5" y="0.5" clip-path="url(#clipPath19)"
/><text x="9" font-size="14px" y="18.1094" clip-path="url(#clipPath19)" font-family="sans-serif" stroke="none" xml:space="preserve"
>issuer's AccountID (160 bits)</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(460,270)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="198.5" height="28.5" y="0.5" clip-path="url(#clipPath15)" stroke="none"
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(470,560)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="198.5" height="28.5" y="0.5" clip-path="url(#clipPath21)" stroke="none"
/></g
><g transform="translate(460,270)"
><rect fill="none" x="0.5" width="198.5" height="28.5" y="0.5" clip-path="url(#clipPath15)"
/><text x="14" font-size="14px" y="18.1094" clip-path="url(#clipPath15)" font-family="sans-serif" stroke="none" xml:space="preserve"
><g transform="translate(470,560)"
><rect fill="none" x="0.5" width="198.5" height="28.5" y="0.5" clip-path="url(#clipPath21)"
/><text x="14" font-size="14px" y="18.1094" clip-path="url(#clipPath21)" font-family="sans-serif" stroke="none" xml:space="preserve"
>currency code (160 bits)</text
></g
><g font-family="sans-serif" font-size="14px" transform="translate(80,350)"
><text x="5" xml:space="preserve" y="18.1094" clip-path="url(#clipPath7)" stroke="none"
>"Not XRP" bit</text
><text x="5" xml:space="preserve" y="34.2188" clip-path="url(#clipPath7)" stroke="none"
>(0=XRP, 1=not XRP)</text
><g font-family="sans-serif" font-size="14px" transform="translate(90,640)"
><text x="5" xml:space="preserve" y="18.1094" clip-path="url(#clipPath10)" stroke="none"
>Amount type bit</text
><text x="5" xml:space="preserve" y="34.2188" clip-path="url(#clipPath10)" stroke="none"
>(0=XRP or MPT,</text
><text x="5" xml:space="preserve" y="50.3281" clip-path="url(#clipPath10)" stroke="none"
>1=fungible token)</text
></g
><g font-family="sans-serif" font-size="14px" transform="translate(100,320)"
><g font-family="sans-serif" font-size="14px" transform="translate(110,610)"
><text x="5" xml:space="preserve" y="18.1094" clip-path="url(#clipPath8)" stroke="none"
>Sign bit (0=negative, 1=positive)</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(260,270)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="188.5" height="28.5" y="0.5" clip-path="url(#clipPath16)" stroke="none"
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(270,560)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="188.5" height="28.5" y="0.5" clip-path="url(#clipPath6)" stroke="none"
/></g
><g transform="translate(260,270)"
><rect fill="none" x="0.5" width="188.5" height="28.5" y="0.5" clip-path="url(#clipPath16)"
/><text x="5" font-size="14px" y="18.1094" clip-path="url(#clipPath16)" font-family="sans-serif" stroke="none" xml:space="preserve"
><g transform="translate(270,560)"
><rect fill="none" x="0.5" width="188.5" height="28.5" y="0.5" clip-path="url(#clipPath6)"
/><text x="5" font-size="14px" y="18.1094" clip-path="url(#clipPath6)" font-family="sans-serif" stroke="none" xml:space="preserve"
>significant digits (54 bits)</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(100,270)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="148.5" height="28.5" y="0.5" clip-path="url(#clipPath11)" stroke="none"
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(110,560)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="148.5" height="28.5" y="0.5" clip-path="url(#clipPath17)" stroke="none"
/></g
><g transform="translate(100,270)"
><rect fill="none" x="0.5" width="148.5" height="28.5" y="0.5" clip-path="url(#clipPath11)"
/><text x="14" font-size="14px" y="18.1094" clip-path="url(#clipPath11)" font-family="sans-serif" stroke="none" xml:space="preserve"
><g transform="translate(110,560)"
><rect fill="none" x="0.5" width="148.5" height="28.5" y="0.5" clip-path="url(#clipPath17)"
/><text x="14" font-size="14px" y="18.1094" clip-path="url(#clipPath17)" font-family="sans-serif" stroke="none" xml:space="preserve"
>exponent (8 bits)</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(70,270)" stroke-opacity="0" stroke="rgb(255,255,255)"
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(80,560)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="18.5" height="28.5" y="0.5" clip-path="url(#clipPath9)" stroke="none"
/></g
><g transform="translate(70,270)"
><g transform="translate(80,560)"
><rect fill="none" x="0.5" width="18.5" height="28.5" y="0.5" clip-path="url(#clipPath9)"
/></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(40,270)" stroke-opacity="0" stroke="rgb(255,255,255)"
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(50,560)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="18.5" height="28.5" y="0.5" clip-path="url(#clipPath9)" stroke="none"
/></g
><g transform="translate(40,270)"
><g transform="translate(50,560)"
><rect fill="none" x="0.5" width="18.5" height="28.5" y="0.5" clip-path="url(#clipPath9)"
/><text x="5" font-size="14px" y="18.1094" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" xml:space="preserve"
>1</text
></g
><g stroke-dasharray="1,2" stroke-miterlimit="5" transform="translate(690,300)" stroke-linecap="butt"
><path fill="none" d="M190.5 90.5 L10.5 10.5" clip-path="url(#clipPath22)"
/></g
><g stroke-dasharray="1,2" stroke-miterlimit="5" transform="translate(390,300)" stroke-linecap="butt"
><path fill="none" d="M10.5 90.5 L100.5 10.5" clip-path="url(#clipPath23)"
/></g
><g transform="translate(100,80)"
><path fill="none" d="M10.5 11.5 L10.5 30.5" clip-path="url(#clipPath24)"
/><path fill="none" d="M10.5 30.5 L30.5 30.5" clip-path="url(#clipPath24)"
/><path fill="white" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath24)" stroke="none"
/><path fill="none" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath24)"
/></g
><g transform="translate(110,300)"
><path fill="none" d="M10.5 11.5 L10.5 40.5" clip-path="url(#clipPath25)"
/><path fill="none" d="M10.5 40.5 L30.5 40.5" clip-path="url(#clipPath25)"
/><path fill="white" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath25)" stroke="none"
/><path fill="none" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath25)"
/></g
><g transform="translate(80,300)"
><path fill="none" d="M10.5 11.5 L10.5 60.5" clip-path="url(#clipPath26)"
/><path fill="none" d="M10.5 60.5 L30.5 60.5" clip-path="url(#clipPath26)"
/><path fill="white" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath26)" stroke="none"
/><path fill="none" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath26)"
/></g
><g transform="translate(50,300)"
><path fill="none" d="M10.5 11.5 L10.5 110.5" clip-path="url(#clipPath27)"
/><path fill="none" d="M10.5 110.5 L40.5 110.5" clip-path="url(#clipPath27)"
/><path fill="white" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath27)" stroke="none"
/><path fill="none" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath27)"
/></g
><g transform="translate(40,80)"
><path fill="none" d="M10.5 11.5 L10.5 70.5" clip-path="url(#clipPath17)"
/><path fill="none" d="M10.5 70.5 L30.5 70.5" clip-path="url(#clipPath17)"
/><path fill="white" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath17)" stroke="none"
/><path fill="none" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath17)"
><path fill="none" d="M10.5 11.5 L10.5 90.5" clip-path="url(#clipPath28)"
/><path fill="none" d="M10.5 90.5 L40.5 90.5" clip-path="url(#clipPath28)"
/><path fill="white" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath28)" stroke="none"
/><path fill="none" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath28)"
/></g
><g transform="translate(70,80)"
><path fill="none" d="M10.5 11.5 L10.5 40.5" clip-path="url(#clipPath18)"
/><path fill="none" d="M10.5 40.5 L30.5 40.5" clip-path="url(#clipPath18)"
/><path fill="white" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath18)" stroke="none"
/><path fill="none" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath18)"
><path fill="none" d="M10.5 11.5 L10.5 50.5" clip-path="url(#clipPath29)"
/><path fill="none" d="M10.5 50.5 L30.5 50.5" clip-path="url(#clipPath29)"
/><path fill="white" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath29)" stroke="none"
/><path fill="none" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath29)"
/></g
><g stroke-dasharray="1,2" stroke-miterlimit="5" transform="translate(640,290)" stroke-linecap="butt"
><path fill="none" d="M10.5 210.5 L20.5 10.5" clip-path="url(#clipPath19)"
><g stroke-dasharray="1,2" stroke-miterlimit="5" transform="translate(650,580)" stroke-linecap="butt"
><path fill="none" d="M10.5 210.5 L20.5 10.5" clip-path="url(#clipPath30)"
/></g
><g stroke-dasharray="1,2" stroke-miterlimit="5" transform="translate(20,290)" stroke-linecap="butt"
><path fill="none" d="M10.5 210.5 L440.5 10.5" clip-path="url(#clipPath20)"
><g stroke-dasharray="1,2" stroke-miterlimit="5" transform="translate(30,580)" stroke-linecap="butt"
><path fill="none" d="M10.5 210.5 L440.5 10.5" clip-path="url(#clipPath31)"
/></g
><g transform="translate(310,530)"
><path fill="none" d="M10.5 11.5 L10.5 30.5" clip-path="url(#clipPath21)"
/><path fill="none" d="M10.5 30.5 L20.5 30.5" clip-path="url(#clipPath21)"
/><path fill="white" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath21)" stroke="none"
/><path fill="none" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath21)"
><g transform="translate(320,820)"
><path fill="none" d="M10.5 11.5 L10.5 30.5" clip-path="url(#clipPath32)"
/><path fill="none" d="M10.5 30.5 L20.5 30.5" clip-path="url(#clipPath32)"
/><path fill="white" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath32)" stroke="none"
/><path fill="none" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath32)"
/></g
><g transform="translate(40,520)"
><path fill="none" d="M10.5 11.5 L10.5 50.5" clip-path="url(#clipPath22)"
/><path fill="none" d="M10.5 50.5 L40.5 50.5" clip-path="url(#clipPath22)"
/><path fill="white" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath22)" stroke="none"
/><path fill="none" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath22)"
><g transform="translate(50,810)"
><path fill="none" d="M10.5 11.5 L10.5 50.5" clip-path="url(#clipPath33)"
/><path fill="none" d="M10.5 50.5 L40.5 50.5" clip-path="url(#clipPath33)"
/><path fill="white" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath33)" stroke="none"
/><path fill="none" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath33)"
/></g
><g transform="translate(40,290)"
><path fill="none" d="M10.5 11.5 L10.5 70.5" clip-path="url(#clipPath17)"
/><path fill="none" d="M10.5 70.5 L30.5 70.5" clip-path="url(#clipPath17)"
/><path fill="white" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath17)" stroke="none"
/><path fill="none" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath17)"
><g transform="translate(50,580)"
><path fill="none" d="M10.5 11.5 L10.5 70.5" clip-path="url(#clipPath34)"
/><path fill="none" d="M10.5 70.5 L30.5 70.5" clip-path="url(#clipPath34)"
/><path fill="white" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath34)" stroke="none"
/><path fill="none" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath34)"
/></g
><g transform="translate(70,290)"
><path fill="none" d="M10.5 11.5 L10.5 40.5" clip-path="url(#clipPath18)"
/><path fill="none" d="M10.5 40.5 L30.5 40.5" clip-path="url(#clipPath18)"
/><path fill="white" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath18)" stroke="none"
/><path fill="none" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath18)"
><g transform="translate(80,580)"
><path fill="none" d="M10.5 11.5 L10.5 40.5" clip-path="url(#clipPath25)"
/><path fill="none" d="M10.5 40.5 L30.5 40.5" clip-path="url(#clipPath25)"
/><path fill="white" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath25)" stroke="none"
/><path fill="none" d="M4 22.2583 L10.5 11 L17 22.2583 Z" clip-path="url(#clipPath25)"
/></g
></g
></svg

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

@@ -236,18 +236,19 @@ The _Amount_ type (also called "STAmount") is a special field type that represen
Fungible tokens (also called "IOUs") consist of three segments in order:
1. 64 bits indicating the amount in the [token amount format](#token-amount-format). The first bit is `1` to indicate that this is not XRP nor an MPT.
1. 64 bits indicating the amount in the [token amount format](#token-amount-format). The first bit is `1` to indicate that this is a fungible token.
2. 160 bits indicating the [currency code](data-types/currency-formats.md#currency-codes). The standard API converts 3-character codes such as "USD" into 160-bit codes using the [standard currency code format](data-types/currency-formats.md#standard-currency-codes), but custom 160-bit codes are also possible.
3. 160 bits indicating the issuer's Account ID. (See also: [Account Address Encoding](../../concepts/accounts/addresses.md#address-encoding))
- **MPTs**
Multi-Purpose Tokens (MPTs) consist of four segments in order:
Multi-Purpose Tokens (MPTs) consist of the following segments in order:
1. 8 bits indicating that this is an MPT. The most significant bit is `0` to indicate that it's not a fungible token. The second bit is `1` to indicate that it is postiive. The third most significant bit is `1` to indicate that it is an MPT. The remaining 5 bits are reserved and must all be `0`. In other words, the first byte is `0x60`.
1. 8 bits indicating that this is an MPT. The most significant bit is `0` to indicate that it's not a fungible token. The second bit is `1` to indicate that it is positive. The third most significant bit is `1` to indicate that it is an MPT. The remaining 5 bits are reserved and must all be `0`. In other words, the first byte is `0x60`.
2. 64 bits indicating the quantity of the MPT, as a 64-bit unsigned integer. (However, the maximum amount cannot be larger than 2<sup>63</sup>-1.)
3. 32 bits indicating the `Sequence` number of the transaction that created the MPT issuance.
4. 160 bits indicating the [AccountID][] of the MPT's issuer.
3. 192 bits for the MPT Issuance ID, which is made of the following parts in order:
1. 32 bits indicating the `Sequence` number of the transaction that created the MPT issuance.
2. 160 bits indicating the [AccountID][] of the MPT's issuer.
You can tell which of the three sub-types an amount is based on the first and third most significant bits:
@@ -259,9 +260,9 @@ You can tell which of the three sub-types an amount is based on the first and th
Not all types of amount are valid in all places. Some fields can only represent XRP, or XRP and fungible tokens but not MPTs. These limitations are defined by the individual transactions and ledger entries.
{% /admonition %}
The following diagram shows the serialization formats for both XRP amounts and token amounts: ***TODO: update***
The following diagram shows the serialization formats for all three amount formats:
[{% inline-svg file="/docs/img/serialization-amount.svg" /%}](/docs/img/serialization-amount.svg 'XRP amounts have a "not XRP" bit, a sign bit, and 62 bits of precision. Token amounts consist of a "not XRP" bit, a sign bit, an exponent (8 bits), significant digits (54 bits), currency code (160 bits), and issuer (160 bits).')
[{% inline-svg file="/docs/img/serialization-amount.svg" /%}](/docs/img/serialization-amount.svg 'The first bit is an amount type bit (0 = XRP or MPT, 1 = fungible token). XRP has a sign bit (always 1 for positive), an MPT indicator bit (0=XRP) and 61 bits of precision. MPTs have a sign bit (always 1 for positive), an MPT indicator bit (1=MPT), 5 reserved bits, 64 bit integer quantity, and a 192 bit MPT Issuance ID which consists of the 32-bit Sequence number followed by 160-bit issuer AccountID. Fungible Token amounts consist start with an amount type bit of 1, a sign bit which can be 1 or 0, an exponent (8 bits), significant digits (54 bits), currency code (160 bits), and issuer (160 bits).')
#### Token Amount Format
[[Source]](https://github.com/XRPLF/rippled/blob/35fa20a110e3d43ffc1e9e664fc9017b6f2747ae/src/ripple/protocol/impl/STAmount.cpp "Source")
@@ -296,9 +297,6 @@ The [`rippled` APIs](../http-websocket-apis/index.md) support a **standard forma
The **nonstandard format** is any 160 bits of data as long as the first 8 bits are not `0x00`.
#### MPT Amount Format
The following diagram shows the amount serialization for MPTs. ***TODO: consolidate or not?***
### Array Fields
[Array]: #array-fields
@@ -325,9 +323,9 @@ Blob fields have no further structure to their contents, so they consist of exac
### Currency Fields
[Currency]: #currency-fields
Some fields specify a currency code, which could be an a fungible token, the ticker symbol for an off-ledger asset, or some other identifier for a currency. This field type is currently used only in [Price Oracles](../../concepts/decentralized-storage/price-oracles.md).
Some fields specify a currency code, which could be a fungible token, the ticker symbol for an off-ledger asset, or some other identifier for a currency. This field type is currently used only in [Price Oracles](../../concepts/decentralized-storage/price-oracles.md).
These fields consists of 160 bits of binary data. If the data matches the ["standard" currency code format](#currency-codes), it may be represented as a three-letter currency code string in JSON. Otherwise, it is represented as hexadecimal. Client libraries _may_ attempt to interpret this as a string of ASCII or UTF-8, but it is not guaranteed to be valid.
These fields consist of 160 bits of binary data. If the data matches the ["standard" currency code format](#currency-codes), it may be represented as a three-letter currency code string in JSON. Otherwise, it is represented as hexadecimal. Client libraries _may_ attempt to interpret this as a string of ASCII or UTF-8, but it is not guaranteed to be valid. The {% repo-link path="_code-samples/normalize-currency-codes/" %}Normalize Currency Codes code sample{% /repo-link %} demonstrates best practices for converting most common formats for this data into a string for humans to read.
### Issue Fields