Wallet Options
The CLI supports multiple ways to provide an Ethereum wallet for signing requests.
Keystore (Recommended)
The most secure option. Uses an encrypted keystore file:
erc8128 curl --keystore ./keyfile.json https://api.example.com/dataFor interactive password prompts:
erc8128 curl \
--keystore ~/.ethereum/keystores/my-key \
--interactive \
https://api.example.com/dataYou can also set the password via environment variable:
export ETH_KEYSTORE_PASSWORD=your-password
erc8128 curl --keystore ./keyfile.json https://api.example.com/dataKeyfile
A file containing a raw private key:
erc8128 curl --keyfile ~/.keys/bot.key https://api.example.com/dataUse - to read from stdin:
cat ~/.keys/bot.key | erc8128 curl --keyfile - https://api.example.com/dataPrivate Key
Pass a raw private key directly:
erc8128 curl --private-key 0x... https://api.example.com/dataOr via environment variable:
export ETH_PRIVATE_KEY=0x...
erc8128 curl https://api.example.com/dataOptions Reference
| Option | Description |
|---|---|
--keystore <path> | Path to encrypted keystore file |
--password <pass> | Keystore password |
--interactive | Prompt for keystore password interactively |
--keyfile <path> | Path to raw private key file (use - for stdin) |
--private-key <key> | Raw private key |
| Environment Variable | Description |
|---|---|
ETH_KEYSTORE_PASSWORD | Non-interactive keystore decryption |
ETH_PRIVATE_KEY | Raw private key |