# `Latch.Client`

Authenticated XRPC for a logged in did, with transparent token refresh.

Loads the session from config, ensuring the access token is current,
and delegates to `Latch.XRPC`. Refresh-token rotation is single-use and
serialized through `Store.update_session/2`.

# `procedure`

```elixir
@spec procedure(Latch.Config.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, map()} | {:error, Latch.Error.t()}
```

Performs an authenticated XRPC procedure for `did`, with automatic refresh.

# `query`

```elixir
@spec query(Latch.Config.t(), String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, Latch.Error.t()}
```

Performs an authenticated XRPC query for `did`, with automatic refresh.

# `upload_blob`

```elixir
@spec upload_blob(Latch.Config.t(), String.t(), binary(), String.t(), keyword()) ::
  {:ok, map()} | {:error, Latch.Error.t()}
```

Uploads a blob for `did`, with automatic refresh.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
