Skip to main content
Subscribe to wallet and transaction lifecycle events with c8.on(event, handler).

Event reference

event
Fires when the user approves the connection in the popup. Payload: { meta?: Json }.
event
Fires when disconnect() is called or the popup is closed. Payload: { reason?: string, meta?: Json }.
event
Fires when balances or holdings change. Payload: { accounts: AccountInfoPayload[], meta?: Json }.
event
Fires when a transaction request is initiated. Payload: { txId?: string, meta?: Json }.
event
Fires when a transaction’s completion status updates. Payload: { txId: string, status: "pending" | "confirmed" | "failed" | string, meta?: Json }.
event
Fires when the wallet interface changes its UI display theme. Payload: { theme: "dark" | "light", meta?: Json }.
event
Fires when an action or modal interface is explicitly rejected by the user. Payload: { reason: string, meta?: Json }.
Always register listeners before calling connect() to ensure you don’t miss the initial connected event.

Unsubscribing from events

The on() method returns an unsubscribe function. Call it to remove the listener.