chore(EIP55): optional EIP55 validation
Context
The SIWE message constructor throws if the address isn't EIP55 compliant, which brakes the SIWE integration for users that use wallets such as Zerion.
In addition to that, it's not a hard requirement based on the EIP-4361 spec
address REQUIRED. The Ethereum address performing the signing. Its value SHOULD be conformant to mixed-case checksum address encoding specified in ERC-55 where applicable.
This provides flexibility to developers to decide whatever or not they want explicit EIP55 validation.
The option defaults to true and is optional for backwards compatibility.
I think it would be better if the option was removed, and instead it would validate like so:
- If all lowercase, then pass
- Otherwise must pass ERC-55
Reason being because different wallets will do it differently, and app developers shouldn't have to think about which one the wallet happens to use. Perhaps the flag could be used if the developer KNOWS that it needs to be ERC-55, but this is probably quite rare.
But does this require a major version bump since the behavior changes?