{"version":3,"file":"MultichainAccountService-method-action-types.cjs","sourceRoot":"","sources":["../src/MultichainAccountService-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { MultichainAccountService } from './MultichainAccountService';\n\n/**\n * Initialize the service and constructs the internal reprensentation of\n * multichain accounts and wallets.\n */\nexport type MultichainAccountServiceInitAction = {\n  type: `MultichainAccountService:init`;\n  handler: MultichainAccountService['init'];\n};\n\n/**\n * Re-synchronize MetaMask accounts and the providers accounts if needed.\n *\n * NOTE: This is mostly required if one of the providers (keyrings or Snaps)\n * have different sets of accounts. This method would ensure that both are\n * in-sync and use the same accounts (and same IDs).\n *\n * READ THIS CAREFULLY (State inconsistency bugs/de-sync)\n * We've seen some problems were keyring accounts on some Snaps were not synchronized\n * with the accounts on MM side. This causes problems where we cannot interact with\n * those accounts because the Snap does know about them.\n * To \"workaround\" this de-sync problem for now, we make sure that both parties are\n * in-sync when the service boots up.\n * ----------------------------------------------------------------------------------\n */\nexport type MultichainAccountServiceResyncAccountsAction = {\n  type: `MultichainAccountService:resyncAccounts`;\n  handler: MultichainAccountService['resyncAccounts'];\n};\n\n/**\n * Gets a reference to the multichain account wallet matching this entropy source.\n *\n * @param options - Options.\n * @param options.entropySource - The entropy source of the multichain account.\n * @throws If none multichain account match this entropy.\n * @returns A reference to the multichain account wallet.\n */\nexport type MultichainAccountServiceGetMultichainAccountWalletAction = {\n  type: `MultichainAccountService:getMultichainAccountWallet`;\n  handler: MultichainAccountService['getMultichainAccountWallet'];\n};\n\n/**\n * Gets an array of all multichain account wallets.\n *\n * @returns An array of all multichain account wallets.\n */\nexport type MultichainAccountServiceGetMultichainAccountWalletsAction = {\n  type: `MultichainAccountService:getMultichainAccountWallets`;\n  handler: MultichainAccountService['getMultichainAccountWallets'];\n};\n\n/**\n * Creates a new multichain account wallet by either importing an existing mnemonic,\n * creating a new vault and keychain, or restoring a vault and keyring.\n *\n * NOTE: This method should only be called in client code where a mutex lock is acquired.\n * `discoverAccounts` should be called after this method to discover and create accounts.\n *\n * @param params - The parameters to use to create the new wallet.\n * @param params.mnemonic - The mnemonic to use to create the new wallet.\n * @param params.password - The password to encrypt the vault with.\n * @param params.type - The flow type to use to create the new wallet.\n * @throws If the mnemonic has already been imported.\n * @returns The new multichain account wallet.\n */\nexport type MultichainAccountServiceCreateMultichainAccountWalletAction = {\n  type: `MultichainAccountService:createMultichainAccountWallet`;\n  handler: MultichainAccountService['createMultichainAccountWallet'];\n};\n\n/**\n * Removes a multichain account wallet, deleting all of its accounts across\n * every registered provider (EVM and snap-based).\n *\n * The deletion iterates providers (the source of truth for their own\n * account lists) and filters each provider's accounts to those matching\n * the wallet's entropy source. Cleanup is best-effort end-to-end: neither\n * a single account deletion failure nor a failure to enumerate a given\n * provider's accounts aborts cleanup of the remaining providers. If one or\n * more operations fail, a single aggregated error is reported via\n * `reportError` with all per-failure details in its context. The wallet is\n * always removed from the service's internal map at the end.\n *\n * @param entropySource - The entropy source of the multichain account wallet.\n */\nexport type MultichainAccountServiceRemoveMultichainAccountWalletAction = {\n  type: `MultichainAccountService:removeMultichainAccountWallet`;\n  handler: MultichainAccountService['removeMultichainAccountWallet'];\n};\n\n/**\n * Gets a reference to the multichain account group matching this entropy source\n * and a group index.\n *\n * @param options - Options.\n * @param options.entropySource - The entropy source of the multichain account.\n * @param options.groupIndex - The group index of the multichain account.\n * @throws If none multichain account match this entropy source and group index.\n * @returns A reference to the multichain account.\n */\nexport type MultichainAccountServiceGetMultichainAccountGroupAction = {\n  type: `MultichainAccountService:getMultichainAccountGroup`;\n  handler: MultichainAccountService['getMultichainAccountGroup'];\n};\n\n/**\n * Gets all multichain account groups for a given entropy source.\n *\n * @param options - Options.\n * @param options.entropySource - The entropy source to query.\n * @throws If no multichain accounts match this entropy source.\n * @returns A list of all multichain accounts.\n */\nexport type MultichainAccountServiceGetMultichainAccountGroupsAction = {\n  type: `MultichainAccountService:getMultichainAccountGroups`;\n  handler: MultichainAccountService['getMultichainAccountGroups'];\n};\n\n/**\n * Creates the next multichain account group.\n *\n * @param options - Options.\n * @param options.entropySource - The wallet's entropy source.\n * @returns The next multichain account group.\n */\nexport type MultichainAccountServiceCreateNextMultichainAccountGroupAction = {\n  type: `MultichainAccountService:createNextMultichainAccountGroup`;\n  handler: MultichainAccountService['createNextMultichainAccountGroup'];\n};\n\n/**\n * Creates a multichain account group.\n *\n * @param options - Options.\n * @param options.groupIndex - The group index to use.\n * @param options.entropySource - The wallet's entropy source.\n * @returns The multichain account group for this group index.\n */\nexport type MultichainAccountServiceCreateMultichainAccountGroupAction = {\n  type: `MultichainAccountService:createMultichainAccountGroup`;\n  handler: MultichainAccountService['createMultichainAccountGroup'];\n};\n\n/**\n * Creates multiple multichain account groups up to maxGroupIndex.\n *\n * @param params - Parameters for creating account groups.\n * @param params.fromGroupIndex - Starting group index to create (inclusive) (defaults to 0).\n * @param params.toGroupIndex - Maximum group index to create (inclusive).\n * @param params.entropySource - The entropy source ID.\n * @returns Array of created multichain account groups.\n */\nexport type MultichainAccountServiceCreateMultichainAccountGroupsAction = {\n  type: `MultichainAccountService:createMultichainAccountGroups`;\n  handler: MultichainAccountService['createMultichainAccountGroups'];\n};\n\n/**\n * Set basic functionality state and trigger alignment if enabled.\n * When basic functionality is disabled, snap-based providers are disabled.\n * When enabled, all snap providers are enabled and wallet alignment is triggered.\n * EVM providers are never disabled as they're required for basic wallet functionality.\n *\n * @param enabled - Whether basic functionality is enabled.\n */\nexport type MultichainAccountServiceSetBasicFunctionalityAction = {\n  type: `MultichainAccountService:setBasicFunctionality`;\n  handler: MultichainAccountService['setBasicFunctionality'];\n};\n\n/**\n * Align all multichain account wallets.\n */\nexport type MultichainAccountServiceAlignWalletsAction = {\n  type: `MultichainAccountService:alignWallets`;\n  handler: MultichainAccountService['alignWallets'];\n};\n\n/**\n * Align a specific multichain account wallet.\n *\n * @param entropySource - The entropy source of the multichain account wallet.\n */\nexport type MultichainAccountServiceAlignWalletAction = {\n  type: `MultichainAccountService:alignWallet`;\n  handler: MultichainAccountService['alignWallet'];\n};\n\n/**\n * Union of all MultichainAccountService action types.\n */\nexport type MultichainAccountServiceMethodActions =\n  | MultichainAccountServiceInitAction\n  | MultichainAccountServiceResyncAccountsAction\n  | MultichainAccountServiceGetMultichainAccountWalletAction\n  | MultichainAccountServiceGetMultichainAccountWalletsAction\n  | MultichainAccountServiceCreateMultichainAccountWalletAction\n  | MultichainAccountServiceRemoveMultichainAccountWalletAction\n  | MultichainAccountServiceGetMultichainAccountGroupAction\n  | MultichainAccountServiceGetMultichainAccountGroupsAction\n  | MultichainAccountServiceCreateNextMultichainAccountGroupAction\n  | MultichainAccountServiceCreateMultichainAccountGroupAction\n  | MultichainAccountServiceCreateMultichainAccountGroupsAction\n  | MultichainAccountServiceSetBasicFunctionalityAction\n  | MultichainAccountServiceAlignWalletsAction\n  | MultichainAccountServiceAlignWalletAction;\n"]}