SoulFire TypeScript SDK 2.10.3
    Preparing search index...

    Class SoulFireClient

    A scoped connection to a SoulFire server and its instances.

    Use SoulFire.connect for an existing server. The Node and Bun entry points also provide managed installation and a one-call createBot helper. SDK operations return lazy Effects and Streams. Compose them in an Effect workflow and run the complete workflow at the application boundary.

    The connection handshake checks API compatibility, capabilities, and plugins. Keep client operations inside the connection scope. Cleanup stops a managed local process but leaves persistent server data and downloaded files in place.

    Index
    • Stop this client's managed local server, if present.

      The connection scope calls this operation automatically. Downloaded files and server data remain in place. For a remote connection, this operation does nothing.

      Returns Effect<void>

    • Create or reuse a ready bot on this connected SoulFire server.

      Parameters

      • options: CreateBotOptions

        Minecraft address, username, authentication, and readiness options.

      Returns Effect<SoulFireBot, SoulFireOperationError, Scope>

      An Effect that produces an observed bot and requires Scope.

      The instance name defaults to the trimmed Minecraft address, and the bot name defaults to the username. Repeated calls reuse named resources. Conflicting configuration fails. Cleanup stops a bot this operation started and preserves one that was already running. The instance and account remain available.

    • Replace the bearer token or provider for subsequent requests.

      This synchronous change does not restart existing streams or run a handshake.

      Parameters

      • token: string | TokenProvider | undefined

        Token, a provider evaluated per request, or undefined to clear it.

      Returns void

    • Connect to an existing server and check SDK compatibility.

      Parameters

      • options: SoulFireOptions

        gRPC-Web URL, authentication, timeouts, and compatibility requirements.

      Returns Effect<SoulFireClient, SoulFireConnectionError, Scope>

      A lazy Effect that produces the connected client after the handshake.

      The handshake checks the SDK API version, required capabilities, and plugin versions. Requires Scope; cleanup closes any resources this client owns. A remote SoulFire server continues running after the scope closes. Failures use SoulFireConnectionError in the Effect error channel.

      unauthenticated when login must precede the handshake.