The lifecycle
Initialize
Parsing and validating configuration happens here. Invalid configuration fails fast — nothing is sent over the network.Stopped. Nothing is scheduled until
start.
Start
Starts the worker machinery (event flush scheduler, realtime poller, wallet stream). InThreaded runtime mode a background thread is spawned; in
Manual mode you drive progress by calling tick.
Authenticate
Exchanges credentials (or a persisted token) for a backend session. See Authentication.Refresh
The SDK rotates tokens automatically when the access token nears expiry, usingPOST /api/v1/auth/validate with the refresh token. You can also
trigger a manual refresh:
Logout
Revokes the server-side session and clears local credentials.Shutdown
Releases the runtime.shutdown_timeout_ms (default 5000 ms) bounds the
graceful drain before resources are freed.
shutdown is idempotent and safe to call from any thread.
Runtime options
Single-threaded engines (Unity, Godot main thread, web) generally prefer
Manual, letting the SDK process bounded work per frame.
The blocking variants of SDK calls run on their own current-thread runtime.
Do not call blocking variants from inside another Tokio runtime context.

