Companion

Functions

Link copied to clipboard
suspend fun create(address: String? = null, token: String? = null): TapClient

Resolves the server (address, else tap.server/TAP_SERVER, else the live daemon.json) and returns a client for it. An explicit address sends token, else tap.token/TAP_TOKEN; a discovered one sends the token from daemon.json. Discovery probes the server with Info, so a dead descriptor fails here with "no running tap server; run tap start" rather than on the first call.