{"version":3,"file":"TokensController-method-action-types.cjs","sourceRoot":"","sources":["../src/TokensController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { TokensController } from './TokensController';\n\n/**\n * Adds a token to the stored token list.\n *\n * @param options - The method argument object.\n * @param options.address - Hex address of the token contract.\n * @param options.symbol - Symbol of the token.\n * @param options.decimals - Number of decimals the token uses.\n * @param options.name - Name of the token.\n * @param options.image - Image of the token.\n * @param options.interactingAddress - The address of the account to add a token to.\n * @param options.networkClientId - Network Client ID.\n * @param options.rwaData - Optional RWA data for the token.\n * @returns Current token list.\n */\nexport type TokensControllerAddTokenAction = {\n  type: `TokensController:addToken`;\n  handler: TokensController['addToken'];\n};\n\n/**\n * Add a batch of tokens.\n *\n * @param tokensToImport - Array of tokens to import.\n * @param networkClientId - Optional network client ID used to determine interacting chain ID.\n */\nexport type TokensControllerAddTokensAction = {\n  type: `TokensController:addTokens`;\n  handler: TokensController['addTokens'];\n};\n\n/**\n * Ignore a batch of tokens.\n *\n * @param tokenAddressesToIgnore - Array of token addresses to ignore.\n * @param networkClientId - Optional network client ID used to determine interacting chain ID.\n */\nexport type TokensControllerIgnoreTokensAction = {\n  type: `TokensController:ignoreTokens`;\n  handler: TokensController['ignoreTokens'];\n};\n\n/**\n * Adds a batch of detected tokens to the stored token list.\n *\n * @param incomingDetectedTokens - Array of detected tokens to be added or updated.\n * @param detectionDetails - An object containing the chain ID and address of the currently selected network on which the incomingDetectedTokens were detected.\n * @param detectionDetails.selectedAddress - the account address on which the incomingDetectedTokens were detected.\n * @param detectionDetails.chainId - the chainId on which the incomingDetectedTokens were detected.\n */\nexport type TokensControllerAddDetectedTokensAction = {\n  type: `TokensController:addDetectedTokens`;\n  handler: TokensController['addDetectedTokens'];\n};\n\n/**\n * Adds isERC721 field to token object. This is called when a user attempts to add tokens that\n * were previously added which do not yet had isERC721 field.\n *\n * @param tokenAddress - The contract address of the token requiring the isERC721 field added.\n * @param networkClientId - The network client ID of the network on which the token is detected.\n * @returns The new token object with the added isERC721 field.\n */\nexport type TokensControllerUpdateTokenTypeAction = {\n  type: `TokensController:updateTokenType`;\n  handler: TokensController['updateTokenType'];\n};\n\n/**\n * Adds a new suggestedAsset to the list of watched assets.\n * Parameters will be validated according to the asset type being watched.\n *\n * @param options - The method options.\n * @param options.asset - The asset to be watched. For now only ERC20 tokens are accepted.\n * @param options.type - The asset type.\n * @param options.interactingAddress - The address of the account that is requesting to watch the asset.\n * @param options.networkClientId - Network Client ID.\n * @param options.origin - The origin to set on the approval request.\n * @param options.pageMeta - The metadata for the page initiating the request.\n * @param options.requestMetadata - Metadata for the request, including pageMeta and origin.\n * @returns A promise that resolves if the asset was watched successfully, and rejects otherwise.\n */\nexport type TokensControllerWatchAssetAction = {\n  type: `TokensController:watchAsset`;\n  handler: TokensController['watchAsset'];\n};\n\n/**\n * Removes all tokens from the ignored list.\n */\nexport type TokensControllerClearIgnoredTokensAction = {\n  type: `TokensController:clearIgnoredTokens`;\n  handler: TokensController['clearIgnoredTokens'];\n};\n\n/**\n * Reset the controller state to the default state.\n */\nexport type TokensControllerResetStateAction = {\n  type: `TokensController:resetState`;\n  handler: TokensController['resetState'];\n};\n\n/**\n * Union of all TokensController action types.\n */\nexport type TokensControllerMethodActions =\n  | TokensControllerAddTokenAction\n  | TokensControllerAddTokensAction\n  | TokensControllerIgnoreTokensAction\n  | TokensControllerAddDetectedTokensAction\n  | TokensControllerUpdateTokenTypeAction\n  | TokensControllerWatchAssetAction\n  | TokensControllerClearIgnoredTokensAction\n  | TokensControllerResetStateAction;\n"]}