@metamask-previews/assets-controllers 45.1.0-preview-5544fdb2 → 45.1.0-preview-8a04affb

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ### Fixed
11
+
12
+ - Make implicit peer dependencies explicit ([#4974](https://github.com/MetaMask/core/pull/4974))
13
+ - Add the following packages as peer dependencies of this package to satisfy peer dependency requirements from other dependencies:
14
+ - `@metamask/providers` `^18.1.0` (required by `@metamask/keyring-api`)
15
+ - `webextension-polyfill` `^0.10.0 || ^0.11.0 || ^0.12.0` (required by `@metamask/providers`)
16
+ - These dependencies really should be present in projects that consume this package (e.g. MetaMask clients), and this change ensures that they now are.
17
+ - Furthermore, we are assuming that clients already use these dependencies, since otherwise it would be impossible to consume this package in its entirety or even create a working build. Hence, the addition of these peer dependencies is really a formality and should not be breaking.
18
+
10
19
  ## [45.1.0]
11
20
 
12
21
  ### Added
@@ -65,14 +65,14 @@ type AccountTrackerPollingInput = {
65
65
  networkClientId: NetworkClientId;
66
66
  };
67
67
  declare const AccountTrackerController_base: (abstract new (...args: any[]) => {
68
- readonly "__#787833@#intervalIds": Record<string, NodeJS.Timeout>;
69
- "__#787833@#intervalLength": number | undefined;
68
+ readonly "__#787811@#intervalIds": Record<string, NodeJS.Timeout>;
69
+ "__#787811@#intervalLength": number | undefined;
70
70
  setIntervalLength(intervalLength: number): void;
71
71
  getIntervalLength(): number | undefined;
72
72
  _startPolling(input: AccountTrackerPollingInput): void;
73
73
  _stopPollingByPollingTokenSetId(key: string): void;
74
- readonly "__#787825@#pollingTokenSets": Map<string, Set<string>>;
75
- "__#787825@#callbacks": Map<string, Set<(input: AccountTrackerPollingInput) => void>>;
74
+ readonly "__#787803@#pollingTokenSets": Map<string, Set<string>>;
75
+ "__#787803@#callbacks": Map<string, Set<(input: AccountTrackerPollingInput) => void>>;
76
76
  _executePoll(input: AccountTrackerPollingInput): Promise<void>;
77
77
  startPolling(input: AccountTrackerPollingInput): string;
78
78
  stopAllPolling(): void;
@@ -65,14 +65,14 @@ type AccountTrackerPollingInput = {
65
65
  networkClientId: NetworkClientId;
66
66
  };
67
67
  declare const AccountTrackerController_base: (abstract new (...args: any[]) => {
68
- readonly "__#787833@#intervalIds": Record<string, NodeJS.Timeout>;
69
- "__#787833@#intervalLength": number | undefined;
68
+ readonly "__#787811@#intervalIds": Record<string, NodeJS.Timeout>;
69
+ "__#787811@#intervalLength": number | undefined;
70
70
  setIntervalLength(intervalLength: number): void;
71
71
  getIntervalLength(): number | undefined;
72
72
  _startPolling(input: AccountTrackerPollingInput): void;
73
73
  _stopPollingByPollingTokenSetId(key: string): void;
74
- readonly "__#787825@#pollingTokenSets": Map<string, Set<string>>;
75
- "__#787825@#callbacks": Map<string, Set<(input: AccountTrackerPollingInput) => void>>;
74
+ readonly "__#787803@#pollingTokenSets": Map<string, Set<string>>;
75
+ "__#787803@#callbacks": Map<string, Set<(input: AccountTrackerPollingInput) => void>>;
76
76
  _executePoll(input: AccountTrackerPollingInput): Promise<void>;
77
77
  startPolling(input: AccountTrackerPollingInput): string;
78
78
  stopAllPolling(): void;
@@ -29,14 +29,14 @@ type CurrencyRatePollingInput = {
29
29
  nativeCurrencies: string[];
30
30
  };
31
31
  declare const CurrencyRateController_base: (abstract new (...args: any[]) => {
32
- readonly "__#787833@#intervalIds": Record<string, NodeJS.Timeout>;
33
- "__#787833@#intervalLength": number | undefined;
32
+ readonly "__#787811@#intervalIds": Record<string, NodeJS.Timeout>;
33
+ "__#787811@#intervalLength": number | undefined;
34
34
  setIntervalLength(intervalLength: number): void;
35
35
  getIntervalLength(): number | undefined;
36
36
  _startPolling(input: CurrencyRatePollingInput): void;
37
37
  _stopPollingByPollingTokenSetId(key: string): void;
38
- readonly "__#787825@#pollingTokenSets": Map<string, Set<string>>;
39
- "__#787825@#callbacks": Map<string, Set<(input: CurrencyRatePollingInput) => void>>;
38
+ readonly "__#787803@#pollingTokenSets": Map<string, Set<string>>;
39
+ "__#787803@#callbacks": Map<string, Set<(input: CurrencyRatePollingInput) => void>>;
40
40
  _executePoll(input: CurrencyRatePollingInput): Promise<void>;
41
41
  startPolling(input: CurrencyRatePollingInput): string;
42
42
  stopAllPolling(): void;
@@ -29,14 +29,14 @@ type CurrencyRatePollingInput = {
29
29
  nativeCurrencies: string[];
30
30
  };
31
31
  declare const CurrencyRateController_base: (abstract new (...args: any[]) => {
32
- readonly "__#787833@#intervalIds": Record<string, NodeJS.Timeout>;
33
- "__#787833@#intervalLength": number | undefined;
32
+ readonly "__#787811@#intervalIds": Record<string, NodeJS.Timeout>;
33
+ "__#787811@#intervalLength": number | undefined;
34
34
  setIntervalLength(intervalLength: number): void;
35
35
  getIntervalLength(): number | undefined;
36
36
  _startPolling(input: CurrencyRatePollingInput): void;
37
37
  _stopPollingByPollingTokenSetId(key: string): void;
38
- readonly "__#787825@#pollingTokenSets": Map<string, Set<string>>;
39
- "__#787825@#callbacks": Map<string, Set<(input: CurrencyRatePollingInput) => void>>;
38
+ readonly "__#787803@#pollingTokenSets": Map<string, Set<string>>;
39
+ "__#787803@#callbacks": Map<string, Set<(input: CurrencyRatePollingInput) => void>>;
40
40
  _executePoll(input: CurrencyRatePollingInput): Promise<void>;
41
41
  startPolling(input: CurrencyRatePollingInput): string;
42
42
  stopAllPolling(): void;
@@ -45,14 +45,14 @@ export type TokenBalancesPollingInput = {
45
45
  chainId: Hex;
46
46
  };
47
47
  declare const TokenBalancesController_base: (abstract new (...args: any[]) => {
48
- readonly "__#787833@#intervalIds": Record<string, NodeJS.Timeout>;
49
- "__#787833@#intervalLength": number | undefined;
48
+ readonly "__#787811@#intervalIds": Record<string, NodeJS.Timeout>;
49
+ "__#787811@#intervalLength": number | undefined;
50
50
  setIntervalLength(intervalLength: number): void;
51
51
  getIntervalLength(): number | undefined;
52
52
  _startPolling(input: TokenBalancesPollingInput): void;
53
53
  _stopPollingByPollingTokenSetId(key: string): void;
54
- readonly "__#787825@#pollingTokenSets": Map<string, Set<string>>;
55
- "__#787825@#callbacks": Map<string, Set<(input: TokenBalancesPollingInput) => void>>;
54
+ readonly "__#787803@#pollingTokenSets": Map<string, Set<string>>;
55
+ "__#787803@#callbacks": Map<string, Set<(input: TokenBalancesPollingInput) => void>>;
56
56
  _executePoll(input: TokenBalancesPollingInput): Promise<void>;
57
57
  startPolling(input: TokenBalancesPollingInput): string;
58
58
  stopAllPolling(): void;
@@ -45,14 +45,14 @@ export type TokenBalancesPollingInput = {
45
45
  chainId: Hex;
46
46
  };
47
47
  declare const TokenBalancesController_base: (abstract new (...args: any[]) => {
48
- readonly "__#787833@#intervalIds": Record<string, NodeJS.Timeout>;
49
- "__#787833@#intervalLength": number | undefined;
48
+ readonly "__#787811@#intervalIds": Record<string, NodeJS.Timeout>;
49
+ "__#787811@#intervalLength": number | undefined;
50
50
  setIntervalLength(intervalLength: number): void;
51
51
  getIntervalLength(): number | undefined;
52
52
  _startPolling(input: TokenBalancesPollingInput): void;
53
53
  _stopPollingByPollingTokenSetId(key: string): void;
54
- readonly "__#787825@#pollingTokenSets": Map<string, Set<string>>;
55
- "__#787825@#callbacks": Map<string, Set<(input: TokenBalancesPollingInput) => void>>;
54
+ readonly "__#787803@#pollingTokenSets": Map<string, Set<string>>;
55
+ "__#787803@#callbacks": Map<string, Set<(input: TokenBalancesPollingInput) => void>>;
56
56
  _executePoll(input: TokenBalancesPollingInput): Promise<void>;
57
57
  startPolling(input: TokenBalancesPollingInput): string;
58
58
  stopAllPolling(): void;
@@ -34,14 +34,14 @@ type TokenDetectionPollingInput = {
34
34
  address: string;
35
35
  };
36
36
  declare const TokenDetectionController_base: (abstract new (...args: any[]) => {
37
- readonly "__#787833@#intervalIds": Record<string, NodeJS.Timeout>;
38
- "__#787833@#intervalLength": number | undefined;
37
+ readonly "__#787811@#intervalIds": Record<string, NodeJS.Timeout>;
38
+ "__#787811@#intervalLength": number | undefined;
39
39
  setIntervalLength(intervalLength: number): void;
40
40
  getIntervalLength(): number | undefined;
41
41
  _startPolling(input: TokenDetectionPollingInput): void;
42
42
  _stopPollingByPollingTokenSetId(key: string): void;
43
- readonly "__#787825@#pollingTokenSets": Map<string, Set<string>>;
44
- "__#787825@#callbacks": Map<string, Set<(input: TokenDetectionPollingInput) => void>>;
43
+ readonly "__#787803@#pollingTokenSets": Map<string, Set<string>>;
44
+ "__#787803@#callbacks": Map<string, Set<(input: TokenDetectionPollingInput) => void>>;
45
45
  _executePoll(input: TokenDetectionPollingInput): Promise<void>;
46
46
  startPolling(input: TokenDetectionPollingInput): string;
47
47
  stopAllPolling(): void;
@@ -34,14 +34,14 @@ type TokenDetectionPollingInput = {
34
34
  address: string;
35
35
  };
36
36
  declare const TokenDetectionController_base: (abstract new (...args: any[]) => {
37
- readonly "__#787833@#intervalIds": Record<string, NodeJS.Timeout>;
38
- "__#787833@#intervalLength": number | undefined;
37
+ readonly "__#787811@#intervalIds": Record<string, NodeJS.Timeout>;
38
+ "__#787811@#intervalLength": number | undefined;
39
39
  setIntervalLength(intervalLength: number): void;
40
40
  getIntervalLength(): number | undefined;
41
41
  _startPolling(input: TokenDetectionPollingInput): void;
42
42
  _stopPollingByPollingTokenSetId(key: string): void;
43
- readonly "__#787825@#pollingTokenSets": Map<string, Set<string>>;
44
- "__#787825@#callbacks": Map<string, Set<(input: TokenDetectionPollingInput) => void>>;
43
+ readonly "__#787803@#pollingTokenSets": Map<string, Set<string>>;
44
+ "__#787803@#callbacks": Map<string, Set<(input: TokenDetectionPollingInput) => void>>;
45
45
  _executePoll(input: TokenDetectionPollingInput): Promise<void>;
46
46
  startPolling(input: TokenDetectionPollingInput): string;
47
47
  stopAllPolling(): void;
@@ -37,14 +37,14 @@ type TokenListPollingInput = {
37
37
  chainId: Hex;
38
38
  };
39
39
  declare const TokenListController_base: (abstract new (...args: any[]) => {
40
- readonly "__#787833@#intervalIds": Record<string, NodeJS.Timeout>;
41
- "__#787833@#intervalLength": number | undefined;
40
+ readonly "__#787811@#intervalIds": Record<string, NodeJS.Timeout>;
41
+ "__#787811@#intervalLength": number | undefined;
42
42
  setIntervalLength(intervalLength: number): void;
43
43
  getIntervalLength(): number | undefined;
44
44
  _startPolling(input: TokenListPollingInput): void;
45
45
  _stopPollingByPollingTokenSetId(key: string): void;
46
- readonly "__#787825@#pollingTokenSets": Map<string, Set<string>>;
47
- "__#787825@#callbacks": Map<string, Set<(input: TokenListPollingInput) => void>>;
46
+ readonly "__#787803@#pollingTokenSets": Map<string, Set<string>>;
47
+ "__#787803@#callbacks": Map<string, Set<(input: TokenListPollingInput) => void>>;
48
48
  _executePoll(input: TokenListPollingInput): Promise<void>;
49
49
  startPolling(input: TokenListPollingInput): string;
50
50
  stopAllPolling(): void;
@@ -37,14 +37,14 @@ type TokenListPollingInput = {
37
37
  chainId: Hex;
38
38
  };
39
39
  declare const TokenListController_base: (abstract new (...args: any[]) => {
40
- readonly "__#787833@#intervalIds": Record<string, NodeJS.Timeout>;
41
- "__#787833@#intervalLength": number | undefined;
40
+ readonly "__#787811@#intervalIds": Record<string, NodeJS.Timeout>;
41
+ "__#787811@#intervalLength": number | undefined;
42
42
  setIntervalLength(intervalLength: number): void;
43
43
  getIntervalLength(): number | undefined;
44
44
  _startPolling(input: TokenListPollingInput): void;
45
45
  _stopPollingByPollingTokenSetId(key: string): void;
46
- readonly "__#787825@#pollingTokenSets": Map<string, Set<string>>;
47
- "__#787825@#callbacks": Map<string, Set<(input: TokenListPollingInput) => void>>;
46
+ readonly "__#787803@#pollingTokenSets": Map<string, Set<string>>;
47
+ "__#787803@#callbacks": Map<string, Set<(input: TokenListPollingInput) => void>>;
48
48
  _executePoll(input: TokenListPollingInput): Promise<void>;
49
49
  startPolling(input: TokenListPollingInput): string;
50
50
  stopAllPolling(): void;
@@ -108,14 +108,14 @@ export type TokenRatesPollingInput = {
108
108
  chainId: Hex;
109
109
  };
110
110
  declare const TokenRatesController_base: (abstract new (...args: any[]) => {
111
- readonly "__#787833@#intervalIds": Record<string, NodeJS.Timeout>;
112
- "__#787833@#intervalLength": number | undefined;
111
+ readonly "__#787811@#intervalIds": Record<string, NodeJS.Timeout>;
112
+ "__#787811@#intervalLength": number | undefined;
113
113
  setIntervalLength(intervalLength: number): void;
114
114
  getIntervalLength(): number | undefined;
115
115
  _startPolling(input: TokenRatesPollingInput): void;
116
116
  _stopPollingByPollingTokenSetId(key: string): void;
117
- readonly "__#787825@#pollingTokenSets": Map<string, Set<string>>;
118
- "__#787825@#callbacks": Map<string, Set<(input: TokenRatesPollingInput) => void>>;
117
+ readonly "__#787803@#pollingTokenSets": Map<string, Set<string>>;
118
+ "__#787803@#callbacks": Map<string, Set<(input: TokenRatesPollingInput) => void>>;
119
119
  _executePoll(input: TokenRatesPollingInput): Promise<void>;
120
120
  startPolling(input: TokenRatesPollingInput): string;
121
121
  stopAllPolling(): void;
@@ -108,14 +108,14 @@ export type TokenRatesPollingInput = {
108
108
  chainId: Hex;
109
109
  };
110
110
  declare const TokenRatesController_base: (abstract new (...args: any[]) => {
111
- readonly "__#787833@#intervalIds": Record<string, NodeJS.Timeout>;
112
- "__#787833@#intervalLength": number | undefined;
111
+ readonly "__#787811@#intervalIds": Record<string, NodeJS.Timeout>;
112
+ "__#787811@#intervalLength": number | undefined;
113
113
  setIntervalLength(intervalLength: number): void;
114
114
  getIntervalLength(): number | undefined;
115
115
  _startPolling(input: TokenRatesPollingInput): void;
116
116
  _stopPollingByPollingTokenSetId(key: string): void;
117
- readonly "__#787825@#pollingTokenSets": Map<string, Set<string>>;
118
- "__#787825@#callbacks": Map<string, Set<(input: TokenRatesPollingInput) => void>>;
117
+ readonly "__#787803@#pollingTokenSets": Map<string, Set<string>>;
118
+ "__#787803@#callbacks": Map<string, Set<(input: TokenRatesPollingInput) => void>>;
119
119
  _executePoll(input: TokenRatesPollingInput): Promise<void>;
120
120
  startPolling(input: TokenRatesPollingInput): string;
121
121
  stopAllPolling(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/assets-controllers",
3
- "version": "45.1.0-preview-5544fdb2",
3
+ "version": "45.1.0-preview-8a04affb",
4
4
  "description": "Controllers which manage interactions involving ERC-20, ERC-721, and ERC-1155 tokens (including NFTs)",
5
5
  "keywords": [
6
6
  "MetaMask",
@@ -74,6 +74,7 @@
74
74
  "uuid": "^8.3.2"
75
75
  },
76
76
  "devDependencies": {
77
+ "@babel/runtime": "^7.23.9",
77
78
  "@metamask/accounts-controller": "^20.0.0",
78
79
  "@metamask/approval-controller": "^7.1.1",
79
80
  "@metamask/auto-changelog": "^3.4.4",
@@ -82,6 +83,7 @@
82
83
  "@metamask/keyring-controller": "^19.0.0",
83
84
  "@metamask/network-controller": "^22.0.2",
84
85
  "@metamask/preferences-controller": "^15.0.0",
86
+ "@metamask/providers": "^18.1.1",
85
87
  "@types/jest": "^27.4.1",
86
88
  "@types/lodash": "^4.14.191",
87
89
  "@types/node": "^16.18.54",
@@ -93,14 +95,17 @@
93
95
  "ts-jest": "^27.1.4",
94
96
  "typedoc": "^0.24.8",
95
97
  "typedoc-plugin-missing-exports": "^2.0.0",
96
- "typescript": "~5.2.2"
98
+ "typescript": "~5.2.2",
99
+ "webextension-polyfill": "^0.12.0"
97
100
  },
98
101
  "peerDependencies": {
99
102
  "@metamask/accounts-controller": "^20.0.0",
100
103
  "@metamask/approval-controller": "^7.0.0",
101
104
  "@metamask/keyring-controller": "^19.0.0",
102
105
  "@metamask/network-controller": "^22.0.0",
103
- "@metamask/preferences-controller": "^15.0.0"
106
+ "@metamask/preferences-controller": "^15.0.0",
107
+ "@metamask/providers": "^18.1.0",
108
+ "webextension-polyfill": "^0.10.0 || ^0.11.0 || ^0.12.0"
104
109
  },
105
110
  "engines": {
106
111
  "node": "^18.18 || >=20"