Skip to main content

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:
privacy-boost --network op-sepolia [command]
Aliases: op-sepolia, optimism-sepolia, opsepolia Configuration:
indexer_url = "https://test-api.privacy-boost.sunnyside.io/indexer"
rpc_url = "https://sepolia.optimism.io"
weth_contract = "0x4200000000000000000000000000000000000006"
chain_id and shield_contract are auto-discovered from the indexer’s /api/v1/info endpoint at runtime.

Custom Configuration

Configuration File

Create a custom configuration at ~/.privacy-boost/config.toml:
# Custom network configuration
indexer_url = "https://my-indexer.example.com"
chain_id = 1
shield_contract = "0x..."
weth_contract = "0x4200000000000000000000000000000000000006"
rpc_url = "https://mainnet.infura.io/v3/YOUR_KEY"
timeout_secs = 60
Load automatically or specify path:
# 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:
export INDEXER_URL="https://custom-indexer.com"
export CHAIN_ID=1
export RPC_URL="https://mainnet.infura.io/v3/YOUR_KEY"
export SHIELD_CONTRACT="0x..."
export WETH_CONTRACT="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:
# 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:
privacy-boost init --config /path/to/my-config.toml

Multiple Configurations

Use the --config flag to point at different config files per command:
privacy-boost --config ~/.privacy-boost/mainnet.toml balances
privacy-boost --config ~/.privacy-boost/sepolia.toml balances

RPC Provider Recommendations

Public RPC Endpoints

NetworkProviderURL
OP SepoliaOptimismhttps://sepolia.optimism.io
OP SepoliaPublicNodehttps://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

NetworkChain ID
OP Sepolia11155420

Next Steps