@metamask-previews/core-backend 9.1.1-preview-6eff555ee → 10.0.0-preview-0a30e47
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/{ApiPlatformClientService-method-action-types.d.mts → ApiPlatformClientService-method-action-types.d.ts} +2 -2
- package/dist/ApiPlatformClientService-method-action-types.d.ts.map +1 -0
- package/dist/{ApiPlatformClientService-method-action-types.mjs → ApiPlatformClientService-method-action-types.js} +1 -1
- package/dist/ApiPlatformClientService-method-action-types.js.map +1 -0
- package/dist/{ApiPlatformClientService.d.cts → ApiPlatformClientService.d.ts} +5 -5
- package/dist/ApiPlatformClientService.d.ts.map +1 -0
- package/dist/{ApiPlatformClientService.mjs → ApiPlatformClientService.js} +9 -21
- package/dist/ApiPlatformClientService.js.map +1 -0
- package/dist/api/{ApiPlatformClient.d.cts → ApiPlatformClient.d.ts} +8 -8
- package/dist/api/ApiPlatformClient.d.ts.map +1 -0
- package/dist/api/{ApiPlatformClient.mjs → ApiPlatformClient.js} +53 -45
- package/dist/api/{ApiPlatformClient.cjs.map → ApiPlatformClient.js.map} +1 -1
- package/dist/api/accounts/{client.d.cts → client.d.ts} +5 -5
- package/dist/api/accounts/client.d.ts.map +1 -0
- package/dist/api/accounts/{client.mjs → client.js} +3 -3
- package/dist/api/accounts/client.js.map +1 -0
- package/dist/api/accounts/{index.d.mts → index.d.ts} +4 -4
- package/dist/api/accounts/index.d.ts.map +1 -0
- package/dist/api/accounts/index.js +6 -0
- package/dist/api/accounts/index.js.map +1 -0
- package/dist/api/accounts/{types.d.cts → types.d.ts} +3 -3
- package/dist/api/accounts/types.d.ts.map +1 -0
- package/dist/api/accounts/{types.mjs → types.js} +1 -1
- package/dist/api/accounts/types.js.map +1 -0
- package/dist/api/{base-client.d.cts → base-client.d.ts} +6 -5
- package/dist/api/base-client.d.ts.map +1 -0
- package/dist/api/base-client.js +162 -0
- package/dist/api/base-client.js.map +1 -0
- package/dist/api/{index.d.cts → index.d.ts} +14 -14
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +18 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/prices/{client.d.mts → client.d.ts} +5 -5
- package/dist/api/prices/client.d.ts.map +1 -0
- package/dist/api/prices/{client.mjs → client.js} +3 -3
- package/dist/api/prices/client.js.map +1 -0
- package/dist/api/prices/{index.d.mts → index.d.ts} +3 -3
- package/dist/api/prices/index.d.ts.map +1 -0
- package/dist/api/prices/index.js +5 -0
- package/dist/api/prices/index.js.map +1 -0
- package/dist/api/prices/{types.d.cts → types.d.ts} +1 -1
- package/dist/api/prices/types.d.ts.map +1 -0
- package/dist/api/prices/{types.mjs → types.js} +1 -1
- package/dist/api/prices/types.js.map +1 -0
- package/dist/api/{shared-types.d.mts → shared-types.d.ts} +6 -6
- package/dist/api/shared-types.d.ts.map +1 -0
- package/dist/api/{shared-types.mjs → shared-types.js} +6 -2
- package/dist/api/shared-types.js.map +1 -0
- package/dist/api/{test-utils.d.cts → test-utils.d.ts} +2 -3
- package/dist/api/test-utils.d.ts.map +1 -0
- package/dist/api/{test-utils.mjs → test-utils.js} +3 -3
- package/dist/api/test-utils.js.map +1 -0
- package/dist/api/token/{client.d.mts → client.d.ts} +5 -5
- package/dist/api/token/client.d.ts.map +1 -0
- package/dist/api/token/{client.mjs → client.js} +3 -3
- package/dist/api/token/client.js.map +1 -0
- package/dist/api/token/{index.d.cts → index.d.ts} +3 -3
- package/dist/api/token/index.d.ts.map +1 -0
- package/dist/api/token/index.js +5 -0
- package/dist/api/token/index.js.map +1 -0
- package/dist/api/token/{types.d.cts → types.d.ts} +1 -1
- package/dist/api/token/types.d.ts.map +1 -0
- package/dist/api/token/{types.mjs → types.js} +1 -1
- package/dist/api/token/types.js.map +1 -0
- package/dist/api/tokens/{client.d.mts → client.d.ts} +5 -5
- package/dist/api/tokens/client.d.ts.map +1 -0
- package/dist/api/tokens/{client.mjs → client.js} +3 -3
- package/dist/api/tokens/client.js.map +1 -0
- package/dist/api/tokens/{index.d.cts → index.d.ts} +3 -3
- package/dist/api/tokens/index.d.ts.map +1 -0
- package/dist/api/tokens/index.js +5 -0
- package/dist/api/tokens/index.js.map +1 -0
- package/dist/api/tokens/{types.d.cts → types.d.ts} +1 -1
- package/dist/api/tokens/types.d.ts.map +1 -0
- package/dist/api/tokens/{types.mjs → types.js} +1 -1
- package/dist/api/tokens/types.js.map +1 -0
- package/dist/{index.d.mts → index.d.ts} +12 -12
- package/dist/index.d.ts.map +1 -0
- package/dist/{index.mjs → index.js} +6 -6
- package/dist/index.js.map +1 -0
- package/dist/logger.d.ts +4 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +4 -0
- package/dist/logger.js.map +1 -0
- package/dist/{types.d.cts → types.d.ts} +1 -1
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/ws/{AccountActivityService.d.cts → AccountActivityService.d.ts} +10 -10
- package/dist/ws/AccountActivityService.d.ts.map +1 -0
- package/dist/ws/AccountActivityService.js +470 -0
- package/dist/ws/AccountActivityService.js.map +1 -0
- package/dist/ws/{BackendWebSocketService-method-action-types.d.cts → BackendWebSocketService-method-action-types.d.ts} +2 -2
- package/dist/ws/BackendWebSocketService-method-action-types.d.ts.map +1 -0
- package/dist/ws/{BackendWebSocketService-method-action-types.mjs → BackendWebSocketService-method-action-types.js} +1 -1
- package/dist/ws/BackendWebSocketService-method-action-types.js.map +1 -0
- package/dist/ws/{BackendWebSocketService.d.cts → BackendWebSocketService.d.ts} +7 -7
- package/dist/ws/BackendWebSocketService.d.ts.map +1 -0
- package/dist/ws/BackendWebSocketService.js +1191 -0
- package/dist/ws/BackendWebSocketService.js.map +1 -0
- package/dist/ws/ohlcv/{OHLCVService-method-action-types.d.cts → OHLCVService-method-action-types.d.ts} +2 -2
- package/dist/ws/ohlcv/OHLCVService-method-action-types.d.ts.map +1 -0
- package/dist/ws/ohlcv/{OHLCVService-method-action-types.mjs → OHLCVService-method-action-types.js} +1 -1
- package/dist/ws/ohlcv/OHLCVService-method-action-types.js.map +1 -0
- package/dist/ws/ohlcv/{OHLCVService.d.cts → OHLCVService.d.ts} +9 -9
- package/dist/ws/ohlcv/OHLCVService.d.ts.map +1 -0
- package/dist/ws/ohlcv/OHLCVService.js +471 -0
- package/dist/ws/ohlcv/OHLCVService.js.map +1 -0
- package/dist/ws/ohlcv/{index.d.cts → index.d.ts} +5 -5
- package/dist/ws/ohlcv/index.d.ts.map +1 -0
- package/dist/ws/ohlcv/index.js +3 -0
- package/dist/ws/ohlcv/index.js.map +1 -0
- package/dist/ws/ohlcv/{types.d.cts → types.d.ts} +1 -1
- package/dist/ws/ohlcv/types.d.ts.map +1 -0
- package/dist/ws/ohlcv/{types.mjs → types.js} +1 -1
- package/dist/ws/ohlcv/types.js.map +1 -0
- package/package.json +19 -23
- package/dist/ApiPlatformClientService-method-action-types.cjs +0 -7
- package/dist/ApiPlatformClientService-method-action-types.cjs.map +0 -1
- package/dist/ApiPlatformClientService-method-action-types.d.cts +0 -21
- package/dist/ApiPlatformClientService-method-action-types.d.cts.map +0 -1
- package/dist/ApiPlatformClientService-method-action-types.d.mts.map +0 -1
- package/dist/ApiPlatformClientService-method-action-types.mjs.map +0 -1
- package/dist/ApiPlatformClientService.cjs +0 -82
- package/dist/ApiPlatformClientService.cjs.map +0 -1
- package/dist/ApiPlatformClientService.d.cts.map +0 -1
- package/dist/ApiPlatformClientService.d.mts +0 -86
- package/dist/ApiPlatformClientService.d.mts.map +0 -1
- package/dist/ApiPlatformClientService.mjs.map +0 -1
- package/dist/api/ApiPlatformClient.cjs +0 -177
- package/dist/api/ApiPlatformClient.d.cts.map +0 -1
- package/dist/api/ApiPlatformClient.d.mts +0 -127
- package/dist/api/ApiPlatformClient.d.mts.map +0 -1
- package/dist/api/ApiPlatformClient.mjs.map +0 -1
- package/dist/api/accounts/client.cjs +0 -868
- package/dist/api/accounts/client.cjs.map +0 -1
- package/dist/api/accounts/client.d.cts.map +0 -1
- package/dist/api/accounts/client.d.mts +0 -500
- package/dist/api/accounts/client.d.mts.map +0 -1
- package/dist/api/accounts/client.mjs.map +0 -1
- package/dist/api/accounts/index.cjs +0 -11
- package/dist/api/accounts/index.cjs.map +0 -1
- package/dist/api/accounts/index.d.cts +0 -7
- package/dist/api/accounts/index.d.cts.map +0 -1
- package/dist/api/accounts/index.d.mts.map +0 -1
- package/dist/api/accounts/index.mjs +0 -6
- package/dist/api/accounts/index.mjs.map +0 -1
- package/dist/api/accounts/types.cjs +0 -22
- package/dist/api/accounts/types.cjs.map +0 -1
- package/dist/api/accounts/types.d.cts.map +0 -1
- package/dist/api/accounts/types.d.mts +0 -286
- package/dist/api/accounts/types.d.mts.map +0 -1
- package/dist/api/accounts/types.mjs.map +0 -1
- package/dist/api/base-client.cjs +0 -177
- package/dist/api/base-client.cjs.map +0 -1
- package/dist/api/base-client.d.cts.map +0 -1
- package/dist/api/base-client.d.mts +0 -55
- package/dist/api/base-client.d.mts.map +0 -1
- package/dist/api/base-client.mjs +0 -171
- package/dist/api/base-client.mjs.map +0 -1
- package/dist/api/index.cjs +0 -38
- package/dist/api/index.cjs.map +0 -1
- package/dist/api/index.d.cts.map +0 -1
- package/dist/api/index.d.mts +0 -18
- package/dist/api/index.d.mts.map +0 -1
- package/dist/api/index.mjs +0 -18
- package/dist/api/index.mjs.map +0 -1
- package/dist/api/prices/client.cjs +0 -779
- package/dist/api/prices/client.cjs.map +0 -1
- package/dist/api/prices/client.d.cts +0 -447
- package/dist/api/prices/client.d.cts.map +0 -1
- package/dist/api/prices/client.d.mts.map +0 -1
- package/dist/api/prices/client.mjs.map +0 -1
- package/dist/api/prices/index.cjs +0 -9
- package/dist/api/prices/index.cjs.map +0 -1
- package/dist/api/prices/index.d.cts +0 -6
- package/dist/api/prices/index.d.cts.map +0 -1
- package/dist/api/prices/index.d.mts.map +0 -1
- package/dist/api/prices/index.mjs +0 -5
- package/dist/api/prices/index.mjs.map +0 -1
- package/dist/api/prices/types.cjs +0 -7
- package/dist/api/prices/types.cjs.map +0 -1
- package/dist/api/prices/types.d.cts.map +0 -1
- package/dist/api/prices/types.d.mts +0 -61
- package/dist/api/prices/types.d.mts.map +0 -1
- package/dist/api/prices/types.mjs.map +0 -1
- package/dist/api/shared-types.cjs +0 -114
- package/dist/api/shared-types.cjs.map +0 -1
- package/dist/api/shared-types.d.cts +0 -170
- package/dist/api/shared-types.d.cts.map +0 -1
- package/dist/api/shared-types.d.mts.map +0 -1
- package/dist/api/shared-types.mjs.map +0 -1
- package/dist/api/test-utils.cjs +0 -70
- package/dist/api/test-utils.cjs.map +0 -1
- package/dist/api/test-utils.d.cts.map +0 -1
- package/dist/api/test-utils.d.mts +0 -30
- package/dist/api/test-utils.d.mts.map +0 -1
- package/dist/api/test-utils.mjs.map +0 -1
- package/dist/api/token/client.cjs +0 -500
- package/dist/api/token/client.cjs.map +0 -1
- package/dist/api/token/client.d.cts +0 -362
- package/dist/api/token/client.d.cts.map +0 -1
- package/dist/api/token/client.d.mts.map +0 -1
- package/dist/api/token/client.mjs.map +0 -1
- package/dist/api/token/index.cjs +0 -9
- package/dist/api/token/index.cjs.map +0 -1
- package/dist/api/token/index.d.cts.map +0 -1
- package/dist/api/token/index.d.mts +0 -6
- package/dist/api/token/index.d.mts.map +0 -1
- package/dist/api/token/index.mjs +0 -5
- package/dist/api/token/index.mjs.map +0 -1
- package/dist/api/token/types.cjs +0 -7
- package/dist/api/token/types.cjs.map +0 -1
- package/dist/api/token/types.d.cts.map +0 -1
- package/dist/api/token/types.d.mts +0 -124
- package/dist/api/token/types.d.mts.map +0 -1
- package/dist/api/token/types.mjs.map +0 -1
- package/dist/api/tokens/client.cjs +0 -132
- package/dist/api/tokens/client.cjs.map +0 -1
- package/dist/api/tokens/client.d.cts +0 -69
- package/dist/api/tokens/client.d.cts.map +0 -1
- package/dist/api/tokens/client.d.mts.map +0 -1
- package/dist/api/tokens/client.mjs.map +0 -1
- package/dist/api/tokens/index.cjs +0 -9
- package/dist/api/tokens/index.cjs.map +0 -1
- package/dist/api/tokens/index.d.cts.map +0 -1
- package/dist/api/tokens/index.d.mts +0 -6
- package/dist/api/tokens/index.d.mts.map +0 -1
- package/dist/api/tokens/index.mjs +0 -5
- package/dist/api/tokens/index.mjs.map +0 -1
- package/dist/api/tokens/types.cjs +0 -7
- package/dist/api/tokens/types.cjs.map +0 -1
- package/dist/api/tokens/types.d.cts.map +0 -1
- package/dist/api/tokens/types.d.mts +0 -87
- package/dist/api/tokens/types.d.mts.map +0 -1
- package/dist/api/tokens/types.mjs.map +0 -1
- package/dist/index.cjs +0 -55
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -12
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/logger.cjs +0 -7
- package/dist/logger.cjs.map +0 -1
- package/dist/logger.d.cts +0 -5
- package/dist/logger.d.cts.map +0 -1
- package/dist/logger.d.mts +0 -5
- package/dist/logger.d.mts.map +0 -1
- package/dist/logger.mjs +0 -4
- package/dist/logger.mjs.map +0 -1
- package/dist/types.cjs +0 -3
- package/dist/types.cjs.map +0 -1
- package/dist/types.d.cts.map +0 -1
- package/dist/types.d.mts +0 -73
- package/dist/types.d.mts.map +0 -1
- package/dist/types.mjs +0 -2
- package/dist/types.mjs.map +0 -1
- package/dist/ws/AccountActivityService.cjs +0 -435
- package/dist/ws/AccountActivityService.cjs.map +0 -1
- package/dist/ws/AccountActivityService.d.cts.map +0 -1
- package/dist/ws/AccountActivityService.d.mts +0 -136
- package/dist/ws/AccountActivityService.d.mts.map +0 -1
- package/dist/ws/AccountActivityService.mjs +0 -431
- package/dist/ws/AccountActivityService.mjs.map +0 -1
- package/dist/ws/BackendWebSocketService-method-action-types.cjs +0 -7
- package/dist/ws/BackendWebSocketService-method-action-types.cjs.map +0 -1
- package/dist/ws/BackendWebSocketService-method-action-types.d.cts.map +0 -1
- package/dist/ws/BackendWebSocketService-method-action-types.d.mts +0 -252
- package/dist/ws/BackendWebSocketService-method-action-types.d.mts.map +0 -1
- package/dist/ws/BackendWebSocketService-method-action-types.mjs.map +0 -1
- package/dist/ws/BackendWebSocketService.cjs +0 -1062
- package/dist/ws/BackendWebSocketService.cjs.map +0 -1
- package/dist/ws/BackendWebSocketService.d.cts.map +0 -1
- package/dist/ws/BackendWebSocketService.d.mts +0 -406
- package/dist/ws/BackendWebSocketService.d.mts.map +0 -1
- package/dist/ws/BackendWebSocketService.mjs +0 -1057
- package/dist/ws/BackendWebSocketService.mjs.map +0 -1
- package/dist/ws/ohlcv/OHLCVService-method-action-types.cjs +0 -7
- package/dist/ws/ohlcv/OHLCVService-method-action-types.cjs.map +0 -1
- package/dist/ws/ohlcv/OHLCVService-method-action-types.d.cts.map +0 -1
- package/dist/ws/ohlcv/OHLCVService-method-action-types.d.mts +0 -35
- package/dist/ws/ohlcv/OHLCVService-method-action-types.d.mts.map +0 -1
- package/dist/ws/ohlcv/OHLCVService-method-action-types.mjs.map +0 -1
- package/dist/ws/ohlcv/OHLCVService.cjs +0 -471
- package/dist/ws/ohlcv/OHLCVService.cjs.map +0 -1
- package/dist/ws/ohlcv/OHLCVService.d.cts.map +0 -1
- package/dist/ws/ohlcv/OHLCVService.d.mts +0 -111
- package/dist/ws/ohlcv/OHLCVService.d.mts.map +0 -1
- package/dist/ws/ohlcv/OHLCVService.mjs +0 -467
- package/dist/ws/ohlcv/OHLCVService.mjs.map +0 -1
- package/dist/ws/ohlcv/index.cjs +0 -9
- package/dist/ws/ohlcv/index.cjs.map +0 -1
- package/dist/ws/ohlcv/index.d.cts.map +0 -1
- package/dist/ws/ohlcv/index.d.mts +0 -5
- package/dist/ws/ohlcv/index.d.mts.map +0 -1
- package/dist/ws/ohlcv/index.mjs +0 -3
- package/dist/ws/ohlcv/index.mjs.map +0 -1
- package/dist/ws/ohlcv/types.cjs +0 -6
- package/dist/ws/ohlcv/types.cjs.map +0 -1
- package/dist/ws/ohlcv/types.d.cts.map +0 -1
- package/dist/ws/ohlcv/types.d.mts +0 -32
- package/dist/ws/ohlcv/types.d.mts.map +0 -1
- package/dist/ws/ohlcv/types.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Bump `uuid` from `^8.3.2` to `^9.0.1` ([#10117](https://github.com/MetaMask/core/pull/10117))
|
|
13
|
+
|
|
14
|
+
## [10.0.0]
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- **BREAKING:** Drop CommonJS support ([#9536](https://github.com/MetaMask/core/pull/9536))
|
|
19
|
+
- This package is now ESM-only, but can still be used in CommonJS projects via `require(esm)` in modern Node.js versions (22+), or dynamic imports in older Node.js versions.
|
|
20
|
+
- **BREAKING:** Bump minimum Node.js version to 22 ([#9976](https://github.com/MetaMask/core/pull/9976))
|
|
21
|
+
- **BREAKING:** Bump TypeScript target to ES2022 ([#10019](https://github.com/MetaMask/core/pull/10019))
|
|
22
|
+
- This package now ships ES2022 code, requiring a compatible modern environment or bundler configuration to consume.
|
|
23
|
+
- Bump `@metamask/account-tree-controller` from `^9.0.0` to `^10.0.0` ([#10160](https://github.com/MetaMask/core/pull/10160))
|
|
24
|
+
- Bump `@metamask/controller-utils` from `^12.3.0` to `^13.0.0` ([#10160](https://github.com/MetaMask/core/pull/10160))
|
|
25
|
+
- Bump `@metamask/keyring-controller` from `^27.1.1` to `^28.0.0` ([#10160](https://github.com/MetaMask/core/pull/10160))
|
|
26
|
+
- Bump `@metamask/messenger` from `^2.0.0` to `^3.0.0` ([#10160](https://github.com/MetaMask/core/pull/10160))
|
|
27
|
+
- Bump `@metamask/profile-sync-controller` from `^30.0.0` to `^31.0.0` ([#10160](https://github.com/MetaMask/core/pull/10160))
|
|
28
|
+
- Bump `@metamask/remote-feature-flag-controller` from `^6.1.1` to `^7.0.0` ([#10160](https://github.com/MetaMask/core/pull/10160))
|
|
29
|
+
|
|
10
30
|
## [9.1.1]
|
|
11
31
|
|
|
12
32
|
### Changed
|
|
@@ -421,7 +441,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
421
441
|
- **Type definitions** - Comprehensive TypeScript types for transactions, balances, WebSocket messages, and service configurations
|
|
422
442
|
- **Logging infrastructure** - Structured logging with module-specific loggers for debugging and monitoring
|
|
423
443
|
|
|
424
|
-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/core-backend@
|
|
444
|
+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/core-backend@10.0.0...HEAD
|
|
445
|
+
[10.0.0]: https://github.com/MetaMask/core/compare/@metamask/core-backend@9.1.1...@metamask/core-backend@10.0.0
|
|
425
446
|
[9.1.1]: https://github.com/MetaMask/core/compare/@metamask/core-backend@9.1.0...@metamask/core-backend@9.1.1
|
|
426
447
|
[9.1.0]: https://github.com/MetaMask/core/compare/@metamask/core-backend@9.0.0...@metamask/core-backend@9.1.0
|
|
427
448
|
[9.0.0]: https://github.com/MetaMask/core/compare/@metamask/core-backend@8.1.2...@metamask/core-backend@9.0.0
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* This file is auto generated.
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import type { ApiPlatformClientService } from
|
|
5
|
+
import type { ApiPlatformClientService } from './ApiPlatformClientService.js';
|
|
6
6
|
/**
|
|
7
7
|
* Returns the shared ApiPlatformClient instance.
|
|
8
8
|
*
|
|
@@ -18,4 +18,4 @@ export type ApiPlatformClientServiceGetApiPlatformClientAction = {
|
|
|
18
18
|
* Union of all ApiPlatformClientService action types.
|
|
19
19
|
*/
|
|
20
20
|
export type ApiPlatformClientServiceMethodActions = ApiPlatformClientServiceGetApiPlatformClientAction;
|
|
21
|
-
//# sourceMappingURL=ApiPlatformClientService-method-action-types.d.
|
|
21
|
+
//# sourceMappingURL=ApiPlatformClientService-method-action-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiPlatformClientService-method-action-types.d.ts","sourceRoot":"","sources":["../src/ApiPlatformClientService-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAE9E;;;;;;GAMG;AACH,MAAM,MAAM,kDAAkD,GAAG;IAC/D,IAAI,EAAE,+CAA+C,CAAC;IACtD,OAAO,EAAE,wBAAwB,CAAC,sBAAsB,CAAC,CAAC;CAC3D,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAC/C,kDAAkD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiPlatformClientService-method-action-types.js","sourceRoot":"","sources":["../src/ApiPlatformClientService-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { ApiPlatformClientService } from './ApiPlatformClientService.js';\n\n/**\n * Returns the shared ApiPlatformClient instance.\n *\n * Use this via the messenger: `messenger.call('ApiPlatformClientService:getApiPlatformClient')`.\n *\n * @returns The ApiPlatformClient instance (accounts, prices, token, tokens).\n */\nexport type ApiPlatformClientServiceGetApiPlatformClientAction = {\n type: `ApiPlatformClientService:getApiPlatformClient`;\n handler: ApiPlatformClientService['getApiPlatformClient'];\n};\n\n/**\n * Union of all ApiPlatformClientService action types.\n */\nexport type ApiPlatformClientServiceMethodActions =\n ApiPlatformClientServiceGetApiPlatformClientAction;\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Messenger } from
|
|
2
|
-
import { ApiPlatformClient } from
|
|
3
|
-
import type { ApiPlatformClientOptions } from
|
|
4
|
-
import type { ApiPlatformClientServiceMethodActions } from
|
|
1
|
+
import type { Messenger } from '@metamask/messenger';
|
|
2
|
+
import { ApiPlatformClient } from './api/index.js';
|
|
3
|
+
import type { ApiPlatformClientOptions } from './api/index.js';
|
|
4
|
+
import type { ApiPlatformClientServiceMethodActions } from './ApiPlatformClientService-method-action-types.js';
|
|
5
5
|
/**
|
|
6
6
|
* The name of the {@link ApiPlatformClientService}, used to namespace the
|
|
7
7
|
* service's actions and events.
|
|
@@ -83,4 +83,4 @@ export declare class ApiPlatformClientService {
|
|
|
83
83
|
getApiPlatformClient(): ApiPlatformClient;
|
|
84
84
|
}
|
|
85
85
|
export {};
|
|
86
|
-
//# sourceMappingURL=ApiPlatformClientService.d.
|
|
86
|
+
//# sourceMappingURL=ApiPlatformClientService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiPlatformClientService.d.ts","sourceRoot":"","sources":["../src/ApiPlatformClientService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,mDAAmD,CAAC;AAI/G;;;GAGG;AACH,eAAO,MAAM,4BAA4B,6BAA6B,CAAC;AAMvE;;GAEG;AACH,MAAM,MAAM,+BAA+B,GACzC,qCAAqC,CAAC;AAExC;;GAEG;AACH,KAAK,cAAc,GAAG,KAAK,CAAC;AAE5B;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,KAAK,CAAC;AAEnD;;GAEG;AACH,KAAK,aAAa,GAAG,KAAK,CAAC;AAE3B;;;GAGG;AACH,MAAM,MAAM,iCAAiC,GAAG,SAAS,CACvD,OAAO,4BAA4B,EACnC,+BAA+B,GAAG,cAAc,EAChD,8BAA8B,GAAG,aAAa,CAC/C,CAAC;AAIF;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C,6CAA6C;IAC7C,SAAS,EAAE,iCAAiC,CAAC;CAC9C,GAAG,wBAAwB,CAAC;AAI7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBAAa,wBAAwB;;IACnC,QAAQ,CAAC,IAAI,EAAE,OAAO,4BAA4B,CAAC;IAMnD,YAAY,EACV,SAAS,EACT,GAAG,aAAa,EACjB,EAAE,+BAA+B,EASjC;IAED;;;;;;OAMG;IACH,oBAAoB,IAAI,iBAAiB,CAExC;CACF"}
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
|
-
};
|
|
7
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
-
};
|
|
12
|
-
var _ApiPlatformClientService_messenger, _ApiPlatformClientService_client;
|
|
13
|
-
import { ApiPlatformClient } from "./api/index.mjs";
|
|
1
|
+
import { ApiPlatformClient } from './api/index.js';
|
|
14
2
|
// === GENERAL ===
|
|
15
3
|
/**
|
|
16
4
|
* The name of the {@link ApiPlatformClientService}, used to namespace the
|
|
@@ -55,13 +43,14 @@ const MESSENGER_EXPOSED_METHODS = ['getApiPlatformClient'];
|
|
|
55
43
|
* ```
|
|
56
44
|
*/
|
|
57
45
|
export class ApiPlatformClientService {
|
|
46
|
+
name;
|
|
47
|
+
#messenger;
|
|
48
|
+
#client;
|
|
58
49
|
constructor({ messenger, ...clientOptions }) {
|
|
59
|
-
_ApiPlatformClientService_messenger.set(this, void 0);
|
|
60
|
-
_ApiPlatformClientService_client.set(this, void 0);
|
|
61
50
|
this.name = apiPlatformClientServiceName;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
51
|
+
this.#messenger = messenger;
|
|
52
|
+
this.#client = new ApiPlatformClient(clientOptions);
|
|
53
|
+
this.#messenger.registerMethodActionHandlers(this, MESSENGER_EXPOSED_METHODS);
|
|
65
54
|
}
|
|
66
55
|
/**
|
|
67
56
|
* Returns the shared ApiPlatformClient instance.
|
|
@@ -71,8 +60,7 @@ export class ApiPlatformClientService {
|
|
|
71
60
|
* @returns The ApiPlatformClient instance (accounts, prices, token, tokens).
|
|
72
61
|
*/
|
|
73
62
|
getApiPlatformClient() {
|
|
74
|
-
return
|
|
63
|
+
return this.#client;
|
|
75
64
|
}
|
|
76
65
|
}
|
|
77
|
-
|
|
78
|
-
//# sourceMappingURL=ApiPlatformClientService.mjs.map
|
|
66
|
+
//# sourceMappingURL=ApiPlatformClientService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiPlatformClientService.js","sourceRoot":"","sources":["../src/ApiPlatformClientService.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAInD,kBAAkB;AAElB;;;GAGG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,0BAA0B,CAAC;AAEvE,oBAAoB;AAEpB,MAAM,yBAAyB,GAAG,CAAC,sBAAsB,CAAU,CAAC;AA2CpE,6BAA6B;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,OAAO,wBAAwB;IAC1B,IAAI,CAAsC;IAE1C,UAAU,CAAoC;IAE9C,OAAO,CAAoB;IAEpC,YAAY,EACV,SAAS,EACT,GAAG,aAAa,EACgB;QAChC,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC;QACzC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,IAAI,iBAAiB,CAAC,aAAa,CAAC,CAAC;QAEpD,IAAI,CAAC,UAAU,CAAC,4BAA4B,CAC1C,IAAI,EACJ,yBAAyB,CAC1B,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,oBAAoB;QAClB,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CACF","sourcesContent":["import type { Messenger } from '@metamask/messenger';\n\nimport { ApiPlatformClient } from './api/index.js';\nimport type { ApiPlatformClientOptions } from './api/index.js';\nimport type { ApiPlatformClientServiceMethodActions } from './ApiPlatformClientService-method-action-types.js';\n\n// === GENERAL ===\n\n/**\n * The name of the {@link ApiPlatformClientService}, used to namespace the\n * service's actions and events.\n */\nexport const apiPlatformClientServiceName = 'ApiPlatformClientService';\n\n// === MESSENGER ===\n\nconst MESSENGER_EXPOSED_METHODS = ['getApiPlatformClient'] as const;\n\n/**\n * Actions that {@link ApiPlatformClientService} exposes to other consumers.\n */\nexport type ApiPlatformClientServiceActions =\n ApiPlatformClientServiceMethodActions;\n\n/**\n * Actions from other messengers that {@link ApiPlatformClientServiceMessenger} calls.\n */\ntype AllowedActions = never;\n\n/**\n * Events that {@link ApiPlatformClientService} exposes to other consumers.\n */\nexport type ApiPlatformClientServiceEvents = never;\n\n/**\n * Events from other messengers that {@link ApiPlatformClientService} subscribes to.\n */\ntype AllowedEvents = never;\n\n/**\n * The messenger which is restricted to actions and events accessed by\n * {@link ApiPlatformClientService}.\n */\nexport type ApiPlatformClientServiceMessenger = Messenger<\n typeof apiPlatformClientServiceName,\n ApiPlatformClientServiceActions | AllowedActions,\n ApiPlatformClientServiceEvents | AllowedEvents\n>;\n\n// === SERVICE OPTIONS ===\n\n/**\n * Options for constructing {@link ApiPlatformClientService}.\n */\nexport type ApiPlatformClientServiceOptions = {\n /** The messenger suited for this service. */\n messenger: ApiPlatformClientServiceMessenger;\n} & ApiPlatformClientOptions;\n\n// === SERVICE DEFINITION ===\n\n/**\n * Service that provides access to {@link ApiPlatformClient} via the messenger.\n *\n * Consumers obtain the client by calling the `ApiPlatformClientService:getApiPlatformClient`\n * action, then use it for accounts, prices, token, and tokens API calls.\n *\n * @example\n *\n * ```ts\n * import { Messenger } from '@metamask/messenger';\n * import {\n * ApiPlatformClientService,\n * type ApiPlatformClientServiceActions,\n * type ApiPlatformClientServiceEvents,\n * } from '@metamask/core-backend';\n *\n * const rootMessenger = new Messenger<'Root', ApiPlatformClientServiceActions, ApiPlatformClientServiceEvents>({ namespace: 'Root' });\n * const serviceMessenger = new Messenger<\n * 'ApiPlatformClientService',\n * ApiPlatformClientServiceActions,\n * ApiPlatformClientServiceEvents,\n * typeof rootMessenger\n * >({ namespace: 'ApiPlatformClientService', parent: rootMessenger });\n *\n * new ApiPlatformClientService({\n * messenger: serviceMessenger,\n * clientProduct: 'metamask-extension',\n * getBearerToken: async () => token,\n * });\n *\n * const client = rootMessenger.call('ApiPlatformClientService:getApiPlatformClient');\n * const balances = await client.accounts.fetchV5MultiAccountBalances(accountIds);\n * ```\n */\nexport class ApiPlatformClientService {\n readonly name: typeof apiPlatformClientServiceName;\n\n readonly #messenger: ApiPlatformClientServiceMessenger;\n\n readonly #client: ApiPlatformClient;\n\n constructor({\n messenger,\n ...clientOptions\n }: ApiPlatformClientServiceOptions) {\n this.name = apiPlatformClientServiceName;\n this.#messenger = messenger;\n this.#client = new ApiPlatformClient(clientOptions);\n\n this.#messenger.registerMethodActionHandlers(\n this,\n MESSENGER_EXPOSED_METHODS,\n );\n }\n\n /**\n * Returns the shared ApiPlatformClient instance.\n *\n * Use this via the messenger: `messenger.call('ApiPlatformClientService:getApiPlatformClient')`.\n *\n * @returns The ApiPlatformClient instance (accounts, prices, token, tokens).\n */\n getApiPlatformClient(): ApiPlatformClient {\n return this.#client;\n }\n}\n"]}
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
* await client.prices.invalidatePrices(); // Domain-specific via sub-client
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
|
-
import { QueryClient } from
|
|
37
|
-
import type { QueryKey } from
|
|
38
|
-
import { AccountsApiClient } from
|
|
39
|
-
import { PricesApiClient } from
|
|
40
|
-
import type { ApiPlatformClientOptions } from
|
|
41
|
-
import { TokenApiClient } from
|
|
42
|
-
import { TokensApiClient } from
|
|
36
|
+
import { QueryClient } from '@tanstack/query-core';
|
|
37
|
+
import type { QueryKey } from '@tanstack/query-core';
|
|
38
|
+
import { AccountsApiClient } from './accounts/index.js';
|
|
39
|
+
import { PricesApiClient } from './prices/index.js';
|
|
40
|
+
import type { ApiPlatformClientOptions } from './shared-types.js';
|
|
41
|
+
import { TokenApiClient } from './token/index.js';
|
|
42
|
+
import { TokensApiClient } from './tokens/index.js';
|
|
43
43
|
/**
|
|
44
44
|
* MetaMask API Platform Client with TanStack Query caching.
|
|
45
45
|
* Provides cached access to all MetaMask backend APIs through a unified interface.
|
|
@@ -124,4 +124,4 @@ export declare class ApiPlatformClient {
|
|
|
124
124
|
* @returns A new ApiPlatformClient instance.
|
|
125
125
|
*/
|
|
126
126
|
export declare function createApiPlatformClient(options: ApiPlatformClientOptions): ApiPlatformClient;
|
|
127
|
-
//# sourceMappingURL=ApiPlatformClient.d.
|
|
127
|
+
//# sourceMappingURL=ApiPlatformClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiPlatformClient.d.ts","sourceRoot":"","sources":["../../src/api/ApiPlatformClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBA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.invalidatePrices(); // Domain-specific via sub-client
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
|
-
|
|
37
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
38
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
39
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
40
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
41
|
-
};
|
|
42
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
43
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
44
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
45
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
46
|
-
};
|
|
47
|
-
var _ApiPlatformClient_sharedQueryClient;
|
|
48
|
-
import { QueryClient } from "@tanstack/query-core";
|
|
36
|
+
import { QueryClient } from '@tanstack/query-core';
|
|
49
37
|
// Import API clients from subfolders
|
|
50
|
-
import { AccountsApiClient } from
|
|
51
|
-
import { authQueryKeys } from
|
|
52
|
-
import { PricesApiClient } from
|
|
53
|
-
import { STALE_TIMES, GC_TIMES, shouldRetry, calculateRetryDelay } from
|
|
54
|
-
import { TokenApiClient } from
|
|
55
|
-
import { TokensApiClient } from
|
|
38
|
+
import { AccountsApiClient } from './accounts/index.js';
|
|
39
|
+
import { authQueryKeys } from './base-client.js';
|
|
40
|
+
import { PricesApiClient } from './prices/index.js';
|
|
41
|
+
import { STALE_TIMES, GC_TIMES, shouldRetry, calculateRetryDelay, } from './shared-types.js';
|
|
42
|
+
import { TokenApiClient } from './token/index.js';
|
|
43
|
+
import { TokensApiClient } from './tokens/index.js';
|
|
56
44
|
// ============================================================================
|
|
57
45
|
// UNIFIED API CLIENT
|
|
58
46
|
// ============================================================================
|
|
@@ -67,29 +55,50 @@ import { TokensApiClient } from "./tokens/index.mjs";
|
|
|
67
55
|
* - `client.tokens` - Tokens API (bulk asset operations, supported networks)
|
|
68
56
|
*/
|
|
69
57
|
export class ApiPlatformClient {
|
|
58
|
+
/**
|
|
59
|
+
* Accounts API client.
|
|
60
|
+
* Provides methods for balances, transactions, relationships, NFTs, and token discovery.
|
|
61
|
+
*/
|
|
62
|
+
accounts;
|
|
63
|
+
/**
|
|
64
|
+
* Prices API client.
|
|
65
|
+
* Provides methods for spot prices, exchange rates, and historical prices.
|
|
66
|
+
*/
|
|
67
|
+
prices;
|
|
68
|
+
/**
|
|
69
|
+
* Token API client.
|
|
70
|
+
* Provides methods for token metadata, networks, trending tokens, and top assets.
|
|
71
|
+
*/
|
|
72
|
+
token;
|
|
73
|
+
/**
|
|
74
|
+
* Tokens API client.
|
|
75
|
+
* Provides methods for bulk asset operations and supported networks.
|
|
76
|
+
*/
|
|
77
|
+
tokens;
|
|
78
|
+
/**
|
|
79
|
+
* Shared QueryClient instance used by all sub-clients.
|
|
80
|
+
*/
|
|
81
|
+
#sharedQueryClient;
|
|
70
82
|
constructor(options) {
|
|
71
|
-
/**
|
|
72
|
-
* Shared QueryClient instance used by all sub-clients.
|
|
73
|
-
*/
|
|
74
|
-
_ApiPlatformClient_sharedQueryClient.set(this, void 0);
|
|
75
83
|
// Create or use provided QueryClient - shared by all sub-clients
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
this.#sharedQueryClient =
|
|
85
|
+
options.queryClient ??
|
|
86
|
+
new QueryClient({
|
|
87
|
+
defaultOptions: {
|
|
88
|
+
queries: {
|
|
89
|
+
staleTime: STALE_TIMES.DEFAULT,
|
|
90
|
+
gcTime: GC_TIMES.DEFAULT,
|
|
91
|
+
retry: shouldRetry,
|
|
92
|
+
retryDelay: calculateRetryDelay,
|
|
93
|
+
refetchOnWindowFocus: false,
|
|
94
|
+
networkMode: 'always',
|
|
95
|
+
},
|
|
86
96
|
},
|
|
87
|
-
}
|
|
88
|
-
}), "f");
|
|
97
|
+
});
|
|
89
98
|
// Pass the shared QueryClient to all sub-clients
|
|
90
99
|
const sharedOptions = {
|
|
91
100
|
...options,
|
|
92
|
-
queryClient:
|
|
101
|
+
queryClient: this.#sharedQueryClient,
|
|
93
102
|
};
|
|
94
103
|
this.accounts = new AccountsApiClient(sharedOptions);
|
|
95
104
|
this.prices = new PricesApiClient(sharedOptions);
|
|
@@ -105,7 +114,7 @@ export class ApiPlatformClient {
|
|
|
105
114
|
* @returns The underlying QueryClient instance.
|
|
106
115
|
*/
|
|
107
116
|
get queryClient() {
|
|
108
|
-
return
|
|
117
|
+
return this.#sharedQueryClient;
|
|
109
118
|
}
|
|
110
119
|
/**
|
|
111
120
|
* Get cached data for a query key.
|
|
@@ -114,7 +123,7 @@ export class ApiPlatformClient {
|
|
|
114
123
|
* @returns The cached data or undefined.
|
|
115
124
|
*/
|
|
116
125
|
getCachedData(queryKey) {
|
|
117
|
-
return
|
|
126
|
+
return this.#sharedQueryClient.getQueryData(queryKey);
|
|
118
127
|
}
|
|
119
128
|
/**
|
|
120
129
|
* Set cached data for a query key.
|
|
@@ -123,7 +132,7 @@ export class ApiPlatformClient {
|
|
|
123
132
|
* @param data - The data to cache.
|
|
124
133
|
*/
|
|
125
134
|
setCachedData(queryKey, data) {
|
|
126
|
-
|
|
135
|
+
this.#sharedQueryClient.setQueryData(queryKey, data);
|
|
127
136
|
}
|
|
128
137
|
/**
|
|
129
138
|
* Check if a query is currently fetching.
|
|
@@ -132,19 +141,19 @@ export class ApiPlatformClient {
|
|
|
132
141
|
* @returns True if the query is currently fetching.
|
|
133
142
|
*/
|
|
134
143
|
isFetching(queryKey) {
|
|
135
|
-
return
|
|
144
|
+
return this.#sharedQueryClient.isFetching({ queryKey }) > 0;
|
|
136
145
|
}
|
|
137
146
|
/**
|
|
138
147
|
* Clear all cached data across all sub-clients.
|
|
139
148
|
*/
|
|
140
149
|
clear() {
|
|
141
|
-
|
|
150
|
+
this.#sharedQueryClient.clear();
|
|
142
151
|
}
|
|
143
152
|
/**
|
|
144
153
|
* Invalidate all queries across all sub-clients.
|
|
145
154
|
*/
|
|
146
155
|
async invalidateAll() {
|
|
147
|
-
await
|
|
156
|
+
await this.#sharedQueryClient.invalidateQueries();
|
|
148
157
|
}
|
|
149
158
|
/**
|
|
150
159
|
* Invalidate the cached auth token.
|
|
@@ -154,12 +163,11 @@ export class ApiPlatformClient {
|
|
|
154
163
|
* the cached value, ensuring the next request fetches a fresh token immediately.
|
|
155
164
|
*/
|
|
156
165
|
async invalidateAuthToken() {
|
|
157
|
-
await
|
|
166
|
+
await this.#sharedQueryClient.resetQueries({
|
|
158
167
|
queryKey: authQueryKeys.bearerToken(),
|
|
159
168
|
});
|
|
160
169
|
}
|
|
161
170
|
}
|
|
162
|
-
_ApiPlatformClient_sharedQueryClient = new WeakMap();
|
|
163
171
|
/**
|
|
164
172
|
* Factory function to create an ApiPlatformClient.
|
|
165
173
|
*
|
|
@@ -169,4 +177,4 @@ _ApiPlatformClient_sharedQueryClient = new WeakMap();
|
|
|
169
177
|
export function createApiPlatformClient(options) {
|
|
170
178
|
return new ApiPlatformClient(options);
|
|
171
179
|
}
|
|
172
|
-
//# sourceMappingURL=ApiPlatformClient.
|
|
180
|
+
//# sourceMappingURL=ApiPlatformClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiPlatformClient.
|
|
1
|
+
{"version":3,"file":"ApiPlatformClient.js","sourceRoot":"","sources":["../../src/api/ApiPlatformClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGnD,qCAAqC;AACrC,OAA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IAAI,cAAc,CAAC,aAAa,CAAC,CAAC;QAC/C,IAAI,CAAC,MAAM,GAAG,IAAI,eAAe,CAAC,aAAa,CAAC,CAAC;IACnD,CAAC;IAED,6EAA6E;IAC7E,oDAAoD;IACpD,6EAA6E;IAE7E;;;;OAIG;IACH,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACjC,CAAC;IAED;;;;;OAKG;IACH,aAAa,CAAa,QAAkB;QAC1C,OAAO,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAa,QAAQ,CAAC,CAAC;IACpE,CAAC;IAED;;;;;OAKG;IACH,aAAa,CAAa,QAAkB,EAAE,IAAgB;QAC5D,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC;IAED;;;;;OAKG;IACH,UAAU,CAAC,QAAkB;QAC3B,OAAO,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACH,KAAK;QACH,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,aAAa;QACjB,MAAM,IAAI,CAAC,kBAAkB,CAAC,iBAAiB,EAAE,CAAC;IACpD,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,mBAAmB;QACvB,MAAM,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC;YACzC,QAAQ,EAAE,aAAa,CAAC,WAAW,EAAE;SACtC,CAAC,CAAC;IACL,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CACrC,OAAiC;IAEjC,OAAO,IAAI,iBAAiB,CAAC,OAAO,CAAC,CAAC;AACxC,CAAC","sourcesContent":["/**\n * ApiPlatformClient - MetaMask API Platform Client\n *\n * A comprehensive API client that uses @tanstack/query-core directly for:\n * - Automatic request deduplication\n * - Intelligent caching\n * - Automatic retries with exponential backoff\n *\n * Provides unified access to all MetaMask backend APIs:\n * - Accounts API (accounts.api.cx.metamask.io)\n * - Price API (price.api.cx.metamask.io)\n * - Token API (token.api.cx.metamask.io)\n * - Tokens API (tokens.api.cx.metamask.io)\n *\n * @example\n * ```typescript\n * const client = new ApiPlatformClient({\n * clientProduct: 'metamask-extension',\n * getBearerToken: async () => token,\n * });\n *\n * // Access API methods through sub-clients\n * const networks = await client.accounts.fetchV2SupportedNetworks();\n * const balances = await client.accounts.fetchV5MultiAccountBalances(accountIds);\n * const prices = await client.prices.fetchV3SpotPrices(assetIds);\n * const tokenList = await client.token.fetchTokenList(1);\n * const assets = await client.tokens.fetchV3Assets(assetIds);\n *\n * // Cache management\n * await client.invalidateAll(); // Invalidate all caches\n * await client.invalidateAuthToken(); // Invalidate auth token\n * await client.accounts.invalidateBalances(); // Domain-specific via sub-client\n * await client.prices.invalidatePrices(); // Domain-specific via sub-client\n * ```\n */\n\nimport { QueryClient } from '@tanstack/query-core';\nimport type { QueryKey } from '@tanstack/query-core';\n\n// Import API clients from subfolders\nimport { AccountsApiClient } from './accounts/index.js';\nimport { authQueryKeys } from './base-client.js';\nimport { PricesApiClient } from './prices/index.js';\nimport {\n STALE_TIMES,\n GC_TIMES,\n shouldRetry,\n calculateRetryDelay,\n} from './shared-types.js';\nimport type { ApiPlatformClientOptions } from './shared-types.js';\nimport { TokenApiClient } from './token/index.js';\nimport { TokensApiClient } from './tokens/index.js';\n\n// ============================================================================\n// UNIFIED API CLIENT\n// ============================================================================\n\n/**\n * MetaMask API Platform Client with TanStack Query caching.\n * Provides cached access to all MetaMask backend APIs through a unified interface.\n *\n * Access API methods through the sub-clients:\n * - `client.accounts` - Accounts API (balances, transactions, NFTs, etc.)\n * - `client.prices` - Prices API (spot prices, exchange rates, historical prices)\n * - `client.token` - Token API (token metadata, trending, top gainers)\n * - `client.tokens` - Tokens API (bulk asset operations, supported networks)\n */\nexport class ApiPlatformClient {\n /**\n * Accounts API client.\n * Provides methods for balances, transactions, relationships, NFTs, and token discovery.\n */\n readonly accounts: AccountsApiClient;\n\n /**\n * Prices API client.\n * Provides methods for spot prices, exchange rates, and historical prices.\n */\n readonly prices: PricesApiClient;\n\n /**\n * Token API client.\n * Provides methods for token metadata, networks, trending tokens, and top assets.\n */\n readonly token: TokenApiClient;\n\n /**\n * Tokens API client.\n * Provides methods for bulk asset operations and supported networks.\n */\n readonly tokens: TokensApiClient;\n\n /**\n * Shared QueryClient instance used by all sub-clients.\n */\n readonly #sharedQueryClient: QueryClient;\n\n constructor(options: ApiPlatformClientOptions) {\n // Create or use provided QueryClient - shared by all sub-clients\n this.#sharedQueryClient =\n options.queryClient ??\n new QueryClient({\n defaultOptions: {\n queries: {\n staleTime: STALE_TIMES.DEFAULT,\n gcTime: GC_TIMES.DEFAULT,\n retry: shouldRetry,\n retryDelay: calculateRetryDelay,\n refetchOnWindowFocus: false,\n networkMode: 'always',\n },\n },\n });\n\n // Pass the shared QueryClient to all sub-clients\n const sharedOptions: ApiPlatformClientOptions = {\n ...options,\n queryClient: this.#sharedQueryClient,\n };\n\n this.accounts = new AccountsApiClient(sharedOptions);\n this.prices = new PricesApiClient(sharedOptions);\n this.token = new TokenApiClient(sharedOptions);\n this.tokens = new TokensApiClient(sharedOptions);\n }\n\n // ==========================================================================\n // CACHE MANAGEMENT (operates on shared QueryClient)\n // ==========================================================================\n\n /**\n * Get the underlying QueryClient (for advanced usage).\n *\n * @returns The underlying QueryClient instance.\n */\n get queryClient(): QueryClient {\n return this.#sharedQueryClient;\n }\n\n /**\n * Get cached data for a query key.\n *\n * @param queryKey - The query key to look up.\n * @returns The cached data or undefined.\n */\n getCachedData<CachedData>(queryKey: QueryKey): CachedData | undefined {\n return this.#sharedQueryClient.getQueryData<CachedData>(queryKey);\n }\n\n /**\n * Set cached data for a query key.\n *\n * @param queryKey - The query key to set data for.\n * @param data - The data to cache.\n */\n setCachedData<CachedData>(queryKey: QueryKey, data: CachedData): void {\n this.#sharedQueryClient.setQueryData(queryKey, data);\n }\n\n /**\n * Check if a query is currently fetching.\n *\n * @param queryKey - The query key to check.\n * @returns True if the query is currently fetching.\n */\n isFetching(queryKey: QueryKey): boolean {\n return this.#sharedQueryClient.isFetching({ queryKey }) > 0;\n }\n\n /**\n * Clear all cached data across all sub-clients.\n */\n clear(): void {\n this.#sharedQueryClient.clear();\n }\n\n /**\n * Invalidate all queries across all sub-clients.\n */\n async invalidateAll(): Promise<void> {\n await this.#sharedQueryClient.invalidateQueries();\n }\n\n /**\n * Invalidate the cached auth token.\n * Call this when the user logs out or the token expires.\n *\n * Uses resetQueries() instead of invalidateQueries() to completely remove\n * the cached value, ensuring the next request fetches a fresh token immediately.\n */\n async invalidateAuthToken(): Promise<void> {\n await this.#sharedQueryClient.resetQueries({\n queryKey: authQueryKeys.bearerToken(),\n });\n }\n}\n\n/**\n * Factory function to create an ApiPlatformClient.\n *\n * @param options - Configuration options for the client.\n * @returns A new ApiPlatformClient instance.\n */\nexport function createApiPlatformClient(\n options: ApiPlatformClientOptions,\n): ApiPlatformClient {\n return new ApiPlatformClient(options);\n}\n"]}
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
* - NFTs
|
|
11
11
|
* - Token discovery
|
|
12
12
|
*/
|
|
13
|
-
import type { FetchInfiniteQueryOptions, FetchQueryOptions } from
|
|
14
|
-
import { BaseApiClient } from
|
|
15
|
-
import type { FetchOptions } from
|
|
16
|
-
import type { V1SupportedNetworksResponse, V2SupportedNetworksResponse, V2ActiveNetworksResponse, V2BalancesResponse, V4BalancesResponse, V5BalancesResponse, V6BalancesResponse, V6VsCurrency, V1TransactionByHashResponse, V1AccountTransactionsResponse, V4MultiAccountTransactionsResponse, V1AccountRelationshipResult, V2NftsResponse, V2TokensResponse } from
|
|
13
|
+
import type { FetchInfiniteQueryOptions, FetchQueryOptions } from '@tanstack/query-core';
|
|
14
|
+
import { BaseApiClient } from '../base-client.js';
|
|
15
|
+
import type { FetchOptions } from '../shared-types.js';
|
|
16
|
+
import type { V1SupportedNetworksResponse, V2SupportedNetworksResponse, V2ActiveNetworksResponse, V2BalancesResponse, V4BalancesResponse, V5BalancesResponse, V6BalancesResponse, V6VsCurrency, V1TransactionByHashResponse, V1AccountTransactionsResponse, V4MultiAccountTransactionsResponse, V1AccountRelationshipResult, V2NftsResponse, V2TokensResponse } from './types.js';
|
|
17
17
|
/**
|
|
18
18
|
* Accounts API Client.
|
|
19
19
|
* Provides methods for interacting with the Accounts API.
|
|
@@ -497,4 +497,4 @@ export declare class AccountsApiClient extends BaseApiClient {
|
|
|
497
497
|
networks?: number[];
|
|
498
498
|
}, options?: FetchOptions): Promise<V2TokensResponse>;
|
|
499
499
|
}
|
|
500
|
-
//# sourceMappingURL=client.d.
|
|
500
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/api/accounts/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EACV,yBAAyB,EACzB,iBAAiB,EAElB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,aAAa,EAId,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EACV,2BAA2B,EAC3B,2BAA2B,EAC3B,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,YAAY,EACZ,2BAA2B,EAC3B,6BAA6B,EAC7B,kCAAkC,EAClC,2BAA2B,EAC3B,cAAc,EACd,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAapB;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,aAAa;IAKlD;;OAEG;IACG,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAIxC;IAED;;OAEG;IACG,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAIxC;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,GACrB,OAAO,CAAC,2BAA2B,CAAC,CAItC;IAMD;;;;;;;;;OASG;IACH,4BAA4B,CAC1B,OAAO,EAAE,MAAM,EACf,YAAY,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,EACvD,OAAO,CAAC,EAAE,YAAY,GACrB,iBAAiB,CAAC,cAAc,CAAC,CAoCnC;IAED;;;;;;;;;OASG;IACG,kBAAkB,CACtB,OAAO,EAAE,MAAM,EACf,YAAY,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,EACvD,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,cAAc,CAAC,CAOzB;IAMD;;;;;;;;OAQG;IACH,8BAA8B,CAC5B,OAAO,EAAE,MAAM,EACf,YAAY,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,EACtC,OAAO,CAAC,EAAE,YAAY,GACrB,iBAAiB,CAAC,gBAAgB,CAAC,CAiCrC;IAED;;;;;;;;OAQG;IACG,oBAAoB,CACxB,OAAO,EAAE,MAAM,EACf,YAAY,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,EACtC,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,gBAAgB,CAAC,CAO3B;CACF"}
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* - NFTs
|
|
11
11
|
* - Token discovery
|
|
12
12
|
*/
|
|
13
|
-
import { BaseApiClient, API_URLS, STALE_TIMES, GC_TIMES } from
|
|
14
|
-
import { getQueryOptionsOverrides } from
|
|
13
|
+
import { BaseApiClient, API_URLS, STALE_TIMES, GC_TIMES, } from '../base-client.js';
|
|
14
|
+
import { getQueryOptionsOverrides } from '../shared-types.js';
|
|
15
15
|
/**
|
|
16
16
|
* Generate a short random value for the `bypassServerCache` query param. The
|
|
17
17
|
* Accounts API's server-side cache keys on the full URL including query
|
|
@@ -861,4 +861,4 @@ export class AccountsApiClient extends BaseApiClient {
|
|
|
861
861
|
return this.queryClient.fetchQuery(this.getV2AccountTokensQueryOptions(address, queryOptions, options));
|
|
862
862
|
}
|
|
863
863
|
}
|
|
864
|
-
//# sourceMappingURL=client.
|
|
864
|
+
//# sourceMappingURL=client.js.map
|