Skip to main content

Function: checksumEthereumAddress()

GalaChain core SDK 1.0.0-rc.8


GalaChain core SDK 1.0.0-rc.8 / index / checksumEthereumAddress

Function: checksumEthereumAddress()

checksumEthereumAddress(value): string | undefined

Defined in: packages/gala-core-sdk/dist/index.d.ts:2306

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​

value​

string

Returns​

string | undefined

Example​

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