ServicesPresetOptions

data class ServicesPresetOptions(var relays: List<String>? = null, var apiSecret: String? = null, var apiSecretFromEnv: Boolean? = null, var endpointSecretKey: ByteArray? = null)

Options for `preset_iroh_services`.

Supply exactly one of api_secret or api_secret_from_env.

Constructors

Link copied to clipboard
constructor(relays: List<String>? = null, apiSecret: String? = null, apiSecretFromEnv: Boolean? = null, endpointSecretKey: ByteArray? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Encoded API secret string (services1...). The relay access token is minted from this.

Link copied to clipboard

If true, read the API secret from IROH_SERVICES_API_SECRET.

Link copied to clipboard

The endpoint's own identity key (32 bytes) — not your API secret. The access token is scoped to it, so pass the same key you persist for your endpoint's identity. A fresh key is generated when omitted.

Link copied to clipboard

Your project's relay URLs. Defaults to the n0 public relays when omitted, matching iroh_services::preset(). Passing an empty list is an error rather than a silent fallback — that is nearly always a filtered list that came back empty.