Function: getEthereumAddressFromPrivateKey()
GalaChain core SDK 1.0.0-rc.8 / index / getEthereumAddressFromPrivateKey
Function: getEthereumAddressFromPrivateKey()
getEthereumAddressFromPrivateKey(
privateKey):string
Defined in: packages/gala-core-sdk/dist/index.d.ts:2392
The Ethereum account of a private key: 0x plus the EIP-55 checksummed digits (for the
GalaChain spelling, eth| plus the same digits).
Parameters
privateKey
string
0x plus 64 hex digits.
Returns
string
Throws
GalaSDKError INVALID_PRIVATE_KEY (bad_encoding, not_on_curve).
Example
getEthereumAddressFromPrivateKey(key); // '0x70997970C51812dc3A010C7d01b50e0d17dc79C8'