Skip to main content

NftDetectionController Actions

1 action registered.

NameDeprecated
detectNfts

NftDetectionController:detectNfts​

Package: @metamask/assets-controllers

Triggers asset ERC721 token auto detection on mainnet. Any newly detected NFTs are added.

Parameters:

NameDescription
chainIdsThe chain IDs to detect NFTs on.
optionsOptions bag.
options.userAddressThe address to detect NFTs for.
options.firstPageOnlyWhether to only detect the first page of NFTs.
options.signalAn optional abort signal to cancel the operation.

Handler signature:

(chainIds: Hex[], options?: {
userAddress?: string;
firstPageOnly?: boolean;
signal?: AbortSignal;
}) => Promise<void>