Last active
December 6, 2019 21:22
-
-
Save miguelmota/20fcd7c5c2604907dcbba749ea3f1e8c to your computer and use it in GitHub Desktop.
Node.js check if valid ethereum private key
This file contains 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
var ethUtil = require('ethereumjs-util') | |
var key = 'a3d49d0f53da61605eb44f44...' | |
if (ethUtil.isValidPrivate(key)) { | |
// valid | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment