Description:
The SDK targets two environments — sandbox (Stellar testnet, staging backend) and production (Stellar mainnet, live backend). These must be represented as an enum so the HTTP client and Stellar layer automatically resolve the correct API base URL and network passphrase without the user doing the mapping themselves.
Proposed Steps:
- Define an
Environment enum in config.py with values SANDBOX and PRODUCTION.
- Map each value to its Horizon URL, network passphrase, and Shade backend URL.
- Accept string shorthands
"sandbox" / "production" via a parse_environment() coercer.
- Default the SDK to
SANDBOX so developers don't accidentally hit production.
Acceptance Criteria:
Description:
The SDK targets two environments —
sandbox(Stellar testnet, staging backend) andproduction(Stellar mainnet, live backend). These must be represented as an enum so the HTTP client and Stellar layer automatically resolve the correct API base URL and network passphrase without the user doing the mapping themselves.Proposed Steps:
Environmentenum inconfig.pywith valuesSANDBOXandPRODUCTION."sandbox"/"production"via aparse_environment()coercer.SANDBOXso developers don't accidentally hit production.Acceptance Criteria:
shade.environment = "production"resolves to the mainnet Horizon URL and production API base.shade.environment = "sandbox"resolves to the testnet Horizon URL and staging API base.ValueErrorwith the list of valid options.Environmentwithout separate configuration.