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

Configuration

Set defaults in a .erc8128rc.json file to avoid repeating options on every command.

Config Resolution

The CLI looks for configuration in this order:

  1. --config <path> — explicit path, if provided
  2. ./.erc8128rc.json — current working directory
  3. ~/.erc8128rc.json — home directory

Config File Format

{
  "chainId": 8453,
  "binding": "request-bound",
  "replay": "non-replayable",
  "ttl": 120,
  "keyfile": "/Users/you/.keys/bot.key",
  "keyid": "erc8128:8453:0xabc...",
  "headers": ["Content-Type: application/json"],
  "components": ["x-idempotency-key"]
}

All fields are optional. CLI flags override config file values.

Fields

FieldTypeDescription
chainIdnumberDefault chain ID
bindingstring"request-bound" or "class-bound"
replaystring"non-replayable" or "replayable"
ttlnumberSignature TTL in seconds
keyfilestringPath to private key file
keyidstringDefault key id (erc8128:chainId:address)
headersstring[]Default headers to include
componentsstring[]Default components to sign

Example: Bot Configuration

A typical config for an automated agent on Base:

{
  "chainId": 8453,
  "ttl": 120,
  "keyfile": "/opt/bot/.keys/signer.key",
  "keyid": "erc8128:8453:0x1234...",
  "headers": ["Content-Type: application/json"]
}

Then all you need is:

erc8128 curl -X POST -d '{"action":"buy"}' https://api.example.com/orders