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:
Manual Setup
Flat values (via CLI)
jaw config set apiKey=YOUR_API_KEY defaultChain=8453 sessionExpiry=7Full config (via config write)
Write inline JSON or from a file:
jaw config write '{"apiKey":"...","defaultChain":8453,"paymasters":{...}}'
jaw config write ./my-config.jsonView current config
jaw config showConfiguration Reference
| Key | Type | Description | CLI settable |
|---|---|---|---|
apiKey | string | Your JAW API key (get one) | Yes |
defaultChain | number | Default chain ID for all commands | Yes |
ens | string | ENS domain for subname resolution | Yes |
sessionExpiry | number | Session key expiry in days (default: 7) | Yes |
keysUrl | string | Keys service URL (default: https://keys.jaw.id) | Yes |
relayUrl | string | Relay WebSocket URL (default: wss://relay.jaw.id) | Yes |
paymasters | object | Per-chain paymaster config | Edit JSON |
permissions | object | Session permission scope | Edit JSON |
x402 | object | Spending limits for x402 payments | Yes, 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:
| Preset | target | selector | Description |
|---|---|---|---|
| Any target, any function | 0x3232...3232 | 0x32323232 | Wildcard — can call any contract |
| Any target, empty calldata | 0x3232...3232 | 0xe0e0e0e0 | Only ETH transfers (no contract calls) |
| Custom | 0xYourContract | 0xa9059cbb | Specific contract + function selector |
Spend limits — how much the session key can spend:
| Field | Description |
|---|---|
token | Token address. Use 0xEeee...EEeE for native ETH |
allowance | Max amount in wei (hex string) |
unit | Rate limit period: minute, hour, day, week, month, year, forever |
multiplier | Number 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...| Field | Type | Description |
|---|---|---|
maxAmountPerPayment | string | Max base units for a single payment (default: 1 USDC) |
maxTotalPerSession | string | Max base units across the session (default: 10 USDC) |
topUpFloat | string | Refill target for the payer. Unset tops up the shortfall only |
allowedAssets | string[] | Allowed token addresses. Defaults to the registry USDC |
allowedNetworks | string[] | Allowed CAIP-2 networks. Defaults to the supported networks |
allowedHosts | string[] | Allowed resource hostnames. Unset means any |
allowedPayTo | string[] | 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):
- CLI flags (
--api-key,--chain) - Environment variables (
JAW_API_KEY,JAW_CHAIN_ID,JAW_OUTPUT) - Config file (
~/.jaw/config.json) - 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.