enid is a command-line tool for interacting with the ENI blockchain. This page will guide you through setting up Enid and introduce some basic commands to help you get started.
Prerequisites
Go 1.23+: Installation instructions can be found here.
Installation
To install enid, first find the version you wish to use here, then run the following commands:
git clone https://github.com/eni-chain/go-eni
cd eni-chain
git checkout main
make install
You can verify that enid is installed correctly by running:
enid version
If you encounter an error like command not found: enid, you may need to set the GOPATH environment variable.
Use go env GOPATH to find your GOPATH
Add the following lines to your ~/.bashrc or ~/.zshrc:
export GOPATH=[GOPATH obtained from step 1]
export PATH=$PATH:$GOPATH/bin
enid supports all the commands necessary for interacting with the chain. To see a list of available commands and their descriptions, run enid:
Start eni app
Usage:
enid [command]
Available Commands:
add-genesis-account Add a genesis account to genesis.json
add-wasm-genesis-message Wasm genesis subcommands
collect-gentxs Collect genesis txs and output a genesis.json file
compact Compact the application DB fully (only if it is a levelDB)
config Create or query an application CLI configuration file
debug Tool for helping with debugging your application
export Export state to JSON
gentx Generate a genesis tx carrying a self delegation
help Help about any command
init Initialize private validator, p2p, genesis, and application configuration files
keys Manage your application's keys
latest_version Prints the latest version of the app DB
migrate Migrate genesis to a specified target version
prune Prune app history states by keeping the recent heights and deleting old heights
query Querying subcommands
rollback rollback cosmos-sdk and tendermint state by one height
start Run the full node
status Query remote node for status
tendermint Tendermint subcommands
tools A set of useful tools for eni chain
tx Transactions subcommands
validate-genesis validates the genesis file at the default location or at the location passed as an arg
version Print the application binary version information
Flags:
-h, --help help for enid
--home string directory for config and data (default "/Users/bryantran/.eni")
--log_format string The logging format (json|plain)
--log_level string The logging level (trace|debug|info|warn|error|fatal|panic)
--trace print out full stack trace on errors
Use "enid [command] --help" for more information about a command.
Adding a Wallet
You can create a new wallet using the enid keys command:
enid keys add $NAME
Replace $NAME with the name you want to use for this key. This will generate a mnemonic phrase and store the account in the CLI for use. Write down this mnemonic phrase and store it securely.
Alternatively, if you want to import an existing mnemonic phrase, you can add the --recover flag:
enid keys add $NAME --recover
You will then be prompted to enter the mnemonic phrase.
If importing from an EVM wallet like MetaMask, you may need to specify the coin type. Ethereum-based (EVM) wallets use coin type 60, while Eni defaults to 118. For example,
enid keys add $NAME --coin-type=60
This will generate an address different from the default coin type 118.