Skip to main content

Network Presets

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

Available Presets

Local Development

For local development with a local blockchain (Anvil, Hardhat, Ganache):
privacy-boost --network local [command]
Configuration:
indexer_url = "http://localhost:8081"
prover_url = "http://localhost:8080"
chain_id = 31337
rpc_url = "http://localhost:8545"
shield_contract = "0x96abd26a2a354e17263325b136f0a24febc8c009"
weth_contract = "0xb07bea251cc06b5f2d56ab4ae0193c504921cb6a"
The local preset reads from environment variables with these defaults.

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"
prover_url = "https://test-api.privacy-boost.sunnyside.io/prover"
chain_id = 11155420
rpc_url = "https://sepolia.optimism.io"
shield_contract = "0xB22fD661b322F10d4B7cd0cFcb9578C485423119"
weth_contract = "0x4200000000000000000000000000000000000006"

Custom Configuration

Configuration File

Create a custom configuration at ~/.privacy-boost/config.toml:
# Custom network configuration
indexer_url = "https://my-indexer.example.com"
prover_url = "https://my-prover.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 PROVER_URL="https://custom-prover.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

# Create local dev config
privacy-boost init --network local

# 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
Local (Anvil/Hardhat)31337

Next Steps