Function isValidEvmAddress

  • Checks whether or not the given address is a valid EVM address.

    Parameters

    • address: string

      The address to check. Should be "0x" followed by 40 characters ranging from [0-9] or [a-f]. Either all uppercase, all lowercase, or checksum-cased.

    • lenient: boolean = false

      defaults to false, which means only checksum-cased is considered valid.

    Returns boolean