0005 XLS-5.1d NetworkID extension to X-Addresses #142
RichardAH
started this conversation in
Standard Proposals
Replies: 2 comments 17 replies
-
Why remove the X vs T prefix? I like that I can tell at-a-glance if this account holds real funds or fake test funds. |
Beta Was this translation helpful? Give feedback.
17 replies
-
It's a good and it will help avoid sending funds to wrong network now that the XRPL Community is expanding. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Introduction
X-Addresses provide a way to encode all relevant payment endpoint information (r-address, destination tag / no destination tag) in a single user-friendly, checksum-protected address format. This is primarily intended to prevent users sending funds to exchanges without including the correct destination tag.
However, with the recent release of the Xahau network and planned further expansion of the XRP Ledger Protocol ecosystem, there is now an additional, highly relevant, piece of payment endpoint information: destination NetworkID. Without this information users (or their wallet software) could accidentally send to the same endpoint but on the wrong network.
Extension
The XLS-5 standard is base58 encoded packed binary containing a destination account ID, destination tag (or deliberate absence of a destination tag), and a flags field. In this updated standard we now provide a way to encode the Network ID.
To signal a NetworkID has been included as a little endian encoded UINT32 as the final 4 bytes of the packed data we now set the most significant bit (0x80) on the flags UINT8 high.
Further, we deprecate the T prefix mode of X-addresses. Thereafter all X-addresses that lack NetworkID are assumed to refer to XRPL Mainnet (NetworkID = 0).
Finally, we deprecate the 64bit destination tag flag, to make parsing easier for libraries and because no implementation of the XRPL protocol supports 64bit tags.
[← 2 byte prefix →|← 160 bits of account ID →|← 8 bits of flags →|← 32 bits of tag →|← 32 bits of NetworkID →]
Revised Format Table
For ease of lookup here is the complete revise format table:
0x0544
<20b AccountID>
0x00
0x01
0x80
0x81
<4b dest tag>
0x00000000
<4b NetworkID>
0x00000000
Beta Was this translation helpful? Give feedback.
All reactions