route402.dev / wallet

Configuration

Environment variables, and the one you must set before the wallet can pay for anything.

The authoritative list is the `wallet` service block in the repo-root docker-compose.yml. Everything below is read at request time, so changing a value needs a restart but not a rebuild.

Required before the first payment

SETTLEMENT_ASSETS declares which assets this deployment will treat as having a known USD value. Nothing can be paid for in an asset that is not listed here, because a limit denominated in USD cannot be enforced against an amount with no USD value.

# <caip2>|<address>|<symbol>|<decimals>|<usd|float>
SETTLEMENT_ASSETS='eip155:114|0xYourCoston2SettlementAsset|USD₮0|6|usd'

This is deliberately not inferred from the 402 challenge. A resource server can claim any asset name it likes, so trusting `extra.name` would let a worthless token pose as a dollar-pegged one and walk through every limit. Flare mainnet USD₮0 and Base USDC are built in; testnet assets are deployment-specific and must be declared.

Everything else

VariableDefaultPurpose
AUTH_SECRET— (required in production)Derives token signing and key-wrapping keys
NEXT_PUBLIC_SITE_URLhttp://localhost:3001Canonical origin; determines the token audience
DATABASE_URLin-memoryPostgres. Without it the wallet keeps state in process only
REGISTRY_URLFACILITATOR_URL/discovery/resourcesPrimary Bazaar registry
EXTRA_REGISTRY_URLSComma-separated additional registries, in preference order
X402_NETWORKSeip155:114CAIP-2 networks this wallet will transact on
FLARE_RPC_URLS / COSTON2_RPC_URLSNeeded to read balances; payments work without them
SESSION_KEY_TTL_SECONDS3600How long a spending key lives before rotation
DEFAULT_PER_CALL_LIMIT_USD0.50Starting per-call limit for a new wallet
DEFAULT_DAILY_LIMIT_USD10.00Starting daily limit for a new wallet
CUSTODY_BACKENDsession-keysession-key | kms | fcc. The latter two are v2 stubs