ApiServiceImpl

class ApiServiceImpl(client: HttpClient) : ApiService(source)

Ktor-based ApiService implementation.

Uses relative paths — the base URL is set via the DefaultRequest plugin in the platform Koin modules.

Registered with binds = [] to prevent Koin from auto-binding to ApiService; host modules (app, desktop) provide their own explicit ApiService binding to allow platform-specific HttpClient engines.

Constructors

Link copied to clipboard
constructor(client: HttpClient)

Functions

Link copied to clipboard

Fetches the nRF52 bootloader/OTA quirk catalog (advisory bootloader-upgrade flags and the SoftDevice-variant gating table) from the Meshtastic API. Decodes directly to the same model the bundled asset seed uses — the server serves this file verbatim, so there is nothing to transform.

Link copied to clipboard
open suspend override fun getDeviceHardware(): List<NetworkDeviceHardware>

Fetches the device hardware catalog from the Meshtastic API.

Link copied to clipboard
open suspend override fun getDeviceLinks(): NetworkDeviceLinksResponse

Fetches the resolved device-links catalog (msh.to purchase links) from the Meshtastic API.

Link copied to clipboard
open suspend override fun getEventFirmware(): EventFirmwareResponse

Fetches event-firmware display metadata (editions, welcome messages, links) from the Meshtastic API.

Link copied to clipboard
open suspend override fun getFirmwareReleaseManifest(manifestUrl: String): FirmwareReleaseManifest

Fetches the target manifest referenced by a firmware release's zip_url.

Link copied to clipboard
open suspend override fun getFirmwareReleases(): NetworkFirmwareReleases

Fetches the list of available firmware releases from the Meshtastic API.

Link copied to clipboard

Fetches the pinned maintenance-UF2 manifest (factory-erase and OTAFIX bootloader self-update images) from the Meshtastic API. Decodes directly to the same model the bundled asset seed uses — the server serves this file verbatim, so there is nothing to transform. Each image's own sha256 is still checked against the downloaded bytes before any write; that is unaffected by how this manifest itself is fetched.

Link copied to clipboard
open suspend override fun getNightlyFirmware(): NetworkFirmwareNightly?

Fetches the nightly preview build pointer from meshtastic.github.io. Returns null when no nightly is currently published (HTTP 404); throws on transport or server errors so callers can distinguish "gone" from "unreachable".