Skip to content

Environment & Configuration ​

StellarClear services and packages are configured using standard environment variables.

Environment Variable Reference ​

VariableTarget ComponentRequired / OptionalDefault (Local / Testnet)Description
STELLAR_NETWORKAPI, Indexer, SDKOptionaltestnetTarget Stellar network identifier (testnet, mainnet, futurenet, standalone).
STELLAR_NETWORK_PASSPHRASEAPI, Indexer, SDKOptionalTest SDF Network ; September 2015Authoritative network passphrase used for signing and transaction envelope validation.
STELLAR_RPC_URLAPI, Indexer, SDKOptionalhttps://soroban-testnet.stellar.orgSoroban RPC endpoint URL.
STELLAR_CONTRACT_IDAPI, Indexer, SDKRequiredCCPCMPIUTKBLSJVSGPPSUHTBBY6HHT3OTE3CKUXC5BD2B3YEDSAROGC556-character StrKey contract ID (C...) for deployed SettlementRegistry.
DATABASE_URLAPI, Indexer, DBRequiredpostgresql://postgres:postgres@localhost:5432/stellarclear_dbPostgreSQL connection string.
API_PORTAPI ServiceOptional3000Port for the REST API HTTP server.
API_HOSTAPI ServiceOptional0.0.0.0Host IP address to bind API HTTP server.
ENABLE_ANCHORINGAPI ServiceOptionalfalseWhen true, API automatically submits state transitions on-chain using observer key.
INDEXER_POLL_INTERVAL_MSIndexer ServiceOptional5000Polling interval in milliseconds for fetching new contract events from RPC.
INDEXER_BATCH_SIZEIndexer ServiceOptional100Maximum number of events to ingest in a single RPC query batch.

Production Configuration Safety Rules ​

When running in production (STELLAR_NETWORK=mainnet):

  1. Contract ID: Must be an explicit deployed mainnet contract address. Default placeholder addresses are rejected by configuration validators.
  2. Network Passphrase: Must match Public Global Stellar Network ; September 2015.
  3. Database URL: Must use private networking with TLS enabled.

Released under the Apache-2.0 License.