tokenbridge/oracle/scripts/privateKeyToAddress.js
Przemyslaw Rzad d656025378
Update the token-bridge sub-repo (#19)
* Moved audit to root directory.

* Moved code of conduct, contributing and licence files.

* Removed travis config and badge.

* Updated repository links in CONTRIBUTING.

* Moved Gitter badge to main readme. Updated links to contributing and licence.

* Updated main readme.

* Moved references to main readme.

* Renamed token-bridge to oracle.

* Update README.md

Co-Authored-By: rzadp <rzadp@student.mini.pw.edu.pl>
2019-05-07 16:52:44 +02:00

18 lines
498 B
JavaScript

const path = require('path')
require('dotenv').config({
path: path.join(__dirname, '..', '.env')
})
const { privateKeyToAddress } = require('../src/utils/utils')
const { EXIT_CODES } = require('../src/utils/constants')
const privateKey = process.env.VALIDATOR_ADDRESS_PRIVATE_KEY
if (!privateKey) {
console.error('Environment variable VALIDATOR_ADDRESS_PRIVATE_KEY is not set')
process.exit(EXIT_CODES.GENERAL_ERROR)
}
const address = privateKeyToAddress(privateKey)
console.log(address)