|
/** |
|
* Check if a string is a valid hex checksum address. |
|
* |
|
* @param value - The value to check. |
|
* @returns Whether the value is a valid hex checksum address. |
|
*/ |
|
export function isHexChecksumAddress(value: unknown): value is Hex { |
|
return isString(value) && HEX_CHECKSUM_ADDRESS_REGEX.test(value); |
|
} |
This function does NOT return if the given string is a "valid hex checksum address" (or a "Hex Checksum Address"). It returns true if the characters used in the given string are all allowed in an checksummed address.
The function (and likely some other similarly confusing functions/docs in this same file) should be updated to reflect their purpose.