Account Mangement
Account security is very important in blockchain networks. You should make sure that your account's private key and password are inaccessible to anyone but yourself. If someone else obtains your account's private key and password, they can control all assets associated with your account. You should safely back up your account. If you lose your key file or password, your account assets are inaccessible and permanently lost.
ETH-ECC's node client has an internal account management tool. However, for better security, an off-client account management tool is desirable. Clef, an external account management tool supported by ETH-ECC, can be run separately from the client and operates on independent hardware. Clef requires manual review of account-related actions by the owner, and is more secure than traditional account management because signing is done inside Clef.
Keep your account safe and backed up!
Clef
Clef init
Clef must be initialized before creating an account. Determine the path for Clef and pass the repository path to the clef init command.
Please remember the master seed generated and keep it safe. The master seed gives you access to the account managed by clef.
Connecting ETH-ECC and Clef
In order for Clef and ETH-ECC to communicate with each other, Cleft needs to know the chain ID of the network and the location of the node's keystore. Keystores are usually located inside the node data directory.
Run the following command to start a Clef configured for ETH-ECC nodes connecting to the Seoul mainnet.
For Gwangju testnet, modify the chain ID to 10359.
Clef starts running in the terminal, starting with a disclaimer and prompting to click "OK".
ETH-ECC can be started in a separate terminal. To connect to Clef, make sure the data directory matches the path provided to Clef and pass the location of the Clef IPC file. Clef saves this file to the path provided in the -configdir
flag.
New Account
A new key file has been added to the keystore for ETH-ECC . A JSON response is returned with the new account address in the result field.
The newly created key file can be found in /keystore/, a subfolder of the node directory. The file name includes the key generation date and time and address.
For example:
You can also create an account by importing the user's existing hexadecimal private key.
List accounts
In the clef console, you can use the following CLI command to list your accounts.
This will return a JSON object with your account address.
You can also list accounts using eth.accounts
but require authorization from Clef.
You can list all wallets managed by clef with the following command
Import account
Clef also supports creating an account using a pre-existing private key. You can bring the address created in a wallet such as Metamask to Clef and interact with it. You can import your account by running the command below and entering your password. Like I said, protect your passwords and back them up.
The following information is displayed in the terminal indicating a successful import.
Account update
Clef can be used to set and remove passwords for existing keystore files. To set a new password, pass the account address to setpw.
This will cause Clef to enter the new password twice, followed by the Clef master password to decrypt the key file.
See the clef section of the go-ethereum docs for details.