@metamask-previews/account-tree-controller 7.5.5-preview-30b493585 → 7.5.5-preview-8abc30aca

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/dist/AccountTreeController-method-action-types.cjs.map +1 -1
  2. package/dist/AccountTreeController-method-action-types.d.cts.map +1 -1
  3. package/dist/AccountTreeController-method-action-types.d.mts.map +1 -1
  4. package/dist/AccountTreeController-method-action-types.mjs.map +1 -1
  5. package/dist/AccountTreeController.cjs +37 -37
  6. package/dist/AccountTreeController.cjs.map +1 -1
  7. package/dist/AccountTreeController.d.cts.map +1 -1
  8. package/dist/AccountTreeController.d.mts.map +1 -1
  9. package/dist/AccountTreeController.mjs.map +1 -1
  10. package/dist/backup-and-sync/analytics/index.cjs.map +1 -1
  11. package/dist/backup-and-sync/analytics/index.d.cts.map +1 -1
  12. package/dist/backup-and-sync/analytics/index.d.mts.map +1 -1
  13. package/dist/backup-and-sync/analytics/index.mjs.map +1 -1
  14. package/dist/backup-and-sync/analytics/segment.cjs.map +1 -1
  15. package/dist/backup-and-sync/analytics/segment.d.cts.map +1 -1
  16. package/dist/backup-and-sync/analytics/segment.d.mts.map +1 -1
  17. package/dist/backup-and-sync/analytics/segment.mjs.map +1 -1
  18. package/dist/backup-and-sync/authentication/index.cjs.map +1 -1
  19. package/dist/backup-and-sync/authentication/index.d.cts.map +1 -1
  20. package/dist/backup-and-sync/authentication/index.d.mts.map +1 -1
  21. package/dist/backup-and-sync/authentication/index.mjs.map +1 -1
  22. package/dist/backup-and-sync/authentication/utils.cjs +2 -2
  23. package/dist/backup-and-sync/authentication/utils.cjs.map +1 -1
  24. package/dist/backup-and-sync/authentication/utils.d.cts.map +1 -1
  25. package/dist/backup-and-sync/authentication/utils.d.mts.map +1 -1
  26. package/dist/backup-and-sync/authentication/utils.mjs.map +1 -1
  27. package/dist/backup-and-sync/service/atomic-sync-queue.cjs +2 -2
  28. package/dist/backup-and-sync/service/atomic-sync-queue.cjs.map +1 -1
  29. package/dist/backup-and-sync/service/atomic-sync-queue.mjs.map +1 -1
  30. package/dist/backup-and-sync/service/index.cjs +36 -36
  31. package/dist/backup-and-sync/service/index.cjs.map +1 -1
  32. package/dist/backup-and-sync/service/index.d.cts.map +1 -1
  33. package/dist/backup-and-sync/service/index.d.mts.map +1 -1
  34. package/dist/backup-and-sync/service/index.mjs.map +1 -1
  35. package/dist/backup-and-sync/syncing/group.cjs +26 -26
  36. package/dist/backup-and-sync/syncing/group.cjs.map +1 -1
  37. package/dist/backup-and-sync/syncing/group.d.cts.map +1 -1
  38. package/dist/backup-and-sync/syncing/group.d.mts.map +1 -1
  39. package/dist/backup-and-sync/syncing/group.mjs +1 -1
  40. package/dist/backup-and-sync/syncing/group.mjs.map +1 -1
  41. package/dist/backup-and-sync/syncing/index.cjs.map +1 -1
  42. package/dist/backup-and-sync/syncing/index.d.cts.map +1 -1
  43. package/dist/backup-and-sync/syncing/index.d.mts.map +1 -1
  44. package/dist/backup-and-sync/syncing/index.mjs.map +1 -1
  45. package/dist/backup-and-sync/syncing/legacy.cjs +14 -14
  46. package/dist/backup-and-sync/syncing/legacy.cjs.map +1 -1
  47. package/dist/backup-and-sync/syncing/legacy.d.cts.map +1 -1
  48. package/dist/backup-and-sync/syncing/legacy.d.mts.map +1 -1
  49. package/dist/backup-and-sync/syncing/legacy.mjs.map +1 -1
  50. package/dist/backup-and-sync/syncing/metadata.cjs.map +1 -1
  51. package/dist/backup-and-sync/syncing/metadata.d.cts.map +1 -1
  52. package/dist/backup-and-sync/syncing/metadata.d.mts.map +1 -1
  53. package/dist/backup-and-sync/syncing/metadata.mjs.map +1 -1
  54. package/dist/backup-and-sync/syncing/wallet.cjs +10 -10
  55. package/dist/backup-and-sync/syncing/wallet.cjs.map +1 -1
  56. package/dist/backup-and-sync/syncing/wallet.d.cts.map +1 -1
  57. package/dist/backup-and-sync/syncing/wallet.d.mts.map +1 -1
  58. package/dist/backup-and-sync/syncing/wallet.mjs.map +1 -1
  59. package/dist/backup-and-sync/types.cjs.map +1 -1
  60. package/dist/backup-and-sync/types.d.cts.map +1 -1
  61. package/dist/backup-and-sync/types.d.mts.map +1 -1
  62. package/dist/backup-and-sync/types.mjs.map +1 -1
  63. package/dist/backup-and-sync/user-storage/format-utils.cjs +12 -12
  64. package/dist/backup-and-sync/user-storage/format-utils.cjs.map +1 -1
  65. package/dist/backup-and-sync/user-storage/format-utils.d.cts.map +1 -1
  66. package/dist/backup-and-sync/user-storage/format-utils.d.mts.map +1 -1
  67. package/dist/backup-and-sync/user-storage/format-utils.mjs.map +1 -1
  68. package/dist/backup-and-sync/user-storage/index.cjs.map +1 -1
  69. package/dist/backup-and-sync/user-storage/index.d.cts.map +1 -1
  70. package/dist/backup-and-sync/user-storage/index.d.mts.map +1 -1
  71. package/dist/backup-and-sync/user-storage/index.mjs.map +1 -1
  72. package/dist/backup-and-sync/user-storage/network-operations.cjs +35 -35
  73. package/dist/backup-and-sync/user-storage/network-operations.cjs.map +1 -1
  74. package/dist/backup-and-sync/user-storage/network-operations.d.cts.map +1 -1
  75. package/dist/backup-and-sync/user-storage/network-operations.d.mts.map +1 -1
  76. package/dist/backup-and-sync/user-storage/network-operations.mjs.map +1 -1
  77. package/dist/backup-and-sync/user-storage/validation.cjs +4 -4
  78. package/dist/backup-and-sync/user-storage/validation.cjs.map +1 -1
  79. package/dist/backup-and-sync/user-storage/validation.d.cts.map +1 -1
  80. package/dist/backup-and-sync/user-storage/validation.d.mts.map +1 -1
  81. package/dist/backup-and-sync/user-storage/validation.mjs.map +1 -1
  82. package/dist/backup-and-sync/utils/controller.cjs +3 -3
  83. package/dist/backup-and-sync/utils/controller.cjs.map +1 -1
  84. package/dist/backup-and-sync/utils/controller.d.cts.map +1 -1
  85. package/dist/backup-and-sync/utils/controller.d.mts.map +1 -1
  86. package/dist/backup-and-sync/utils/controller.mjs.map +1 -1
  87. package/dist/backup-and-sync/utils/index.cjs +4 -4
  88. package/dist/backup-and-sync/utils/index.cjs.map +1 -1
  89. package/dist/backup-and-sync/utils/index.d.cts.map +1 -1
  90. package/dist/backup-and-sync/utils/index.d.mts.map +1 -1
  91. package/dist/backup-and-sync/utils/index.mjs.map +1 -1
  92. package/dist/backup-and-sync/utils/mutation-tracker.cjs.map +1 -1
  93. package/dist/backup-and-sync/utils/mutation-tracker.d.cts.map +1 -1
  94. package/dist/backup-and-sync/utils/mutation-tracker.d.mts.map +1 -1
  95. package/dist/backup-and-sync/utils/mutation-tracker.mjs.map +1 -1
  96. package/dist/group.cjs.map +1 -1
  97. package/dist/group.d.cts.map +1 -1
  98. package/dist/group.d.mts.map +1 -1
  99. package/dist/group.mjs.map +1 -1
  100. package/dist/index.cjs +8 -8
  101. package/dist/index.cjs.map +1 -1
  102. package/dist/index.d.cts.map +1 -1
  103. package/dist/index.d.mts.map +1 -1
  104. package/dist/index.mjs.map +1 -1
  105. package/dist/rule.cjs.map +1 -1
  106. package/dist/rule.d.cts.map +1 -1
  107. package/dist/rule.d.mts.map +1 -1
  108. package/dist/rule.mjs.map +1 -1
  109. package/dist/rules/entropy.cjs +2 -2
  110. package/dist/rules/entropy.cjs.map +1 -1
  111. package/dist/rules/entropy.d.cts.map +1 -1
  112. package/dist/rules/entropy.d.mts.map +1 -1
  113. package/dist/rules/entropy.mjs.map +1 -1
  114. package/dist/rules/keyring.cjs +2 -2
  115. package/dist/rules/keyring.cjs.map +1 -1
  116. package/dist/rules/keyring.d.cts.map +1 -1
  117. package/dist/rules/keyring.d.mts.map +1 -1
  118. package/dist/rules/keyring.mjs.map +1 -1
  119. package/dist/rules/snap.cjs +4 -4
  120. package/dist/rules/snap.cjs.map +1 -1
  121. package/dist/rules/snap.d.cts.map +1 -1
  122. package/dist/rules/snap.d.mts.map +1 -1
  123. package/dist/rules/snap.mjs.map +1 -1
  124. package/dist/types.cjs.map +1 -1
  125. package/dist/types.d.cts +1 -1
  126. package/dist/types.d.cts.map +1 -1
  127. package/dist/types.d.mts +1 -1
  128. package/dist/types.d.mts.map +1 -1
  129. package/dist/types.mjs.map +1 -1
  130. package/dist/wallet.cjs.map +1 -1
  131. package/dist/wallet.d.cts.map +1 -1
  132. package/dist/wallet.d.mts.map +1 -1
  133. package/dist/wallet.mjs.map +1 -1
  134. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"AccountTreeController-method-action-types.cjs","sourceRoot":"","sources":["../src/AccountTreeController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { AccountTreeController } from './AccountTreeController';\n\n/**\n * Initialize the controller's state.\n *\n * It constructs the initial state of the account tree (tree nodes, nodes\n * names, metadata, etc..) and will automatically update the controller's\n * state with it.\n */\nexport type AccountTreeControllerInitAction = {\n type: `AccountTreeController:init`;\n handler: AccountTreeController['init'];\n};\n\n/**\n * Re-initialize the controller's state.\n *\n * This is done in one single (atomic) `update` block to avoid having a temporary\n * cleared state. Use this when you need to force a full re-init even if already initialized.\n */\nexport type AccountTreeControllerReinitAction = {\n type: `AccountTreeController:reinit`;\n handler: AccountTreeController['reinit'];\n};\n\n/**\n * Gets the account wallet object from its ID.\n *\n * @param walletId - Account wallet ID.\n * @returns The account wallet object if found, undefined otherwise.\n */\nexport type AccountTreeControllerGetAccountWalletObjectAction = {\n type: `AccountTreeController:getAccountWalletObject`;\n handler: AccountTreeController['getAccountWalletObject'];\n};\n\n/**\n * Gets all account wallet objects.\n *\n * @returns All account wallet objects.\n */\nexport type AccountTreeControllerGetAccountWalletObjectsAction = {\n type: `AccountTreeController:getAccountWalletObjects`;\n handler: AccountTreeController['getAccountWalletObjects'];\n};\n\n/**\n * Gets all underlying accounts from the currently selected account\n * group.\n *\n * It also support account selector, which allows to filter specific\n * accounts given some criterias (account type, address, scopes, etc...).\n *\n * @param selector - Optional account selector.\n * @returns Underlying accounts for the currently selected account (filtered\n * by the selector if provided).\n */\nexport type AccountTreeControllerGetAccountsFromSelectedAccountGroupAction = {\n type: `AccountTreeController:getAccountsFromSelectedAccountGroup`;\n handler: AccountTreeController['getAccountsFromSelectedAccountGroup'];\n};\n\n/**\n * Gets the account group object from its ID.\n *\n * @param groupId - Account group ID.\n * @returns The account group object if found, undefined otherwise.\n */\nexport type AccountTreeControllerGetAccountGroupObjectAction = {\n type: `AccountTreeController:getAccountGroupObject`;\n handler: AccountTreeController['getAccountGroupObject'];\n};\n\n/**\n * Gets the account's context which contains its wallet ID, group ID, and sort order.\n *\n * @param accountId - Account ID.\n * @returns The account context if found, undefined otherwise.\n */\nexport type AccountTreeControllerGetAccountContextAction = {\n type: `AccountTreeController:getAccountContext`;\n handler: AccountTreeController['getAccountContext'];\n};\n\n/**\n * Gets the currently selected account group ID.\n *\n * @returns The selected account group ID or empty string if none selected.\n */\nexport type AccountTreeControllerGetSelectedAccountGroupAction = {\n type: `AccountTreeController:getSelectedAccountGroup`;\n handler: AccountTreeController['getSelectedAccountGroup'];\n};\n\n/**\n * Sets the selected account group and updates the AccountsController selectedAccount accordingly.\n *\n * @param groupId - The account group ID to select.\n */\nexport type AccountTreeControllerSetSelectedAccountGroupAction = {\n type: `AccountTreeController:setSelectedAccountGroup`;\n handler: AccountTreeController['setSelectedAccountGroup'];\n};\n\n/**\n * Sets a custom name for an account group.\n *\n * @param groupId - The account group ID.\n * @param name - The custom name to set.\n * @param autoHandleConflict - If true, automatically resolves name conflicts by adding a suffix. If false, throws on conflicts.\n * @throws If the account group ID is not found in the current tree.\n * @throws If the account group name already exists and autoHandleConflict is false.\n */\nexport type AccountTreeControllerSetAccountGroupNameAction = {\n type: `AccountTreeController:setAccountGroupName`;\n handler: AccountTreeController['setAccountGroupName'];\n};\n\n/**\n * Sets a custom name for an account wallet.\n *\n * @param walletId - The account wallet ID.\n * @param name - The custom name to set.\n * @throws If the account wallet ID is not found in the current tree.\n */\nexport type AccountTreeControllerSetAccountWalletNameAction = {\n type: `AccountTreeController:setAccountWalletName`;\n handler: AccountTreeController['setAccountWalletName'];\n};\n\n/**\n * Toggles the pinned state of an account group.\n *\n * @param groupId - The account group ID.\n * @param pinned - Whether the group should be pinned.\n * @throws If the account group ID is not found in the current tree.\n */\nexport type AccountTreeControllerSetAccountGroupPinnedAction = {\n type: `AccountTreeController:setAccountGroupPinned`;\n handler: AccountTreeController['setAccountGroupPinned'];\n};\n\n/**\n * Toggles the hidden state of an account group.\n *\n * @param groupId - The account group ID.\n * @param hidden - Whether the group should be hidden.\n * @throws If the account group ID is not found in the current tree.\n */\nexport type AccountTreeControllerSetAccountGroupHiddenAction = {\n type: `AccountTreeController:setAccountGroupHidden`;\n handler: AccountTreeController['setAccountGroupHidden'];\n};\n\n/**\n * Clears the controller state and resets to default values.\n * Also clears the backup and sync service state.\n */\nexport type AccountTreeControllerClearStateAction = {\n type: `AccountTreeController:clearState`;\n handler: AccountTreeController['clearState'];\n};\n\n/**\n * Bi-directionally syncs the account tree with user storage.\n * This will perform a full sync, including both pulling updates\n * from user storage and pushing local changes to user storage.\n * This also performs legacy account syncing if needed.\n *\n * IMPORTANT:\n * If a full sync is already in progress, it will return the ongoing promise.\n *\n * @returns A promise that resolves when the sync is complete.\n */\nexport type AccountTreeControllerSyncWithUserStorageAction = {\n type: `AccountTreeController:syncWithUserStorage`;\n handler: AccountTreeController['syncWithUserStorage'];\n};\n\n/**\n * Bi-directionally syncs the account tree with user storage.\n * This will ensure at least one full sync is ran, including both pulling updates\n * from user storage and pushing local changes to user storage.\n * This also performs legacy account syncing if needed.\n *\n * IMPORTANT:\n * If the first ever full sync is already in progress, it will return the ongoing promise.\n * If the first ever full sync was previously completed, it will NOT start a new sync, and will resolve immediately.\n *\n * @returns A promise that resolves when the first ever full sync is complete.\n */\nexport type AccountTreeControllerSyncWithUserStorageAtLeastOnceAction = {\n type: `AccountTreeController:syncWithUserStorageAtLeastOnce`;\n handler: AccountTreeController['syncWithUserStorageAtLeastOnce'];\n};\n\n/**\n * Union of all AccountTreeController action types.\n */\nexport type AccountTreeControllerMethodActions =\n | AccountTreeControllerInitAction\n | AccountTreeControllerReinitAction\n | AccountTreeControllerGetAccountWalletObjectAction\n | AccountTreeControllerGetAccountWalletObjectsAction\n | AccountTreeControllerGetAccountsFromSelectedAccountGroupAction\n | AccountTreeControllerGetAccountGroupObjectAction\n | AccountTreeControllerGetAccountContextAction\n | AccountTreeControllerGetSelectedAccountGroupAction\n | AccountTreeControllerSetSelectedAccountGroupAction\n | AccountTreeControllerSetAccountGroupNameAction\n | AccountTreeControllerSetAccountWalletNameAction\n | AccountTreeControllerSetAccountGroupPinnedAction\n | AccountTreeControllerSetAccountGroupHiddenAction\n | AccountTreeControllerClearStateAction\n | AccountTreeControllerSyncWithUserStorageAction\n | AccountTreeControllerSyncWithUserStorageAtLeastOnceAction;\n"]}
