Linux command
clef 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Initialize clef
clef init
Start clef
clef
Start clef on the Sepolia
clef --chainid 11155111 --keystore [path/to/keystore]
Start clef with a custom
clef --configdir [path/to/clef/config]
Start clef with automatic
clef --rules [path/to/rules.js]
Set a password
clef setpw [0xaddress]
Start clef in stdio mode
clef --stdio-ui
Create a new account
clef newaccount
说明
Clef is a standalone Ethereum account management and signing tool from the go-ethereum project. It provides secure storage of private keys and transaction signing capabilities separate from the main Ethereum client. Clef acts as a signing oracle that can approve or reject transaction signing requests. It supports hardware wallets, encrypted keystores, and can run in a detached mode where a JavaScript rules engine automatically processes signing requests based on predefined policies. The tool is designed for enhanced security by isolating key management from network-facing components. It can serve multiple clients through IPC or HTTP interfaces, making it suitable for both individual use and as part of larger infrastructure deployments.
参数
- --keystore _DIR_
- Directory for the keystore (default: $HOME/.ethereum/keystore).
- --configdir _DIR_
- Directory for Clef configuration (default: $HOME/.clef).
- --chainid _ID_
- Chain ID for transaction signing (default: 1). Common values: 1=mainnet, 11155111=sepolia.
- --rules _FILE_
- Path to JavaScript rules file for automatic transaction approval.
- --stdio-ui
- Use standard input/output for user interface (for integration with external tools).
- --ipcpath _PATH_
- Filename for IPC socket/pipe.
- --ipcdisable
- Disable the IPC-RPC server.
- --http
- Enable HTTP-RPC server for remote signing requests.
- --http.addr _ADDR_
- HTTP server listening address (default: localhost).
- --http.port _PORT_
- HTTP server listening port (default: 8550).
- --http.vhosts _HOSTS_
- Comma-separated list of virtual hostnames (default: localhost).
- --signersecret _FILE_
- File containing the encrypted master seed.
- --auditlog _FILE_
- File for audit logs (default: audit.log).
- --loglevel _LEVEL_
- Log level to emit to the screen (default: 4).
- --lightkdf
- Reduce key-derivation RAM and CPU usage at some expense of KDF strength.
- --advanced
- Issue warnings instead of rejections for advanced operations.
- --suppress-bootwarn
- Suppress the boot warning display.
- --help
- Display help information.
FAQ
What is the clef command used for?
Clef is a standalone Ethereum account management and signing tool from the go-ethereum project. It provides secure storage of private keys and transaction signing capabilities separate from the main Ethereum client. Clef acts as a signing oracle that can approve or reject transaction signing requests. It supports hardware wallets, encrypted keystores, and can run in a detached mode where a JavaScript rules engine automatically processes signing requests based on predefined policies. The tool is designed for enhanced security by isolating key management from network-facing components. It can serve multiple clients through IPC or HTTP interfaces, making it suitable for both individual use and as part of larger infrastructure deployments.
How do I run a basic clef example?
Run `clef init` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --keystore _DIR_ do in clef?
Directory for the keystore (default: $HOME/.ethereum/keystore).