Canton Network docsSDKs › dApp SDK › API Reference
Events
Updated 23-11-2026
The dApp SDK emits events so your UI can stay in sync with the wallet’s state. Subscribe
with the
Fires when the connection status or session state changes.
Fires when accounts are added or removed, or the primary account changes.
Fires as a transaction submitted via
on* functions and unsubscribe with the matching off* function. For usage
examples, see Handle Events.
onStatusChanged(handler) / offStatusChanged(handler)
Fires when the connection status or session state changes.
| Payload field | Type | Description |
|---|---|---|
connection.isConnected | boolean | Whether a session is currently active. |
onAccountsChanged(handler) / offAccountsChanged(handler)
Fires when accounts are added or removed, or the primary account changes.
| Payload | Type | Description |
|---|---|---|
accounts | Account[] | The current set of parties. |
onTxChanged(handler) / offTxChanged(handler)
Fires as a transaction submitted via prepareExecute moves through its lifecycle.
| Payload field | Type | Description |
|---|---|---|
status | 'pending' | 'signed' | 'executed' | 'failed' | Current transaction state. |
payload.updateId | string | Ledger update ID (present when executed). |
error | { code: number; message: string; data?: unknown } | CIP-0103 error (present when failed). |
Related
- Handle Events — Examples for subscribing to and cleaning up these events.
- SDK Methods — The functions that trigger these events.