1
+ {"version":3,"file":"AccountTreeController-method-action-types.cjs","sourceRoot":"","sources":["../src/AccountTreeController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { AccountTreeController } from './AccountTreeController.js';\n\n/**\n * Initialize the controller's state.\n *\n * It constructs the initial state of the account tree (tree nodes, nodes\n * names, metadata, etc..) and will automatically update the controller's\n * state with it.\n */\nexport type AccountTreeControllerInitAction = {\n type: `AccountTreeController:init`;\n handler: AccountTreeController['init'];\n};\n\n/**\n * Re-initialize the controller's state.\n *\n * This is done in one single (atomic) `update` block to avoid having a temporary\n * cleared state. Use this when you need to force a full re-init even if already initialized.\n */\nexport type AccountTreeControllerReinitAction = {\n type: `AccountTreeController:reinit`;\n handler: AccountTreeController['reinit'];\n};\n\n/**\n * Gets the account wallet object from its ID.\n *\n * @param walletId - Account wallet ID.\n * @returns The account wallet object if found, undefined otherwise.\n */\nexport type AccountTreeControllerGetAccountWalletObjectAction = {\n type: `AccountTreeController:getAccountWalletObject`;\n handler: AccountTreeController['getAccountWalletObject'];\n};\n\n/**\n * Gets all account wallet objects.\n *\n * @returns All account wallet objects.\n */\nexport type AccountTreeControllerGetAccountWalletObjectsAction = {\n type: `AccountTreeController:getAccountWalletObjects`;\n handler: AccountTreeController['getAccountWalletObjects'];\n};\n\n/**\n * Gets all underlying accounts from the currently selected account\n * group.\n *\n * It also support account selector, which allows to filter specific\n * accounts given some criterias (account type, address, scopes, etc...).\n *\n * @param selector - Optional account selector.\n * @returns Underlying accounts for the currently selected account (filtered\n * by the selector if provided).\n */\nexport type AccountTreeControllerGetAccountsFromSelectedAccountGroupAction = {\n type: `AccountTreeController:getAccountsFromSelectedAccountGroup`;\n handler: AccountTreeController['getAccountsFromSelectedAccountGroup'];\n};\n\n/**\n * Gets the account group object from its ID.\n *\n * @param groupId - Account group ID.\n * @returns The account group object if found, undefined otherwise.\n */\nexport type AccountTreeControllerGetAccountGroupObjectAction = {\n type: `AccountTreeController:getAccountGroupObject`;\n handler: AccountTreeController['getAccountGroupObject'];\n};\n\n/**\n * Gets the account's context which contains its wallet ID, group ID, and sort order.\n *\n * @param accountId - Account ID.\n * @returns The account context if found, undefined otherwise.\n */\nexport type AccountTreeControllerGetAccountContextAction = {\n type: `AccountTreeController:getAccountContext`;\n handler: AccountTreeController['getAccountContext'];\n};\n\n/**\n * Gets the currently selected account group ID.\n *\n * @returns The selected account group ID or empty string if none selected.\n */\nexport type AccountTreeControllerGetSelectedAccountGroupAction = {\n type: `AccountTreeController:getSelectedAccountGroup`;\n handler: AccountTreeController['getSelectedAccountGroup'];\n};\n\n/**\n * Sets the selected account group and updates the AccountsController selectedAccount accordingly.\n *\n * @param groupId - The account group ID to select.\n */\nexport type AccountTreeControllerSetSelectedAccountGroupAction = {\n type: `AccountTreeController:setSelectedAccountGroup`;\n handler: AccountTreeController['setSelectedAccountGroup'];\n};\n\n/**\n * Sets a custom name for an account group.\n *\n * @param groupId - The account group ID.\n * @param name - The custom name to set.\n * @param autoHandleConflict - If true, automatically resolves name conflicts by adding a suffix. If false, throws on conflicts.\n * @throws If the account group ID is not found in the current tree.\n * @throws If the account group name already exists and autoHandleConflict is false.\n */\nexport type AccountTreeControllerSetAccountGroupNameAction = {\n type: `AccountTreeController:setAccountGroupName`;\n handler: AccountTreeController['setAccountGroupName'];\n};\n\n/**\n * Sets a custom name for an account wallet.\n *\n * @param walletId - The account wallet ID.\n * @param name - The custom name to set.\n * @throws If the account wallet ID is not found in the current tree.\n */\nexport type AccountTreeControllerSetAccountWalletNameAction = {\n type: `AccountTreeController:setAccountWalletName`;\n handler: AccountTreeController['setAccountWalletName'];\n};\n\n/**\n * Toggles the pinned state of an account group.\n *\n * @param groupId - The account group ID.\n * @param pinned - Whether the group should be pinned.\n * @throws If the account group ID is not found in the current tree.\n */\nexport type AccountTreeControllerSetAccountGroupPinnedAction = {\n type: `AccountTreeController:setAccountGroupPinned`;\n handler: AccountTreeController['setAccountGroupPinned'];\n};\n\n/**\n * Toggles the hidden state of an account group.\n *\n * @param groupId - The account group ID.\n * @param hidden - Whether the group should be hidden.\n * @throws If the account group ID is not found in the current tree.\n */\nexport type AccountTreeControllerSetAccountGroupHiddenAction = {\n type: `AccountTreeController:setAccountGroupHidden`;\n handler: AccountTreeController['setAccountGroupHidden'];\n};\n\n/**\n * Clears the controller state and resets to default values.\n * Also clears the backup and sync service state.\n */\nexport type AccountTreeControllerClearStateAction = {\n type: `AccountTreeController:clearState`;\n handler: AccountTreeController['clearState'];\n};\n\n/**\n * Bi-directionally syncs the account tree with user storage.\n * This will perform a full sync, including both pulling updates\n * from user storage and pushing local changes to user storage.\n * This also performs legacy account syncing if needed.\n *\n * IMPORTANT:\n * If a full sync is already in progress, it will return the ongoing promise.\n *\n * @returns A promise that resolves when the sync is complete.\n */\nexport type AccountTreeControllerSyncWithUserStorageAction = {\n type: `AccountTreeController:syncWithUserStorage`;\n handler: AccountTreeController['syncWithUserStorage'];\n};\n\n/**\n * Bi-directionally syncs the account tree with user storage.\n * This will ensure at least one full sync is ran, including both pulling updates\n * from user storage and pushing local changes to user storage.\n * This also performs legacy account syncing if needed.\n *\n * IMPORTANT:\n * If the first ever full sync is already in progress, it will return the ongoing promise.\n * If the first ever full sync was previously completed, it will NOT start a new sync, and will resolve immediately.\n *\n * @returns A promise that resolves when the first ever full sync is complete.\n */\nexport type AccountTreeControllerSyncWithUserStorageAtLeastOnceAction = {\n type: `AccountTreeController:syncWithUserStorageAtLeastOnce`;\n handler: AccountTreeController['syncWithUserStorageAtLeastOnce'];\n};\n\n/**\n * Union of all AccountTreeController action types.\n */\nexport type AccountTreeControllerMethodActions =\n | AccountTreeControllerInitAction\n | AccountTreeControllerReinitAction\n | AccountTreeControllerGetAccountWalletObjectAction\n | AccountTreeControllerGetAccountWalletObjectsAction\n | AccountTreeControllerGetAccountsFromSelectedAccountGroupAction\n | AccountTreeControllerGetAccountGroupObjectAction\n | AccountTreeControllerGetAccountContextAction\n | AccountTreeControllerGetSelectedAccountGroupAction\n | AccountTreeControllerSetSelectedAccountGroupAction\n | AccountTreeControllerSetAccountGroupNameAction\n | AccountTreeControllerSetAccountWalletNameAction\n | AccountTreeControllerSetAccountGroupPinnedAction\n | AccountTreeControllerSetAccountGroupHiddenAction\n | AccountTreeControllerClearStateAction\n | AccountTreeControllerSyncWithUserStorageAction\n | AccountTreeControllerSyncWithUserStorageAtLeastOnceAction;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AccountTreeController-method-action-types.d.cts","sourceRoot":"","sources":["../src/AccountTreeController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,oCAAgC;AAErE;;;;;;GAMG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,EAAE,4BAA4B,CAAC;IACnC,OAAO,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAC;CACxC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC9C,IAAI,EAAE,8BAA8B,CAAC;IACrC,OAAO,EAAE,qBAAqB,CAAC,QAAQ,CAAC,CAAC;CAC1C,CAAC;AAEF;;;;;GAKG;AACH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4CAA4C,CAAC;IACnD,OAAO,EAAE,qBAAqB,CAAC,sBAAsB,CAAC,CAAC;CACxD,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,gDAAgD,GAAG;IAC7D,IAAI,EAAE,6CAA6C,CAAC;IACpD,OAAO,EAAE,qBAAqB,CAAC,uBAAuB,CAAC,CAAC;CACzD,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,gDAAgD,GAAG;IAC7D,IAAI,EAAE,6CAA6C,CAAC;IACpD,OAAO,EAAE,qBAAqB,CAAC,uBAAuB,CAAC,CAAC;CACzD,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,qCAAqC,GAAG;IAClD,IAAI,EAAE,kCAAkC,CAAC;IACzC,OAAO,EAAE,qBAAqB,CAAC,YAAY,CAAC,CAAC;CAC9C,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,8CAA8C,GAAG;IAC3D,IAAI,EAAE,2CAA2C,CAAC;IAClD,OAAO,EAAE,qBAAqB,CAAC,qBAAqB,CAAC,CAAC;CACvD,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,yDAAyD,GAAG;IACtE,IAAI,EAAE,sDAAsD,CAAC;IAC7D,OAAO,EAAE,qBAAqB,CAAC,gCAAgC,CAAC,CAAC;CAClE,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAC1C,+BAA+B,GAC/B,iCAAiC,GACjC,iDAAiD,GACjD,kDAAkD,GAClD,8DAA8D,GAC9D,gDAAgD,GAChD,4CAA4C,GAC5C,kDAAkD,GAClD,kDAAkD,GAClD,8CAA8C,GAC9C,+CAA+C,GAC/C,gDAAgD,GAChD,gDAAgD,GAChD,qCAAqC,GACrC,8CAA8C,GAC9C,yDAAyD,CAAC"}
1
+ {"version":3,"file":"AccountTreeController-method-action-types.d.cts","sourceRoot":"","sources":["../src/AccountTreeController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,K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iCAAiC,GACjC,iDAAiD,GACjD,kDAAkD,GAClD,8DAA8D,GAC9D,gDAAgD,GAChD,4CAA4C,GAC5C,kDAAkD,GAClD,kDAAkD,GAClD,8CAA8C,GAC9C,+CAA+C,GAC/C,gDAAgD,GAChD,gDAAgD,GAChD,qCAAqC,GACrC,8CAA8C,GAC9C,yDAAyD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AccountTreeController-method-action-types.d.mts","sourceRoot":"","sources":["../src/AccountTreeController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,oCAAgC;AAErE;;;;;;GAMG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,EAAE,4BAA4B,CAAC;IACnC,OAAO,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAC;CACxC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC9C,IAAI,EAAE,8BAA8B,CAAC;IACrC,OAAO,EAAE,qBAAqB,CAAC,QAAQ,CAAC,CAAC;CAC1C,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,iDAAiD,GAAG;IAC9D,IAAI,EAAE,8CAA8C,CAAC;IACrD,OAAO,EAAE,qBAAqB,CAAC,wBAAwB,CAAC,CAAC;CAC1D,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,kDAAkD,GAAG;IAC/D,IAAI,EAAE,+CAA+C,CAAC;IACtD,OAAO,EAAE,qBAAqB,CAAC,yBAAyB,CAAC,CAAC;CAC3D,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,8DAA8D,GAAG;IAC3E,IAAI,EAAE,2DAA2D,CAAC;IAClE,OAAO,EAAE,qBAAqB,CAAC,qCAAqC,CAAC,CAAC;CACvE,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,gDAAgD,GAAG;IAC7D,IAAI,EAAE,6CAA6C,CAAC;IACpD,OAAO,EAAE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;;;;;;;GAUG;AACH,MAAM,MAAM,8CAA8C,GAAG;IAC3D,IAAI,EAAE,2CAA2C,CAAC;IAClD,OAAO,EAAE,qBAAqB,CAAC,qBAAqB,CAAC,CAAC;CACvD,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,yDAAyD,GAAG;IACtE,IAAI,EAAE,sDAAsD,CAAC;IAC7D,OAAO,EAAE,qBAAqB,CAAC,gCAAgC,CAAC,CAAC;CAClE,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAC1C,+BAA+B,GAC/B,iCAAiC,GACjC,iDAAiD,GACjD,kDAAkD,GAClD,8DAA8D,GAC9D,gDAAgD,GAChD,4CAA4C,GAC5C,kDAAkD,GAClD,kDAAkD,GAClD,8CAA8C,GAC9C,+CAA+C,GAC/C,gDAAgD,GAChD,gDAAgD,GAChD,qCAAqC,GACrC,8CAA8C,GAC9C,yDAAyD,CAAC"}
1
+ {"version":3,"file":"AccountTreeController-method-action-types.d.mts","sourceRoot":"","sources":["../src/AccountTreeController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,oCAAmC;AAExE;;;;;;GAMG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,EAAE,4BAA4B,CAAC;IACnC,OAAO,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAC;CACxC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC9C,IAAI,EAAE,8BAA8B,CAAC;IACrC,OAAO,EAAE,qBAAqB,CAAC,QAAQ,CAAC,CAAC;CAC1C,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,iDAAiD,GAAG;IAC9D,IAAI,EAAE,8CAA8C,CAAC;IACrD,OAAO,EAAE,qBAAqB,CAAC,wBAAwB,CAAC,CAAC;CAC1D,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,kDAAkD,GAAG;IAC/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,qBAAqB,CAAC,uBAAuB,CAAC,CAAC;CACzD,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,gDAAgD,GAAG;IAC7D,IAAI,EAAE,6CAA6C,CAAC;IACpD,OAAO,EAAE,qBAAqB,CAAC,uBAAuB,CAAC,CAAC;CACzD,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,qCAAqC,GAAG;IAClD,IAAI,EAAE,kCAAkC,CAAC;IACzC,OAAO,EAAE,qBAAqB,CAAC,YAAY,CAAC,CAAC;CAC9C,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,8CAA8C,GAAG;IAC3D,IAAI,EAAE,2CAA2C,CAAC;IAClD,OAAO,EAAE,qBAAqB,CAAC,qBAAqB,CAAC,CAAC;CACvD,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,yDAAyD,GAAG;IACtE,IAAI,EAAE,sDAAsD,CAAC;IAC7D,OAAO,EAAE,qBAAqB,CAAC,gCAAgC,CAAC,CAAC;CAClE,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAC1C,+BAA+B,GAC/B,iCAAiC,GACjC,iDAAiD,GACjD,kDAAkD,GAClD,8DAA8D,GAC9D,gDAAgD,GAChD,4CAA4C,GAC5C,kDAAkD,GAClD,kDAAkD,GAClD,8CAA8C,GAC9C,+CAA+C,GAC/C,gDAAgD,GAChD,gDAAgD,GAChD,qCAAqC,GACrC,8CAA8C,GAC9C,yDAAyD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AccountTreeController-method-action-types.mjs","sourceRoot":"","sources":["../src/AccountTreeController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { AccountTreeController } from './AccountTreeController';\n\n/**\n * Initialize the controller's state.\n *\n * It constructs the initial state of the account tree (tree nodes, nodes\n * names, metadata, etc..) and will automatically update the controller's\n * state with it.\n */\nexport type AccountTreeControllerInitAction = {\n type: `AccountTreeController:init`;\n handler: AccountTreeController['init'];\n};\n\n/**\n * Re-initialize the controller's state.\n *\n * This is done in one single (atomic) `update` block to avoid having a temporary\n * cleared state. Use this when you need to force a full re-init even if already initialized.\n */\nexport type AccountTreeControllerReinitAction = {\n type: `AccountTreeController:reinit`;\n handler: AccountTreeController['reinit'];\n};\n\n/**\n * Gets the account wallet object from its ID.\n *\n * @param walletId - Account wallet ID.\n * @returns The account wallet object if found, undefined otherwise.\n */\nexport type AccountTreeControllerGetAccountWalletObjectAction = {\n type: `AccountTreeController:getAccountWalletObject`;\n handler: AccountTreeController['getAccountWalletObject'];\n};\n\n/**\n * Gets all account wallet objects.\n *\n * @returns All account wallet objects.\n */\nexport type AccountTreeControllerGetAccountWalletObjectsAction = {\n type: `AccountTreeController:getAccountWalletObjects`;\n handler: AccountTreeController['getAccountWalletObjects'];\n};\n\n/**\n * Gets all underlying accounts from the currently selected account\n * group.\n *\n * It also support account selector, which allows to filter specific\n * accounts given some criterias (account type, address, scopes, etc...).\n *\n * @param selector - Optional account selector.\n * @returns Underlying accounts for the currently selected account (filtered\n * by the selector if provided).\n */\nexport type AccountTreeControllerGetAccountsFromSelectedAccountGroupAction = {\n type: `AccountTreeController:getAccountsFromSelectedAccountGroup`;\n handler: AccountTreeController['getAccountsFromSelectedAccountGroup'];\n};\n\n/**\n * Gets the account group object from its ID.\n *\n * @param groupId - Account group ID.\n * @returns The account group object if found, undefined otherwise.\n */\nexport type AccountTreeControllerGetAccountGroupObjectAction = {\n type: `AccountTreeController:getAccountGroupObject`;\n handler: AccountTreeController['getAccountGroupObject'];\n};\n\n/**\n * Gets the account's context which contains its wallet ID, group ID, and sort order.\n *\n * @param accountId - Account ID.\n * @returns The account context if found, undefined otherwise.\n */\nexport type AccountTreeControllerGetAccountContextAction = {\n type: `AccountTreeController:getAccountContext`;\n handler: AccountTreeController['getAccountContext'];\n};\n\n/**\n * Gets the currently selected account group ID.\n *\n * @returns The selected account group ID or empty string if none selected.\n */\nexport type AccountTreeControllerGetSelectedAccountGroupAction = {\n type: `AccountTreeController:getSelectedAccountGroup`;\n handler: AccountTreeController['getSelectedAccountGroup'];\n};\n\n/**\n * Sets the selected account group and updates the AccountsController selectedAccount accordingly.\n *\n * @param groupId - The account group ID to select.\n */\nexport type AccountTreeControllerSetSelectedAccountGroupAction = {\n type: `AccountTreeController:setSelectedAccountGroup`;\n handler: AccountTreeController['setSelectedAccountGroup'];\n};\n\n/**\n * Sets a custom name for an account group.\n *\n * @param groupId - The account group ID.\n * @param name - The custom name to set.\n * @param autoHandleConflict - If true, automatically resolves name conflicts by adding a suffix. If false, throws on conflicts.\n * @throws If the account group ID is not found in the current tree.\n * @throws If the account group name already exists and autoHandleConflict is false.\n */\nexport type AccountTreeControllerSetAccountGroupNameAction = {\n type: `AccountTreeController:setAccountGroupName`;\n handler: AccountTreeController['setAccountGroupName'];\n};\n\n/**\n * Sets a custom name for an account wallet.\n *\n * @param walletId - The account wallet ID.\n * @param name - The custom name to set.\n * @throws If the account wallet ID is not found in the current tree.\n */\nexport type AccountTreeControllerSetAccountWalletNameAction = {\n type: `AccountTreeController:setAccountWalletName`;\n handler: AccountTreeController['setAccountWalletName'];\n};\n\n/**\n * Toggles the pinned state of an account group.\n *\n * @param groupId - The account group ID.\n * @param pinned - Whether the group should be pinned.\n * @throws If the account group ID is not found in the current tree.\n */\nexport type AccountTreeControllerSetAccountGroupPinnedAction = {\n type: `AccountTreeController:setAccountGroupPinned`;\n handler: AccountTreeController['setAccountGroupPinned'];\n};\n\n/**\n * Toggles the hidden state of an account group.\n *\n * @param groupId - The account group ID.\n * @param hidden - Whether the group should be hidden.\n * @throws If the account group ID is not found in the current tree.\n */\nexport type AccountTreeControllerSetAccountGroupHiddenAction = {\n type: `AccountTreeController:setAccountGroupHidden`;\n handler: AccountTreeController['setAccountGroupHidden'];\n};\n\n/**\n * Clears the controller state and resets to default values.\n * Also clears the backup and sync service state.\n */\nexport type AccountTreeControllerClearStateAction = {\n type: `AccountTreeController:clearState`;\n handler: AccountTreeController['clearState'];\n};\n\n/**\n * Bi-directionally syncs the account tree with user storage.\n * This will perform a full sync, including both pulling updates\n * from user storage and pushing local changes to user storage.\n * This also performs legacy account syncing if needed.\n *\n * IMPORTANT:\n * If a full sync is already in progress, it will return the ongoing promise.\n *\n * @returns A promise that resolves when the sync is complete.\n */\nexport type AccountTreeControllerSyncWithUserStorageAction = {\n type: `AccountTreeController:syncWithUserStorage`;\n handler: AccountTreeController['syncWithUserStorage'];\n};\n\n/**\n * Bi-directionally syncs the account tree with user storage.\n * This will ensure at least one full sync is ran, including both pulling updates\n * from user storage and pushing local changes to user storage.\n * This also performs legacy account syncing if needed.\n *\n * IMPORTANT:\n * If the first ever full sync is already in progress, it will return the ongoing promise.\n * If the first ever full sync was previously completed, it will NOT start a new sync, and will resolve immediately.\n *\n * @returns A promise that resolves when the first ever full sync is complete.\n */\nexport type AccountTreeControllerSyncWithUserStorageAtLeastOnceAction = {\n type: `AccountTreeController:syncWithUserStorageAtLeastOnce`;\n handler: AccountTreeController['syncWithUserStorageAtLeastOnce'];\n};\n\n/**\n * Union of all AccountTreeController action types.\n */\nexport type AccountTreeControllerMethodActions =\n | AccountTreeControllerInitAction\n | AccountTreeControllerReinitAction\n | AccountTreeControllerGetAccountWalletObjectAction\n | AccountTreeControllerGetAccountWalletObjectsAction\n | AccountTreeControllerGetAccountsFromSelectedAccountGroupAction\n | AccountTreeControllerGetAccountGroupObjectAction\n | AccountTreeControllerGetAccountContextAction\n | AccountTreeControllerGetSelectedAccountGroupAction\n | AccountTreeControllerSetSelectedAccountGroupAction\n | AccountTreeControllerSetAccountGroupNameAction\n | AccountTreeControllerSetAccountWalletNameAction\n | AccountTreeControllerSetAccountGroupPinnedAction\n | AccountTreeControllerSetAccountGroupHiddenAction\n | AccountTreeControllerClearStateAction\n | AccountTreeControllerSyncWithUserStorageAction\n | AccountTreeControllerSyncWithUserStorageAtLeastOnceAction;\n"]}
1
+ {"version":3,"file":"AccountTreeController-method-action-types.mjs","sourceRoot":"","sources":["../src/AccountTreeController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { AccountTreeController } from './AccountTreeController.js';\n\n/**\n * Initialize the controller's state.\n *\n * It constructs the initial state of the account tree (tree nodes, nodes\n * names, metadata, etc..) and will automatically update the controller's\n * state with it.\n */\nexport type AccountTreeControllerInitAction = {\n type: `AccountTreeController:init`;\n handler: AccountTreeController['init'];\n};\n\n/**\n * Re-initialize the controller's state.\n *\n * This is done in one single (atomic) `update` block to avoid having a temporary\n * cleared state. Use this when you need to force a full re-init even if already initialized.\n */\nexport type AccountTreeControllerReinitAction = {\n type: `AccountTreeController:reinit`;\n handler: AccountTreeController['reinit'];\n};\n\n/**\n * Gets the account wallet object from its ID.\n *\n * @param walletId - Account wallet ID.\n * @returns The account wallet object if found, undefined otherwise.\n */\nexport type AccountTreeControllerGetAccountWalletObjectAction = {\n type: `AccountTreeController:getAccountWalletObject`;\n handler: AccountTreeController['getAccountWalletObject'];\n};\n\n/**\n * Gets all account wallet objects.\n *\n * @returns All account wallet objects.\n */\nexport type AccountTreeControllerGetAccountWalletObjectsAction = {\n type: `AccountTreeController:getAccountWalletObjects`;\n handler: AccountTreeController['getAccountWalletObjects'];\n};\n\n/**\n * Gets all underlying accounts from the currently selected account\n * group.\n *\n * It also support account selector, which allows to filter specific\n * accounts given some criterias (account type, address, scopes, etc...).\n *\n * @param selector - Optional account selector.\n * @returns Underlying accounts for the currently selected account (filtered\n * by the selector if provided).\n */\nexport type AccountTreeControllerGetAccountsFromSelectedAccountGroupAction = {\n type: `AccountTreeController:getAccountsFromSelectedAccountGroup`;\n handler: AccountTreeController['getAccountsFromSelectedAccountGroup'];\n};\n\n/**\n * Gets the account group object from its ID.\n *\n * @param groupId - Account group ID.\n * @returns The account group object if found, undefined otherwise.\n */\nexport type AccountTreeControllerGetAccountGroupObjectAction = {\n type: `AccountTreeController:getAccountGroupObject`;\n handler: AccountTreeController['getAccountGroupObject'];\n};\n\n/**\n * Gets the account's context which contains its wallet ID, group ID, and sort order.\n *\n * @param accountId - Account ID.\n * @returns The account context if found, undefined otherwise.\n */\nexport type AccountTreeControllerGetAccountContextAction = {\n type: `AccountTreeController:getAccountContext`;\n handler: AccountTreeController['getAccountContext'];\n};\n\n/**\n * Gets the currently selected account group ID.\n *\n * @returns The selected account group ID or empty string if none selected.\n */\nexport type AccountTreeControllerGetSelectedAccountGroupAction = {\n type: `AccountTreeController:getSelectedAccountGroup`;\n handler: AccountTreeController['getSelectedAccountGroup'];\n};\n\n/**\n * Sets the selected account group and updates the AccountsController selectedAccount accordingly.\n *\n * @param groupId - The account group ID to select.\n */\nexport type AccountTreeControllerSetSelectedAccountGroupAction = {\n type: `AccountTreeController:setSelectedAccountGroup`;\n handler: AccountTreeController['setSelectedAccountGroup'];\n};\n\n/**\n * Sets a custom name for an account group.\n *\n * @param groupId - The account group ID.\n * @param name - The custom name to set.\n * @param autoHandleConflict - If true, automatically resolves name conflicts by adding a suffix. If false, throws on conflicts.\n * @throws If the account group ID is not found in the current tree.\n * @throws If the account group name already exists and autoHandleConflict is false.\n */\nexport type AccountTreeControllerSetAccountGroupNameAction = {\n type: `AccountTreeController:setAccountGroupName`;\n handler: AccountTreeController['setAccountGroupName'];\n};\n\n/**\n * Sets a custom name for an account wallet.\n *\n * @param walletId - The account wallet ID.\n * @param name - The custom name to set.\n * @throws If the account wallet ID is not found in the current tree.\n */\nexport type AccountTreeControllerSetAccountWalletNameAction = {\n type: `AccountTreeController:setAccountWalletName`;\n handler: AccountTreeController['setAccountWalletName'];\n};\n\n/**\n * Toggles the pinned state of an account group.\n *\n * @param groupId - The account group ID.\n * @param pinned - Whether the group should be pinned.\n * @throws If the account group ID is not found in the current tree.\n */\nexport type AccountTreeControllerSetAccountGroupPinnedAction = {\n type: `AccountTreeController:setAccountGroupPinned`;\n handler: AccountTreeController['setAccountGroupPinned'];\n};\n\n/**\n * Toggles the hidden state of an account group.\n *\n * @param groupId - The account group ID.\n * @param hidden - Whether the group should be hidden.\n * @throws If the account group ID is not found in the current tree.\n */\nexport type AccountTreeControllerSetAccountGroupHiddenAction = {\n type: `AccountTreeController:setAccountGroupHidden`;\n handler: AccountTreeController['setAccountGroupHidden'];\n};\n\n/**\n * Clears the controller state and resets to default values.\n * Also clears the backup and sync service state.\n */\nexport type AccountTreeControllerClearStateAction = {\n type: `AccountTreeController:clearState`;\n handler: AccountTreeController['clearState'];\n};\n\n/**\n * Bi-directionally syncs the account tree with user storage.\n * This will perform a full sync, including both pulling updates\n * from user storage and pushing local changes to user storage.\n * This also performs legacy account syncing if needed.\n *\n * IMPORTANT:\n * If a full sync is already in progress, it will return the ongoing promise.\n *\n * @returns A promise that resolves when the sync is complete.\n */\nexport type AccountTreeControllerSyncWithUserStorageAction = {\n type: `AccountTreeController:syncWithUserStorage`;\n handler: AccountTreeController['syncWithUserStorage'];\n};\n\n/**\n * Bi-directionally syncs the account tree with user storage.\n * This will ensure at least one full sync is ran, including both pulling updates\n * from user storage and pushing local changes to user storage.\n * This also performs legacy account syncing if needed.\n *\n * IMPORTANT:\n * If the first ever full sync is already in progress, it will return the ongoing promise.\n * If the first ever full sync was previously completed, it will NOT start a new sync, and will resolve immediately.\n *\n * @returns A promise that resolves when the first ever full sync is complete.\n */\nexport type AccountTreeControllerSyncWithUserStorageAtLeastOnceAction = {\n type: `AccountTreeController:syncWithUserStorageAtLeastOnce`;\n handler: AccountTreeController['syncWithUserStorageAtLeastOnce'];\n};\n\n/**\n * Union of all AccountTreeController action types.\n */\nexport type AccountTreeControllerMethodActions =\n | AccountTreeControllerInitAction\n | AccountTreeControllerReinitAction\n | AccountTreeControllerGetAccountWalletObjectAction\n | AccountTreeControllerGetAccountWalletObjectsAction\n | AccountTreeControllerGetAccountsFromSelectedAccountGroupAction\n | AccountTreeControllerGetAccountGroupObjectAction\n | AccountTreeControllerGetAccountContextAction\n | AccountTreeControllerGetSelectedAccountGroupAction\n | AccountTreeControllerSetSelectedAccountGroupAction\n | AccountTreeControllerSetAccountGroupNameAction\n | AccountTreeControllerSetAccountWalletNameAction\n | AccountTreeControllerSetAccountGroupPinnedAction\n | AccountTreeControllerSetAccountGroupHiddenAction\n | AccountTreeControllerClearStateAction\n | AccountTreeControllerSyncWithUserStorageAction\n | AccountTreeControllerSyncWithUserStorageAtLeastOnceAction;\n"]}
@@ -17,14 +17,14 @@ const account_api_1 = require("@metamask/account-api");
17
17
  const base_controller_1 = require("@metamask/base-controller");
18
18
  const keyring_api_1 = require("@metamask/keyring-api");
19
19
  const utils_1 = require("@metamask/utils");
20
- const analytics_1 = require("./backup-and-sync/analytics/index.cjs");
21
- const service_1 = require("./backup-and-sync/service/index.cjs");
22
- const utils_2 = require("./backup-and-sync/utils/index.cjs");
23
- const group_1 = require("./group.cjs");
24
- const logger_1 = require("./logger.cjs");
25
- const entropy_1 = require("./rules/entropy.cjs");
26
- const keyring_1 = require("./rules/keyring.cjs");
27
- const snap_1 = require("./rules/snap.cjs");
20
+ const index_js_1 = require("./backup-and-sync/analytics/index.cjs");
21
+ const index_js_2 = require("./backup-and-sync/service/index.cjs");
22
+ const index_js_3 = require("./backup-and-sync/utils/index.cjs");
23
+ const group_js_1 = require("./group.cjs");
24
+ const logger_js_1 = require("./logger.cjs");
25
+ const entropy_js_1 = require("./rules/entropy.cjs");
26
+ const keyring_js_1 = require("./rules/keyring.cjs");
27
+ const snap_js_1 = require("./rules/snap.cjs");
28
28
  exports.controllerName = 'AccountTreeController';
29
29
  const MESSENGER_EXPOSED_METHODS = [
30
30
  'getSelectedAccountGroup',
@@ -143,24 +143,24 @@ class AccountTreeController extends base_controller_1.BaseController {
143
143
  // Rules to apply to construct the wallets tree.
144
144
  __classPrivateFieldSet(this, _AccountTreeController_rules, [
145
145
  // 1. We group by entropy-source
146
- new entropy_1.EntropyRule(this.messenger),
146
+ new entropy_js_1.EntropyRule(this.messenger),
147
147
  // 2. We group by Snap ID
148
- new snap_1.SnapRule(this.messenger),
148
+ new snap_js_1.SnapRule(this.messenger),
149
149
  // 3. We group by wallet type (this rule cannot fail and will group all non-matching accounts)
150
- new keyring_1.KeyringRule(this.messenger),
150
+ new keyring_js_1.KeyringRule(this.messenger),
151
151
  ], "f");
152
152
  // Initialize trace function
153
- __classPrivateFieldSet(this, _AccountTreeController_trace, config?.trace ?? analytics_1.traceFallback, "f");
153
+ __classPrivateFieldSet(this, _AccountTreeController_trace, config?.trace ?? index_js_1.traceFallback, "f");
154
154
  // Initialize backup and sync config
155
155
  __classPrivateFieldSet(this, _AccountTreeController_backupAndSyncConfig, {
156
156
  emitAnalyticsEventFn: (event) => {
157
- return config?.backupAndSync?.onBackupAndSyncEvent?.((0, analytics_1.formatAnalyticsEvent)(event));
157
+ return config?.backupAndSync?.onBackupAndSyncEvent?.((0, index_js_1.formatAnalyticsEvent)(event));
158
158
  },
159
159
  }, "f");
160
160
  // Used when migrating initial hidden/pinned state for groups (if available).
161
161
  __classPrivateFieldSet(this, _AccountTreeController_accountOrderCallbacks, config?.accountOrderCallbacks, "f");
162
162
  // Initialize the backup and sync service
163
- __classPrivateFieldSet(this, _AccountTreeController_backupAndSyncService, new service_1.BackupAndSyncService(__classPrivateFieldGet(this, _AccountTreeController_instances, "m", _AccountTreeController_createBackupAndSyncContext).call(this)), "f");
163
+ __classPrivateFieldSet(this, _AccountTreeController_backupAndSyncService, new index_js_2.BackupAndSyncService(__classPrivateFieldGet(this, _AccountTreeController_instances, "m", _AccountTreeController_createBackupAndSyncContext).call(this)), "f");
164
164
  // We build the initial tree (from the state), but this might get updated
165
165
  // after `init` got called. Having it available now, allow our consumers to
166
166
  // re-use the state that was already available before we restart/lock the
@@ -196,7 +196,7 @@ class AccountTreeController extends base_controller_1.BaseController {
196
196
  // `reinit` to re-init everything from scratch.
197
197
  return;
198
198
  }
199
- (0, logger_1.projectLogger)('Initializing...');
199
+ (0, logger_js_1.projectLogger)('Initializing...');
200
200
  const wallets = {};
201
201
  // Clear mappings for fresh rebuild.
202
202
  __classPrivateFieldGet(this, _AccountTreeController_accountIdToContext, "f").clear();
@@ -262,9 +262,9 @@ class AccountTreeController extends base_controller_1.BaseController {
262
262
  // We always fire the current selected group after init, even if it did not change, to ensure that
263
263
  // all subscribers are aware of it and can react accordingly (e.g. by fetching accounts from
264
264
  // the selected group on startup).
265
- (0, logger_1.projectLogger)(`Selected (initial) group is: [${this.state.selectedAccountGroup}]`);
265
+ (0, logger_js_1.projectLogger)(`Selected (initial) group is: [${this.state.selectedAccountGroup}]`);
266
266
  this.messenger.publish(`${exports.controllerName}:selectedAccountGroupChange`, this.state.selectedAccountGroup, previousSelectedAccountGroup);
267
- (0, logger_1.projectLogger)('Initialized!');
267
+ (0, logger_js_1.projectLogger)('Initialized!');
268
268
  __classPrivateFieldSet(this, _AccountTreeController_initialized, true, "f");
269
269
  }
270
270
  /**
@@ -274,7 +274,7 @@ class AccountTreeController extends base_controller_1.BaseController {
274
274
  * cleared state. Use this when you need to force a full re-init even if already initialized.
275
275
  */
276
276
  reinit() {
277
- (0, logger_1.projectLogger)('Re-initializing...');
277
+ (0, logger_js_1.projectLogger)('Re-initializing...');
278
278
  __classPrivateFieldSet(this, _AccountTreeController_initialized, false, "f");
279
279
  this.init();
280
280
  }
@@ -389,14 +389,14 @@ class AccountTreeController extends base_controller_1.BaseController {
389
389
  let finalName = name;
390
390
  // Handle name conflicts based on the autoHandleConflict flag
391
391
  if (autoHandleConflict &&
392
- !(0, group_1.isAccountGroupNameUniqueFromWallet)(wallet, groupId, name)) {
392
+ !(0, group_js_1.isAccountGroupNameUniqueFromWallet)(wallet, groupId, name)) {
393
393
  finalName = __classPrivateFieldGet(this, _AccountTreeController_instances, "m", _AccountTreeController_resolveNameConflict).call(this, wallet, groupId, name);
394
394
  }
395
395
  else {
396
396
  // Validate that the name is unique
397
397
  __classPrivateFieldGet(this, _AccountTreeController_instances, "m", _AccountTreeController_assertAccountGroupNameIsUnique).call(this, groupId, finalName);
398
398
  }
399
- (0, logger_1.projectLogger)(`[${groupId}] Set new name to: "${finalName}" (auto handle conflict: ${autoHandleConflict})`);
399
+ (0, logger_js_1.projectLogger)(`[${groupId}] Set new name to: "${finalName}" (auto handle conflict: ${autoHandleConflict})`);
400
400
  this.update((state) => {
401
401
  /* istanbul ignore next */
402
402
  if (!state.accountGroupsMetadata[groupId]) {
@@ -523,7 +523,7 @@ class AccountTreeController extends base_controller_1.BaseController {
523
523
  * Also clears the backup and sync service state.
524
524
  */
525
525
  clearState() {
526
- (0, logger_1.projectLogger)('Clearing state');
526
+ (0, logger_js_1.projectLogger)('Clearing state');
527
527
  this.update(() => {
528
528
  return {
529
529
  ...getDefaultAccountTreeControllerState(),
@@ -576,9 +576,9 @@ _AccountTreeController_accountIdToContext = new WeakMap(), _AccountTreeControlle
576
576
  // NOTE: The account should always be available, but if it is not, we
577
577
  // still let it inside the tree with a max sort order to avoid blocking
578
578
  // the entire tree construction.
579
- let sortOrder = group_1.MAX_SORT_ORDER;
579
+ let sortOrder = group_js_1.MAX_SORT_ORDER;
580
580
  if (account) {
581
- sortOrder = group_1.ACCOUNT_TYPE_TO_SORT_ORDER[account.type];
581
+ sortOrder = group_js_1.ACCOUNT_TYPE_TO_SORT_ORDER[account.type];
582
582
  }
583
583
  __classPrivateFieldGet(this, _AccountTreeController_accountIdToContext, "f").set(accountId, {
584
584
  walletId,
@@ -615,7 +615,7 @@ _AccountTreeController_accountIdToContext = new WeakMap(), _AccountTreeControlle
615
615
  wallet.metadata.name =
616
616
  __classPrivateFieldGet(this, _AccountTreeController_instances, "m", _AccountTreeController_getKeyringRule).call(this).getDefaultAccountWalletName(wallet);
617
617
  }
618
- (0, logger_1.projectLogger)(`[${wallet.id}] Set default name to: "${wallet.metadata.name}"`);
618
+ (0, logger_js_1.projectLogger)(`[${wallet.id}] Set default name to: "${wallet.metadata.name}"`);
619
619
  }
620
620
  }, _AccountTreeController_getRuleForWallet = function _AccountTreeController_getRuleForWallet(wallet) {
621
621
  switch (wallet.type) {
@@ -646,7 +646,7 @@ _AccountTreeController_accountIdToContext = new WeakMap(), _AccountTreeControlle
646
646
  }
647
647
  // If this name already exists for whatever reason, we rename it to resolve this conflict.
648
648
  if (proposedName.length &&
649
- !(0, group_1.isAccountGroupNameUniqueFromWallet)(wallet, group.id, proposedName)) {
649
+ !(0, group_js_1.isAccountGroupNameUniqueFromWallet)(wallet, group.id, proposedName)) {
650
650
  proposedName = __classPrivateFieldGet(this, _AccountTreeController_instances, "m", _AccountTreeController_resolveNameConflict).call(this, wallet, group.id, proposedName);
651
651
  }
652
652
  return proposedName;
@@ -699,7 +699,7 @@ _AccountTreeController_accountIdToContext = new WeakMap(), _AccountTreeControlle
699
699
  do {
700
700
  proposedName = `${namePrefix} ${proposedNameIndex}`;
701
701
  // Check if this name already exists in the wallet (excluding current group)
702
- proposedNameExists = !(0, group_1.isAccountGroupNameUniqueFromWallet)(wallet, group.id, proposedName);
702
+ proposedNameExists = !(0, group_js_1.isAccountGroupNameUniqueFromWallet)(wallet, group.id, proposedName);
703
703
  /* istanbul ignore next */
704
704
  if (proposedNameExists) {
705
705
  proposedNameIndex += 1; // Try next number
@@ -731,7 +731,7 @@ _AccountTreeController_accountIdToContext = new WeakMap(), _AccountTreeControlle
731
731
  }
732
732
  state.accountTree.wallets[walletId].groups[groupId].metadata.name =
733
733
  proposedName;
734
- (0, logger_1.projectLogger)(`[${group.id}] Set default name to: "${group.metadata.name}"`);
734
+ (0, logger_js_1.projectLogger)(`[${group.id}] Set default name to: "${group.metadata.name}"`);
735
735
  // Persist the generated name to ensure consistency
736
736
  state.accountGroupsMetadata[groupId].name = {
737
737
  value: proposedName,
@@ -917,7 +917,7 @@ _AccountTreeController_accountIdToContext = new WeakMap(), _AccountTreeControlle
917
917
  const walletId = result.wallet.id;
918
918
  let wallet = wallets[walletId];
919
919
  if (!wallet) {
920
- (0, logger_1.projectLogger)(`[${walletId}] Added as new wallet`);
920
+ (0, logger_js_1.projectLogger)(`[${walletId}] Added as new wallet`);
921
921
  wallets[walletId] = {
922
922
  ...result.wallet,
923
923
  status: 'ready',
@@ -938,10 +938,10 @@ _AccountTreeController_accountIdToContext = new WeakMap(), _AccountTreeControlle
938
938
  const groupId = result.group.id;
939
939
  let group = wallet.groups[groupId];
940
940
  const { type, id } = account;
941
- const sortOrder = group_1.ACCOUNT_TYPE_TO_SORT_ORDER[type];
941
+ const sortOrder = group_js_1.ACCOUNT_TYPE_TO_SORT_ORDER[type];
942
942
  const created = !group;
943
943
  if (!group) {
944
- (0, logger_1.projectLogger)(`[${walletId}] Add new group: [${groupId}]`);
944
+ (0, logger_js_1.projectLogger)(`[${walletId}] Add new group: [${groupId}]`);
945
945
  wallet.groups[groupId] = {
946
946
  ...result.group,
947
947
  // Type-wise, we are guaranteed to always have at least 1 account.
@@ -977,10 +977,10 @@ _AccountTreeController_accountIdToContext = new WeakMap(), _AccountTreeControlle
977
977
  (a, b) => {
978
978
  const aSortOrder = a === id ? sortOrder : __classPrivateFieldGet(this, _AccountTreeController_accountIdToContext, "f").get(a)?.sortOrder;
979
979
  const bSortOrder = b === id ? sortOrder : __classPrivateFieldGet(this, _AccountTreeController_accountIdToContext, "f").get(b)?.sortOrder;
980
- return ((aSortOrder ?? group_1.MAX_SORT_ORDER) - (bSortOrder ?? group_1.MAX_SORT_ORDER));
980
+ return ((aSortOrder ?? group_js_1.MAX_SORT_ORDER) - (bSortOrder ?? group_js_1.MAX_SORT_ORDER));
981
981
  });
982
982
  }
983
- (0, logger_1.projectLogger)(`[${groupId}] Add new account: { id: "${account.id}", type: "${account.type}", address: "${account.address}"`);
983
+ (0, logger_js_1.projectLogger)(`[${groupId}] Add new account: { id: "${account.id}", type: "${account.type}", address: "${account.address}"`);
984
984
  // Update the reverse mapping for this account.
985
985
  __classPrivateFieldGet(this, _AccountTreeController_accountIdToContext, "f").set(account.id, {
986
986
  walletId: wallet.id,
@@ -1001,7 +1001,7 @@ _AccountTreeController_accountIdToContext = new WeakMap(), _AccountTreeControlle
1001
1001
  throw new Error('Account wallet not found in tree');
1002
1002
  }
1003
1003
  }, _AccountTreeController_assertAccountGroupNameIsUnique = function _AccountTreeController_assertAccountGroupNameIsUnique(groupId, name) {
1004
- if (!(0, group_1.isAccountGroupNameUnique)(this.state, groupId, name)) {
1004
+ if (!(0, group_js_1.isAccountGroupNameUnique)(this.state, groupId, name)) {
1005
1005
  throw new Error('Account group name already exists');
1006
1006
  }
1007
1007
  }, _AccountTreeController_setSelectedAccountGroup = function _AccountTreeController_setSelectedAccountGroup(groupId, forwardSelectedAccount = true) {
@@ -1031,13 +1031,13 @@ _AccountTreeController_accountIdToContext = new WeakMap(), _AccountTreeControlle
1031
1031
  state.accountTree.wallets[walletId].groups[groupId].metadata.lastSelected = now;
1032
1032
  }
1033
1033
  });
1034
- (0, logger_1.projectLogger)(`Selected group is now: [${this.state.selectedAccountGroup}]`);
1034
+ (0, logger_js_1.projectLogger)(`Selected group is now: [${this.state.selectedAccountGroup}]`);
1035
1035
  this.messenger.publish(`${exports.controllerName}:selectedAccountGroupChange`, groupId, previousSelectedAccountGroup);
1036
1036
  if (forwardSelectedAccount) {
1037
1037
  // Update AccountsController - this will trigger selectedAccountChange event,
1038
1038
  // but our handler is idempotent so it won't cause infinite loop
1039
1039
  this.messenger.call('AccountsController:setSelectedAccount', accountToSelect);
1040
- (0, logger_1.projectLogger)(`Selected account is now: ${accountToSelect}`);
1040
+ (0, logger_js_1.projectLogger)(`Selected account is now: ${accountToSelect}`);
1041
1041
  }
1042
1042
  }, _AccountTreeController_getDefaultSelectedAccountGroup = function _AccountTreeController_getDefaultSelectedAccountGroup(wallets) {
1043
1043
  const selectedAccount = this.messenger.call('AccountsController:getSelectedMultichainAccount');
@@ -1122,7 +1122,7 @@ _AccountTreeController_accountIdToContext = new WeakMap(), _AccountTreeControlle
1122
1122
  let suffix = 2;
1123
1123
  let candidateName = `${name} (${suffix})`;
1124
1124
  // Keep incrementing suffix until we find a unique name
1125
- while (!(0, group_1.isAccountGroupNameUniqueFromWallet)(wallet, groupId, candidateName)) {
1125
+ while (!(0, group_js_1.isAccountGroupNameUniqueFromWallet)(wallet, groupId, candidateName)) {
1126
1126
  suffix += 1;
1127
1127
  candidateName = `${name} (${suffix})`;
1128
1128
  }
@@ -1135,7 +1135,7 @@ _AccountTreeController_accountIdToContext = new WeakMap(), _AccountTreeControlle
1135
1135
  controllerStateUpdateFn: this.update.bind(this),
1136
1136
  traceFn: __classPrivateFieldGet(this, _AccountTreeController_trace, "f").bind(this),
1137
1137
  groupIdToWalletId: __classPrivateFieldGet(this, _AccountTreeController_groupIdToWalletId, "f"),
1138
- mutationTracker: (0, utils_2.createSyncMutationTracker)(),
1138
+ mutationTracker: (0, index_js_3.createSyncMutationTracker)(),
1139
1139
  };
1140
1140
  };
1141
1141
  //# sourceMappingURL=AccountTreeController.cjs.map