Skip to main content

AccountTreeController Events

8 events registered.

NameDeprecated
accountGroupCreated
accountGroupRemoved
accountGroupUpdated
accountTreeChange
initialized
selectedAccountGroupChange
stateChange
uninitialized

AccountTreeController:accountGroupCreated​

Package: @metamask/account-tree-controller

Represents the AccountTreeController:accountGroupCreated event. This event is emitted when a new account group is added to the tree after the controller has been initialized.

Payload signature:

[AccountGroupObject]

AccountTreeController:accountGroupRemoved​

Package: @metamask/account-tree-controller

Represents the AccountTreeController:accountGroupRemoved event. This event is emitted when an account group is pruned from the tree (its last account was removed) after the controller has been initialized.

Payload signature:

[AccountGroupId]

AccountTreeController:accountGroupUpdated​

Package: @metamask/account-tree-controller

Represents the AccountTreeController:accountGroupUpdated event. This event is emitted when an existing account group's metadata or membership changes after the controller has been initialized.

Payload signature:

[AccountGroupObject]

AccountTreeController:accountTreeChange​

Package: @metamask/account-tree-controller

Represents the AccountTreeController:accountTreeChange event. This event is emitted when nodes (wallets, groups, or accounts) are added or removed.

Payload signature:

[AccountTreeControllerState['accountTree']]

AccountTreeController:initialized​

Package: @metamask/account-tree-controller

Represents the AccountTreeController:initialized event. This event is emitted when the account tree has been fully built and is ready to consume. It carries the full controller state at the moment of initialization so that consumers do not need an extra getState() call.

Payload signature:

[AccountTreeControllerState]

AccountTreeController:selectedAccountGroupChange​

Package: @metamask/account-tree-controller

Represents the AccountTreeController:selectedAccountGroupChange event. This event is emitted when the selected account group changes.

Payload signature:

[AccountGroupId | '', AccountGroupId | '']

AccountTreeController:stateChange​

Package: @metamask/account-tree-controller

Payload signature:

[AccountTreeControllerState, Patch[]]

AccountTreeController:uninitialized​

Package: @metamask/account-tree-controller

Represents the AccountTreeController:uninitialized event. This event is emitted when the account tree has been torn down via clearState(), symmetric to initialized.

Payload signature:

[]