ReferenceAPIsSDK
SDK API
@olympusoss/sdk exported API surface
The SDK is consumed by Athena, Hera, and Site. It provides:
- Settings vault (key-value in the
olympusdatabase) - AES-256-GCM encryption with HKDF-SHA256 key derivation
- In-memory TTL cache for hot reads
- Brute-force tracking, lockout, and security audit
- Session location tracking
The API is small. There are no async iterators, no event emitters, no streaming. Most functions are async (read/write Postgres) and return well-typed data.
Modules
| Module | Exports | Description |
|---|---|---|
| blocklist | 1 | ENCRYPTION_KEY_BLOCKLIST |
| brute-force | 12 | BruteForceConfig, LockoutState, LockedAccount, … |
| cache | 2 | SettingsCache, settingsCache |
| crypto | 6 | encrypt, decrypt, isEncryptedFormat, … |
| db | 10 | getDb, getSettingsTable, ensureTable, … |
| locations | 6 | SessionLocation, AddSessionLocationData, GetSessionLocationsOptions, … |
| migrate-encryption-key | 0 | |
| settings | 11 | Setting, SetSettingOptions, getSetting, … |
Installation
bun add @olympusoss/sdkRequired environment
The SDK requires:
DATABASE_URL, Postgres connection stringENCRYPTION_KEY, 32-byte base64-encoded key for AES-256-GCM (see Security, Encryption at Rest)
See the environment variable catalog for the full list.