PressKey events
A connected browser identity is not static. Users can change accounts, lock PressKey or encounter a network change while an application remains open. PressKey exposes provider events so the application can respond without relying on stale state.Accounts changed
Chain changed
Lock changed
Current provider behavior includes alockChanged event. This is useful for flows that prepare an action over several minutes.
Remove listeners
Single-page applications can accidentally subscribe several times during navigation or hot reload.Invalidate derived authorization state
An account change should invalidate data such as:- protocol role
- active bond
- outlet permissions
- contributor relationship
- existing evidence vote
- bounty assignment
- pending unsigned transaction intent