Drand Client
constructor(baseUrl: String = "https://api.drand.sh", httpConfig: HttpConfig = HttpConfig(), enableCache: Boolean = true)
Creates a client using HTTP transport with the specified base URL.
Parameters
base Url
The base URL of the drand API endpoint (default: https://api.drand.sh)
http Config
HTTP timeout configuration (optional, uses defaults if not specified)
enable Cache
Whether to enable caching of chain information (default: true)
Throws
if baseUrl is invalid for HTTP transport
constructor(api: DrandApi, cache: Cache<String, ChainInfo> = SimpleCache(), verifier: BeaconVerificationService = BeaconVerificationService())
Parameters
api
The underlying API implementation for network transport (default: HTTP)
cache
Thread-safe cache for storing chain information to reduce network calls
verifier
Service for cryptographic verification of beacons