@metamask-previews/assets-controllers 65.0.0-preview-e5f15167 → 65.0.0-preview-d75f4283
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 +0 -2
- package/dist/NftController.cjs +84 -82
- package/dist/NftController.cjs.map +1 -1
- package/dist/NftController.d.cts +41 -26
- package/dist/NftController.d.cts.map +1 -1
- package/dist/NftController.d.mts +41 -26
- package/dist/NftController.d.mts.map +1 -1
- package/dist/NftController.mjs +85 -83
- package/dist/NftController.mjs.map +1 -1
- package/dist/NftDetectionController.cjs +2 -2
- package/dist/NftDetectionController.cjs.map +1 -1
- package/dist/NftDetectionController.d.cts +1 -2
- package/dist/NftDetectionController.d.cts.map +1 -1
- package/dist/NftDetectionController.d.mts +1 -2
- package/dist/NftDetectionController.d.mts.map +1 -1
- package/dist/NftDetectionController.mjs +2 -2
- package/dist/NftDetectionController.mjs.map +1 -1
- package/package.json +1 -1
package/dist/NftController.d.cts
CHANGED
@@ -2,15 +2,14 @@ import type { AccountsControllerSelectedEvmAccountChangeEvent, AccountsControlle
|
|
2
2
|
import type { AddApprovalRequest } from "@metamask/approval-controller";
|
3
3
|
import type { RestrictedMessenger, ControllerStateChangeEvent } from "@metamask/base-controller";
|
4
4
|
import { BaseController, type ControllerGetStateAction } from "@metamask/base-controller";
|
5
|
-
import type { NetworkClientId, NetworkControllerGetNetworkClientByIdAction } from "@metamask/network-controller";
|
5
|
+
import type { NetworkClientId, NetworkControllerGetNetworkClientByIdAction, NetworkControllerNetworkDidChangeEvent } from "@metamask/network-controller";
|
6
6
|
import type { BulkPhishingDetectionScanResponse } from "@metamask/phishing-controller";
|
7
7
|
import type { PreferencesControllerStateChangeEvent } from "@metamask/preferences-controller";
|
8
8
|
import type { Hex } from "@metamask/utils";
|
9
9
|
import type { AssetsContractControllerGetERC1155BalanceOfAction, AssetsContractControllerGetERC1155TokenURIAction, AssetsContractControllerGetERC721AssetNameAction, AssetsContractControllerGetERC721AssetSymbolAction, AssetsContractControllerGetERC721OwnerOfAction, AssetsContractControllerGetERC721TokenURIAction } from "./AssetsContractController.cjs";
|
10
10
|
import { Source } from "./constants.cjs";
|
11
11
|
import type { Collection, Attributes, LastSale, TopBid } from "./NftDetectionController.cjs";
|
12
|
-
|
13
|
-
export type NFTStandardType = 'ERC721' | 'ERC1155';
|
12
|
+
type NFTStandardType = 'ERC721' | 'ERC1155';
|
14
13
|
type SuggestedNftMeta = {
|
15
14
|
asset: {
|
16
15
|
address: string;
|
@@ -159,8 +158,8 @@ export type PhishingControllerBulkScanUrlsAction = {
|
|
159
158
|
/**
|
160
159
|
* The external actions available to the {@link NftController}.
|
161
160
|
*/
|
162
|
-
export type AllowedActions = AddApprovalRequest | AccountsControllerGetAccountAction | AccountsControllerGetSelectedAccountAction | NetworkControllerGetNetworkClientByIdAction | AssetsContractControllerGetERC721AssetNameAction | AssetsContractControllerGetERC721AssetSymbolAction | AssetsContractControllerGetERC721TokenURIAction | AssetsContractControllerGetERC721OwnerOfAction | AssetsContractControllerGetERC1155BalanceOfAction | AssetsContractControllerGetERC1155TokenURIAction |
|
163
|
-
export type AllowedEvents = PreferencesControllerStateChangeEvent | AccountsControllerSelectedEvmAccountChangeEvent;
|
161
|
+
export type AllowedActions = AddApprovalRequest | AccountsControllerGetAccountAction | AccountsControllerGetSelectedAccountAction | NetworkControllerGetNetworkClientByIdAction | AssetsContractControllerGetERC721AssetNameAction | AssetsContractControllerGetERC721AssetSymbolAction | AssetsContractControllerGetERC721TokenURIAction | AssetsContractControllerGetERC721OwnerOfAction | AssetsContractControllerGetERC1155BalanceOfAction | AssetsContractControllerGetERC1155TokenURIAction | PhishingControllerBulkScanUrlsAction;
|
162
|
+
export type AllowedEvents = PreferencesControllerStateChangeEvent | NetworkControllerNetworkDidChangeEvent | AccountsControllerSelectedEvmAccountChangeEvent;
|
164
163
|
export type NftControllerStateChangeEvent = ControllerStateChangeEvent<typeof controllerName, NftControllerState>;
|
165
164
|
export type NftControllerEvents = NftControllerStateChangeEvent;
|
166
165
|
/**
|
@@ -181,6 +180,7 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
181
180
|
* Creates an NftController instance.
|
182
181
|
*
|
183
182
|
* @param options - The controller options.
|
183
|
+
* @param options.chainId - The chain ID of the current network.
|
184
184
|
* @param options.ipfsGateway - The configured IPFS gateway.
|
185
185
|
* @param options.openSeaEnabled - Controls whether the OpenSea API is used.
|
186
186
|
* @param options.useIpfsSubdomains - Controls whether IPFS subdomains are used.
|
@@ -190,7 +190,8 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
190
190
|
* @param options.messenger - The messenger.
|
191
191
|
* @param options.state - Initial state to set on this controller.
|
192
192
|
*/
|
193
|
-
constructor({ ipfsGateway, openSeaEnabled, useIpfsSubdomains, isIpfsGatewayEnabled, onNftAdded, messenger, state, }: {
|
193
|
+
constructor({ chainId: initialChainId, ipfsGateway, openSeaEnabled, useIpfsSubdomains, isIpfsGatewayEnabled, onNftAdded, messenger, state, }: {
|
194
|
+
chainId: Hex;
|
194
195
|
ipfsGateway?: string;
|
195
196
|
openSeaEnabled?: boolean;
|
196
197
|
useIpfsSubdomains?: boolean;
|
@@ -215,12 +216,13 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
215
216
|
* @param asset.tokenId - The ID of the asset.
|
216
217
|
* @param type - The asset type.
|
217
218
|
* @param origin - Domain origin to register the asset from.
|
218
|
-
* @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
219
219
|
* @param options - Options bag.
|
220
|
+
* @param options.networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
220
221
|
* @param options.userAddress - The address of the account where the NFT is being added.
|
221
222
|
* @returns Object containing a Promise resolving to the suggestedAsset address if accepted.
|
222
223
|
*/
|
223
|
-
watchNft(asset: NftAsset, type: NFTStandardType, origin: string, networkClientId
|
224
|
+
watchNft(asset: NftAsset, type: NFTStandardType, origin: string, { networkClientId, userAddress, }?: {
|
225
|
+
networkClientId?: NetworkClientId;
|
224
226
|
userAddress?: string;
|
225
227
|
}): Promise<void>;
|
226
228
|
/**
|
@@ -235,23 +237,27 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
235
237
|
* @param ownerAddress - User public address.
|
236
238
|
* @param nftAddress - NFT contract address.
|
237
239
|
* @param tokenId - NFT token ID.
|
238
|
-
* @param
|
240
|
+
* @param options - Options bag.
|
241
|
+
* @param options.networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
239
242
|
* @returns Promise resolving the NFT ownership.
|
240
243
|
*/
|
241
|
-
isNftOwner(ownerAddress: string, nftAddress: string, tokenId: string, networkClientId
|
244
|
+
isNftOwner(ownerAddress: string, nftAddress: string, tokenId: string, { networkClientId, }?: {
|
245
|
+
networkClientId?: NetworkClientId;
|
246
|
+
}): Promise<boolean>;
|
242
247
|
/**
|
243
248
|
* Verifies currently selected address owns entered NFT address/tokenId combo and
|
244
249
|
* adds the NFT and respective NFT contract to the stored NFT and NFT contracts lists.
|
245
250
|
*
|
246
251
|
* @param address - Hex address of the NFT contract.
|
247
252
|
* @param tokenId - The NFT identifier.
|
248
|
-
* @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
249
253
|
* @param options - an object of arguments
|
250
254
|
* @param options.userAddress - The address of the current user.
|
255
|
+
* @param options.networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
251
256
|
* @param options.source - Whether the NFT was detected, added manually or suggested by a dapp.
|
252
257
|
*/
|
253
|
-
addNftVerifyOwnership(address: string, tokenId: string,
|
258
|
+
addNftVerifyOwnership(address: string, tokenId: string, { userAddress, networkClientId, source, }?: {
|
254
259
|
userAddress?: string;
|
260
|
+
networkClientId?: NetworkClientId;
|
255
261
|
source?: Source;
|
256
262
|
}): Promise<void>;
|
257
263
|
/**
|
@@ -259,17 +265,20 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
259
265
|
*
|
260
266
|
* @param tokenAddress - Hex address of the NFT contract.
|
261
267
|
* @param tokenId - The NFT identifier.
|
262
|
-
* @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
263
268
|
* @param options - an object of arguments
|
264
269
|
* @param options.nftMetadata - NFT optional metadata.
|
265
270
|
* @param options.userAddress - The address of the current user.
|
266
271
|
* @param options.source - Whether the NFT was detected, added manually or suggested by a dapp.
|
272
|
+
* @param options.networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
273
|
+
* @param options.chainId - The chain ID to add the NFT to.
|
267
274
|
* @returns Promise resolving to the current NFT list.
|
268
275
|
*/
|
269
|
-
addNft(tokenAddress: string, tokenId: string,
|
276
|
+
addNft(tokenAddress: string, tokenId: string, { nftMetadata, userAddress, source, networkClientId, chainId, }?: {
|
270
277
|
nftMetadata?: NftMetadata;
|
271
278
|
userAddress?: string;
|
272
279
|
source?: Source;
|
280
|
+
networkClientId?: NetworkClientId;
|
281
|
+
chainId?: Hex;
|
273
282
|
}): Promise<void>;
|
274
283
|
/**
|
275
284
|
* Refetches NFT metadata and updates the state
|
@@ -277,21 +286,24 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
277
286
|
* @param options - Options for refetching NFT metadata
|
278
287
|
* @param options.nfts - nfts to update metadata for.
|
279
288
|
* @param options.userAddress - The current user address
|
289
|
+
* @param options.networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
280
290
|
*/
|
281
|
-
updateNftMetadata({ nfts, userAddress, }: {
|
291
|
+
updateNftMetadata({ nfts, userAddress, networkClientId, }: {
|
282
292
|
nfts: Nft[];
|
283
293
|
userAddress?: string;
|
294
|
+
networkClientId?: NetworkClientId;
|
284
295
|
}): Promise<void>;
|
285
296
|
/**
|
286
297
|
* Removes an NFT from the stored token list.
|
287
298
|
*
|
288
299
|
* @param address - Hex address of the NFT contract.
|
289
300
|
* @param tokenId - Token identifier of the NFT.
|
290
|
-
* @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
291
301
|
* @param options - an object of arguments
|
302
|
+
* @param options.networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
292
303
|
* @param options.userAddress - The address of the account where the NFT is being removed.
|
293
304
|
*/
|
294
|
-
removeNft(address: string, tokenId: string, networkClientId
|
305
|
+
removeNft(address: string, tokenId: string, { networkClientId, userAddress, }?: {
|
306
|
+
networkClientId?: NetworkClientId;
|
295
307
|
userAddress?: string;
|
296
308
|
}): void;
|
297
309
|
/**
|
@@ -299,11 +311,12 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
299
311
|
*
|
300
312
|
* @param address - Hex address of the NFT contract.
|
301
313
|
* @param tokenId - Token identifier of the NFT.
|
302
|
-
* @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
303
314
|
* @param options - an object of arguments
|
315
|
+
* @param options.networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
304
316
|
* @param options.userAddress - The address of the account where the NFT is being removed.
|
305
317
|
*/
|
306
|
-
removeAndIgnoreNft(address: string, tokenId: string, networkClientId
|
318
|
+
removeAndIgnoreNft(address: string, tokenId: string, { networkClientId, userAddress, }?: {
|
319
|
+
networkClientId?: NetworkClientId;
|
307
320
|
userAddress?: string;
|
308
321
|
}): void;
|
309
322
|
/**
|
@@ -316,12 +329,13 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
316
329
|
*
|
317
330
|
* @param nft - The NFT object to check and update.
|
318
331
|
* @param batch - A boolean indicating whether this method is being called as part of a batch or single update.
|
319
|
-
* @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
320
332
|
* @param accountParams - The userAddress and chainId to check ownership against
|
321
333
|
* @param accountParams.userAddress - the address passed through the confirmed transaction flow to ensure assets are stored to the correct account
|
334
|
+
* @param accountParams.networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
322
335
|
* @returns the NFT with the updated isCurrentlyOwned value
|
323
336
|
*/
|
324
|
-
checkAndUpdateSingleNftOwnershipStatus(nft: Nft, batch: boolean,
|
337
|
+
checkAndUpdateSingleNftOwnershipStatus(nft: Nft, batch: boolean, { userAddress, networkClientId, }?: {
|
338
|
+
networkClientId?: NetworkClientId;
|
325
339
|
userAddress?: string;
|
326
340
|
}): Promise<{
|
327
341
|
isCurrentlyOwned: boolean | undefined;
|
@@ -353,12 +367,12 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
353
367
|
/**
|
354
368
|
* Checks whether NFTs associated with current selectedAddress/chainId combination are still owned by the user
|
355
369
|
* And updates the isCurrentlyOwned value on each accordingly.
|
356
|
-
*
|
357
|
-
* @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
358
370
|
* @param options - an object of arguments
|
371
|
+
* @param options.networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
359
372
|
* @param options.userAddress - The address of the account where the NFT ownership status is checked/updated.
|
360
373
|
*/
|
361
|
-
checkAndUpdateAllNftsOwnershipStatus(networkClientId
|
374
|
+
checkAndUpdateAllNftsOwnershipStatus({ networkClientId, userAddress, }?: {
|
375
|
+
networkClientId?: NetworkClientId;
|
362
376
|
userAddress?: string;
|
363
377
|
}): Promise<void>;
|
364
378
|
/**
|
@@ -367,11 +381,12 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
367
381
|
* @param address - Hex address of the NFT contract.
|
368
382
|
* @param tokenId - Hex address of the NFT contract.
|
369
383
|
* @param favorite - NFT new favorite status.
|
370
|
-
* @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
371
384
|
* @param options - an object of arguments
|
385
|
+
* @param options.networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
372
386
|
* @param options.userAddress - The address of the account where the NFT is being removed.
|
373
387
|
*/
|
374
|
-
updateNftFavoriteStatus(address: string, tokenId: string, favorite: boolean, networkClientId
|
388
|
+
updateNftFavoriteStatus(address: string, tokenId: string, favorite: boolean, { networkClientId, userAddress, }?: {
|
389
|
+
networkClientId?: NetworkClientId;
|
375
390
|
userAddress?: string;
|
376
391
|
}): void;
|
377
392
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NftController.d.cts","sourceRoot":"","sources":["../src/NftController.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,+CAA+C,EAC/C,kCAAkC,EAClC,0CAA0C,EAC3C,sCAAsC;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,sCAAsC;AACxE,OAAO,KAAK,EACV,mBAAmB,EACnB,0BAA0B,EAC3B,kCAAkC;AACnC,OAAO,EACL,cAAc,EACd,KAAK,wBAAwB,EAC9B,kCAAkC;
|
1
|
+
{"version":3,"file":"NftController.d.cts","sourceRoot":"","sources":["../src/NftController.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,+CAA+C,EAC/C,kCAAkC,EAClC,0CAA0C,EAC3C,sCAAsC;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,sCAAsC;AACxE,OAAO,KAAK,EACV,mBAAmB,EACnB,0BAA0B,EAC3B,kCAAkC;AACnC,OAAO,EACL,cAAc,EACd,KAAK,wBAAwB,EAC9B,kCAAkC;AAgBnC,OAAO,KAAK,EACV,eAAe,EACf,2CAA2C,EAC3C,sCAAsC,EAEvC,qCAAqC;AACtC,OAAO,KAAK,EAAE,iCAAiC,EAAE,sCAAsC;AAEvF,OAAO,KAAK,EACV,qCAAqC,EAEtC,yCAAyC;AAE1C,OAAO,KAAK,EAAE,GAAG,EAAE,wBAAwB;AAM3C,OAAO,KAAK,EACV,iDAAiD,EACjD,gDAAgD,EAChD,gDAAgD,EAChD,kDAAkD,EAClD,8CAA8C,EAC9C,+CAA+C,EAChD,uCAAmC;AAMpC,OAAO,EAAE,MAAM,EAAE,wBAAoB;AACrC,OAAO,KAAK,EAGV,UAAU,EACV,UAAU,EACV,QAAQ,EAER,MAAM,EACP,qCAAiC;AAElC,KAAK,eAAe,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE5C,KAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,WAAW,CAAC;IAC1D,EAAE,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,MAAM,EACf,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,OAAO,EACjB,EACE,eAAe,EACf,WAAW,GACZ,GAAE;QACD,eAAe,CAAC,EAAE,eAAe,CAAC;QAClC,WAAW,CAAC,EAAE,MAAM,CAAC;KACjB;IA4BR;;;;;;;;OAQG;IACH,0BAA0B,CACxB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,eAAe,EAAE,MAAM,EACvB,OAAO,EAAE,GAAG,GACX;QAAE,GAAG,EAAE,GAAG,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAgBrC;;;;;;;OAOG;IACH,SAAS,CACP,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,EACrB,eAAe,EAAE,MAAM,EACvB,OAAO,EAAE,GAAG;IA+Bd;;;;;;;OAOG;IACH,wCAAwC,CACtC,aAAa,EAAE,MAAM,EACrB,eAAe,EAAE,MAAM,EACvB,OAAO,EAAE,GAAG,GACX,OAAO;IA6BV;;;;;;OAMG;IACG,kBAAkB,CACtB,iBAAiB,EAAE,MAAM,EAAE,EAC3B,OAAO,EAAE,GAAG,GACX,OAAO,CAAC;QACT,WAAW,EAAE,UAAU,EAAE,CAAC;KAC3B,CAAC;IAgBI,gBAAgB,CAAC,gBAAgB,EAAE,gBAAgB;IAyDzD;;OAEG;IACH,UAAU;CAwHX;AAED,eAAe,aAAa,CAAC"}
|
package/dist/NftController.d.mts
CHANGED
@@ -2,15 +2,14 @@ import type { AccountsControllerSelectedEvmAccountChangeEvent, AccountsControlle
|
|
2
2
|
import type { AddApprovalRequest } from "@metamask/approval-controller";
|
3
3
|
import type { RestrictedMessenger, ControllerStateChangeEvent } from "@metamask/base-controller";
|
4
4
|
import { BaseController, type ControllerGetStateAction } from "@metamask/base-controller";
|
5
|
-
import type { NetworkClientId, NetworkControllerGetNetworkClientByIdAction } from "@metamask/network-controller";
|
5
|
+
import type { NetworkClientId, NetworkControllerGetNetworkClientByIdAction, NetworkControllerNetworkDidChangeEvent } from "@metamask/network-controller";
|
6
6
|
import type { BulkPhishingDetectionScanResponse } from "@metamask/phishing-controller";
|
7
7
|
import type { PreferencesControllerStateChangeEvent } from "@metamask/preferences-controller";
|
8
8
|
import type { Hex } from "@metamask/utils";
|
9
9
|
import type { AssetsContractControllerGetERC1155BalanceOfAction, AssetsContractControllerGetERC1155TokenURIAction, AssetsContractControllerGetERC721AssetNameAction, AssetsContractControllerGetERC721AssetSymbolAction, AssetsContractControllerGetERC721OwnerOfAction, AssetsContractControllerGetERC721TokenURIAction } from "./AssetsContractController.mjs";
|
10
10
|
import { Source } from "./constants.mjs";
|
11
11
|
import type { Collection, Attributes, LastSale, TopBid } from "./NftDetectionController.mjs";
|
12
|
-
|
13
|
-
export type NFTStandardType = 'ERC721' | 'ERC1155';
|
12
|
+
type NFTStandardType = 'ERC721' | 'ERC1155';
|
14
13
|
type SuggestedNftMeta = {
|
15
14
|
asset: {
|
16
15
|
address: string;
|
@@ -159,8 +158,8 @@ export type PhishingControllerBulkScanUrlsAction = {
|
|
159
158
|
/**
|
160
159
|
* The external actions available to the {@link NftController}.
|
161
160
|
*/
|
162
|
-
export type AllowedActions = AddApprovalRequest | AccountsControllerGetAccountAction | AccountsControllerGetSelectedAccountAction | NetworkControllerGetNetworkClientByIdAction | AssetsContractControllerGetERC721AssetNameAction | AssetsContractControllerGetERC721AssetSymbolAction | AssetsContractControllerGetERC721TokenURIAction | AssetsContractControllerGetERC721OwnerOfAction | AssetsContractControllerGetERC1155BalanceOfAction | AssetsContractControllerGetERC1155TokenURIAction |
|
163
|
-
export type AllowedEvents = PreferencesControllerStateChangeEvent | AccountsControllerSelectedEvmAccountChangeEvent;
|
161
|
+
export type AllowedActions = AddApprovalRequest | AccountsControllerGetAccountAction | AccountsControllerGetSelectedAccountAction | NetworkControllerGetNetworkClientByIdAction | AssetsContractControllerGetERC721AssetNameAction | AssetsContractControllerGetERC721AssetSymbolAction | AssetsContractControllerGetERC721TokenURIAction | AssetsContractControllerGetERC721OwnerOfAction | AssetsContractControllerGetERC1155BalanceOfAction | AssetsContractControllerGetERC1155TokenURIAction | PhishingControllerBulkScanUrlsAction;
|
162
|
+
export type AllowedEvents = PreferencesControllerStateChangeEvent | NetworkControllerNetworkDidChangeEvent | AccountsControllerSelectedEvmAccountChangeEvent;
|
164
163
|
export type NftControllerStateChangeEvent = ControllerStateChangeEvent<typeof controllerName, NftControllerState>;
|
165
164
|
export type NftControllerEvents = NftControllerStateChangeEvent;
|
166
165
|
/**
|
@@ -181,6 +180,7 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
181
180
|
* Creates an NftController instance.
|
182
181
|
*
|
183
182
|
* @param options - The controller options.
|
183
|
+
* @param options.chainId - The chain ID of the current network.
|
184
184
|
* @param options.ipfsGateway - The configured IPFS gateway.
|
185
185
|
* @param options.openSeaEnabled - Controls whether the OpenSea API is used.
|
186
186
|
* @param options.useIpfsSubdomains - Controls whether IPFS subdomains are used.
|
@@ -190,7 +190,8 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
190
190
|
* @param options.messenger - The messenger.
|
191
191
|
* @param options.state - Initial state to set on this controller.
|
192
192
|
*/
|
193
|
-
constructor({ ipfsGateway, openSeaEnabled, useIpfsSubdomains, isIpfsGatewayEnabled, onNftAdded, messenger, state, }: {
|
193
|
+
constructor({ chainId: initialChainId, ipfsGateway, openSeaEnabled, useIpfsSubdomains, isIpfsGatewayEnabled, onNftAdded, messenger, state, }: {
|
194
|
+
chainId: Hex;
|
194
195
|
ipfsGateway?: string;
|
195
196
|
openSeaEnabled?: boolean;
|
196
197
|
useIpfsSubdomains?: boolean;
|
@@ -215,12 +216,13 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
215
216
|
* @param asset.tokenId - The ID of the asset.
|
216
217
|
* @param type - The asset type.
|
217
218
|
* @param origin - Domain origin to register the asset from.
|
218
|
-
* @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
219
219
|
* @param options - Options bag.
|
220
|
+
* @param options.networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
220
221
|
* @param options.userAddress - The address of the account where the NFT is being added.
|
221
222
|
* @returns Object containing a Promise resolving to the suggestedAsset address if accepted.
|
222
223
|
*/
|
223
|
-
watchNft(asset: NftAsset, type: NFTStandardType, origin: string, networkClientId
|
224
|
+
watchNft(asset: NftAsset, type: NFTStandardType, origin: string, { networkClientId, userAddress, }?: {
|
225
|
+
networkClientId?: NetworkClientId;
|
224
226
|
userAddress?: string;
|
225
227
|
}): Promise<void>;
|
226
228
|
/**
|
@@ -235,23 +237,27 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
235
237
|
* @param ownerAddress - User public address.
|
236
238
|
* @param nftAddress - NFT contract address.
|
237
239
|
* @param tokenId - NFT token ID.
|
238
|
-
* @param
|
240
|
+
* @param options - Options bag.
|
241
|
+
* @param options.networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
239
242
|
* @returns Promise resolving the NFT ownership.
|
240
243
|
*/
|
241
|
-
isNftOwner(ownerAddress: string, nftAddress: string, tokenId: string, networkClientId
|
244
|
+
isNftOwner(ownerAddress: string, nftAddress: string, tokenId: string, { networkClientId, }?: {
|
245
|
+
networkClientId?: NetworkClientId;
|
246
|
+
}): Promise<boolean>;
|
242
247
|
/**
|
243
248
|
* Verifies currently selected address owns entered NFT address/tokenId combo and
|
244
249
|
* adds the NFT and respective NFT contract to the stored NFT and NFT contracts lists.
|
245
250
|
*
|
246
251
|
* @param address - Hex address of the NFT contract.
|
247
252
|
* @param tokenId - The NFT identifier.
|
248
|
-
* @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
249
253
|
* @param options - an object of arguments
|
250
254
|
* @param options.userAddress - The address of the current user.
|
255
|
+
* @param options.networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
251
256
|
* @param options.source - Whether the NFT was detected, added manually or suggested by a dapp.
|
252
257
|
*/
|
253
|
-
addNftVerifyOwnership(address: string, tokenId: string,
|
258
|
+
addNftVerifyOwnership(address: string, tokenId: string, { userAddress, networkClientId, source, }?: {
|
254
259
|
userAddress?: string;
|
260
|
+
networkClientId?: NetworkClientId;
|
255
261
|
source?: Source;
|
256
262
|
}): Promise<void>;
|
257
263
|
/**
|
@@ -259,17 +265,20 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
259
265
|
*
|
260
266
|
* @param tokenAddress - Hex address of the NFT contract.
|
261
267
|
* @param tokenId - The NFT identifier.
|
262
|
-
* @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
263
268
|
* @param options - an object of arguments
|
264
269
|
* @param options.nftMetadata - NFT optional metadata.
|
265
270
|
* @param options.userAddress - The address of the current user.
|
266
271
|
* @param options.source - Whether the NFT was detected, added manually or suggested by a dapp.
|
272
|
+
* @param options.networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
273
|
+
* @param options.chainId - The chain ID to add the NFT to.
|
267
274
|
* @returns Promise resolving to the current NFT list.
|
268
275
|
*/
|
269
|
-
addNft(tokenAddress: string, tokenId: string,
|
276
|
+
addNft(tokenAddress: string, tokenId: string, { nftMetadata, userAddress, source, networkClientId, chainId, }?: {
|
270
277
|
nftMetadata?: NftMetadata;
|
271
278
|
userAddress?: string;
|
272
279
|
source?: Source;
|
280
|
+
networkClientId?: NetworkClientId;
|
281
|
+
chainId?: Hex;
|
273
282
|
}): Promise<void>;
|
274
283
|
/**
|
275
284
|
* Refetches NFT metadata and updates the state
|
@@ -277,21 +286,24 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
277
286
|
* @param options - Options for refetching NFT metadata
|
278
287
|
* @param options.nfts - nfts to update metadata for.
|
279
288
|
* @param options.userAddress - The current user address
|
289
|
+
* @param options.networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
280
290
|
*/
|
281
|
-
updateNftMetadata({ nfts, userAddress, }: {
|
291
|
+
updateNftMetadata({ nfts, userAddress, networkClientId, }: {
|
282
292
|
nfts: Nft[];
|
283
293
|
userAddress?: string;
|
294
|
+
networkClientId?: NetworkClientId;
|
284
295
|
}): Promise<void>;
|
285
296
|
/**
|
286
297
|
* Removes an NFT from the stored token list.
|
287
298
|
*
|
288
299
|
* @param address - Hex address of the NFT contract.
|
289
300
|
* @param tokenId - Token identifier of the NFT.
|
290
|
-
* @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
291
301
|
* @param options - an object of arguments
|
302
|
+
* @param options.networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
292
303
|
* @param options.userAddress - The address of the account where the NFT is being removed.
|
293
304
|
*/
|
294
|
-
removeNft(address: string, tokenId: string, networkClientId
|
305
|
+
removeNft(address: string, tokenId: string, { networkClientId, userAddress, }?: {
|
306
|
+
networkClientId?: NetworkClientId;
|
295
307
|
userAddress?: string;
|
296
308
|
}): void;
|
297
309
|
/**
|
@@ -299,11 +311,12 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
299
311
|
*
|
300
312
|
* @param address - Hex address of the NFT contract.
|
301
313
|
* @param tokenId - Token identifier of the NFT.
|
302
|
-
* @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
303
314
|
* @param options - an object of arguments
|
315
|
+
* @param options.networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
304
316
|
* @param options.userAddress - The address of the account where the NFT is being removed.
|
305
317
|
*/
|
306
|
-
removeAndIgnoreNft(address: string, tokenId: string, networkClientId
|
318
|
+
removeAndIgnoreNft(address: string, tokenId: string, { networkClientId, userAddress, }?: {
|
319
|
+
networkClientId?: NetworkClientId;
|
307
320
|
userAddress?: string;
|
308
321
|
}): void;
|
309
322
|
/**
|
@@ -316,12 +329,13 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
316
329
|
*
|
317
330
|
* @param nft - The NFT object to check and update.
|
318
331
|
* @param batch - A boolean indicating whether this method is being called as part of a batch or single update.
|
319
|
-
* @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
320
332
|
* @param accountParams - The userAddress and chainId to check ownership against
|
321
333
|
* @param accountParams.userAddress - the address passed through the confirmed transaction flow to ensure assets are stored to the correct account
|
334
|
+
* @param accountParams.networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
322
335
|
* @returns the NFT with the updated isCurrentlyOwned value
|
323
336
|
*/
|
324
|
-
checkAndUpdateSingleNftOwnershipStatus(nft: Nft, batch: boolean,
|
337
|
+
checkAndUpdateSingleNftOwnershipStatus(nft: Nft, batch: boolean, { userAddress, networkClientId, }?: {
|
338
|
+
networkClientId?: NetworkClientId;
|
325
339
|
userAddress?: string;
|
326
340
|
}): Promise<{
|
327
341
|
isCurrentlyOwned: boolean | undefined;
|
@@ -353,12 +367,12 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
353
367
|
/**
|
354
368
|
* Checks whether NFTs associated with current selectedAddress/chainId combination are still owned by the user
|
355
369
|
* And updates the isCurrentlyOwned value on each accordingly.
|
356
|
-
*
|
357
|
-
* @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
358
370
|
* @param options - an object of arguments
|
371
|
+
* @param options.networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
359
372
|
* @param options.userAddress - The address of the account where the NFT ownership status is checked/updated.
|
360
373
|
*/
|
361
|
-
checkAndUpdateAllNftsOwnershipStatus(networkClientId
|
374
|
+
checkAndUpdateAllNftsOwnershipStatus({ networkClientId, userAddress, }?: {
|
375
|
+
networkClientId?: NetworkClientId;
|
362
376
|
userAddress?: string;
|
363
377
|
}): Promise<void>;
|
364
378
|
/**
|
@@ -367,11 +381,12 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
367
381
|
* @param address - Hex address of the NFT contract.
|
368
382
|
* @param tokenId - Hex address of the NFT contract.
|
369
383
|
* @param favorite - NFT new favorite status.
|
370
|
-
* @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
371
384
|
* @param options - an object of arguments
|
385
|
+
* @param options.networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
372
386
|
* @param options.userAddress - The address of the account where the NFT is being removed.
|
373
387
|
*/
|
374
|
-
updateNftFavoriteStatus(address: string, tokenId: string, favorite: boolean, networkClientId
|
388
|
+
updateNftFavoriteStatus(address: string, tokenId: string, favorite: boolean, { networkClientId, userAddress, }?: {
|
389
|
+
networkClientId?: NetworkClientId;
|
375
390
|
userAddress?: string;
|
376
391
|
}): void;
|
377
392
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NftController.d.mts","sourceRoot":"","sources":["../src/NftController.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,+CAA+C,EAC/C,kCAAkC,EAClC,0CAA0C,EAC3C,sCAAsC;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,sCAAsC;AACxE,OAAO,KAAK,EACV,mBAAmB,EACnB,0BAA0B,EAC3B,kCAAkC;AACnC,OAAO,EACL,cAAc,EACd,KAAK,wBAAwB,EAC9B,kCAAkC;
|
1
|
+
{"version":3,"file":"NftController.d.mts","sourceRoot":"","sources":["../src/NftController.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,+CAA+C,EAC/C,kCAAkC,EAClC,0CAA0C,EAC3C,sCAAsC;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,sCAAsC;AACxE,OAAO,KAAK,EACV,mBAAmB,EACnB,0BAA0B,EAC3B,kCAAkC;AACnC,OAAO,EACL,cAAc,EACd,KAAK,wBAAwB,EAC9B,kCAAkC;AAgBnC,OAAO,KAAK,EACV,eAAe,EACf,2CAA2C,EAC3C,sCAAsC,EAEvC,qCAAqC;AACtC,OAAO,KAAK,EAAE,iCAAiC,EAAE,sCAAsC;AAEvF,OAAO,KAAK,EACV,qCAAqC,EAEtC,yCAAyC;AAE1C,OAAO,KAAK,EAAE,GAAG,EAAE,wBAAwB;AAM3C,OAAO,KAAK,EACV,iDAAiD,EACjD,gDAAgD,EAChD,gDAAgD,EAChD,kDAAkD,EAClD,8CAA8C,EAC9C,+CAA+C,EAChD,uCAAmC;AAMpC,OAAO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