> ## Documentation Index
> Fetch the complete documentation index at: https://docs.privacyboost.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Network presets

# Network Presets

The Privacy Boost CLI includes built-in network presets for common configurations.

## Available Presets

### OP Sepolia Testnet

For testing on Optimism's Sepolia testnet:

```bash theme={null}
privacy-boost --network op-sepolia [command]
```

**Aliases:** `op-sepolia`, `optimism-sepolia`, `opsepolia`

**Configuration:**

```toml theme={null}
server_url = "https://optimism.sepolia.privacyboost.io"
rpc_url = "https://sepolia.optimism.io"
weth_contract_address = "0x4200000000000000000000000000000000000006"
```

`chain_id` and `shield_contract_address` are auto-discovered from the server's `/api/v1/info` endpoint at runtime.

### OP Mainnet

There is no built-in `--network` preset for mainnet yet. Point `server_url` at the mainnet endpoint via a config file or environment variable:

```toml theme={null}
server_url = "https://optimism.privacyboost.io"
rpc_url = "https://mainnet.optimism.io"
weth_contract_address = "0x4200000000000000000000000000000000000006"
```

As with the testnet preset, `chain_id` and `shield_contract_address` are auto-discovered from `/api/v1/info`.

## Custom Configuration

### Configuration File

Create a custom configuration at `~/.privacy-boost/config.toml`:

```toml theme={null}
# Custom network configuration
server_url = "https://my-indexer.example.com"
chain_id = 1
shield_contract_address = "0x..."
weth_contract_address = "0x4200000000000000000000000000000000000006"
rpc_url = "https://mainnet.infura.io/v3/YOUR_KEY"
timeout_secs = 60
```

Load automatically or specify path:

```bash theme={null}
# Uses ~/.privacy-boost/config.toml automatically
privacy-boost status

# Specify custom path
privacy-boost --config /path/to/config.toml status
```

### Environment Variables

Override any configuration with environment variables:

```bash theme={null}
export SERVER_URL="https://custom-indexer.com"
export CHAIN_ID=1
export RPC_URL="https://mainnet.infura.io/v3/YOUR_KEY"
export SHIELD_CONTRACT_ADDRESS="0x..."
export WETH_CONTRACT_ADDRESS="0x..."

privacy-boost status
```

### Priority Order

Configuration is resolved in this order (later overrides earlier):

1. Default values
2. Network preset (`--network`)
3. Configuration file (`~/.privacy-boost/config.toml`)
4. Custom config file (`--config`)
5. Environment variables

## Initialize Configuration

Create a configuration file from a preset:

```bash theme={null}
# Create OP Sepolia config
privacy-boost init --network op-sepolia

# View created config
cat ~/.privacy-boost/config.toml
```

If `~/.privacy-boost/config.toml` already exists, `init` will skip and warn you. Delete the existing file first to reinitialize.

You can also import an existing config file as the default:

```bash theme={null}
privacy-boost init --config /path/to/my-config.toml
```

## Multiple Configurations

Use the `--config` flag to point at different config files per command:

```bash theme={null}
privacy-boost --config ~/.privacy-boost/mainnet.toml balances
privacy-boost --config ~/.privacy-boost/sepolia.toml balances
```

## RPC Provider Recommendations

### Public RPC Endpoints

| Network    | Provider   | URL                                       |
| ---------- | ---------- | ----------------------------------------- |
| OP Sepolia | Optimism   | `https://sepolia.optimism.io`             |
| OP Sepolia | PublicNode | `https://optimism-sepolia.publicnode.com` |

### Private RPC Providers

For higher rate limits, use a dedicated RPC provider:

* **Alchemy**: `https://opt-sepolia.g.alchemy.com/v2/YOUR_KEY`
* **Infura**: `https://optimism-sepolia.infura.io/v3/YOUR_KEY`

## Chain ID Reference

| Network    | Chain ID |
| ---------- | -------- |
| OP Mainnet | 10       |
| OP Sepolia | 11155420 |

## Next Steps

* [Commands Reference](./commands) - All CLI commands
* [Scripting Guide](./scripting) - Automation examples
