@metamask/assets-controllers 13.0.0 → 15.0.0

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.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,55 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [15.0.0]
10
+ ### Changed
11
+ - **BREAKING**: `NftController` now expects `getNetworkClientById` in constructor options ([#1698](https://github.com/MetaMask/core/pull/1698))
12
+ - **BREAKING**: `NftController.addNft` function signature has changed ([#1698](https://github.com/MetaMask/core/pull/1698))
13
+ - Previously
14
+ ```
15
+ address: string,
16
+ tokenId: string,
17
+ nftMetadata?: NftMetadata,
18
+ accountParams?: {
19
+ userAddress: string;
20
+ chainId: Hex;
21
+ },
22
+ source = Source.Custom,
23
+ ```
24
+ now:
25
+ ```
26
+ tokenAddress: string,
27
+ tokenId: string,
28
+ {
29
+ nftMetadata?: NftMetadata;
30
+ chainId?: Hex; // extracts from AccountParams
31
+ userAddress?: string // extracted from AccountParams
32
+ source?: Source;
33
+ networkClientId?: NetworkClientId; // new
34
+ },
35
+ ```
36
+ - `NftController.addNftVerifyOwnership`: Now accepts optional 3rd argument `networkClientId` which is used to fetch NFT metadata and determine by which chainId the added NFT should be stored in state. Also accepts optional 4th argument `source` used for metrics to identify the flow in which the NFT was added to the wallet. ([#1698](https://github.com/MetaMask/core/pull/1698))
37
+ - `NftController.isNftOwner`: Now accepts optional `networkClientId` which is used to instantiate the provider for the correct chain and call the NFT contract to verify ownership ([#1698](https://github.com/MetaMask/core/pull/1698))
38
+ - `NftController.addNft` will use the chainId value derived from `networkClientId` if provided ([#1698](https://github.com/MetaMask/core/pull/1698))
39
+ - `NftController.watchNft` options now accepts optional `networkClientId` which is used to fetch NFT metadata and determine by which chainId the added NFT should be stored in state ([#1698](https://github.com/MetaMask/core/pull/1698))
40
+ - Bump dependency on `@metamask/utils` to ^8.1.0 ([#1639](https://github.com/MetaMask/core/pull/1639))
41
+ - Bump dependency and peer dependency on `@metamask/approval-controller` to ^4.0.0
42
+ - Bump dependency on `@metamask/base-controller` to ^3.2.3
43
+ - Bump dependency on `@metamask/controller-utils` to ^5.0.2
44
+ - Bump dependency and peer dependency on `@metamask/network-controller` to ^14.0.0
45
+
46
+ ### Fixed
47
+ - Fix bug in TokensController where batched `addToken` overwrote each other because mutex was acquired after reading state ([#1768](https://github.com/MetaMask/core/pull/1768))
48
+
49
+ ## [14.0.0]
50
+ ### Changed
51
+ - Update TypeScript to v4.8.x ([#1718](https://github.com/MetaMask/core/pull/1718))
52
+ - Update `@metamask/rpc-errors` to `^6.0.0` ([#1690](https://github.com/MetaMask/core/pull/1690))
53
+
54
+ ### Removed
55
+ - **BREAKING:** Remove AbortController polyfill
56
+ - This package now assumes that the AbortController global exists
57
+
9
58
  ## [13.0.0]
10
59
  ### Changed
11
60
  - **BREAKING**: `TokensController` now expects `getNetworkClientById` in constructor options ([#1676](https://github.com/MetaMask/core/pull/1676))
@@ -271,7 +320,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
271
320
  ### Changed
272
321
  - Use Ethers for AssetsContractController ([#845](https://github.com/MetaMask/core/pull/845))
273
322
 
274
- [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@13.0.0...HEAD
323
+ [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@15.0.0...HEAD
324
+ [15.0.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@14.0.0...@metamask/assets-controllers@15.0.0
325
+ [14.0.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@13.0.0...@metamask/assets-controllers@14.0.0
275
326
  [13.0.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@12.0.0...@metamask/assets-controllers@13.0.0
276
327
  [12.0.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@11.1.0...@metamask/assets-controllers@12.0.0
277
328
  [11.1.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@11.0.1...@metamask/assets-controllers@11.1.0
@@ -2,7 +2,7 @@
2
2
  import type { AddApprovalRequest } from '@metamask/approval-controller';
3
3
  import type { BaseConfig, BaseState, RestrictedControllerMessenger } from '@metamask/base-controller';
4
4
  import { BaseController } from '@metamask/base-controller';
5
- import type { NetworkState } from '@metamask/network-controller';
5
+ import type { NetworkClientId, NetworkController, NetworkState } from '@metamask/network-controller';
6
6
  import type { PreferencesState } from '@metamask/preferences-controller';
7
7
  import type { Hex } from '@metamask/utils';
8
8
  import { EventEmitter } from 'events';
@@ -111,10 +111,6 @@ export interface NftMetadata {
111
111
  transactionId?: string;
112
112
  tokenURI?: string | null;
113
113
  }
114
- interface AccountParams {
115
- userAddress: string;
116
- chainId: Hex;
117
- }
118
114
  /**
119
115
  * @type NftConfig
120
116
  *
@@ -197,6 +193,7 @@ export declare class NftController extends BaseController<NftConfig, NftState> {
197
193
  *
198
194
  * @param contractAddress - Hex address of the NFT contract.
199
195
  * @param tokenId - The NFT identifier.
196
+ * @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
200
197
  * @returns Promise resolving to the current NFT name and image.
201
198
  */
202
199
  private getNftInformationFromTokenURI;
@@ -205,6 +202,7 @@ export declare class NftController extends BaseController<NftConfig, NftState> {
205
202
  *
206
203
  * @param contractAddress - NFT contract address.
207
204
  * @param tokenId - NFT token id.
205
+ * @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
208
206
  * @returns Promise resolving NFT uri and token standard.
209
207
  */
210
208
  private getNftURIAndStandard;
@@ -213,6 +211,7 @@ export declare class NftController extends BaseController<NftConfig, NftState> {
213
211
  *
214
212
  * @param contractAddress - Hex address of the NFT contract.
215
213
  * @param tokenId - The NFT identifier.
214
+ * @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
216
215
  * @returns Promise resolving to the current NFT name and image.
217
216
  */
218
217
  private getNftInformation;
@@ -227,6 +226,7 @@ export declare class NftController extends BaseController<NftConfig, NftState> {
227
226
  * Request NFT contract information from the contract itself.
228
227
  *
229
228
  * @param contractAddress - Hex address of the NFT contract.
229
+ * @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
230
230
  * @returns Promise resolving to the current NFT name and image.
231
231
  */
232
232
  private getNftContractInformationFromContract;
@@ -234,17 +234,19 @@ export declare class NftController extends BaseController<NftConfig, NftState> {
234
234
  * Request NFT contract information from OpenSea API.
235
235
  *
236
236
  * @param contractAddress - Hex address of the NFT contract.
237
+ * @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
237
238
  * @returns Promise resolving to the NFT contract name, image and description.
238
239
  */
239
240
  private getNftContractInformation;
240
241
  /**
241
242
  * Adds an individual NFT to the stored NFT list.
242
243
  *
243
- * @param address - Hex address of the NFT contract.
244
+ * @param tokenAddress - Hex address of the NFT contract.
244
245
  * @param tokenId - The NFT identifier.
245
246
  * @param nftMetadata - NFT optional information (name, image and description).
246
247
  * @param nftContract - An object containing contract data of the NFT being added.
247
- * @param accountParams - The chain ID and address of network and account to which the nftContract should be added.
248
+ * @param chainId - The chainId of the network where the NFT is being added.
249
+ * @param userAddress - The address of the account where the NFT is being added.
248
250
  * @param source - Whether the NFT was detected, added manually or suggested by a dapp.
249
251
  * @returns Promise resolving to the current NFT list.
250
252
  */
@@ -252,9 +254,12 @@ export declare class NftController extends BaseController<NftConfig, NftState> {
252
254
  /**
253
255
  * Adds an NFT contract to the stored NFT contracts list.
254
256
  *
255
- * @param address - Hex address of the NFT contract.
256
- * @param accountParams - The chain ID and address of network and account to which the nftContract should be added.
257
- * @param source - Whether the NFT was detected, added manually or suggested by a dapp.
257
+ * @param options - options.
258
+ * @param options.tokenAddress - Hex address of the NFT contract.
259
+ * @param options.chainId - The chainId of the network where the NFT is being added.
260
+ * @param options.userAddress - The address of the account where the NFT is being added.
261
+ * @param options.networkClientId - The networkClientId that can be used to identify the network client to use for this request.
262
+ * @param options.source - Whether the NFT was detected, added manually or suggested by a dapp.
258
263
  * @returns Promise resolving to the current NFT contracts list.
259
264
  */
260
265
  private addNftContract;
@@ -297,6 +302,7 @@ export declare class NftController extends BaseController<NftConfig, NftState> {
297
302
  private readonly getERC721OwnerOf;
298
303
  private readonly getERC1155BalanceOf;
299
304
  private readonly getERC1155TokenURI;
305
+ private readonly getNetworkClientById;
300
306
  private readonly onNftAdded?;
301
307
  /**
302
308
  * Creates an NftController instance.
@@ -311,13 +317,14 @@ export declare class NftController extends BaseController<NftConfig, NftState> {
311
317
  * @param options.getERC721OwnerOf - Get the owner of a ERC-721 NFT.
312
318
  * @param options.getERC1155BalanceOf - Gets balance of a ERC-1155 NFT.
313
319
  * @param options.getERC1155TokenURI - Gets the URI of the ERC1155 token at the given address, with the given ID.
320
+ * @param options.getNetworkClientById - Gets the network client for the given networkClientId.
314
321
  * @param options.onNftAdded - Callback that is called when an NFT is added. Currently used pass data
315
322
  * for tracking the NFT added event.
316
323
  * @param options.messenger - The controller messenger.
317
324
  * @param config - Initial options used to configure this controller.
318
325
  * @param state - Initial state to set on this controller.
319
326
  */
320
- constructor({ chainId: initialChainId, onPreferencesStateChange, onNetworkStateChange, getERC721AssetName, getERC721AssetSymbol, getERC721TokenURI, getERC721OwnerOf, getERC1155BalanceOf, getERC1155TokenURI, onNftAdded, messenger, }: {
327
+ constructor({ chainId: initialChainId, onPreferencesStateChange, onNetworkStateChange, getERC721AssetName, getERC721AssetSymbol, getERC721TokenURI, getERC721OwnerOf, getERC1155BalanceOf, getERC1155TokenURI, getNetworkClientById, onNftAdded, messenger, }: {
321
328
  chainId: Hex;
322
329
  onPreferencesStateChange: (listener: (preferencesState: PreferencesState) => void) => void;
323
330
  onNetworkStateChange: (listener: (networkState: NetworkState) => void) => void;
@@ -327,6 +334,7 @@ export declare class NftController extends BaseController<NftConfig, NftState> {
327
334
  getERC721OwnerOf: AssetsContractController['getERC721OwnerOf'];
328
335
  getERC1155BalanceOf: AssetsContractController['getERC1155BalanceOf'];
329
336
  getERC1155TokenURI: AssetsContractController['getERC1155TokenURI'];
337
+ getNetworkClientById: NetworkController['getNetworkClientById'];
330
338
  onNftAdded?: (data: {
331
339
  address: string;
332
340
  symbol: string | undefined;
@@ -336,7 +344,8 @@ export declare class NftController extends BaseController<NftConfig, NftState> {
336
344
  }) => void;
337
345
  messenger: NftControllerMessenger;
338
346
  }, config?: Partial<BaseConfig>, state?: Partial<NftState>);
339
- validateWatchNft(asset: NftAsset, type: NFTStandardType, accountAddress: string): Promise<void>;
347
+ validateWatchNft(asset: NftAsset, type: NFTStandardType, userAddress: string): Promise<void>;
348
+ private getCorrectChainId;
340
349
  /**
341
350
  * Adds a new suggestedAsset to state. Parameters will be validated according to
342
351
  * asset type being watched. A `<suggestedNftMeta.id>:pending` hub event will be emitted once added.
@@ -346,9 +355,10 @@ export declare class NftController extends BaseController<NftConfig, NftState> {
346
355
  * @param asset.tokenId - The ID of the asset.
347
356
  * @param type - The asset type.
348
357
  * @param origin - Domain origin to register the asset from.
358
+ * @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
349
359
  * @returns Object containing a Promise resolving to the suggestedAsset address if accepted.
350
360
  */
351
- watchNft(asset: NftAsset, type: NFTStandardType, origin: string): Promise<void>;
361
+ watchNft(asset: NftAsset, type: NFTStandardType, origin: string, networkClientId?: NetworkClientId): Promise<void>;
352
362
  /**
353
363
  * Sets an OpenSea API key to retrieve NFT information.
354
364
  *
@@ -360,29 +370,42 @@ export declare class NftController extends BaseController<NftConfig, NftState> {
360
370
  *
361
371
  * @param ownerAddress - User public address.
362
372
  * @param nftAddress - NFT contract address.
363
- * @param nftId - NFT token ID.
373
+ * @param tokenId - NFT token ID.
374
+ * @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
364
375
  * @returns Promise resolving the NFT ownership.
365
376
  */
366
- isNftOwner(ownerAddress: string, nftAddress: string, nftId: string): Promise<boolean>;
377
+ isNftOwner(ownerAddress: string, nftAddress: string, tokenId: string, networkClientId?: NetworkClientId): Promise<boolean>;
367
378
  /**
368
379
  * Verifies currently selected address owns entered NFT address/tokenId combo and
369
380
  * adds the NFT and respective NFT contract to the stored NFT and NFT contracts lists.
370
381
  *
371
382
  * @param address - Hex address of the NFT contract.
372
383
  * @param tokenId - The NFT identifier.
384
+ * @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
385
+ * @param source - Whether the NFT was detected, added manually or suggested by a dapp.
373
386
  */
374
- addNftVerifyOwnership(address: string, tokenId: string): Promise<void>;
387
+ addNftVerifyOwnership(address: string, tokenId: string, networkClientId?: NetworkClientId, source?: Source): Promise<void>;
375
388
  /**
376
389
  * Adds an NFT and respective NFT contract to the stored NFT and NFT contracts lists.
377
390
  *
378
- * @param address - Hex address of the NFT contract.
391
+ * @param tokenAddress - Hex address of the NFT contract.
379
392
  * @param tokenId - The NFT identifier.
380
- * @param nftMetadata - NFT optional metadata.
381
- * @param accountParams - The chain ID and address of network and account to which the nftContract should be added.
382
- * @param source - Whether the NFT was detected, added manually or suggested by a dapp.
393
+ * @param options - an object of arguments
394
+ * @param options.nftMetadata - NFT optional metadata.
395
+ * @param options.chainId - The chain ID of the current network.
396
+ * @param options.userAddress - The address of the current user.
397
+ * @param options.source - Whether the NFT was detected, added manually or suggested by a dapp.
398
+ * @param options.networkClientId - The networkClientId that can be used to identify the network client to use for this request.
383
399
  * @returns Promise resolving to the current NFT list.
384
400
  */
385
- addNft(address: string, tokenId: string, nftMetadata?: NftMetadata, accountParams?: AccountParams, source?: Source): Promise<void>;
401
+ addNft(tokenAddress: string, tokenId: string, { nftMetadata, chainId, // TODO remove and replace chainId arg with fetch chainId using getNetworkClientById(networkClientId).configuration.chainId once polling refactor is complete
402
+ userAddress, source, networkClientId, }?: {
403
+ nftMetadata?: NftMetadata;
404
+ chainId?: Hex;
405
+ userAddress?: string;
406
+ source?: Source;
407
+ networkClientId?: NetworkClientId;
408
+ }): Promise<void>;
386
409
  /**
387
410
  * Removes an NFT from the stored token list.
388
411
  *
@@ -1 +1 @@
1
- {"version":3,"file":"NftController.d.ts","sourceRoot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