Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Examples – ERC-8128
Skip to content

Examples

Common usage patterns for the ERC-8128 CLI.

GET Requests

Simple authenticated GET

erc8128 curl --keystore ./keyfile.json https://api.example.com/data

Verbose output

erc8128 curl -v \
  --keystore ./keyfile.json \
  https://api.example.com/data

Include response headers

erc8128 curl -i \
  --keystore ./keyfile.json \
  https://api.example.com/data

Save response to file

erc8128 curl -o response.json \
  --keystore ./keyfile.json \
  https://api.example.com/data

POST Requests

POST with JSON body

erc8128 curl -X POST \
  -H "Content-Type: application/json" \
  -d '{"foo":"bar"}' \
  --keystore ./keyfile.json \
  https://api.example.com/submit

POST with body from file

erc8128 curl -X POST \
  -d @body.json \
  --keyfile ~/.keys/bot.key \
  https://api.example.com/orders

POST with keyid

erc8128 curl -X POST \
  -d @body.json \
  --keyfile ~/.keys/bot.key \
  --keyid erc8128:8453:0xabc... \
  https://api.example.com/orders

Dry 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/orders

Advanced 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/data

Interactive keystore password

erc8128 curl \
  --keystore ~/.ethereum/keystores/my-key \
  --interactive \
  https://api.example.com/data

How It Works

Under the hood, erc8128 curl:

  1. Creates an Ethereum signer from your wallet
  2. Builds the HTTP request with your specified options
  3. Signs the request according to ERC-8128 using RFC 9421 HTTP Message Signatures
  4. Sends the signed request and displays the response