Last active
September 2, 2021 20:07
-
-
Save PaulRBerg/b979bd1041df93ccd26d2906bf9dba2b to your computer and use it in GitHub Desktop.
Random Ethereum address generator written in TypeScript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function getRandomEthereumAddress(): string { | |
const length: number = 40; | |
const number: string = [...Array(length)] | |
.map(() => { | |
return Math.floor(Math.random() * 16).toString(16); | |
}) | |
.join(""); | |
return "0x" + number; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment