Events are a way to listen for SDK events and run your own code at certain points.

You do not need to import anything extra to make use of events, instead simply add them using the events field inside the settings prop on DynamicContextProvider.

    events: {
      // events callbacks go here

onAuthFlowCancel: Called when the auth modal is closed before authentication is successful (alongside onAuthFlowClose).

onAuthFlowClose: Called whenever the auth flow modal is closed.

onAuthFlowOpen: Called after the auth flow modal is opened.

onAuthFailure: Called when authentication fails.

onAuthInit: Called when an authentication process begins.

onAuthSuccess: Called after the user successfully authenticates.

onEmbeddedWalletCreated: Called after embedded wallet created for user.

onLogout: Called after the user logs out.

onOtpVerificationResult: Called when an email or SMS OTP verification succeeds or fails.

onSignedMessage: Called when the user signs a message and it allows you to act on that message.

onUserProfileUpdate: Called when the user successfully updated their profile.

onWalletAdded: Called when a new wallet is added to the user wallets.

onWalletRemoved: Called when a wallet is removed from the user wallets.