Events
ArConnect DOM events
ArConnect provides useful custom events to track the state of the extension. These events implement the CustomEvent
browser API.
arweaveWalletLoaded
event
arweaveWalletLoaded
eventThis event is dispatched once the ArConnect Injected API has been initialized in the window
object. Before this event is fired, you cannot interact with ArConnect and the window.arweaveWallet
object will be undefined.
Example
walletSwitch
event
walletSwitch
eventThis event is fired when the user manually switches their active wallet. The even also includes the new active wallet's address, if the user allowed the ACCESS_ADDRESS
and the ACCESS_ALL_ADDRESSES
permissions.
Example
Event emitter
The event emitter is available under window.arweaveWallet.events
as a more advanced event system for the extension.
Note: This documentation is incomplete and the feature is experimental.
Last updated