Verify Wallet Address
Explains how to verify wallet addresses, particularly those with a tag, memo, or ':' in them.
A wallet address may have various formats, combining the address itself, a tag or memo, and a delimiter. It's crucial to note that in the IVMS101 protocol, this entire combination is treated as a single string.
Thus, there are 4 possible formats of wallet addresses.
No | Description | Example Assets | Address Format |
---|---|---|---|
1 | Address only | BTC , ETH… | address |
2 | Combination of address and tag or memo | EOS, XRP… | address:memo or tag |
3 | ‘:’ included in the address | BCH, Kaspa… | currency:address |
4 | ‘:’ included in the address and tag or memo added | Not existing at the moment, but potentially possible in the future. | currency:address:memo or tag |
It is agreed that originating VASPs combine wallet address and a tag or memo with a colon(‘:’). To ensure that the beneficiary VASP can handle all cases without exception, it is essential to design a verification process while considering the various possible formats of wallet addresses. The flow of this process should be as follows:
Verify Address First
- Verify address with the received string as it is.
- If it fails, check if the string contains a ‘:’. If so, split the string at the rightmost colon.
- Re-verify with the first segment of the splitted string.
Caution
- When splitting, regardless of colon count, use the rightmost colon as the basis.
- You must first try verifying the received string, irrespective of the presence of a colon.
Verify ':' first
- Verify the address directly if no colon (':') is present.
- If a colon is present, split the string at the rightmost colon and verify the address using the first segment.
- If it fails, verify the existence of the address using the received string as it is, including the colon.
Updated 2 months ago