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_IDYesCA5R7V5IGMYOBRSAMP4R5MWURSNTY6565NSKEEVR6626PLC3VM2A3EZ2Current GREEN Testnet sla_vault.
NEXT_PUBLIC_WATCHER_REGISTRY_CONTRACT_IDYesCDTIVQ6I77EMFP42522RIFKMSMJID3BDLNR5LPLJEGVAS4Q2DJDMN3DYCurrent GREEN Testnet watcher_registry.
NEXT_PUBLIC_INDEXER_API_URLYeshttps://slasettle-indexer-v02.slasettle-indexer.workers.devCurrent GREEN event indexer (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 (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 (process environment; template: watcher/.env.example) ​

VariableRequiredDefaultDescription
WATCHER_REGISTRY_CONTRACT_IDYesNoneDeployed watcher_registry address.
SLA_VAULT_CONTRACT_IDYesNoneDeployed sla_vault address; used to read the SLA's committed endpoint hash.
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_SECONDSNo10Request timeout for HTTP GET probing, in seconds.
HTTP_EXPECT_MAX_STATUSNo400Status threshold: responses below it are UP; responses at or above it are DOWN. Timeouts and other request failures are also DOWN.

The daemon reads the process environment and does not load .env files itself. Export values in the environment of the process that starts it.

CAUTION

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