Skip to main content

Events

Provider (window.zunia)​

EventAudienceData
accountsChangedOrigins that are connectedRead getKey again
chainChangedOrigins that are connected{ chainIds } still granted
disconnectOrigins that lost accessnull (all) or { chainIds }
lockedConnected originsnone
keplr_keystorechangeSame as accountsChangednone (Keplr alias)

Window events zunia_* and keplr_* are also dispatched for older listeners.

The worker only delivers these to tabs whose origin is granted. An origin that never connected hears nothing.

Safari​

Safari accepts tabs.sendMessage from the worker and never hands the message to the content script. The Safari build therefore:

  1. Lets the content script open a port named zunia:provider-events once the page has used the provider.
  2. Numbers every event and keeps the last 100 in storage.session.
  3. On reconnect (worker restarted, or the tab came back to the front), sends everything newer than the page's last number.

A visible Safari tab that uses the wallet also pings the worker every 3 seconds so iOS does not stop it after ~8 seconds idle.

SDK session​

EventPayload
statusZuniaSessionStatus
accountsChangedZuniaAccountInfo[]
chainChangedstring[]
pairing{ transport, uri, expiresAt }
verification6-digit string (QR only)
disconnectreason string
errorZuniaConnectError