@metamask-previews/assets-controller 16.1.0-preview-7304fd253 → 16.1.0-preview-b1e33e9f1
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 +28 -0
- package/dist/AssetsController-method-action-types.d.ts +5 -1
- package/dist/AssetsController-method-action-types.d.ts.map +1 -1
- package/dist/AssetsController-method-action-types.js.map +1 -1
- package/dist/AssetsController.d.ts +8 -40
- package/dist/AssetsController.d.ts.map +1 -1
- package/dist/AssetsController.js +570 -235
- package/dist/AssetsController.js.map +1 -1
- package/dist/data-sources/AbstractDataSource.d.ts +1 -6
- package/dist/data-sources/AbstractDataSource.d.ts.map +1 -1
- package/dist/data-sources/AbstractDataSource.js.map +1 -1
- package/dist/data-sources/AccountsApiDataSource.d.ts +17 -3
- package/dist/data-sources/AccountsApiDataSource.d.ts.map +1 -1
- package/dist/data-sources/AccountsApiDataSource.js +275 -125
- package/dist/data-sources/AccountsApiDataSource.js.map +1 -1
- package/dist/data-sources/PriceDataSource.d.ts +7 -6
- package/dist/data-sources/PriceDataSource.d.ts.map +1 -1
- package/dist/data-sources/PriceDataSource.js +15 -20
- package/dist/data-sources/PriceDataSource.js.map +1 -1
- package/dist/data-sources/RpcDataSource.d.ts +15 -1
- package/dist/data-sources/RpcDataSource.d.ts.map +1 -1
- package/dist/data-sources/RpcDataSource.js +398 -107
- package/dist/data-sources/RpcDataSource.js.map +1 -1
- package/dist/data-sources/SnapDataSource.d.ts +5 -0
- package/dist/data-sources/SnapDataSource.d.ts.map +1 -1
- package/dist/data-sources/SnapDataSource.js +114 -0
- package/dist/data-sources/SnapDataSource.js.map +1 -1
- package/dist/data-sources/TokenDataSource.d.ts +3 -1
- package/dist/data-sources/TokenDataSource.d.ts.map +1 -1
- package/dist/data-sources/TokenDataSource.js +4 -2
- package/dist/data-sources/TokenDataSource.js.map +1 -1
- package/dist/data-sources/evm-rpc-services/services/BalanceFetcher.d.ts +8 -0
- package/dist/data-sources/evm-rpc-services/services/BalanceFetcher.d.ts.map +1 -1
- package/dist/data-sources/evm-rpc-services/services/BalanceFetcher.js +47 -2
- package/dist/data-sources/evm-rpc-services/services/BalanceFetcher.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/middlewares/CustomAssetGraduationMiddleware.d.ts +3 -1
- package/dist/middlewares/CustomAssetGraduationMiddleware.d.ts.map +1 -1
- package/dist/middlewares/CustomAssetGraduationMiddleware.js +3 -1
- package/dist/middlewares/CustomAssetGraduationMiddleware.js.map +1 -1
- package/dist/middlewares/DetectionMiddleware.d.ts +10 -2
- package/dist/middlewares/DetectionMiddleware.d.ts.map +1 -1
- package/dist/middlewares/DetectionMiddleware.js +5 -23
- package/dist/middlewares/DetectionMiddleware.js.map +1 -1
- package/dist/middlewares/ParallelMiddleware.d.ts.map +1 -1
- package/dist/middlewares/ParallelMiddleware.js +0 -3
- package/dist/middlewares/ParallelMiddleware.js.map +1 -1
- package/dist/middlewares/RpcFallbackMiddleware.d.ts +16 -15
- package/dist/middlewares/RpcFallbackMiddleware.d.ts.map +1 -1
- package/dist/middlewares/RpcFallbackMiddleware.js +125 -107
- package/dist/middlewares/RpcFallbackMiddleware.js.map +1 -1
- package/dist/middlewares/index.d.ts +1 -0
- package/dist/middlewares/index.d.ts.map +1 -1
- package/dist/middlewares/index.js.map +1 -1
- package/dist/migrations/healAssetsInfoMetadata.d.ts +5 -5
- package/dist/migrations/healAssetsInfoMetadata.d.ts.map +1 -1
- package/dist/migrations/healAssetsInfoMetadata.js.map +1 -1
- package/dist/pipeline/buildFastFetchSources.d.ts +5 -0
- package/dist/pipeline/buildFastFetchSources.d.ts.map +1 -1
- package/dist/pipeline/buildFastFetchSources.js +7 -1
- package/dist/pipeline/buildFastFetchSources.js.map +1 -1
- package/dist/pipeline/executeAssetsPipeline.d.ts +1 -3
- package/dist/pipeline/executeAssetsPipeline.d.ts.map +1 -1
- package/dist/pipeline/executeAssetsPipeline.js +1 -2
- package/dist/pipeline/executeAssetsPipeline.js.map +1 -1
- package/dist/selectors/balance.js +1 -1
- package/dist/selectors/balance.js.map +1 -1
- package/dist/types.d.ts +29 -23
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/assetVisibility.d.ts +29 -0
- package/dist/utils/assetVisibility.d.ts.map +1 -0
- package/dist/utils/assetVisibility.js +80 -0
- package/dist/utils/assetVisibility.js.map +1 -0
- package/dist/utils/filterFailedChainBalances.d.ts +11 -0
- package/dist/utils/filterFailedChainBalances.d.ts.map +1 -0
- package/dist/utils/filterFailedChainBalances.js +22 -0
- package/dist/utils/filterFailedChainBalances.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,12 +7,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Add optional `isBalanceV6Enabled` to `AccountsApiDataSourceOptions`, `RpcDataSourceOptions`, and `RpcFallbackMiddlewareOptions`, so the `assetsAccountsApiV6` flag is read once by `AssetsController` and injected ([#9651](https://github.com/MetaMask/core/pull/9651))
|
|
13
|
+
|
|
10
14
|
### Changed
|
|
11
15
|
|
|
16
|
+
- **BREAKING:** Remove `'update'` from `AssetsUpdateMode`; use `'full'` (Accounts API v6 snapshot) or `'merge'` ([#9651](https://github.com/MetaMask/core/pull/9651))
|
|
17
|
+
- **BREAKING:** Remove the `updateMode` option from `AssetsController.getAssets`; the data source now sets it on its response ([#9651](https://github.com/MetaMask/core/pull/9651))
|
|
18
|
+
- **BREAKING:** Remove `getAssetsState` from pipeline `Context`; inject it on data-source and middleware constructors instead (`TokenDataSourceOptions`, `PriceDataSourceOptions`, `DetectionMiddlewareOptions`, `CustomAssetGraduationMiddlewareOptions`, `RpcFallbackMiddlewareOptions`)
|
|
19
|
+
- **BREAKING:** Remove `getAssetsState` from `SubscriptionRequest` and `PriceDataSource.fetch`; `PriceDataSource` reads state from its constructor
|
|
20
|
+
- **BREAKING:** Require `getAssetsState` in `AccountsApiDataSourceOptions` and `RpcDataSourceOptions` ([#9651](https://github.com/MetaMask/core/pull/9651))
|
|
21
|
+
- Pass `() => this.state` from `AssetsController`
|
|
22
|
+
- **BREAKING:** Require `getAssetVisibility` in `AccountsApiDataSourceOptions`, `SnapDataSourceOptions`, and `RpcDataSourceOptions`
|
|
23
|
+
- Pass the shared native/pin/default/hidden visibility resolver from `AssetsController`
|
|
24
|
+
- **BREAKING:** Require `isBalanceV6Enabled` in `SnapDataSourceOptions`
|
|
25
|
+
- When `assetsAccountsApiV6` is enabled, Accounts API v6 reads pins and hides from state and sends them as `includeAssetIds` / `excludeAssetIds`, then applies the response with `updateMode: 'full'` ([#9651](https://github.com/MetaMask/core/pull/9651))
|
|
26
|
+
- `hideAsset` now re-evaluates subscriptions so live polls start excluding the asset immediately ([#9651](https://github.com/MetaMask/core/pull/9651))
|
|
27
|
+
- **BREAKING:** `unhideAsset` is now async and force-fetches the asset's chain (same as `addCustomAsset`) so a v6 `full` snapshot can restore the balance immediately ([#9651](https://github.com/MetaMask/core/pull/9651))
|
|
12
28
|
- Bump `@metamask/transaction-controller` from `^70.0.1` to `^71.0.0` ([#10262](https://github.com/MetaMask/core/pull/10262), [#10386](https://github.com/MetaMask/core/pull/10386))
|
|
13
29
|
|
|
14
30
|
### Fixed
|
|
15
31
|
|
|
32
|
+
- On the Accounts API v6 RPC poll path, skip staking vault share tokens so a `full` snapshot cannot overwrite the converted staked amount with a raw `balanceOf`
|
|
33
|
+
- `addCustomAsset` on the Accounts API v6 path now force-fetches the token's chain with all visible pins, instead of scoping `customAssets` to the new token, so a `full` snapshot no longer drops other pinned balances until the next poll
|
|
34
|
+
- Accounts API v6 RPC fallback retries failed chains in full (native, existing balances, pins, and default tracked assets from state) instead of scoping `request.customAssets` to individual tokens
|
|
35
|
+
- Accounts API v6 `includeAssetIds` is built from natives, visible pins, and default tracked assets for the requested chains (not detected ERC-20 balances or a scoped `request.customAssets` list), so `updateMode: 'full'` can replace the chain slice
|
|
36
|
+
- On the Accounts API v6 path, the Accounts API, Snap, RPC fallback, and RPC polling share the same native/pin/default/hidden visibility policy; hidden assets are not fetched and omitted balances are dropped on `full` (unhide force-fetches a new snapshot) ([#9651](https://github.com/MetaMask/core/pull/9651))
|
|
37
|
+
- `RpcDataSource.fetch` on the Accounts API v6 path builds its asset list from the shared visibility policy (native, visible pins, default tracked assets) instead of the request's `customAssets` scope, so a force refresh picks up pinned tokens on RPC-only chains and when basic functionality is off instead of leaving them until the next poll ([#9651](https://github.com/MetaMask/core/pull/9651))
|
|
38
|
+
- `RpcDataSource.fetch` and RPC subscribe balance updates stamp `updateMode: 'full'` on the Accounts API v6 path, so successful RPC chain snapshots replace state the same way as Accounts API v6 ([#9651](https://github.com/MetaMask/core/pull/9651))
|
|
39
|
+
- `SnapDataSource.fetch` and subscription initial fetches stamp `updateMode: 'full'` on the Accounts API v6 path and add missing visible assets at zero, so non-EVM pins survive authoritative snapshots; Snap balance events remain merge deltas
|
|
40
|
+
- Treat a failed RPC `balanceOf` or an asset with unknown decimals as a chain failure on the Accounts API v6 path: discard that chain's snapshot and leave existing balances unchanged
|
|
41
|
+
- Treat the `assetsAccountsApiV6` remote feature flag as enabled when it is `true`, instead of reading a nested `{ value }` object ([#9651](https://github.com/MetaMask/core/pull/9651))
|
|
42
|
+
- Apply an Accounts API v6 `full` update as the complete asset list for the chains it covers, only carrying over visible assets the client asked for (natives, pins, default tracked) and staking positions; omitted hidden balances are dropped because unhide force-fetches a new snapshot ([#9651](https://github.com/MetaMask/core/pull/9651))
|
|
43
|
+
- Apply Accounts API and RPC balance responses atomically per chain on the Accounts API v6 path: a chain that fails, or that v6 could not answer for every requested `includeAssetIds`, is reported in `errors`, contributes no balances, and leaves its existing state unchanged until the RPC fallback recovers it ([#9651](https://github.com/MetaMask/core/pull/9651))
|
|
16
44
|
- Skip `#updateState` assignments for metadata, balances, and prices that are deep-equal to what's already in state, so Immer no longer emits a no-op `stateChange` (and a full state persist) on every poll that repeats unchanged data ([#10260](https://github.com/MetaMask/core/pull/10260))
|
|
17
45
|
- `TokenDataSource` spam filtering now removes filtered assets from `assetsBalance` and `detectedAssets` using case-insensitive asset ID matching (previously only `assetsInfo` was matched case-insensitively), so spam tokens whose IDs arrive in a different case than state no longer survive in the pipeline response and persist to state ([#10172](https://github.com/MetaMask/core/pull/10172))
|
|
18
46
|
|
|
@@ -111,7 +111,8 @@ export type AssetsControllerGetStateForTransactionPayAction = {
|
|
|
111
111
|
/**
|
|
112
112
|
* Add a custom asset for an account.
|
|
113
113
|
* Custom assets are included in subscription and fetch operations.
|
|
114
|
-
* Adding a custom asset also unhides it if it was previously hidden
|
|
114
|
+
* Adding a custom asset also unhides it if it was previously hidden,
|
|
115
|
+
* and force-fetches that asset's chain (including every visible pin).
|
|
115
116
|
*
|
|
116
117
|
* When `pendingMetadata` is provided (e.g. from the extension's pending-tokens
|
|
117
118
|
* flow), the token metadata is persisted immediately into `assetsInfo` so the
|
|
@@ -158,6 +159,9 @@ export type AssetsControllerHideAssetAction = {
|
|
|
158
159
|
};
|
|
159
160
|
/**
|
|
160
161
|
* Unhide an asset globally.
|
|
162
|
+
* Force-fetches that asset's chain (including every visible pin) so a
|
|
163
|
+
* `full` snapshot can restore the balance immediately, then re-evaluates
|
|
164
|
+
* subscriptions so later polls stop excluding it.
|
|
161
165
|
*
|
|
162
166
|
* @param assetId - The CAIP-19 asset ID to unhide.
|
|
163
167
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssetsController-method-action-types.d.ts","sourceRoot":"","sources":["../src/AssetsController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,MAAM,MAAM,+BAA+B,GAAG;IAC5C,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AC,2BAA2B,CAAC,CAAC;CACxD,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"AssetsController-method-action-types.d.ts","sourceRoot":"","sources":["../src/AssetsController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,EAAE,4BAA4B,CAAC;IACnC,OAAO,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,sCAAsC,GAAG;IACnD,IAAI,EAAE,mCAAmC,CAAC;IAC1C,OAAO,EAAE,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,sCAAsC,GAAG;IACnD,IAAI,EAAE,mCAAmC,CAAC;IAC1C,OAAO,EAAE,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;CAC/C,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,yCAAyC,GAAG;IACtD,IAAI,EAAE,sCAAsC,CAAC;IAC7C,OAAO,EAAE,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;CAClD,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,2CAA2C,GAAG;IACxD,IAAI,EAAE,wCAAwC,CAAC;IAC/C,OAAO,EAAE,gBAAgB,CAAC,uBAAuB,CAAC,CAAC;CACpD,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,6CAA6C,GAAG;IAC1D,IAAI,EAAE,0CAA0C,CAAC;IACjD,OAAO,EAAE,gBAAgB,CAAC,yBAAyB,CAAC,CAAC;CACtD,CAAC;AAEF,MAAM,MAAM,oCAAoC,GAAG;IACjD,IAAI,EAAE,iCAAiC,CAAC;IACxC,OAAO,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;CAC7C,CAAC;AAEF;;;;;;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AC/B,sCAAsC,GACtC,sCAAsC,GACtC,yCAAyC,GACzC,2CAA2C,GAC3C,6CAA6C,GAC7C,oCAAoC,GACpC,+CAA+C,GAC/C,+CAA+C,GAC/C,oCAAoC,GACpC,uCAAuC,GACvC,qCAAqC,GACrC,+BAA+B,GAC/B,iCAAiC,GACjC,yCAAyC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssetsController-method-action-types.js","sourceRoot":"","sources":["../src/AssetsController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { AssetsController } from './AssetsController.js';\n\nexport type AssetsControllerGetAssetsAction = {\n type: `AssetsController:getAssets`;\n handler: AssetsController['getAssets'];\n};\n\nexport type AssetsControllerGetAssetsBalanceAction = {\n type: `AssetsController:getAssetsBalance`;\n handler: AssetsController['getAssetsBalance'];\n};\n\nexport type AssetsControllerGetAssetMetadataAction = {\n type: `AssetsController:getAssetMetadata`;\n handler: AssetsController['getAssetMetadata'];\n};\n\n/**\n * Get a single combined asset (balance + metadata + price + computed\n * `fiatValue`) for an account directly from controller state.\n *\n * Reuses the same state-composition and filtering logic as `getAssets`\n * (balance and metadata are required, a missing price falls back to\n * `{ price: 0, lastUpdated: 0 }` with `fiatValue: 0`, and hidden or\n * otherwise filtered assets are excluded) so the returned shape never\n * drifts from `getAssets`. Reads from current state only and does not\n * trigger a data-source refresh.\n *\n * @param accountId - The account ID (`InternalAccount.id`, not an address).\n * @param assetId - The CAIP-19 asset ID including chain scope\n * (e.g. `eip155:1/erc20:0x...`).\n * @returns The combined `Asset`, or `undefined` when no complete\n * renderable asset (balance + metadata) exists for the account/asset pair.\n * @throws If `accountId` is empty or `assetId` is not a valid CAIP-19 asset ID.\n */\nexport type AssetsControllerGetAccountAssetByIDAction = {\n type: `AssetsController:getAccountAssetByID`;\n handler: AssetsController['getAccountAssetByID'];\n};\n\n/**\n * Get multiple combined assets (balance + metadata + price + computed\n * `fiatValue`) for an account directly from controller state.\n *\n * Applies the same state-composition and filtering rules as\n * `getAccountAssetByID` to each requested asset ID. Asset IDs that do not\n * resolve to a complete renderable asset (missing balance/metadata, hidden,\n * or otherwise filtered out) are omitted from the result. Reads from\n * current state only and does not trigger a data-source refresh.\n *\n * @param accountId - The account ID (`InternalAccount.id`, not an address).\n * @param assetIds - The CAIP-19 asset IDs including chain scope\n * (e.g. `eip155:1/erc20:0x...`).\n * @returns A record of combined `Asset`s keyed by normalized CAIP-19 asset\n * ID, containing only the requested assets that resolved.\n * @throws If `accountId` is empty or any `assetIds` entry is not a valid\n * CAIP-19 asset ID.\n */\nexport type AssetsControllerGetAccountAssetsByIDsAction = {\n type: `AssetsController:getAccountAssetsByIDs`;\n handler: AssetsController['getAccountAssetsByIDs'];\n};\n\n/**\n * Get all combined assets (balance + metadata + price + computed\n * `fiatValue`) an account holds on a given chain scope, directly from\n * controller state.\n *\n * Applies the same state-composition and filtering rules as\n * `getAccountAssetByID` (hidden or otherwise filtered assets are excluded).\n * Reads from current state only and does not trigger a data-source refresh.\n *\n * @param accountId - The account ID (`InternalAccount.id`, not an address).\n * @param scope - The CAIP-2 chain ID to filter by (e.g. `eip155:1`).\n * @returns A record of combined `Asset`s keyed by CAIP-19 asset ID,\n * containing only the account's assets on the given scope.\n * @throws If `accountId` is empty or `scope` is not a valid CAIP-2 chain ID.\n */\nexport type AssetsControllerGetAccountAssetsByScopeAction = {\n type: `AssetsController:getAccountAssetsByScope`;\n handler: AssetsController['getAccountAssetsByScope'];\n};\n\nexport type AssetsControllerGetAssetsPriceAction = {\n type: `AssetsController:getAssetsPrice`;\n handler: AssetsController['getAssetsPrice'];\n};\n\n/**\n * Returns exchange rates in the format expected by the bridge controller\n * (conversionRates, currencyRates, marketData, currentCurrency) so that\n * when useAssetsControllerForRates is true the bridge can use a single\n * action instead of MultichainAssetsRatesController, TokenRatesController,\n * and CurrencyRateController.\n *\n * @returns Bridge-compatible exchange rate state derived from assetsPrice and selectedCurrency.\n */\nexport type AssetsControllerGetExchangeRatesForBridgeAction = {\n type: `AssetsController:getExchangeRatesForBridge`;\n handler: AssetsController['getExchangeRatesForBridge'];\n};\n\n/**\n * Returns state in the legacy format expected by transaction-pay-controller\n * (TokenBalancesController, AccountTrackerController, TokensController,\n * TokenRatesController, CurrencyRateController shapes) so that when\n * useAssetsController is true the transaction-pay-controller can use a\n * single action instead of five separate getState calls.\n *\n * @returns Legacy-compatible state for transaction-pay-controller.\n */\nexport type AssetsControllerGetStateForTransactionPayAction = {\n type: `AssetsController:getStateForTransactionPay`;\n handler: AssetsController['getStateForTransactionPay'];\n};\n\n/**\n * Add a custom asset for an account.\n * Custom assets are included in subscription and fetch operations.\n * Adding a custom asset also unhides it if it was previously hidden.\n *\n * When `pendingMetadata` is provided (e.g. from the extension's pending-tokens\n * flow), the token metadata is persisted immediately into `assetsInfo` so the\n * UI can render it without waiting for the next pipeline fetch.\n *\n * @param accountId - The account ID to add the custom asset for.\n * @param assetId - The CAIP-19 asset ID to add.\n * @param pendingMetadata - Optional token metadata from the UI (pendingTokens format).\n */\nexport type AssetsControllerAddCustomAssetAction = {\n type: `AssetsController:addCustomAsset`;\n handler: AssetsController['addCustomAsset'];\n};\n\n/**\n * Remove a custom asset from an account.\n *\n * @param accountId - The account ID to remove the custom asset from.\n * @param assetId - The CAIP-19 asset ID to remove.\n */\nexport type AssetsControllerRemoveCustomAssetAction = {\n type: `AssetsController:removeCustomAsset`;\n handler: AssetsController['removeCustomAsset'];\n};\n\n/**\n * Get all custom assets for an account.\n *\n * @param accountId - The account ID to get custom assets for.\n * @returns Array of CAIP-19 asset IDs for the account's custom assets.\n */\nexport type AssetsControllerGetCustomAssetsAction = {\n type: `AssetsController:getCustomAssets`;\n handler: AssetsController['getCustomAssets'];\n};\n\n/**\n * Hide an asset globally.\n * Hidden assets are excluded from the asset list returned by getAssets.\n * The hidden state is stored in assetPreferences.\n *\n * @param assetId - The CAIP-19 asset ID to hide.\n */\nexport type AssetsControllerHideAssetAction = {\n type: `AssetsController:hideAsset`;\n handler: AssetsController['hideAsset'];\n};\n\n/**\n * Unhide an asset globally.\n *\n * @param assetId - The CAIP-19 asset ID to unhide.\n */\nexport type AssetsControllerUnhideAssetAction = {\n type: `AssetsController:unhideAsset`;\n handler: AssetsController['unhideAsset'];\n};\n\n/**\n * Set the current currency.\n *\n * @param selectedCurrency - The ISO 4217 currency code to set.\n */\nexport type AssetsControllerSetSelectedCurrencyAction = {\n type: `AssetsController:setSelectedCurrency`;\n handler: AssetsController['setSelectedCurrency'];\n};\n\n/**\n * Union of all AssetsController action types.\n */\nexport type AssetsControllerMethodActions =\n | AssetsControllerGetAssetsAction\n | AssetsControllerGetAssetsBalanceAction\n | AssetsControllerGetAssetMetadataAction\n | AssetsControllerGetAccountAssetByIDAction\n | AssetsControllerGetAccountAssetsByIDsAction\n | AssetsControllerGetAccountAssetsByScopeAction\n | AssetsControllerGetAssetsPriceAction\n | AssetsControllerGetExchangeRatesForBridgeAction\n | AssetsControllerGetStateForTransactionPayAction\n | AssetsControllerAddCustomAssetAction\n | AssetsControllerRemoveCustomAssetAction\n | AssetsControllerGetCustomAssetsAction\n | AssetsControllerHideAssetAction\n | AssetsControllerUnhideAssetAction\n | AssetsControllerSetSelectedCurrencyAction;\n"]}
|
|
1
|
+
{"version":3,"file":"AssetsController-method-action-types.js","sourceRoot":"","sources":["../src/AssetsController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { AssetsController } from './AssetsController.js';\n\nexport type AssetsControllerGetAssetsAction = {\n type: `AssetsController:getAssets`;\n handler: AssetsController['getAssets'];\n};\n\nexport type AssetsControllerGetAssetsBalanceAction = {\n type: `AssetsController:getAssetsBalance`;\n handler: AssetsController['getAssetsBalance'];\n};\n\nexport type AssetsControllerGetAssetMetadataAction = {\n type: `AssetsController:getAssetMetadata`;\n handler: AssetsController['getAssetMetadata'];\n};\n\n/**\n * Get a single combined asset (balance + metadata + price + computed\n * `fiatValue`) for an account directly from controller state.\n *\n * Reuses the same state-composition and filtering logic as `getAssets`\n * (balance and metadata are required, a missing price falls back to\n * `{ price: 0, lastUpdated: 0 }` with `fiatValue: 0`, and hidden or\n * otherwise filtered assets are excluded) so the returned shape never\n * drifts from `getAssets`. Reads from current state only and does not\n * trigger a data-source refresh.\n *\n * @param accountId - The account ID (`InternalAccount.id`, not an address).\n * @param assetId - The CAIP-19 asset ID including chain scope\n * (e.g. `eip155:1/erc20:0x...`).\n * @returns The combined `Asset`, or `undefined` when no complete\n * renderable asset (balance + metadata) exists for the account/asset pair.\n * @throws If `accountId` is empty or `assetId` is not a valid CAIP-19 asset ID.\n */\nexport type AssetsControllerGetAccountAssetByIDAction = {\n type: `AssetsController:getAccountAssetByID`;\n handler: AssetsController['getAccountAssetByID'];\n};\n\n/**\n * Get multiple combined assets (balance + metadata + price + computed\n * `fiatValue`) for an account directly from controller state.\n *\n * Applies the same state-composition and filtering rules as\n * `getAccountAssetByID` to each requested asset ID. Asset IDs that do not\n * resolve to a complete renderable asset (missing balance/metadata, hidden,\n * or otherwise filtered out) are omitted from the result. Reads from\n * current state only and does not trigger a data-source refresh.\n *\n * @param accountId - The account ID (`InternalAccount.id`, not an address).\n * @param assetIds - The CAIP-19 asset IDs including chain scope\n * (e.g. `eip155:1/erc20:0x...`).\n * @returns A record of combined `Asset`s keyed by normalized CAIP-19 asset\n * ID, containing only the requested assets that resolved.\n * @throws If `accountId` is empty or any `assetIds` entry is not a valid\n * CAIP-19 asset ID.\n */\nexport type AssetsControllerGetAccountAssetsByIDsAction = {\n type: `AssetsController:getAccountAssetsByIDs`;\n handler: AssetsController['getAccountAssetsByIDs'];\n};\n\n/**\n * Get all combined assets (balance + metadata + price + computed\n * `fiatValue`) an account holds on a given chain scope, directly from\n * controller state.\n *\n * Applies the same state-composition and filtering rules as\n * `getAccountAssetByID` (hidden or otherwise filtered assets are excluded).\n * Reads from current state only and does not trigger a data-source refresh.\n *\n * @param accountId - The account ID (`InternalAccount.id`, not an address).\n * @param scope - The CAIP-2 chain ID to filter by (e.g. `eip155:1`).\n * @returns A record of combined `Asset`s keyed by CAIP-19 asset ID,\n * containing only the account's assets on the given scope.\n * @throws If `accountId` is empty or `scope` is not a valid CAIP-2 chain ID.\n */\nexport type AssetsControllerGetAccountAssetsByScopeAction = {\n type: `AssetsController:getAccountAssetsByScope`;\n handler: AssetsController['getAccountAssetsByScope'];\n};\n\nexport type AssetsControllerGetAssetsPriceAction = {\n type: `AssetsController:getAssetsPrice`;\n handler: AssetsController['getAssetsPrice'];\n};\n\n/**\n * Returns exchange rates in the format expected by the bridge controller\n * (conversionRates, currencyRates, marketData, currentCurrency) so that\n * when useAssetsControllerForRates is true the bridge can use a single\n * action instead of MultichainAssetsRatesController, TokenRatesController,\n * and CurrencyRateController.\n *\n * @returns Bridge-compatible exchange rate state derived from assetsPrice and selectedCurrency.\n */\nexport type AssetsControllerGetExchangeRatesForBridgeAction = {\n type: `AssetsController:getExchangeRatesForBridge`;\n handler: AssetsController['getExchangeRatesForBridge'];\n};\n\n/**\n * Returns state in the legacy format expected by transaction-pay-controller\n * (TokenBalancesController, AccountTrackerController, TokensController,\n * TokenRatesController, CurrencyRateController shapes) so that when\n * useAssetsController is true the transaction-pay-controller can use a\n * single action instead of five separate getState calls.\n *\n * @returns Legacy-compatible state for transaction-pay-controller.\n */\nexport type AssetsControllerGetStateForTransactionPayAction = {\n type: `AssetsController:getStateForTransactionPay`;\n handler: AssetsController['getStateForTransactionPay'];\n};\n\n/**\n * Add a custom asset for an account.\n * Custom assets are included in subscription and fetch operations.\n * Adding a custom asset also unhides it if it was previously hidden,\n * and force-fetches that asset's chain (including every visible pin).\n *\n * When `pendingMetadata` is provided (e.g. from the extension's pending-tokens\n * flow), the token metadata is persisted immediately into `assetsInfo` so the\n * UI can render it without waiting for the next pipeline fetch.\n *\n * @param accountId - The account ID to add the custom asset for.\n * @param assetId - The CAIP-19 asset ID to add.\n * @param pendingMetadata - Optional token metadata from the UI (pendingTokens format).\n */\nexport type AssetsControllerAddCustomAssetAction = {\n type: `AssetsController:addCustomAsset`;\n handler: AssetsController['addCustomAsset'];\n};\n\n/**\n * Remove a custom asset from an account.\n *\n * @param accountId - The account ID to remove the custom asset from.\n * @param assetId - The CAIP-19 asset ID to remove.\n */\nexport type AssetsControllerRemoveCustomAssetAction = {\n type: `AssetsController:removeCustomAsset`;\n handler: AssetsController['removeCustomAsset'];\n};\n\n/**\n * Get all custom assets for an account.\n *\n * @param accountId - The account ID to get custom assets for.\n * @returns Array of CAIP-19 asset IDs for the account's custom assets.\n */\nexport type AssetsControllerGetCustomAssetsAction = {\n type: `AssetsController:getCustomAssets`;\n handler: AssetsController['getCustomAssets'];\n};\n\n/**\n * Hide an asset globally.\n * Hidden assets are excluded from the asset list returned by getAssets.\n * The hidden state is stored in assetPreferences.\n *\n * @param assetId - The CAIP-19 asset ID to hide.\n */\nexport type AssetsControllerHideAssetAction = {\n type: `AssetsController:hideAsset`;\n handler: AssetsController['hideAsset'];\n};\n\n/**\n * Unhide an asset globally.\n * Force-fetches that asset's chain (including every visible pin) so a\n * `full` snapshot can restore the balance immediately, then re-evaluates\n * subscriptions so later polls stop excluding it.\n *\n * @param assetId - The CAIP-19 asset ID to unhide.\n */\nexport type AssetsControllerUnhideAssetAction = {\n type: `AssetsController:unhideAsset`;\n handler: AssetsController['unhideAsset'];\n};\n\n/**\n * Set the current currency.\n *\n * @param selectedCurrency - The ISO 4217 currency code to set.\n */\nexport type AssetsControllerSetSelectedCurrencyAction = {\n type: `AssetsController:setSelectedCurrency`;\n handler: AssetsController['setSelectedCurrency'];\n};\n\n/**\n * Union of all AssetsController action types.\n */\nexport type AssetsControllerMethodActions =\n | AssetsControllerGetAssetsAction\n | AssetsControllerGetAssetsBalanceAction\n | AssetsControllerGetAssetMetadataAction\n | AssetsControllerGetAccountAssetByIDAction\n | AssetsControllerGetAccountAssetsByIDsAction\n | AssetsControllerGetAccountAssetsByScopeAction\n | AssetsControllerGetAssetsPriceAction\n | AssetsControllerGetExchangeRatesForBridgeAction\n | AssetsControllerGetStateForTransactionPayAction\n | AssetsControllerAddCustomAssetAction\n | AssetsControllerRemoveCustomAssetAction\n | AssetsControllerGetCustomAssetsAction\n | AssetsControllerHideAssetAction\n | AssetsControllerUnhideAssetAction\n | AssetsControllerSetSelectedCurrencyAction;\n"]}
|
|
@@ -24,7 +24,7 @@ import type { RpcDataSourceConfig } from './data-sources/RpcDataSource.js';
|
|
|
24
24
|
import type { AccountsControllerAccountBalancesUpdatedEvent } from './data-sources/SnapDataSource.js';
|
|
25
25
|
import type { StakedBalanceDataSourceConfig } from './data-sources/StakedBalanceDataSource.js';
|
|
26
26
|
import type { Assets3346MigrationState } from './migrations/healAssetsInfoMetadata.js';
|
|
27
|
-
import type { AccountId,
|
|
27
|
+
import type { AccountId, AssetsControllerState, ChainId, Caip19AssetId, AssetMetadata, AssetPrice, AssetBalance, AssetType, DataType, DataRequest, DataResponse, Asset } from './types.js';
|
|
28
28
|
import type { BridgeExchangeRatesFormat, TransactionPayLegacyFormat } from './utils/index.js';
|
|
29
29
|
/**
|
|
30
30
|
* Metadata format passed from the UI when adding a custom token.
|
|
@@ -42,40 +42,7 @@ export type PendingTokenMetadata = {
|
|
|
42
42
|
unlisted?: boolean;
|
|
43
43
|
};
|
|
44
44
|
declare const CONTROLLER_NAME: 'AssetsController';
|
|
45
|
-
|
|
46
|
-
* State structure for AssetsController.
|
|
47
|
-
*
|
|
48
|
-
* All values are JSON-serializable. UI preferences (e.g. hidden) are in
|
|
49
|
-
* assetPreferences, not in metadata.
|
|
50
|
-
*
|
|
51
|
-
* @see AssetsControllerStateInternal for the semantic type structure
|
|
52
|
-
*/
|
|
53
|
-
export type AssetsControllerState = {
|
|
54
|
-
/** Shared metadata for all assets (stored once per asset) */
|
|
55
|
-
assetsInfo: {
|
|
56
|
-
[assetId: string]: AssetMetadata;
|
|
57
|
-
};
|
|
58
|
-
/** Per-account balance data */
|
|
59
|
-
assetsBalance: {
|
|
60
|
-
[accountId: string]: {
|
|
61
|
-
[assetId: string]: AssetBalance;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
/** Price data for assets */
|
|
65
|
-
assetsPrice: {
|
|
66
|
-
[assetId: string]: AssetPrice;
|
|
67
|
-
};
|
|
68
|
-
/** Custom assets added by users per account (CAIP-19 asset IDs) */
|
|
69
|
-
customAssets: {
|
|
70
|
-
[accountId: string]: Caip19AssetId[];
|
|
71
|
-
};
|
|
72
|
-
/** UI preferences per asset (e.g. hidden) */
|
|
73
|
-
assetPreferences: {
|
|
74
|
-
[assetId: string]: AssetPreferences;
|
|
75
|
-
};
|
|
76
|
-
/** Currently-active ISO 4217 currency code */
|
|
77
|
-
selectedCurrency: SupportedCurrency;
|
|
78
|
-
};
|
|
45
|
+
export type { AssetsControllerState };
|
|
79
46
|
/**
|
|
80
47
|
* Returns the default state for AssetsController.
|
|
81
48
|
*
|
|
@@ -228,8 +195,6 @@ export declare class AssetsController extends BaseController<typeof CONTROLLER_N
|
|
|
228
195
|
bypassServerCache?: boolean;
|
|
229
196
|
dataTypes?: DataType[];
|
|
230
197
|
assetsForPriceUpdate?: Caip19AssetId[];
|
|
231
|
-
/** When set to `'merge'`, fetch result is merged with existing state instead of replacing. Use for partial fetches (e.g. newly added chains). */
|
|
232
|
-
updateMode?: AssetsUpdateMode;
|
|
233
198
|
}): Promise<Record<AccountId, Record<Caip19AssetId, Asset>>>;
|
|
234
199
|
getAssetsBalance(accounts: InternalAccount[], options?: {
|
|
235
200
|
chainIds?: ChainId[];
|
|
@@ -319,7 +284,8 @@ export declare class AssetsController extends BaseController<typeof CONTROLLER_N
|
|
|
319
284
|
/**
|
|
320
285
|
* Add a custom asset for an account.
|
|
321
286
|
* Custom assets are included in subscription and fetch operations.
|
|
322
|
-
* Adding a custom asset also unhides it if it was previously hidden
|
|
287
|
+
* Adding a custom asset also unhides it if it was previously hidden,
|
|
288
|
+
* and force-fetches that asset's chain (including every visible pin).
|
|
323
289
|
*
|
|
324
290
|
* When `pendingMetadata` is provided (e.g. from the extension's pending-tokens
|
|
325
291
|
* flow), the token metadata is persisted immediately into `assetsInfo` so the
|
|
@@ -354,10 +320,13 @@ export declare class AssetsController extends BaseController<typeof CONTROLLER_N
|
|
|
354
320
|
hideAsset(assetId: Caip19AssetId): void;
|
|
355
321
|
/**
|
|
356
322
|
* Unhide an asset globally.
|
|
323
|
+
* Force-fetches that asset's chain (including every visible pin) so a
|
|
324
|
+
* `full` snapshot can restore the balance immediately, then re-evaluates
|
|
325
|
+
* subscriptions so later polls stop excluding it.
|
|
357
326
|
*
|
|
358
327
|
* @param assetId - The CAIP-19 asset ID to unhide.
|
|
359
328
|
*/
|
|
360
|
-
unhideAsset(assetId: Caip19AssetId): void
|
|
329
|
+
unhideAsset(assetId: Caip19AssetId): Promise<void>;
|
|
361
330
|
/**
|
|
362
331
|
* Set the current currency.
|
|
363
332
|
*
|
|
@@ -398,5 +367,4 @@ export declare class AssetsController extends BaseController<typeof CONTROLLER_N
|
|
|
398
367
|
handleAssetsUpdate(response: DataResponse, sourceId: string, request?: DataRequest): Promise<void>;
|
|
399
368
|
destroy(): void;
|
|
400
369
|
}
|
|
401
|
-
export {};
|
|
402
370
|
//# sourceMappingURL=AssetsController.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssetsController.d.ts","sourceRoot":"","sources":["../src/AssetsController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,8DAA8D,EAC9D,qCAAqC,EACrC,wCAAwC,EACxC,oDAAoD,EACpD,uCAAuC,EACxC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,0CAA0C,EAAE,MAAM,+BAA+B,CAAC;AAChG,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAE3B,MAAM,2BAA2B,CAAC;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