Skip to main content
Version: 11.x

Function: ethRandomPrivateKey()

ethRandomPrivateKey(): string

Defined in: src/utils/eth.ts:18

Get random Ethereum private Key.

Returns​

string

an Hex string

Example​

const myPK: string = ethRandomPrivateKey()
// result = "0xf04e69ac152fba37c02929c2ae78c9a481461dda42dbc6c6e286be6eb2a8ab83"