BeaconOperations

Operations for accessing drand networks by beacon ID.

All methods in this interface accept a beacon ID string (e.g., "default", "quicknet") and return Result types for safe error handling.

Functions

Link copied to clipboard
abstract suspend fun atRound(id: String, round: Long): Result<RandomnessBeacon>

Gets a specific randomness beacon by round number.

Link copied to clipboard
abstract suspend fun health(id: String): Result<HealthStatus>

Gets the health status of a drand network by beacon ID.

Link copied to clipboard
abstract suspend fun info(id: String): Result<ChainInfo>

Gets the chain configuration information by beacon ID.

Link copied to clipboard
abstract suspend fun latest(id: String): Result<RandomnessBeacon>

Gets the most recent randomness beacon from a network by beacon ID.

Link copied to clipboard
abstract suspend fun list(): Result<List<String>>

Lists all available beacon IDs on this drand API endpoint.

Link copied to clipboard
abstract suspend fun next(id: String): Result<RandomnessBeacon>

Waits for and returns the next randomness beacon (long polling).