Skip to content

Environment Configuration ​

SLASettle uses decoupled environment configurations across its web application, indexer service, and watcher daemon.

Web Console & SDK (apps/web/.env.local) ​

These variables are consumed by @slasettle/sdk and inlined into the Next.js bundle at build time. None of these variables contain sensitive credentials.

VariableRequiredDefault / Testnet ValueDescription
NEXT_PUBLIC_SOROBAN_RPC_URLYeshttps://soroban-testnet.stellar.orgStellar RPC endpoint for contract simulations and submission.
NEXT_PUBLIC_NETWORK_PASSPHRASEYesTest SDF Network ; September 2015Stellar network passphrase for transaction envelope signing.
NEXT_PUBLIC_SLA_VAULT_CONTRACT_IDYesCDBFPYHJNYSIFXSMXF3BBDWPKHRS7SJFFEKMQ5WJXYTBMD4LFAG2CHLNAddress of deployed sla_vault smart contract.
NEXT_PUBLIC_WATCHER_REGISTRY_CONTRACT_IDYesCDRNXUPCZTVZXKPWNBQZAYI6HYFNBDHRO2KNNJSMDVTEHFOM7LCMOYMFAddress of deployed watcher_registry smart contract.
NEXT_PUBLIC_INDEXER_API_URLYeshttps://slasettle-indexer.slasettle-indexer.workers.devEndpoint of the event indexer service (or http://localhost:8787).

NOTE

@slasettle/sdk invokes getSdkConfig() at runtime. If any required variable is omitted, it throws a explicit MissingSdkConfigError rather than guessing a fallback.


Event Indexer (services/indexer/.env) ​

VariableRequiredDefaultDescription
WATCHER_REGISTRY_CONTRACT_IDYesNoneRegistry contract address to track for check submissions.
SLA_VAULT_CONTRACT_IDYesNoneVault contract address to track for lifecycle events.
RPC_URLNohttps://soroban-testnet.stellar.orgSoroban RPC endpoint for event polling.
NETWORK_PASSPHRASENoTest SDF Network ; September 2015Network passphrase.
DB_PATHNo./data/indexer.dbLocal SQLite database file path (when running Node engine).
HTTP_PORTNo8787HTTP listening port for REST API.
POLL_INTERVAL_MSNo5000Polling cadence for ledger event ingestion (in ms).
MAX_LEDGERS_PER_REQUESTNo1000Batch size limit for getEvents RPC calls.
ROUND_LENGTH_SECONDSNo60Duration of each monitoring round for the /v1/clock API.
ALLOWED_ORIGINSNohttp://localhost:3000Strict comma-separated list of allowed CORS origins.
LOG_LEVELNoinfoLogging verbosity (debug, info, warn, error).

Watcher Node Daemon (services/watcher/.env) ​

VariableRequiredDefaultDescription
WATCHER_REGISTRY_CONTRACT_IDYesNoneDeployed watcher_registry address.
WATCHER_SECRET_KEYYesNoneStellar private secret key (S...) used to sign check submissions.
TARGET_URLYesNoneHTTP endpoint URL monitored by this watcher instance.
SLA_IDYesNoneNumerical SLA index monitored by this watcher.
RPC_URLNohttps://soroban-testnet.stellar.orgSoroban RPC endpoint.
NETWORK_PASSPHRASENoTest SDF Network ; September 2015Network passphrase.
ROUND_LENGTH_SECONDSNo60Duration of monitoring round in seconds.
HTTP_TIMEOUT_SECONDSNo5Request timeout for HTTP probing.
HTTP_EXPECT_MAX_STATUSNo299Maximum acceptable HTTP status code considered UP.

CAUTION

The WATCHER_SECRET_KEY variable holds real signing credentials. Never commit .env files containing secret keys.