Skip to main content

Events

AppKit Events

//Invoked after successful initialization of AppKit
AppKit.Initialized += (sender, eventArgs) => { };

// Invoked after successful connection of an account
AppKit.AccountConnected += (sender, eventArgs) => {
Account activeAccount = eventArgs.GetAccount();
};

// Invoked after successful disconnection of an account
AppKit.AccountDisconnected += (sender, eventArgs) => { };

// Invoked after account has changed
// This happens when the wallet updates a session or the user changes the active chain.
AppKit.AccountChanged += (sender, eventArgs) => {
Account newAccount = eventArgs.Account;
};

// Invoked after active chain has changed
AppKit.ChainChanged += (sender, eventArgs) => {
Chain newChain = eventArgs.Chain;
};