Skip to main content

Module services_env

Module services_env 

Source
Expand description

Single source of truth for building ServicesOptions from the environment.

Previously context.rs, commands/daemon.rs, commands/tick.rs, and commands/services.rs each rolled their own (subtly divergent) services setup. This module unifies them and adds the Arcade V2 surface.

§Environment variables

VarEffect
CHAINTRACKS_URLChaintracks header service for proof validation
ARC_URLOverride the broadcaster URL (classic ARC, or the Arcade endpoint in Arcade mode)
ARC_MODE=arcade or ARCADE=1Arcade V2 mode: EF-only submit, SSE status stream, push proofs
CALLBACK_TOKENOverride the per-wallet callback token (otherwise auto-generated and persisted next to the db)
PUBLIC_CALLBACK_URLPublic HTTPS URL Arcade should POST status webhooks to (X-CallbackUrl)
TAAL_API_KEYTAAL ARC key sent as Authorization: Bearer <key>
MAIN_TAAL_API_KEYTAAL ARC key sent as raw Authorization: <key> (TAAL accepts no Bearer prefix)

Structs§

ArcadeRuntime
Resolved Arcade V2 runtime settings (present only in Arcade mode).

Functions§

arcade_mode_enabled
Whether Arcade V2 mode is selected via env (ARC_MODE=arcade or ARCADE=1).
arcade_runtime
Resolve the Arcade runtime settings, or None when not in Arcade mode.
callback_token_path
Where the per-wallet callback token lives: <db>.callback-token (covered by the repo’s *.db* gitignore pattern).
resolve_callback_token
Resolve the per-wallet callback token.
services_options_from_env
Build ServicesOptions from the environment (the ONE shared helper).