Have ideas to improve npm?Join in the discussion! »

ewf-validator-toolTypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Validator tool

Command line tool for Volta and EWC validators, for sensitive operations that require to use the validator accounts. Features:

  • changing of validator payout address
  • checking of validator payout address
  • sending funds from validator account
  • Dockerization to running from validator machines
  • .. with transaction signing locally (not using personal, or other compromising APIs)
  • .. with 2 ways of supplying the credentials

❗️ Disclaimer: this is my own project, and I am not responsible for any data/key loss, leak or security issue. Use at your own risk.


Tool: @ngyam

Dockerization: @marcelorocha-e



  • node 8+
  • npm


  • Docker


Install the command with:

npm install -g ewf-validator-tool

Read about available commands and their options using the --help flag

> validatortool --help
validatortool <command>
  validatortool accountfile <filepath>           Creates an empty validator account
  [options]                                 file skeleton. It has to be filled
                                            up with validator address and
                                            private key manually.
  validatortool payout <command>                 Commands related to the validator
                                            payout addresses.
  validatortool transferto <toaddress> <amount>  Makes a value transfer from the
  [options]                                 validator account (or from any
  --version  Show version number                                       [boolean]
  --help     Show help                                                 [boolean]

For using the docker image, see below.

How to use the tool

1. Supplying the private key (credential)

You can supply your validator account credentials 2 ways when needed:

  1. Specifying a path to the encrypted ethereum keystore file with the --keyfilepath flag AND to to a text file containing only the password with the --secretpath flag. The path can be absolute or relative to the working directory. Example:
    validatortool transferto 0x2daa43fbcf5a5a7518b45665cc00d577f080f325 0.0001 -k "/home/aznagy/.local/share/io.parity.ethereum/keys/Volta/UTC--2018-07-31T13-41-14Z--f18df90c-f86c-0545-9f43-615834e7e778" -s ../../work/ewf/pwd
    The input files are left untouched.
  2. Specifying the address and private key in a json file in the format below, then passing the path to --accountfilepath.
      "address": "0xYourPublicValidatorAddressHere",
      "privateKey": "0xYourPrivateKeyHere"
    ❗️ This file is deleted after usage. This is intentional so you do not forget your private key laying around in a textfile. Example:
    validatortool transferto 0x2daa43fbcf5a5a7518b45665cc00d577f080f325 0.0001 -a ./account/account.json
    With the accountfile command you can create an empty accountfile skeleton that you can fill up with your credentials:
    > validatortool accountfile ./account/account.json
    Success! File created at: /home/aznagy/personal/validator-tool/account/account.json

The imported/decrypted account is added to web3's software wallet for the period of execution and signs transactions locally, not by using the connected node.

2. Supplying the rpc address

You can supply an rpc address with the --rpc flag. Websocket and http connections are supported. You can connect to remote nodes too, though local ones are always preferred.


1. Making a transfer from a validator account

Example 1 with using an accountfile:

> validatortool transferto 0x2daa43fbcf5a5a7518b45665cc00d577f080f325 0.0001 -a ./account/account.json -r https://volta-rpc.energyweb.org
Connected to Volta (test network)
  "transactionIndex": 0
Validator account file successfully deleted.

Example 2 with a keystore file:

> validatortool transferto 0x2daa43fbcf5a5a7518b45665cc00d577f080f325 0.0001 -k "/home/aznagy/.local/share/io.parity.ethereum/keys/Volta/UTC--2018-07-31T13-41-14Z--f18df90c-f86c-0545-9f43-615834e7e778" -s /home/aznagy/work/ewf/pwd -r wss://volta-rpc.energyweb.org/ws
Connected to Volta (test network)
  "transactionIndex": 0

2. Checking the payout address of the validator

Example 1:

> validatortool payout check 0x0052569B2d787bB89d711e4aFB56F9C1E420a2a6 -r https://volta-rpc.energyweb.org
Connected to Volta (test network)
Successful call! Payout address of 0x0052569B2d787bB89d711e4aFB56F9C1E420a2a6 is: 0x2dAA43fBCF5A5A7518b45665cC00D577F080F325

Example 2:

> validatortool payout check 0x2dAA43fBCF5A5A7518b45665cC00D577F080F325 -r wss://volta-rpc.energyweb.org/ws
Connected to Volta (test network)
Successful call! Payout address of 0x2dAA43fBCF5A5A7518b45665cC00D577F080F325 is: 0x2dAA43fBCF5A5A7518b45665cC00D577F080F325

3. Changing the payout address of the validator

Example 1 with a keystore file:

validatortool payout changeto 0x2daa43fbcf5a5a7518b45665cc00d577f080f325 -k "/home/aznagy/.local/share/io.parity.ethereum/keys/Volta/UTC--2018-07-31T13-41-14Z--f18df90c-f86c-0545-9f43-615834e7e778" -s /home/aznagy/work/ewf/pwd -r https://volta-rpc.energyweb.org
Connected to Volta (test network)
Change of payout address successful!
  "transactionIndex": 0,
  "events": {}

Example 2 with using an accountfile:

> validatortool payout changeto 0x2daa43fbcf5a5a7518b45665cc00d577f080f325 -a ./account/account.json -r https://volta-rpc.energyweb.org
Connected to Volta (test network)
Change of payout address successful!
  "transactionIndex": 0,
  "events": {}
Validator account file successfully deleted.

How to use with Docker

With docker you don't have to have node/npm installed, so it is more feasible and safe to be run on validator machines. The tool is already installed in the container, and in this case it can be only used with the keystore file method.

You need to mount the keystore file and password files as volumes with the -v flag like the following:

dokcer run -it \
  -v /path/to/the/keystorefile:/keyfile \
  -v /path/to/the/passwordfile:/keypass \
  aznagy:ewf-validator-tool \
  <validator tool command and options>

The docker image gets pulled automatically if not found on your machine.


1. Making a transfer from a validator account

docker run -it -v "/home/aznagy/.local/share/io.parity.ethereum/keys/Volta/UTC--2018-07-31T13-41-14Z--f18df90c-f86c-0545-9f43-615834e7e778":/keyfile -v /home/aznagy/work/ewf/pwd:/keypass aznagy/ewf-validator-tool:latest transferto 0x2daa43fbcf5a5a7518b45665cc00d577f080f325 0.001 -r wss://volta-rpc.energyweb.org/ws

2. Checking the payout address of the validator

docker run -it -v "/home/aznagy/.local/share/io.parity.ethereum/keys/Volta/UTC--2018-07-31T13-41-14Z--f18df90c-f86c-0545-9f43-615834e7e778":/keyfile -v /home/aznagy/work/ewf/pwd:/keypass aznagy/ewf-validator-tool:latest payout check 0x2dAA43fBCF5A5A7518b45665cC00D577F080F325 -r wss://volta-rpc.energyweb.org/ws

3. Changing the payout address of the validator

docker run -it -v "/home/aznagy/.local/share/io.parity.ethereum/keys/Volta/UTC--2018-07-31T13-41-14Z--f18df90c-f86c-0545-9f43-615834e7e778":/keyfile -v /home/aznagy/work/ewf/pwd:/keypass aznagy/ewf-validator-tool:latest payout changeto 0x2daa43fbcf5a5a7518b45665cc00d577f080f325 -r https://volta-rpc.energyweb.org


Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.


SemVer is used for versioning. For the versions available, see the tags on this repository.


This project is licensed under the GPLv3.0 License - see the LICENSE.md file for details.


npm i ewf-validator-tool

DownloadsWeekly Downloads






Unpacked Size

564 kB

Total Files


Last publish


  • avatar