EigenLayer CLI is used to manage core operator functionalities like local key management, operator registration and updates.
Operating System | Architecture |
---|---|
Linux | amd64 |
Linux | arm64 |
The eigenlayer
CLI tool versions are managed with GitHub releases. To install it, you can download the binary directly from the release assets manually, or by using the following command replacing the <VERSION>
and <ARCH>
with the proper values:
curl -L https://github.com/NethermindEth/eigenlayer/releases/download/<VERSION>/eigenlayer-linux-<ARCH> --output eigenlayer
chmod +x eigenlayer
curl -L https://github.com/NethermindEth/eigenlayer/releases/download/v0.4.3/eigenlayer-linux-amd64 --output eigenlayer
chmod +x eigenlayer
curl -L https://github.com/NethermindEth/eigenlayer/releases/download/v0.4.3/eigenlayer-linux-arm64 --output eigenlayer
chmod +x eigenlayer
Note: If you are using Ubuntu 20.04
, you can also use the below command to install the binary:
curl -L https://github.com/NethermindEth/eigenlayer/releases/download/v0.4.3/eigenlayer-linux-amd64-ubuntu-20-04 --output eigenlayer
chmod +x eigenlayer
curl -L https://github.com/NethermindEth/eigenlayer/releases/download/v0.4.3/eigenlayer-linux-arm64-ubuntu-20-04 --output eigenlayer
chmod +x eigenlayer
First, install the Go programming language following the official instructions. You need at least the 1.21
version.
Eigenlayer is only supported on Linux. Make sure you install Go for Linux in a Linux environment (e.g. WSL2, Docker, etc.)
This command will install the eigenlayer
executable along with the library and its dependencies in your system:
As the repository is private, you need to set the
GOPRIVATE
variable properly by running the following command:export GOPRIVATE=github.com/NethermindEth/eigenlayer,$GOPRIVATE
. Git will automatically resolve the private access if your Git user has all the required permissions over the repository.
go install github.com/NethermindEth/eigenlayer/cmd/eigenlayer@latest
The executable will be in your $GOBIN
($GOPATH/bin
).
To check if the GOBIN
is not in your PATH, you can execute echo $GOBIN
from the Terminal. If it doesn't print anything, then it is not in your PATH. To add GOBIN
to your PATH, add the following lines to your $HOME/.profile
:
export GOBIN=$GOPATH/bin
export PATH=$GOBIN:$PATH
Changes made to a profile file may not apply until the next time you log into your computer. To apply the changes immediately, run the shell commands directly or execute them from the profile using a command such as
source $HOME/.profile
.
With this method, you generate the binary manually (need Go installed), downloading and compiling the source code:
git clone https://github.com/NethermindEth/eigenlayer.git
cd eigenlayer
mkdir -p build
go build -o build/eigenlayer cmd/eigenlayer/main.go
or if you have make
installed:
git clone https://github.com/NethermindEth/eigenlayer.git
cd eigenlayer
make build
The executable will be in the build
folder.
In case you want the binary in your PATH (or if you used the Using Go method and you don't have $GOBIN
in your PATH), please copy the binary to /usr/local/bin
:
# Using Go
sudo cp $GOPATH/bin/eigenlayer /usr/local/bin/
# Build from source
sudo cp eigenlayer/build/eigenlayer /usr/local/bin/
You can create encrypted ecdsa and bls keys using the cli which will be needed for operator registration and other onchain calls
eigenlayer operator keys create --key-type ecdsa [keyname]
eigenlayer operator keys create --key-type bls [keyname]
keyname
- This will be the name of the created key file. It will be saved as<keyname>.ecdsa.key.json
or<keyname>.bls.key.json
This will prompt a password which you can use to encrypt the keys. Keys will be stored in local disk and will be shown once keys are created. It will also show the private key only once, so that you can back it up in case you lose the password or keyfile.
Example:
Input command
eigenlayer operator keys create --key-type ecdsa test
Output This outputs the public key and the ethereum address associated with the key. This will also be your operator address.
? Enter password to encrypt the ecdsa private key:
ECDSA Private Key (Hex): b3eba201405d5b5f7aaa9adf6bb734dc6c0f448ef64dd39df80ca2d92fca6d7b
Please backup the above private key hex in safe place.
Key location: /home/ubuntu/.eigenlayer/operator_keys/test.ecdsa.key.json
Public Key hex: f87ee475109c2943038b3c006b8a004ee17bebf3357d10d8f63ef202c5c28723906533dccfda5d76c1da0a9f05cc6d32085ca1af8aaab5a28171474b1ad0aa68
Ethereum Address 0x6a8c0D554a694899041E52a91B4EC3Ff23d8aBD5
You can import existing ecdsa and bls keys using the cli which will be needed for operator registration and other onchain calls
eigenlayer operator keys import --key-type ecdsa [keyname] [privatekey]
eigenlayer operator keys import --key-type bls [keyname] [privatekey]
keyname
- This will be the name of the imported key file. It will be saved as<keyname>.ecdsa.key.json
or<keyname>.bls.key.json
privatekey
- This will be the private key of the key to be imported.- For ecdsa key, it should be in hex format
- For bls key, it should be a large number
Example:
Input command
eigenlayer operator keys import --key-type ecdsa test 6842fb8f5fa574d0482818b8a825a15c4d68f542693197f2c2497e3562f335f6
Output
? Enter password to encrypt the ecdsa private key: *******
ECDSA Private Key (Hex): 6842fb8f5fa574d0482818b8a825a15c4d68f542693197f2c2497e3562f335f6
Please backup the above private key hex in safe place.
Key location: /home/ubuntu/.eigenlayer/operator_keys/test.ecdsa.key.json
Public Key hex: a30264c19cd7292d5153da9c9df58f81aced417e8587dd339021c45ee61f20d55f4c3d374d6f472d3a2c4382e2a9770db395d60756d3b3ea97e8c1f9013eb1bb
Ethereum Address 0x9F664973BF656d6077E66973c474cB58eD5E97E1
This will prompt a password which you can use to encrypt the keys. Keys will be stored in local disk and will be shown once keys are created. It will also show the private key only once, so that you can back it up in case you lose the password or keyfile.
You can also list your created keys using
eigenlayer operator keys list
It will show all the keys created with this command with the public key
ECDSA and BLS keys are required for operator registration. You may choose to either create your own set of keys using the EigenLayer CLI (recommended for first time users) or import your existing keys (recommended for advanced users who already have keys created).
You can register your operator using the command below.
eigenlayer operator register operator-config.yaml
A sample yaml operator-config.yaml is provided for reference. You can also create empty config files by using commands referred in this section. Fill in the required details to register the operator.
A public metadata url is required to register the operator.
After creating and filling the metadata file, you can it to a publicly accessible location and give the url in the config file.
You are also required to upload the image of the operator to a publicly accessible location and give the url in the metadata file. We only support .png
images for now.
Make sure that if you use local_keystore
as signer, you give the path to the keys created in above section.
After you complete the registration, you can check the registration status of your operator using
eigenlayer operator status operator-config.yaml
You can also update the operator metadata using
eigenlayer operator update operator-config.yaml
If you need to create a new config file for registration and metadata you can use
eigenlayer operator config create
It will create two file: operator.yaml
and metadata.json
After filling the details in metadata.json
, please upload this into a publicly accessible location and fill that url in operator.yaml
. A valid metadata url is required for successful registration.