@metamask-previews/assets-controllers 66.0.0-preview-e9f8bc88 → 68.0.0-preview-510657d5
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 +22 -1
- package/dist/NftController.cjs +82 -84
- package/dist/NftController.cjs.map +1 -1
- package/dist/NftController.d.cts +26 -41
- package/dist/NftController.d.cts.map +1 -1
- package/dist/NftController.d.mts +26 -41
- package/dist/NftController.d.mts.map +1 -1
- package/dist/NftController.mjs +83 -85
- 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 +2 -1
- package/dist/NftDetectionController.d.cts.map +1 -1
- package/dist/NftDetectionController.d.mts +2 -1
- package/dist/NftDetectionController.d.mts.map +1 -1
- package/dist/NftDetectionController.mjs +2 -2
- package/dist/NftDetectionController.mjs.map +1 -1
- package/dist/token-prices-service/codefi-v2.cjs +0 -2
- package/dist/token-prices-service/codefi-v2.cjs.map +1 -1
- package/dist/token-prices-service/codefi-v2.d.cts +1 -1
- package/dist/token-prices-service/codefi-v2.d.cts.map +1 -1
- package/dist/token-prices-service/codefi-v2.d.mts +1 -1
- package/dist/token-prices-service/codefi-v2.d.mts.map +1 -1
- package/dist/token-prices-service/codefi-v2.mjs +0 -2
- package/dist/token-prices-service/codefi-v2.mjs.map +1 -1
- package/package.json +15 -15
package/dist/NftController.d.cts
CHANGED
@@ -2,14 +2,15 @@ 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
|
5
|
+
import type { NetworkClientId, NetworkControllerGetNetworkClientByIdAction } 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
|
-
type
|
12
|
+
import type { NetworkControllerFindNetworkClientIdByChainIdAction } from "../../network-controller/src/NetworkController.cjs";
|
13
|
+
export type NFTStandardType = 'ERC721' | 'ERC1155';
|
13
14
|
type SuggestedNftMeta = {
|
14
15
|
asset: {
|
15
16
|
address: string;
|
@@ -158,8 +159,8 @@ export type PhishingControllerBulkScanUrlsAction = {
|
|
158
159
|
/**
|
159
160
|
* The external actions available to the {@link NftController}.
|
160
161
|
*/
|
161
|
-
export type AllowedActions = AddApprovalRequest | AccountsControllerGetAccountAction | AccountsControllerGetSelectedAccountAction | NetworkControllerGetNetworkClientByIdAction | AssetsContractControllerGetERC721AssetNameAction | AssetsContractControllerGetERC721AssetSymbolAction | AssetsContractControllerGetERC721TokenURIAction | AssetsContractControllerGetERC721OwnerOfAction | AssetsContractControllerGetERC1155BalanceOfAction | AssetsContractControllerGetERC1155TokenURIAction | PhishingControllerBulkScanUrlsAction;
|
162
|
-
export type AllowedEvents = PreferencesControllerStateChangeEvent |
|
162
|
+
export type AllowedActions = AddApprovalRequest | AccountsControllerGetAccountAction | AccountsControllerGetSelectedAccountAction | NetworkControllerGetNetworkClientByIdAction | AssetsContractControllerGetERC721AssetNameAction | AssetsContractControllerGetERC721AssetSymbolAction | AssetsContractControllerGetERC721TokenURIAction | AssetsContractControllerGetERC721OwnerOfAction | AssetsContractControllerGetERC1155BalanceOfAction | AssetsContractControllerGetERC1155TokenURIAction | NetworkControllerFindNetworkClientIdByChainIdAction | PhishingControllerBulkScanUrlsAction;
|
163
|
+
export type AllowedEvents = PreferencesControllerStateChangeEvent | AccountsControllerSelectedEvmAccountChangeEvent;
|
163
164
|
export type NftControllerStateChangeEvent = ControllerStateChangeEvent<typeof controllerName, NftControllerState>;
|
164
165
|
export type NftControllerEvents = NftControllerStateChangeEvent;
|
165
166
|
/**
|
@@ -180,7 +181,6 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
180
181
|
* Creates an NftController instance.
|
181
182
|
*
|
182
183
|
* @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,8 +190,7 @@ 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({
|
194
|
-
chainId: Hex;
|
193
|
+
constructor({ ipfsGateway, openSeaEnabled, useIpfsSubdomains, isIpfsGatewayEnabled, onNftAdded, messenger, state, }: {
|
195
194
|
ipfsGateway?: string;
|
196
195
|
openSeaEnabled?: boolean;
|
197
196
|
useIpfsSubdomains?: boolean;
|
@@ -216,13 +215,12 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
216
215
|
* @param asset.tokenId - The ID of the asset.
|
217
216
|
* @param type - The asset type.
|
218
217
|
* @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.
|
221
220
|
* @param options.userAddress - The address of the account where the NFT is being added.
|
222
221
|
* @returns Object containing a Promise resolving to the suggestedAsset address if accepted.
|
223
222
|
*/
|
224
|
-
watchNft(asset: NftAsset, type: NFTStandardType, origin: string,
|
225
|
-
networkClientId?: NetworkClientId;
|
223
|
+
watchNft(asset: NftAsset, type: NFTStandardType, origin: string, networkClientId: NetworkClientId, { userAddress, }?: {
|
226
224
|
userAddress?: string;
|
227
225
|
}): Promise<void>;
|
228
226
|
/**
|
@@ -237,27 +235,23 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
237
235
|
* @param ownerAddress - User public address.
|
238
236
|
* @param nftAddress - NFT contract address.
|
239
237
|
* @param tokenId - NFT token ID.
|
240
|
-
* @param
|
241
|
-
* @param options.networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
238
|
+
* @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
242
239
|
* @returns Promise resolving the NFT ownership.
|
243
240
|
*/
|
244
|
-
isNftOwner(ownerAddress: string, nftAddress: string, tokenId: string,
|
245
|
-
networkClientId?: NetworkClientId;
|
246
|
-
}): Promise<boolean>;
|
241
|
+
isNftOwner(ownerAddress: string, nftAddress: string, tokenId: string, networkClientId: NetworkClientId): Promise<boolean>;
|
247
242
|
/**
|
248
243
|
* Verifies currently selected address owns entered NFT address/tokenId combo and
|
249
244
|
* adds the NFT and respective NFT contract to the stored NFT and NFT contracts lists.
|
250
245
|
*
|
251
246
|
* @param address - Hex address of the NFT contract.
|
252
247
|
* @param tokenId - The NFT identifier.
|
248
|
+
* @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
253
249
|
* @param options - an object of arguments
|
254
250
|
* @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.
|
256
251
|
* @param options.source - Whether the NFT was detected, added manually or suggested by a dapp.
|
257
252
|
*/
|
258
|
-
addNftVerifyOwnership(address: string, tokenId: string, { userAddress,
|
253
|
+
addNftVerifyOwnership(address: string, tokenId: string, networkClientId: NetworkClientId, { userAddress, source, }?: {
|
259
254
|
userAddress?: string;
|
260
|
-
networkClientId?: NetworkClientId;
|
261
255
|
source?: Source;
|
262
256
|
}): Promise<void>;
|
263
257
|
/**
|
@@ -265,20 +259,17 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
265
259
|
*
|
266
260
|
* @param tokenAddress - Hex address of the NFT contract.
|
267
261
|
* @param tokenId - The NFT identifier.
|
262
|
+
* @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
268
263
|
* @param options - an object of arguments
|
269
264
|
* @param options.nftMetadata - NFT optional metadata.
|
270
265
|
* @param options.userAddress - The address of the current user.
|
271
266
|
* @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.
|
274
267
|
* @returns Promise resolving to the current NFT list.
|
275
268
|
*/
|
276
|
-
addNft(tokenAddress: string, tokenId: string, { nftMetadata, userAddress, source,
|
269
|
+
addNft(tokenAddress: string, tokenId: string, networkClientId: NetworkClientId, { nftMetadata, userAddress, source, }?: {
|
277
270
|
nftMetadata?: NftMetadata;
|
278
271
|
userAddress?: string;
|
279
272
|
source?: Source;
|
280
|
-
networkClientId?: NetworkClientId;
|
281
|
-
chainId?: Hex;
|
282
273
|
}): Promise<void>;
|
283
274
|
/**
|
284
275
|
* Refetches NFT metadata and updates the state
|
@@ -286,24 +277,21 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
286
277
|
* @param options - Options for refetching NFT metadata
|
287
278
|
* @param options.nfts - nfts to update metadata for.
|
288
279
|
* @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.
|
290
280
|
*/
|
291
|
-
updateNftMetadata({ nfts, userAddress,
|
281
|
+
updateNftMetadata({ nfts, userAddress, }: {
|
292
282
|
nfts: Nft[];
|
293
283
|
userAddress?: string;
|
294
|
-
networkClientId?: NetworkClientId;
|
295
284
|
}): Promise<void>;
|
296
285
|
/**
|
297
286
|
* Removes an NFT from the stored token list.
|
298
287
|
*
|
299
288
|
* @param address - Hex address of the NFT contract.
|
300
289
|
* @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.
|
301
291
|
* @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.
|
303
292
|
* @param options.userAddress - The address of the account where the NFT is being removed.
|
304
293
|
*/
|
305
|
-
removeNft(address: string, tokenId: string,
|
306
|
-
networkClientId?: NetworkClientId;
|
294
|
+
removeNft(address: string, tokenId: string, networkClientId: NetworkClientId, { userAddress }?: {
|
307
295
|
userAddress?: string;
|
308
296
|
}): void;
|
309
297
|
/**
|
@@ -311,12 +299,11 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
311
299
|
*
|
312
300
|
* @param address - Hex address of the NFT contract.
|
313
301
|
* @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.
|
314
303
|
* @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.
|
316
304
|
* @param options.userAddress - The address of the account where the NFT is being removed.
|
317
305
|
*/
|
318
|
-
removeAndIgnoreNft(address: string, tokenId: string,
|
319
|
-
networkClientId?: NetworkClientId;
|
306
|
+
removeAndIgnoreNft(address: string, tokenId: string, networkClientId: NetworkClientId, { userAddress }?: {
|
320
307
|
userAddress?: string;
|
321
308
|
}): void;
|
322
309
|
/**
|
@@ -329,13 +316,12 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
329
316
|
*
|
330
317
|
* @param nft - The NFT object to check and update.
|
331
318
|
* @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.
|
332
320
|
* @param accountParams - The userAddress and chainId to check ownership against
|
333
321
|
* @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.
|
335
322
|
* @returns the NFT with the updated isCurrentlyOwned value
|
336
323
|
*/
|
337
|
-
checkAndUpdateSingleNftOwnershipStatus(nft: Nft, batch: boolean, { userAddress
|
338
|
-
networkClientId?: NetworkClientId;
|
324
|
+
checkAndUpdateSingleNftOwnershipStatus(nft: Nft, batch: boolean, networkClientId: NetworkClientId, { userAddress }?: {
|
339
325
|
userAddress?: string;
|
340
326
|
}): Promise<{
|
341
327
|
isCurrentlyOwned: boolean | undefined;
|
@@ -367,12 +353,12 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
367
353
|
/**
|
368
354
|
* Checks whether NFTs associated with current selectedAddress/chainId combination are still owned by the user
|
369
355
|
* 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.
|
370
358
|
* @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.
|
372
359
|
* @param options.userAddress - The address of the account where the NFT ownership status is checked/updated.
|
373
360
|
*/
|
374
|
-
checkAndUpdateAllNftsOwnershipStatus(
|
375
|
-
networkClientId?: NetworkClientId;
|
361
|
+
checkAndUpdateAllNftsOwnershipStatus(networkClientId: NetworkClientId, { userAddress, }?: {
|
376
362
|
userAddress?: string;
|
377
363
|
}): Promise<void>;
|
378
364
|
/**
|
@@ -381,12 +367,11 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
381
367
|
* @param address - Hex address of the NFT contract.
|
382
368
|
* @param tokenId - Hex address of the NFT contract.
|
383
369
|
* @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.
|
384
371
|
* @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.
|
386
372
|
* @param options.userAddress - The address of the account where the NFT is being removed.
|
387
373
|
*/
|
388
|
-
updateNftFavoriteStatus(address: string, tokenId: string, favorite: boolean,
|
389
|
-
networkClientId?: NetworkClientId;
|
374
|
+
updateNftFavoriteStatus(address: string, tokenId: string, favorite: boolean, networkClientId: NetworkClientId, { userAddress, }?: {
|
390
375
|
userAddress?: string;
|
391
376
|
}): void;
|
392
377
|
/**
|
@@ -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;AAiBnC,OAAO,KAAK,EACV,eAAe,EACf,2CAA2C,EAC5C,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,EAA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O,EAAE,MAAM,EACf,QAAQ,EAAE,OAAO,EACjB,eAAe,EAAE,eAAe,EAChC,EACE,WAAW,GACZ,GAAE;QACD,WAAW,CAAC,EAAE,MAAM,CAAC;KACjB;IAiCR;;;;;;;;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;IAiEzD;;OAEG;IACH,UAAU;CAwHX;AAED,eAAe,aAAa,CAAC"}
|
package/dist/NftController.d.mts
CHANGED
@@ -2,14 +2,15 @@ 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
|
5
|
+
import type { NetworkClientId, NetworkControllerGetNetworkClientByIdAction } 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
|
-
type
|
12
|
+
import type { NetworkControllerFindNetworkClientIdByChainIdAction } from "../../network-controller/src/NetworkController.mjs";
|
13
|
+
export type NFTStandardType = 'ERC721' | 'ERC1155';
|
13
14
|
type SuggestedNftMeta = {
|
14
15
|
asset: {
|
15
16
|
address: string;
|
@@ -158,8 +159,8 @@ export type PhishingControllerBulkScanUrlsAction = {
|
|
158
159
|
/**
|
159
160
|
* The external actions available to the {@link NftController}.
|
160
161
|
*/
|
161
|
-
export type AllowedActions = AddApprovalRequest | AccountsControllerGetAccountAction | AccountsControllerGetSelectedAccountAction | NetworkControllerGetNetworkClientByIdAction | AssetsContractControllerGetERC721AssetNameAction | AssetsContractControllerGetERC721AssetSymbolAction | AssetsContractControllerGetERC721TokenURIAction | AssetsContractControllerGetERC721OwnerOfAction | AssetsContractControllerGetERC1155BalanceOfAction | AssetsContractControllerGetERC1155TokenURIAction | PhishingControllerBulkScanUrlsAction;
|
162
|
-
export type AllowedEvents = PreferencesControllerStateChangeEvent |
|
162
|
+
export type AllowedActions = AddApprovalRequest | AccountsControllerGetAccountAction | AccountsControllerGetSelectedAccountAction | NetworkControllerGetNetworkClientByIdAction | AssetsContractControllerGetERC721AssetNameAction | AssetsContractControllerGetERC721AssetSymbolAction | AssetsContractControllerGetERC721TokenURIAction | AssetsContractControllerGetERC721OwnerOfAction | AssetsContractControllerGetERC1155BalanceOfAction | AssetsContractControllerGetERC1155TokenURIAction | NetworkControllerFindNetworkClientIdByChainIdAction | PhishingControllerBulkScanUrlsAction;
|
163
|
+
export type AllowedEvents = PreferencesControllerStateChangeEvent | AccountsControllerSelectedEvmAccountChangeEvent;
|
163
164
|
export type NftControllerStateChangeEvent = ControllerStateChangeEvent<typeof controllerName, NftControllerState>;
|
164
165
|
export type NftControllerEvents = NftControllerStateChangeEvent;
|
165
166
|
/**
|
@@ -180,7 +181,6 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
180
181
|
* Creates an NftController instance.
|
181
182
|
*
|
182
183
|
* @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,8 +190,7 @@ 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({
|
194
|
-
chainId: Hex;
|
193
|
+
constructor({ ipfsGateway, openSeaEnabled, useIpfsSubdomains, isIpfsGatewayEnabled, onNftAdded, messenger, state, }: {
|
195
194
|
ipfsGateway?: string;
|
196
195
|
openSeaEnabled?: boolean;
|
197
196
|
useIpfsSubdomains?: boolean;
|
@@ -216,13 +215,12 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
216
215
|
* @param asset.tokenId - The ID of the asset.
|
217
216
|
* @param type - The asset type.
|
218
217
|
* @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.
|
221
220
|
* @param options.userAddress - The address of the account where the NFT is being added.
|
222
221
|
* @returns Object containing a Promise resolving to the suggestedAsset address if accepted.
|
223
222
|
*/
|
224
|
-
watchNft(asset: NftAsset, type: NFTStandardType, origin: string,
|
225
|
-
networkClientId?: NetworkClientId;
|
223
|
+
watchNft(asset: NftAsset, type: NFTStandardType, origin: string, networkClientId: NetworkClientId, { userAddress, }?: {
|
226
224
|
userAddress?: string;
|
227
225
|
}): Promise<void>;
|
228
226
|
/**
|
@@ -237,27 +235,23 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
237
235
|
* @param ownerAddress - User public address.
|
238
236
|
* @param nftAddress - NFT contract address.
|
239
237
|
* @param tokenId - NFT token ID.
|
240
|
-
* @param
|
241
|
-
* @param options.networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
238
|
+
* @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
242
239
|
* @returns Promise resolving the NFT ownership.
|
243
240
|
*/
|
244
|
-
isNftOwner(ownerAddress: string, nftAddress: string, tokenId: string,
|
245
|
-
networkClientId?: NetworkClientId;
|
246
|
-
}): Promise<boolean>;
|
241
|
+
isNftOwner(ownerAddress: string, nftAddress: string, tokenId: string, networkClientId: NetworkClientId): Promise<boolean>;
|
247
242
|
/**
|
248
243
|
* Verifies currently selected address owns entered NFT address/tokenId combo and
|
249
244
|
* adds the NFT and respective NFT contract to the stored NFT and NFT contracts lists.
|
250
245
|
*
|
251
246
|
* @param address - Hex address of the NFT contract.
|
252
247
|
* @param tokenId - The NFT identifier.
|
248
|
+
* @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
253
249
|
* @param options - an object of arguments
|
254
250
|
* @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.
|
256
251
|
* @param options.source - Whether the NFT was detected, added manually or suggested by a dapp.
|
257
252
|
*/
|
258
|
-
addNftVerifyOwnership(address: string, tokenId: string, { userAddress,
|
253
|
+
addNftVerifyOwnership(address: string, tokenId: string, networkClientId: NetworkClientId, { userAddress, source, }?: {
|
259
254
|
userAddress?: string;
|
260
|
-
networkClientId?: NetworkClientId;
|
261
255
|
source?: Source;
|
262
256
|
}): Promise<void>;
|
263
257
|
/**
|
@@ -265,20 +259,17 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
265
259
|
*
|
266
260
|
* @param tokenAddress - Hex address of the NFT contract.
|
267
261
|
* @param tokenId - The NFT identifier.
|
262
|
+
* @param networkClientId - The networkClientId that can be used to identify the network client to use for this request.
|
268
263
|
* @param options - an object of arguments
|
269
264
|
* @param options.nftMetadata - NFT optional metadata.
|
270
265
|
* @param options.userAddress - The address of the current user.
|
271
266
|
* @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.
|
274
267
|
* @returns Promise resolving to the current NFT list.
|
275
268
|
*/
|
276
|
-
addNft(tokenAddress: string, tokenId: string, { nftMetadata, userAddress, source,
|
269
|
+
addNft(tokenAddress: string, tokenId: string, networkClientId: NetworkClientId, { nftMetadata, userAddress, source, }?: {
|
277
270
|
nftMetadata?: NftMetadata;
|
278
271
|
userAddress?: string;
|
279
272
|
source?: Source;
|
280
|
-
networkClientId?: NetworkClientId;
|
281
|
-
chainId?: Hex;
|
282
273
|
}): Promise<void>;
|
283
274
|
/**
|
284
275
|
* Refetches NFT metadata and updates the state
|
@@ -286,24 +277,21 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
286
277
|
* @param options - Options for refetching NFT metadata
|
287
278
|
* @param options.nfts - nfts to update metadata for.
|
288
279
|
* @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.
|
290
280
|
*/
|
291
|
-
updateNftMetadata({ nfts, userAddress,
|
281
|
+
updateNftMetadata({ nfts, userAddress, }: {
|
292
282
|
nfts: Nft[];
|
293
283
|
userAddress?: string;
|
294
|
-
networkClientId?: NetworkClientId;
|
295
284
|
}): Promise<void>;
|
296
285
|
/**
|
297
286
|
* Removes an NFT from the stored token list.
|
298
287
|
*
|
299
288
|
* @param address - Hex address of the NFT contract.
|
300
289
|
* @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.
|
301
291
|
* @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.
|
303
292
|
* @param options.userAddress - The address of the account where the NFT is being removed.
|
304
293
|
*/
|
305
|
-
removeNft(address: string, tokenId: string,
|
306
|
-
networkClientId?: NetworkClientId;
|
294
|
+
removeNft(address: string, tokenId: string, networkClientId: NetworkClientId, { userAddress }?: {
|
307
295
|
userAddress?: string;
|
308
296
|
}): void;
|
309
297
|
/**
|
@@ -311,12 +299,11 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
311
299
|
*
|
312
300
|
* @param address - Hex address of the NFT contract.
|
313
301
|
* @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.
|
314
303
|
* @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.
|
316
304
|
* @param options.userAddress - The address of the account where the NFT is being removed.
|
317
305
|
*/
|
318
|
-
removeAndIgnoreNft(address: string, tokenId: string,
|
319
|
-
networkClientId?: NetworkClientId;
|
306
|
+
removeAndIgnoreNft(address: string, tokenId: string, networkClientId: NetworkClientId, { userAddress }?: {
|
320
307
|
userAddress?: string;
|
321
308
|
}): void;
|
322
309
|
/**
|
@@ -329,13 +316,12 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
329
316
|
*
|
330
317
|
* @param nft - The NFT object to check and update.
|
331
318
|
* @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.
|
332
320
|
* @param accountParams - The userAddress and chainId to check ownership against
|
333
321
|
* @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.
|
335
322
|
* @returns the NFT with the updated isCurrentlyOwned value
|
336
323
|
*/
|
337
|
-
checkAndUpdateSingleNftOwnershipStatus(nft: Nft, batch: boolean, { userAddress
|
338
|
-
networkClientId?: NetworkClientId;
|
324
|
+
checkAndUpdateSingleNftOwnershipStatus(nft: Nft, batch: boolean, networkClientId: NetworkClientId, { userAddress }?: {
|
339
325
|
userAddress?: string;
|
340
326
|
}): Promise<{
|
341
327
|
isCurrentlyOwned: boolean | undefined;
|
@@ -367,12 +353,12 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
367
353
|
/**
|
368
354
|
* Checks whether NFTs associated with current selectedAddress/chainId combination are still owned by the user
|
369
355
|
* 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.
|
370
358
|
* @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.
|
372
359
|
* @param options.userAddress - The address of the account where the NFT ownership status is checked/updated.
|
373
360
|
*/
|
374
|
-
checkAndUpdateAllNftsOwnershipStatus(
|
375
|
-
networkClientId?: NetworkClientId;
|
361
|
+
checkAndUpdateAllNftsOwnershipStatus(networkClientId: NetworkClientId, { userAddress, }?: {
|
376
362
|
userAddress?: string;
|
377
363
|
}): Promise<void>;
|
378
364
|
/**
|
@@ -381,12 +367,11 @@ export declare class NftController extends BaseController<typeof controllerName,
|
|
381
367
|
* @param address - Hex address of the NFT contract.
|
382
368
|
* @param tokenId - Hex address of the NFT contract.
|
383
369
|
* @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.
|
384
371
|
* @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.
|
386
372
|
* @param options.userAddress - The address of the account where the NFT is being removed.
|
387
373
|
*/
|
388
|
-
updateNftFavoriteStatus(address: string, tokenId: string, favorite: boolean,
|
389
|
-
networkClientId?: NetworkClientId;
|
374
|
+
updateNftFavoriteStatus(address: string, tokenId: string, favorite: boolean, networkClientId: NetworkClientId, { userAddress, }?: {
|
390
375
|
userAddress?: string;
|
391
376
|
}): void;
|
392
377
|
/**
|
@@ -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;AAiBnC,OAAO,KAAK,EACV,eAAe,EACf,2CAA2C,EAC5C,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,U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