/** * This file is auto generated. * Do not edit manually. */ import type { AccountTreeController } from "./AccountTreeController.cjs"; /** * Initialize the controller's state. * * It constructs the initial state of the account tree (tree nodes, nodes * names, metadata, etc..) and will automatically update the controller's * state with it. */ export type AccountTreeControllerInitAction = { type: `AccountTreeController:init`; handler: AccountTreeController['init']; }; /** * Re-initialize the controller's state. * * This is done in one single (atomic) `update` block to avoid having a temporary * cleared state. Use this when you need to force a full re-init even if already initialized. */ export type AccountTreeControllerReinitAction = { type: `AccountTreeController:reinit`; handler: AccountTreeController['reinit']; }; /** * Gets the account wallet object from its ID. * * @param walletId - Account wallet ID. * @returns The account wallet object if found, undefined otherwise. */ export type AccountTreeControllerGetAccountWalletObjectAction = { type: `AccountTreeController:getAccountWalletObject`; handler: AccountTreeController['getAccountWalletObject']; }; /** * Gets all account wallet objects. * * @returns All account wallet objects. */ export type AccountTreeControllerGetAccountWalletObjectsAction = { type: `AccountTreeController:getAccountWalletObjects`; handler: AccountTreeController['getAccountWalletObjects']; }; /** * Gets all underlying accounts from the currently selected account * group. * * It also support account selector, which allows to filter specific * accounts given some criterias (account type, address, scopes, etc...). * * @param selector - Optional account selector. * @returns Underlying accounts for the currently selected account (filtered * by the selector if provided). */ export type AccountTreeControllerGetAccountsFromSelectedAccountGroupAction = { type: `AccountTreeController:getAccountsFromSelectedAccountGroup`; handler: AccountTreeController['getAccountsFromSelectedAccountGroup']; }; /** * Gets the account group object from its ID. * * @param groupId - Account group ID. * @returns The account group object if found, undefined otherwise. */ export type AccountTreeControllerGetAccountGroupObjectAction = { type: `AccountTreeController:getAccountGroupObject`; handler: AccountTreeController['getAccountGroupObject']; }; /** * Gets the account's context which contains its wallet ID, group ID, and sort order. * * @param accountId - Account ID. * @returns The account context if found, undefined otherwise. */ export type AccountTreeControllerGetAccountContextAction = { type: `AccountTreeController:getAccountContext`; handler: AccountTreeController['getAccountContext']; }; /** * Gets the currently selected account group ID. * * @returns The selected account group ID or empty string if none selected. */ export type AccountTreeControllerGetSelectedAccountGroupAction = { type: `AccountTreeController:getSelectedAccountGroup`; handler: AccountTreeController['getSelectedAccountGroup']; }; /** * Sets the selected account group and updates the AccountsController selectedAccount accordingly. * * @param groupId - The account group ID to select. */ export type AccountTreeControllerSetSelectedAccountGroupAction = { type: `AccountTreeController:setSelectedAccountGroup`; handler: AccountTreeController['setSelectedAccountGroup']; }; /** * Sets a custom name for an account group. * * @param groupId - The account group ID. * @param name - The custom name to set. * @param autoHandleConflict - If true, automatically resolves name conflicts by adding a suffix. If false, throws on conflicts. * @throws If the account group ID is not found in the current tree. * @throws If the account group name already exists and autoHandleConflict is false. */ export type AccountTreeControllerSetAccountGroupNameAction = { type: `AccountTreeController:setAccountGroupName`; handler: AccountTreeController['setAccountGroupName']; }; /** * Sets a custom name for an account wallet. * * @param walletId - The account wallet ID. * @param name - The custom name to set. * @throws If the account wallet ID is not found in the current tree. */ export type AccountTreeControllerSetAccountWalletNameAction = { type: `AccountTreeController:setAccountWalletName`; handler: AccountTreeController['setAccountWalletName']; }; /** * Toggles the pinned state of an account group. * * @param groupId - The account group ID. * @param pinned - Whether the group should be pinned. * @throws If the account group ID is not found in the current tree. */ export type AccountTreeControllerSetAccountGroupPinnedAction = { type: `AccountTreeController:setAccountGroupPinned`; handler: AccountTreeController['setAccountGroupPinned']; }; /** * Toggles the hidden state of an account group. * * @param groupId - The account group ID. * @param hidden - Whether the group should be hidden. * @throws If the account group ID is not found in the current tree. */ export type AccountTreeControllerSetAccountGroupHiddenAction = { type: `AccountTreeController:setAccountGroupHidden`; handler: AccountTreeController['setAccountGroupHidden']; }; /** * Clears the controller state and resets to default values. * Also clears the backup and sync service state. */ export type AccountTreeControllerClearStateAction = { type: `AccountTreeController:clearState`; handler: AccountTreeController['clearState']; }; /** * Bi-directionally syncs the account tree with user storage. * This will perform a full sync, including both pulling updates * from user storage and pushing local changes to user storage. * This also performs legacy account syncing if needed. * * IMPORTANT: * If a full sync is already in progress, it will return the ongoing promise. * * @returns A promise that resolves when the sync is complete. */ export type AccountTreeControllerSyncWithUserStorageAction = { type: `AccountTreeController:syncWithUserStorage`; handler: AccountTreeController['syncWithUserStorage']; }; /** * Bi-directionally syncs the account tree with user storage. * This will ensure at least one full sync is ran, including both pulling updates * from user storage and pushing local changes to user storage. * This also performs legacy account syncing if needed. * * IMPORTANT: * If the first ever full sync is already in progress, it will return the ongoing promise. * If the first ever full sync was previously completed, it will NOT start a new sync, and will resolve immediately. * * @returns A promise that resolves when the first ever full sync is complete. */ export type AccountTreeControllerSyncWithUserStorageAtLeastOnceAction = { type: `AccountTreeController:syncWithUserStorageAtLeastOnce`; handler: AccountTreeController['syncWithUserStorageAtLeastOnce']; }; /** * Union of all AccountTreeController action types. */ export type AccountTreeControllerMethodActions = AccountTreeControllerInitAction | AccountTreeControllerReinitAction | AccountTreeControllerGetAccountWalletObjectAction | AccountTreeControllerGetAccountWalletObjectsAction | AccountTreeControllerGetAccountsFromSelectedAccountGroupAction | AccountTreeControllerGetAccountGroupObjectAction | AccountTreeControllerGetAccountContextAction | AccountTreeControllerGetSelectedAccountGroupAction | AccountTreeControllerSetSelectedAccountGroupAction | AccountTreeControllerSetAccountGroupNameAction | AccountTreeControllerSetAccountWalletNameAction | AccountTreeControllerSetAccountGroupPinnedAction | AccountTreeControllerSetAccountGroupHiddenAction | AccountTreeControllerClearStateAction | AccountTreeControllerSyncWithUserStorageAction | AccountTreeControllerSyncWithUserStorageAtLeastOnceAction; //# sourceMappingURL=AccountTreeController-method-action-types.d.cts.map