Examples
Common usage patterns for the ERC-8128 CLI.
GET Requests
Simple authenticated GET
erc8128 curl --keystore ./keyfile.json https://api.example.com/dataVerbose output
erc8128 curl -v \
--keystore ./keyfile.json \
https://api.example.com/dataInclude response headers
erc8128 curl -i \
--keystore ./keyfile.json \
https://api.example.com/dataSave response to file
erc8128 curl -o response.json \
--keystore ./keyfile.json \
https://api.example.com/dataPOST Requests
POST with JSON body
erc8128 curl -X POST \
-H "Content-Type: application/json" \
-d '{"foo":"bar"}' \
--keystore ./keyfile.json \
https://api.example.com/submitPOST with body from file
erc8128 curl -X POST \
-d @body.json \
--keyfile ~/.keys/bot.key \
https://api.example.com/ordersPOST with keyid
erc8128 curl -X POST \
-d @body.json \
--keyfile ~/.keys/bot.key \
--keyid erc8128:8453:0xabc... \
https://api.example.com/ordersDry Run
Sign a request without sending it — useful for debugging or generating signatures for other tools:
erc8128 curl -X POST \
-d @body.json \
--keyfile ~/.keys/bot.key \
--dry-run \
https://api.example.com/ordersAdvanced Signatures
Custom chain, binding mode, and TTL
erc8128 curl \
--chain-id 137 \
--binding class-bound \
--replay replayable \
--ttl 300 \
--keystore ./keyfile.json \
https://api.example.com/dataInteractive keystore password
erc8128 curl \
--keystore ~/.ethereum/keystores/my-key \
--interactive \
https://api.example.com/dataHow It Works
Under the hood, erc8128 curl: