---
url: >-
  https://game-engine-io.github.io/enginex-frontend-sdk/reference/api/@getenginex/sdk/realtime/variables/coreTopics.md
---
[Reference](../../../../index.md) / [@getenginex/sdk/realtime](../index.md) / coreTopics

# coreTopics

> `const` **coreTopics**: `object`

Core realtime topics, for `realtime.subscribe`. Both are private: they use the session's
user and require login.

## Type Declaration

### balance()

> **balance**(): [`Topic`](../../extension/interfaces/Topic.md)<[`BalanceUpdate`](../interfaces/BalanceUpdate.md)>

Updates to the user's balance (`balance:<sub>`, `balance_update` messages). The sequenced
mode snapshot is not delivered: load the balance with `wallet.getBalance()` when subscribing and in
`onResync`.

#### Returns

[`Topic`](../../extension/interfaces/Topic.md)<[`BalanceUpdate`](../interfaces/BalanceUpdate.md)>

#### Example

```ts
realtime.subscribe(coreTopics.balance(), ({ available, changeType }) => console.log(available, changeType))
```

### notification()

> **notification**(): [`Topic`](../../extension/interfaces/Topic.md)<[`RealtimeNotification`](../interfaces/RealtimeNotification.md)>

User notifications (`notification:<sub>`).

#### Returns

[`Topic`](../../extension/interfaces/Topic.md)<[`RealtimeNotification`](../interfaces/RealtimeNotification.md)>

#### Example

```ts
realtime.subscribe(coreTopics.notification(), (n) => toast(n.title, n.message))
```

## Example

```ts
import { createRealtime, coreTopics } from '@getenginex/sdk/realtime'

const realtime = createRealtime(enginex)
const off = realtime.subscribe(coreTopics.balance(), (update) => render(update.available))
```
