Important dependencies:
Library and CLI to work with the ETH keystore file and extract latest validator cluster snapshot to build the payload:
If you want to run a compiled version (easier option then CLI)
vX.Y.Z-v1
- for the first version of the contract, vX.Y.Z-v2
- for second etc.
Example: v0.0.1-v1
or v0.0.1-v2
.ssv-keys-lin
- for Ubuntu Linuxssv-keys-mac
- for MacOSssv-keys.exe
- for Windowscd ~/Downloads
chmod 777 ./ssv-keys-mac
./ssv-keys-mac
Open
menu. Once open click the Open
or allow
button when you are asked to do so. After this go back to the console and try to run it again.This installation requires NodeJS on your machine. You can download it here.
Once you have installed NodeJS, follow instructions:
git clone https://github.com/ssvlabs/ssv-keys.git
cd ssv-keys
npm install -g yarn
yarn install
yarn cli --help
Help on available actions:
yarn cli --help
Help on a specific action:
yarn cli <action> --help
To run you will use the "shares" command
Input parameters:
# single file
yarn cli shares --keystore=keystore.json --password=test --operator-ids=1,2,3,4 --operator-keys=LS..,LS..,LS..,LS.. --output-folder=./ --owner-address=... --owner-nonce=..
# folder with multiple keystore files
yarn cli shares --keystore=./keystore-files --password=test --operator-ids=1,2,3,4 --operator-keys=LS..,LS..,LS..,LS.. --output-folder=./ --owner-address=... --owner-nonce=..
Output: Name will start with keyshares-timestamp.json
To run an example of a NodeJS project containing all the code snippets to build the share and transaction payload, simply follow these instructions!
cd examples/console
yarn install
To run a JavaScript example:
# example 1
yarn start:basic:js
# example 2
yarn start:complex:js
To run a TypeScript example:
yarn start:ts
Go to the example folder and then install all the dependencies:
cd examples/react-app
yarn install
Start the web app:
yarn start
Open the developer console to see how it works in a browser environment.
yarn dev:cli ...
yarn cli ...
yarn lint
yarn test
In watch mode during development
yarn test --watchAll
Build TypeScript into JavaScript
yarn build
Build for NodeJs using esbuild
yarn esbuild
Build everything
yarn build-all
MIT License