CLI Commands

Please store back up your BLS and ECDSA key pairs. Do not discard keys under any circumstance. Your keys are located at ~/.lagrange/keystore/<key_type>_<public_key_prefix>.key.

We recommend using performant providers such Alchemy, Quicknode, Infura, in the case that you do not run your own Ethereum node. For the Beacon RPC endpoint, you should check if the given RPC provider supports the Beacon RPC API like /eth/v1/beacon/genesis. Quicknode supports this API.

You can check client config files in at~/.lagrange/config/client_<network_name>_<chain_name>_<bls_pub_key_prefix>.toml and docker-compose files in the ~/.lagrange/docker-compose_<network_name>_<chain_name>_<bls_pub_key_prefix>.yml.

  • Generating Keystore: generates a new key pair for the given key type and password, and saves it in the keystore file. The key type can be either ecdsa or bls.

    lagrange-cli generate-keystore -t <Key Type> -p <Password>
    
    # i.e. ./dist/lagrange-cli generate-keystore -t ecdsa -p 'password@123!'
  • Importing Keystore: imports a key pair from the given private key and saves it in the keystore file. The key type can be either ecdsa or bls.

    lagrange-cli import-keystore -t <Key Type> -p <Password> -k <Private Key>
    
    # i.e. ./dist/lagrange-cli import-keystore -t bls -p 'password@123!' -k 0x1234567890abcdef...
  • Exporting Keystore: exports a private key from the keystore file for the given key type and password.

    lagrange-cli export-keystore -t <Key Type> -p <Password> -f <Keystore File Path>
    
    # i.e. ./dist/lagrange-cli export-keystore -t ecdsa -p 'password@123!' -f ~/.lagrange/keystore/bls_.key
  • Registering Operator: registers an operator to the Lagrange State Committee. The network name can be either mainnet or holesky. The BLS key and Signer address are referenced from the config file.

    lagrange-cli register-operator -c <Config File Path> -n <Network Name>
    
    # i.e. ./dist/lagrange-cli register-operator -c ./config.toml -n mainnet
  • Deregistering Operator: deregisters an operator from the Lagrange State Committee. The network name can be either mainnet or holesky.

    lagrange-cli deregister-operator -c <Config File Path> -n <Network Name>
    
    # i.e. ./dist/lagrange-cli deregister-operator -c ./config.toml -n mainnet
  • Updating BLS Public Key: updates the BLS public key for the operator at the given index. The network name can be either mainnet or holesky. New BLS key is referenced from the config file.

    lagrange-cli update-bls-pub-key -c <Config File Path> -n <Network Name> -i <Key Index>
    
    # i.e. ./dist/lagrange-cli update-bls-pub-key -c ./config.toml -n mainnet -i 0
  • Updating Signer Address: updates the signer address for the operator. The network name can be either mainnet or holesky. New signer address is referenced from the config file.

    lagrange-cli update-signer-address -c <Config File Path> -n <Network Name>
    
    # i.e. ./dist/lagrange-cli update-signer-address -c ./config.toml -n mainnet
  • Adding BLS Public Key: adds a new BLS public key for the operator. The network name can be either mainnet or holesky. New BLS key is referenced from the config file.

    lagrange-cli add-bls-pub-key -c <Config File Path> -n <Network Name>
    
    # i.e. ./dist/lagrange-cli add-bls-pub-key -c ./config.toml -n mainnet
  • Removing BLS Public Key: removes the BLS public key for the operator at the given index. The network name can be either mainnet or holesky.

    lagrange-cli remove-bls-pub-key -c <Config File Path> -n <Network Name> -i <Key Index>
    
    # i.e. ./dist/lagrange-cli remove-bls-pub-key -c ./config.toml -n mainnet -i 0
  • Subscribing to Chain: subscribes the operator to the given chain. The network name can be either mainnet or holesky. The chain name can be either optimism or base.

    lagrange-cli subscribe-chain -c <Config File Path> -n <Network Name> -r <Chain Name>
    
    # i.e. ./dist/lagrange-cli subscribe-chain -c ./config.toml -n mainnet -r optimism
  • Unsubscribing from Chain: unsubscribes the operator from the given chain. The network name can be either mainnet or holesky. The chain name can be either optimism or base.

    lagrange-cli unsubscribe-chain -c <Config File Path> -n <Network Name> -r <Chain Name>
    
    # i.e. ./dist/lagrange-cli unsubscribe-chain -c ./config.toml -n mainnet -r optimism
  • Generating Config: generates an attestation node config file. The network name can be either mainnet or holesky. The chain name can be either optimism or base. The L1 RPC endpoint is the Ethereum mainnet RPC endpoint for both mainnet and Holesky testnet. The L2 (Optimism or Base) RPC endpoint is the rollup chain's mainnet RPC endpoint for both mainnet and Holesky testnet. The Beacon RPC endpoint is the Beacon mainnet RPC endpoint for both mainnet and Holesky testnet.

    lagrange-cli generate-config -c <Config File Path> -n <Network Name> -r <Chain Name>
    
    # i.e. ./dist/lagrange-cli generate-config -c ./config.toml -n mainnet -r optimism
  • Deploying Node: creates a docker-compose file and deploys the docker container for the attestation node. The network name can be either mainnet or holesky.

    lagrange-cli deploy -c <Client Config File Path> -i <Docker Image Name>
    
    # i.e. ./dist/lagrange-cli deploy -c ~/.lagrange/config/client_mainnet_optimism_.toml -i lagrangelabs/lagrange-node:v0.3.15

Last updated