{"size": 562, "ext": "js", "max_stars_repo_path": "dltdojo/ethnode/subapp/ethereumjs-util.js", "max_stars_repo_name": "dltdojo/container", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "dltdojo/ethnode/subapp/ethereumjs-util.js", "max_issues_repo_name": "dltdojo/container", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "dltdojo/ethnode/subapp/ethereumjs-util.js", "max_forks_repo_name": "dltdojo/container", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 51.0909090909, "max_line_length": 111, "alphanum_fraction": 0.7669039146}
var ethUtils = require('ethereumjs-util')
var BN = require('bn.js')
var SECP256K1_N = new ethUtils.BN('fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141', 16)
var privKeyHex = SECP256K1_N.subn(1).toString(16)
var privKey = Buffer.from(privKeyHex, 'hex')
var isValid = ethUtils.isValidPrivate(privKey)
var pubKey = ethUtils.privateToPublic(privKey)
var address = ethUtils.publicToAddress(pubKey)
var r = { privKey: privKey.toString('hex'), pubKey: pubKey.toString('hex'), address: address.toString('hex') }
console.log(JSON.stringify(r))
