index/functions/getEthereumAddressFromPrivateKey.md
getEthereumAddressFromPrivateKey(
privateKey):string
The Ethereum account of a private key: 0x plus the EIP-55 checksummed digits (for the
GalaChain spelling, eth| plus the same digits).
private key
Parameters
| Parameter | Type | Description |
|---|---|---|
privateKey | string | 0x plus 64 hex digits. |
private key
Returns
string
Throws
GalaSDKError INVALID_PRIVATE_KEY (bad_encoding, not_on_curve).
invalid private key bad encoding not on curve
Example
getEthereumAddressFromPrivateKey(key); // '0x70997970C51812dc3A010C7d01b50e0d17dc79C8'