Skip to main content

index/functions/checksumEthereumAddress.md

checksumEthereumAddress(value): string | undefined

An Ethereum account (0x plus 40 hex digits, or the 40 digits alone) as 0x plus its EIP-55 checksummed digits, or undefined for anything else: another length or character, or a mixed-case spelling whose casing is not the EIP-55 one (a typo EIP-55 exists to catch). Byte-identical to ethers' getAddress for every value it accepts.

Parameters​

ParameterType
valuestring

Returns​

string | undefined

Example​

checksumEthereumAddress('0x70997970c51812dc3a010c7d01b50e0d17dc79c8');
// '0x70997970C51812dc3A010C7d01b50e0d17dc79C8'