Skip to content
LogoLogo

Configuration

The CLI reads all configuration from ~/.jaw/config.json. This includes API credentials, paymaster setup, and session permissions.

Config Generator

Use the interactive form to build your config and get a ready-to-paste command:

General
Paymasters
Base Sepolia
JSON object passed to paymaster calls (e.g., Pimlico sponsorship policy)
Call Permissions
Any Target + Any Function
Spend Limits
Native ETH
Max 0.1 ETH per day
Generated Command
jaw config write '{"defaultChain":84532,"permissions":{"calls":[{"target":"0x3232323232323232323232323232323232323232","selector":"0x32323232"}],"spends":[{"token":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE","allowance":"0x16345785d8a0000","unit":"day","multiplier":1}]}}'

Manual Setup

Flat values (via CLI)

jaw config set apiKey=YOUR_API_KEY defaultChain=8453 sessionExpiry=7

Full config (via config write)

Write inline JSON or from a file:

jaw config write '{"apiKey":"...","defaultChain":8453,"paymasters":{...}}'
jaw config write ./my-config.json

View current config

jaw config show

Configuration Reference

KeyTypeDescriptionCLI settable
apiKeystringYour JAW API key (get one)Yes
defaultChainnumberDefault chain ID for all commandsYes
ensstringENS domain for subname resolutionYes
sessionExpirynumberSession key expiry in days (default: 7)Yes
keysUrlstringKeys service URL (default: https://keys.jaw.id)Yes
relayUrlstringRelay WebSocket URL (default: wss://relay.jaw.id)Yes
paymastersobjectPer-chain paymaster configEdit JSON
permissionsobjectSession permission scopeEdit JSON
x402objectSpending limits for x402 paymentsYes, per field

Config File Structure

{
  "apiKey": "jaw_...",
  "defaultChain": 84532,
  "ens": "mydomain.eth",
  "keysUrl": "https://keys.jaw.id",
  "relayUrl": "wss://relay.jaw.id",
  "paymasters": {
    "84532": {
      "url": "https://api.pimlico.io/v2/84532/rpc?apikey=...",
      "context": { "sponsorshipPolicyId": "sp_my_policy" }
    }
  },
  "sessionExpiry": 7,
  "permissions": {
    "calls": [{ "target": "0x3232...", "selector": "0xe0e0e0e0" }],
    "spends": [{ "token": "0xEeee...EEeE", "allowance": "0x16345785d8a0000", "unit": "day", "multiplier": 1 }]
  }
}

Paymasters

Per-chain paymaster configuration. Each key is a chain ID:

"paymasters": {
  "8453": { "url": "https://api.pimlico.io/v2/8453/rpc?apikey=..." },
  "84532": {
    "url": "https://api.pimlico.io/v2/84532/rpc?apikey=...",
    "context": { "sponsorshipPolicyId": "sp_my_policy" }
  }
}
  • url — Paymaster RPC endpoint (required)
  • context — Optional context object passed to paymaster calls (e.g., Pimlico sponsorship policy)

Permissions

Defines the scope of what a session key can do. Only used by Auto Mode.

Call permissions — which contracts and functions the session key can call:

PresettargetselectorDescription
Any target, any function0x3232...32320x32323232Wildcard — can call any contract
Any target, empty calldata0x3232...32320xe0e0e0e0Only ETH transfers (no contract calls)
Custom0xYourContract0xa9059cbbSpecific contract + function selector

Spend limits — how much the session key can spend:

FieldDescription
tokenToken address. Use 0xEeee...EEeE for native ETH
allowanceMax amount in wei (hex string)
unitRate limit period: minute, hour, day, week, month, year, forever
multiplierNumber of periods (e.g., 2 with day = every 2 days)

x402

Spending limits for x402 payments. Set one field at a time:

jaw config set x402.maxAmountPerPayment 500000
jaw config set x402.allowedPayTo 0xabc...,0xdef...
FieldTypeDescription
maxAmountPerPaymentstringMax base units for a single payment (default: 1 USDC)
maxTotalPerSessionstringMax base units across the session (default: 10 USDC)
topUpFloatstringRefill target for the payer. Unset tops up the shortfall only
allowedAssetsstring[]Allowed token addresses. Defaults to the registry USDC
allowedNetworksstring[]Allowed CAIP-2 networks. Defaults to the supported networks
allowedHostsstring[]Allowed resource hostnames. Unset means any
allowedPayTostring[]Allowed recipients. Unset means any

Amounts are in base units, so 1000000 is 1 USDC. Array fields are comma separated on the CLI.

The per-period caps are seeded from the on chain grant, one for every spend limit the permission puts on the token, and mirror it. They are not settable, because they describe what the permission already enforces.

Resolution Order

Configuration values are resolved in this order (first match wins):

  1. CLI flags (--api-key, --chain)
  2. Environment variables (JAW_API_KEY, JAW_CHAIN_ID, JAW_OUTPUT)
  3. Config file (~/.jaw/config.json)
  4. Built-in defaults

Migration

If you previously used paymasterUrl (single string), it's automatically migrated to the paymasters map on first load using your defaultChain.