@metamask-previews/config-registry-controller 1.0.0-preview-a42e8d0d2 → 2.0.0-preview-5a03e1b92
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 +26 -1
- package/dist/config-registry-api-service/types.cjs +4 -0
- package/dist/config-registry-api-service/types.cjs.map +1 -1
- package/dist/config-registry-api-service/types.d.cts +25 -0
- package/dist/config-registry-api-service/types.d.cts.map +1 -1
- package/dist/config-registry-api-service/types.d.mts +25 -0
- package/dist/config-registry-api-service/types.d.mts.map +1 -1
- package/dist/config-registry-api-service/types.mjs +5 -1
- package/dist/config-registry-api-service/types.mjs.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/selectors.d.cts +18 -0
- package/dist/selectors.d.cts.map +1 -1
- package/dist/selectors.d.mts +18 -0
- package/dist/selectors.d.mts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.0.0]
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Add optional `contracts` property to `RegistryNetworkConfig` ([#9717](https://github.com/MetaMask/core/pull/9717))
|
|
15
|
+
- The `contracts` property is a record of known contract addresses for the network, keyed by contract name.
|
|
16
|
+
- Currently, the only supported contract is `multicall3`.
|
|
17
|
+
|
|
18
|
+
### Removed
|
|
19
|
+
|
|
20
|
+
- **BREAKING:** Remove `ConfigRegistryControllerMethodActions` from exported types ([#9717](https://github.com/MetaMask/core/pull/9717))
|
|
21
|
+
- One of the following action types can be used instead:
|
|
22
|
+
- `ConfigRegistryControllerStartPollingAction`
|
|
23
|
+
- `ConfigRegistryControllerStopPollingAction`
|
|
24
|
+
- `ConfigRegistryControllerGetNetworkConfigByCaip2ChainIdAction`
|
|
25
|
+
|
|
26
|
+
## [1.0.1]
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- Bump `@metamask/polling-controller` from `^16.0.8` to `^16.0.9` ([#9735](https://github.com/MetaMask/core/pull/9735))
|
|
31
|
+
- Bump `@metamask/remote-feature-flag-controller` from `^4.2.2` to `^5.0.0` ([#9735](https://github.com/MetaMask/core/pull/9735))
|
|
32
|
+
|
|
10
33
|
## [1.0.0]
|
|
11
34
|
|
|
12
35
|
### Added
|
|
@@ -101,7 +124,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
101
124
|
|
|
102
125
|
- Initial release ([#7668](https://github.com/MetaMask/core/pull/7668), [#7809](https://github.com/MetaMask/core/pull/7809))
|
|
103
126
|
|
|
104
|
-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/config-registry-controller@
|
|
127
|
+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/config-registry-controller@2.0.0...HEAD
|
|
128
|
+
[2.0.0]: https://github.com/MetaMask/core/compare/@metamask/config-registry-controller@1.0.1...@metamask/config-registry-controller@2.0.0
|
|
129
|
+
[1.0.1]: https://github.com/MetaMask/core/compare/@metamask/config-registry-controller@1.0.0...@metamask/config-registry-controller@1.0.1
|
|
105
130
|
[1.0.0]: https://github.com/MetaMask/core/compare/@metamask/config-registry-controller@0.4.1...@metamask/config-registry-controller@1.0.0
|
|
106
131
|
[0.4.1]: https://github.com/MetaMask/core/compare/@metamask/config-registry-controller@0.4.0...@metamask/config-registry-controller@0.4.1
|
|
107
132
|
[0.4.0]: https://github.com/MetaMask/core/compare/@metamask/config-registry-controller@0.3.2...@metamask/config-registry-controller@0.4.0
|
|
@@ -38,6 +38,9 @@ const ChainConfigSchema = (0, superstruct_1.type)({
|
|
|
38
38
|
isDeletable: (0, superstruct_1.boolean)(),
|
|
39
39
|
priority: (0, superstruct_1.number)(),
|
|
40
40
|
});
|
|
41
|
+
const NetworkContractsSchema = (0, superstruct_1.type)({
|
|
42
|
+
multicall3: (0, superstruct_1.optional)(utils_1.StrictHexStruct),
|
|
43
|
+
});
|
|
41
44
|
/**
|
|
42
45
|
* Schema for a single chain in the CAIP-2 config registry API response.
|
|
43
46
|
* chainId is in CAIP-2 format (e.g. "eip155:1", "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp").
|
|
@@ -52,6 +55,7 @@ exports.RegistryNetworkConfigSchema = (0, superstruct_1.type)({
|
|
|
52
55
|
rpcProviders: RpcProvidersSchema,
|
|
53
56
|
blockExplorerUrls: BlockExplorerUrlsSchema,
|
|
54
57
|
config: ChainConfigSchema,
|
|
58
|
+
contracts: (0, superstruct_1.optional)(NetworkContractsSchema),
|
|
55
59
|
});
|
|
56
60
|
/**
|
|
57
61
|
* Top-level API response shape. Uses `data.chains` (CAIP-2) and `data.version`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../../src/config-registry-api-service/types.ts"],"names":[],"mappings":";;;AACA,uDAQ+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../../src/config-registry-api-service/types.ts"],"names":[],"mappings":";;;AACA,uDAQ+B;AAC/B,2CAAqE;AAErE,MAAM,WAAW,GAAG,IAAA,kBAAI,EAAC;IACvB,OAAO,EAAE,IAAA,oBAAM,GAAE;IACjB,QAAQ,EAAE,IAAA,oBAAM,GAAE;IAClB,IAAI,EAAE,IAAA,oBAAM,GAAE;IACd,MAAM,EAAE,IAAA,oBAAM,GAAE;IAChB,QAAQ,EAAE,IAAA,oBAAM,GAAE;IAClB,eAAe,EAAE,IAAA,sBAAQ,EAAC,IAAA,oBAAM,GAAE,CAAC;CACpC,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG,IAAA,kBAAI,EAAC;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Q,EAAE,IAAA,oBAAM,GAAE;IAClB,mBAAmB,EAAE,IAAA,oBAAM,GAAE;IAC7B,uBAAuB,EAAE,IAAA,sBAAQ,EAAC,IAAA,oBAAM,GAAE,CAAC;IAC3C,MAAM,EAAE,YAAY;IACpB,YAAY,EAAE,kBAAkB;IAChC,iBAAiB,EAAE,uBAAuB;IAC1C,MAAM,EAAE,iBAAiB;IACzB,SAAS,EAAE,IAAA,sBAAQ,EAAC,sBAAsB,CAAC;CAC5C,CAAC,CAAC;AAEH;;GAEG;AACU,QAAA,+BAA+B,GAAG,IAAA,kBAAI,EAAC;IAClD,IAAI,EAAE,IAAA,kBAAI,EAAC;QACT,OAAO,EAAE,IAAA,oBAAM,GAAE;QACjB,SAAS,EAAE,IAAA,oBAAM,GAAE;QACnB,MAAM,EAAE,IAAA,mBAAK,EAAC,mCAA2B,CAAC;KAC3C,CAAC;CACH,CAAC,CAAC;AAQH,SAAgB,iCAAiC,CAC/C,IAAa;IAEb,IAAA,oBAAM,EAAC,IAAI,EAAE,uCAA+B,CAAC,CAAC;AAChD,CAAC;AAJD,8EAIC","sourcesContent":["import type { Infer } from '@metamask/superstruct';\nimport {\n array,\n assert,\n boolean,\n number,\n optional,\n string,\n type,\n} from '@metamask/superstruct';\nimport { CaipChainIdStruct, StrictHexStruct } from '@metamask/utils';\n\nconst AssetSchema = type({\n assetId: string(),\n imageUrl: string(),\n name: string(),\n symbol: string(),\n decimals: number(),\n coingeckoCoinId: optional(string()),\n});\n\nconst AssetsSchema = type({\n listUrl: optional(string()),\n native: AssetSchema,\n governance: optional(AssetSchema),\n});\n\nconst RpcProviderSchema = type({\n url: string(),\n type: string(),\n networkClientId: string(),\n});\n\nconst RpcProvidersSchema = type({\n default: RpcProviderSchema,\n fallbacks: array(string()),\n});\n\nconst BlockExplorerUrlsSchema = type({\n default: string(),\n fallbacks: array(string()),\n});\n\nconst ChainConfigSchema = type({\n isActive: boolean(),\n isTestnet: boolean(),\n isDefault: boolean(),\n isFeatured: boolean(),\n isDeprecated: boolean(),\n isDeletable: boolean(),\n priority: number(),\n});\n\nconst NetworkContractsSchema = type({\n multicall3: optional(StrictHexStruct),\n});\n\n/**\n * Schema for a single chain in the CAIP-2 config registry API response.\n * chainId is in CAIP-2 format (e.g. \"eip155:1\", \"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\").\n */\nexport const RegistryNetworkConfigSchema = type({\n chainId: CaipChainIdStruct,\n name: string(),\n imageUrl: string(),\n coingeckoPlatformId: string(),\n geckoTerminalPlatformId: optional(string()),\n assets: AssetsSchema,\n rpcProviders: RpcProvidersSchema,\n blockExplorerUrls: BlockExplorerUrlsSchema,\n config: ChainConfigSchema,\n contracts: optional(NetworkContractsSchema),\n});\n\n/**\n * Top-level API response shape. Uses `data.chains` (CAIP-2) and `data.version`.\n */\nexport const RegistryConfigApiResponseSchema = type({\n data: type({\n version: string(),\n timestamp: number(),\n chains: array(RegistryNetworkConfigSchema),\n }),\n});\n\nexport type RegistryNetworkConfig = Infer<typeof RegistryNetworkConfigSchema>;\n\nexport type RegistryConfigApiResponse = Infer<\n typeof RegistryConfigApiResponseSchema\n>;\n\nexport function validateRegistryConfigApiResponse(\n data: unknown,\n): asserts data is RegistryConfigApiResponse {\n assert(data, RegistryConfigApiResponseSchema);\n}\n\nexport type FetchConfigOptions = {\n etag?: string;\n};\n\nexport type FetchConfigResult =\n | {\n modified: false;\n etag?: string;\n /**\n * Cached data from the service when available (e.g. after a previous\n * successful fetch). Omitted when the service has no cache yet.\n */\n data?: RegistryConfigApiResponse;\n }\n | {\n modified: true;\n data: RegistryConfigApiResponse;\n etag?: string;\n };\n"]}
|
|
@@ -49,6 +49,9 @@ export declare const RegistryNetworkConfigSchema: import("@metamask/superstruct"
|
|
|
49
49
|
priority: number;
|
|
50
50
|
};
|
|
51
51
|
geckoTerminalPlatformId?: string | undefined;
|
|
52
|
+
contracts?: {
|
|
53
|
+
multicall3?: `0x${string}` | undefined;
|
|
54
|
+
} | undefined;
|
|
52
55
|
}, {
|
|
53
56
|
chainId: import("@metamask/superstruct").Struct<`${string}:${string}`, null>;
|
|
54
57
|
name: import("@metamask/superstruct").Struct<string, null>;
|
|
@@ -149,6 +152,11 @@ export declare const RegistryNetworkConfigSchema: import("@metamask/superstruct"
|
|
|
149
152
|
isDeletable: import("@metamask/superstruct").Struct<boolean, null>;
|
|
150
153
|
priority: import("@metamask/superstruct").Struct<number, null>;
|
|
151
154
|
}>;
|
|
155
|
+
contracts: import("@metamask/superstruct").Struct<{
|
|
156
|
+
multicall3?: `0x${string}` | undefined;
|
|
157
|
+
} | undefined, {
|
|
158
|
+
multicall3: import("@metamask/superstruct").Struct<`0x${string}` | undefined, null>;
|
|
159
|
+
}>;
|
|
152
160
|
}>;
|
|
153
161
|
/**
|
|
154
162
|
* Top-level API response shape. Uses `data.chains` (CAIP-2) and `data.version`.
|
|
@@ -203,6 +211,9 @@ export declare const RegistryConfigApiResponseSchema: import("@metamask/superstr
|
|
|
203
211
|
priority: number;
|
|
204
212
|
};
|
|
205
213
|
geckoTerminalPlatformId?: string | undefined;
|
|
214
|
+
contracts?: {
|
|
215
|
+
multicall3?: `0x${string}` | undefined;
|
|
216
|
+
} | undefined;
|
|
206
217
|
}[];
|
|
207
218
|
};
|
|
208
219
|
}, {
|
|
@@ -255,6 +266,9 @@ export declare const RegistryConfigApiResponseSchema: import("@metamask/superstr
|
|
|
255
266
|
priority: number;
|
|
256
267
|
};
|
|
257
268
|
geckoTerminalPlatformId?: string | undefined;
|
|
269
|
+
contracts?: {
|
|
270
|
+
multicall3?: `0x${string}` | undefined;
|
|
271
|
+
} | undefined;
|
|
258
272
|
}[];
|
|
259
273
|
}, {
|
|
260
274
|
version: import("@metamask/superstruct").Struct<string, null>;
|
|
@@ -305,6 +319,9 @@ export declare const RegistryConfigApiResponseSchema: import("@metamask/superstr
|
|
|
305
319
|
priority: number;
|
|
306
320
|
};
|
|
307
321
|
geckoTerminalPlatformId?: string | undefined;
|
|
322
|
+
contracts?: {
|
|
323
|
+
multicall3?: `0x${string}` | undefined;
|
|
324
|
+
} | undefined;
|
|
308
325
|
}[], import("@metamask/superstruct").Struct<{
|
|
309
326
|
name: string;
|
|
310
327
|
imageUrl: string;
|
|
@@ -351,6 +368,9 @@ export declare const RegistryConfigApiResponseSchema: import("@metamask/superstr
|
|
|
351
368
|
priority: number;
|
|
352
369
|
};
|
|
353
370
|
geckoTerminalPlatformId?: string | undefined;
|
|
371
|
+
contracts?: {
|
|
372
|
+
multicall3?: `0x${string}` | undefined;
|
|
373
|
+
} | undefined;
|
|
354
374
|
}, {
|
|
355
375
|
chainId: import("@metamask/superstruct").Struct<`${string}:${string}`, null>;
|
|
356
376
|
name: import("@metamask/superstruct").Struct<string, null>;
|
|
@@ -451,6 +471,11 @@ export declare const RegistryConfigApiResponseSchema: import("@metamask/superstr
|
|
|
451
471
|
isDeletable: import("@metamask/superstruct").Struct<boolean, null>;
|
|
452
472
|
priority: import("@metamask/superstruct").Struct<number, null>;
|
|
453
473
|
}>;
|
|
474
|
+
contracts: import("@metamask/superstruct").Struct<{
|
|
475
|
+
multicall3?: `0x${string}` | undefined;
|
|
476
|
+
} | undefined, {
|
|
477
|
+
multicall3: import("@metamask/superstruct").Struct<`0x${string}` | undefined, null>;
|
|
478
|
+
}>;
|
|
454
479
|
}>>;
|
|
455
480
|
}>;
|
|
456
481
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../../src/config-registry-api-service/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;
|
|
1
|
+
{"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../../src/config-registry-api-service/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAyDnD;;;GAGG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
priority: number;
|
|
50
50
|
};
|
|
51
51
|
geckoTerminalPlatformId?: string | undefined;
|
|
52
|
+
contracts?: {
|
|
53
|
+
multicall3?: `0x${string}` | undefined;
|
|
54
|
+
} | undefined;
|
|
52
55
|
}, {
|
|
53
56
|
chainId: import("@metamask/superstruct").Struct<`${string}:${string}`, null>;
|
|
54
57
|
name: import("@metamask/superstruct").Struct<string, null>;
|
|
@@ -149,6 +152,11 @@ export declare const RegistryNetworkConfigSchema: import("@metamask/superstruct"
|
|
|
149
152
|
isDeletable: import("@metamask/superstruct").Struct<boolean, null>;
|
|
150
153
|
priority: import("@metamask/superstruct").Struct<number, null>;
|
|
151
154
|
}>;
|
|
155
|
+
contracts: import("@metamask/superstruct").Struct<{
|
|
156
|
+
multicall3?: `0x${string}` | undefined;
|
|
157
|
+
} | undefined, {
|
|
158
|
+
multicall3: import("@metamask/superstruct").Struct<`0x${string}` | undefined, null>;
|
|
159
|
+
}>;
|
|
152
160
|
}>;
|
|
153
161
|
/**
|
|
154
162
|
* Top-level API response shape. Uses `data.chains` (CAIP-2) and `data.version`.
|
|
@@ -203,6 +211,9 @@ export declare const RegistryConfigApiResponseSchema: import("@metamask/superstr
|
|
|
203
211
|
priority: number;
|
|
204
212
|
};
|
|
205
213
|
geckoTerminalPlatformId?: string | undefined;
|
|
214
|
+
contracts?: {
|
|
215
|
+
multicall3?: `0x${string}` | undefined;
|
|
216
|
+
} | undefined;
|
|
206
217
|
}[];
|
|
207
218
|
};
|
|
208
219
|
}, {
|
|
@@ -255,6 +266,9 @@ export declare const RegistryConfigApiResponseSchema: import("@metamask/superstr
|
|
|
255
266
|
priority: number;
|
|
256
267
|
};
|
|
257
268
|
geckoTerminalPlatformId?: string | undefined;
|
|
269
|
+
contracts?: {
|
|
270
|
+
multicall3?: `0x${string}` | undefined;
|
|
271
|
+
} | undefined;
|
|
258
272
|
}[];
|
|
259
273
|
}, {
|
|
260
274
|
version: import("@metamask/superstruct").Struct<string, null>;
|
|
@@ -305,6 +319,9 @@ export declare const RegistryConfigApiResponseSchema: import("@metamask/superstr
|
|
|
305
319
|
priority: number;
|
|
306
320
|
};
|
|
307
321
|
geckoTerminalPlatformId?: string | undefined;
|
|
322
|
+
contracts?: {
|
|
323
|
+
multicall3?: `0x${string}` | undefined;
|
|
324
|
+
} | undefined;
|
|
308
325
|
}[], import("@metamask/superstruct").Struct<{
|
|
309
326
|
name: string;
|
|
310
327
|
imageUrl: string;
|
|
@@ -351,6 +368,9 @@ export declare const RegistryConfigApiResponseSchema: import("@metamask/superstr
|
|
|
351
368
|
priority: number;
|
|
352
369
|
};
|
|
353
370
|
geckoTerminalPlatformId?: string | undefined;
|
|
371
|
+
contracts?: {
|
|
372
|
+
multicall3?: `0x${string}` | undefined;
|
|
373
|
+
} | undefined;
|
|
354
374
|
}, {
|
|
355
375
|
chainId: import("@metamask/superstruct").Struct<`${string}:${string}`, null>;
|
|
356
376
|
name: import("@metamask/superstruct").Struct<string, null>;
|
|
@@ -451,6 +471,11 @@ export declare const RegistryConfigApiResponseSchema: import("@metamask/superstr
|
|
|
451
471
|
isDeletable: import("@metamask/superstruct").Struct<boolean, null>;
|
|
452
472
|
priority: import("@metamask/superstruct").Struct<number, null>;
|
|
453
473
|
}>;
|
|
474
|
+
contracts: import("@metamask/superstruct").Struct<{
|
|
475
|
+
multicall3?: `0x${string}` | undefined;
|
|
476
|
+
} | undefined, {
|
|
477
|
+
multicall3: import("@metamask/superstruct").Struct<`0x${string}` | undefined, null>;
|
|
478
|
+
}>;
|
|
454
479
|
}>>;
|
|
455
480
|
}>;
|
|
456
481
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../../src/config-registry-api-service/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;
|
|
1
|
+
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../../src/config-registry-api-service/types.ts"],"names":[],"mappings":"AAAA,OAA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BAAyB,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { array, assert, boolean, number, optional, string, type } from "@metamask/superstruct";
|
|
2
|
-
import { CaipChainIdStruct } from "@metamask/utils";
|
|
2
|
+
import { CaipChainIdStruct, StrictHexStruct } from "@metamask/utils";
|
|
3
3
|
const AssetSchema = type({
|
|
4
4
|
assetId: string(),
|
|
5
5
|
imageUrl: string(),
|
|
@@ -35,6 +35,9 @@ const ChainConfigSchema = type({
|
|
|
35
35
|
isDeletable: boolean(),
|
|
36
36
|
priority: number(),
|
|
37
37
|
});
|
|
38
|
+
const NetworkContractsSchema = type({
|
|
39
|
+
multicall3: optional(StrictHexStruct),
|
|
40
|
+
});
|
|
38
41
|
/**
|
|
39
42
|
* Schema for a single chain in the CAIP-2 config registry API response.
|
|
40
43
|
* chainId is in CAIP-2 format (e.g. "eip155:1", "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp").
|
|
@@ -49,6 +52,7 @@ export const RegistryNetworkConfigSchema = type({
|
|
|
49
52
|
rpcProviders: RpcProvidersSchema,
|
|
50
53
|
blockExplorerUrls: BlockExplorerUrlsSchema,
|
|
51
54
|
config: ChainConfigSchema,
|
|
55
|
+
contracts: optional(NetworkContractsSchema),
|
|
52
56
|
});
|
|
53
57
|
/**
|
|
54
58
|
* Top-level API response shape. Uses `data.chains` (CAIP-2) and `data.version`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../../src/config-registry-api-service/types.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,EACL,MAAM,EACN,OAAO,EACP,MAAM,EACN,QAAQ,EACR,MAAM,EACN,IAAI,EACL,8BAA8B;AAC/B,OAAO,EAAE,iBAAiB,EAAE,wBAAwB;
|
|
1
|
+
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../../src/config-registry-api-service/types.ts"],"names":[],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B,QAAQ,EAAE,MAAM,EAAE;CACnB,CAAC,CAAC;AAEH,MAAM,sBAAsB,GAAG,IAAI,CAAC;IAClC,UAAU,EAAE,QAAQ,CAAC,eAAe,CAAC;CACtC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,CAAC;IAC9C,OAAO,EAAE,iBAAiB;IAC1B,IAAI,EAAE,MAAM,EAAE;IACd,QAAQ,EAAE,MAAM,EAAE;IAClB,mBAAmB,EAAE,MAAM,EAAE;IAC7B,uBAAuB,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IAC3C,MAAM,EAAE,YAAY;IACpB,YAAY,EAAE,kBAAkB;IAChC,iBAAiB,EAAE,uBAAuB;IAC1C,MAAM,EAAE,iBAAiB;IACzB,SAAS,EAAE,QAAQ,CAAC,sBAAsB,CAAC;CAC5C,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,IAAI,CAAC;IAClD,IAAI,EAAE,IAAI,CAAC;QACT,OAAO,EAAE,MAAM,EAAE;QACjB,SAAS,EAAE,MAAM,EAAE;QACnB,MAAM,EAAE,KAAK,CAAC,2BAA2B,CAAC;KAC3C,CAAC;CACH,CAAC,CAAC;AAQH,MAAM,UAAU,iCAAiC,CAC/C,IAAa;IAEb,MAAM,CAAC,IAAI,EAAE,+BAA+B,CAAC,CAAC;AAChD,CAAC","sourcesContent":["import type { Infer } from '@metamask/superstruct';\nimport {\n array,\n assert,\n boolean,\n number,\n optional,\n string,\n type,\n} from '@metamask/superstruct';\nimport { CaipChainIdStruct, StrictHexStruct } from '@metamask/utils';\n\nconst AssetSchema = type({\n assetId: string(),\n imageUrl: string(),\n name: string(),\n symbol: string(),\n decimals: number(),\n coingeckoCoinId: optional(string()),\n});\n\nconst AssetsSchema = type({\n listUrl: optional(string()),\n native: AssetSchema,\n governance: optional(AssetSchema),\n});\n\nconst RpcProviderSchema = type({\n url: string(),\n type: string(),\n networkClientId: string(),\n});\n\nconst RpcProvidersSchema = type({\n default: RpcProviderSchema,\n fallbacks: array(string()),\n});\n\nconst BlockExplorerUrlsSchema = type({\n default: string(),\n fallbacks: array(string()),\n});\n\nconst ChainConfigSchema = type({\n isActive: boolean(),\n isTestnet: boolean(),\n isDefault: boolean(),\n isFeatured: boolean(),\n isDeprecated: boolean(),\n isDeletable: boolean(),\n priority: number(),\n});\n\nconst NetworkContractsSchema = type({\n multicall3: optional(StrictHexStruct),\n});\n\n/**\n * Schema for a single chain in the CAIP-2 config registry API response.\n * chainId is in CAIP-2 format (e.g. \"eip155:1\", \"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\").\n */\nexport const RegistryNetworkConfigSchema = type({\n chainId: CaipChainIdStruct,\n name: string(),\n imageUrl: string(),\n coingeckoPlatformId: string(),\n geckoTerminalPlatformId: optional(string()),\n assets: AssetsSchema,\n rpcProviders: RpcProvidersSchema,\n blockExplorerUrls: BlockExplorerUrlsSchema,\n config: ChainConfigSchema,\n contracts: optional(NetworkContractsSchema),\n});\n\n/**\n * Top-level API response shape. Uses `data.chains` (CAIP-2) and `data.version`.\n */\nexport const RegistryConfigApiResponseSchema = type({\n data: type({\n version: string(),\n timestamp: number(),\n chains: array(RegistryNetworkConfigSchema),\n }),\n});\n\nexport type RegistryNetworkConfig = Infer<typeof RegistryNetworkConfigSchema>;\n\nexport type RegistryConfigApiResponse = Infer<\n typeof RegistryConfigApiResponseSchema\n>;\n\nexport function validateRegistryConfigApiResponse(\n data: unknown,\n): asserts data is RegistryConfigApiResponse {\n assert(data, RegistryConfigApiResponseSchema);\n}\n\nexport type FetchConfigOptions = {\n etag?: string;\n};\n\nexport type FetchConfigResult =\n | {\n modified: false;\n etag?: string;\n /**\n * Cached data from the service when available (e.g. after a previous\n * successful fetch). Omitted when the service has no cache yet.\n */\n data?: RegistryConfigApiResponse;\n }\n | {\n modified: true;\n data: RegistryConfigApiResponse;\n etag?: string;\n };\n"]}
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAaA,8EAGuC;AAFrC,uIAAA,wBAAwB,OAAA;AACxB,uIAAA,wBAAwB,OAAA;AAE1B,gDAAwE;AAA/D,sHAAA,sBAAsB,OAAA;AAAE,8GAAA,cAAc,OAAA;AAkB/C,gHAAwG;AAA/F,0IAAA,wBAAwB,OAAA;AACjC,wEAA0E;AAAjE,4GAAA,cAAc,OAAA","sourcesContent":["export type {\n ConfigRegistryControllerState,\n ConfigRegistryControllerOptions,\n ConfigRegistryControllerActions,\n ConfigRegistryControllerGetStateAction,\n ConfigRegistryControllerEvents,\n ConfigRegistryControllerMessenger,\n} from './ConfigRegistryController.js';\nexport type {\n ConfigRegistryControllerStartPollingAction,\n ConfigRegistryControllerStopPollingAction,\n
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAaA,8EAGuC;AAFrC,uIAAA,wBAAwB,OAAA;AACxB,uIAAA,wBAAwB,OAAA;AAE1B,gDAAwE;AAA/D,sHAAA,sBAAsB,OAAA;AAAE,8GAAA,cAAc,OAAA;AAkB/C,gHAAwG;AAA/F,0IAAA,wBAAwB,OAAA;AACjC,wEAA0E;AAAjE,4GAAA,cAAc,OAAA","sourcesContent":["export type {\n ConfigRegistryControllerState,\n ConfigRegistryControllerOptions,\n ConfigRegistryControllerActions,\n ConfigRegistryControllerGetStateAction,\n ConfigRegistryControllerEvents,\n ConfigRegistryControllerMessenger,\n} from './ConfigRegistryController.js';\nexport type {\n ConfigRegistryControllerStartPollingAction,\n ConfigRegistryControllerStopPollingAction,\n ConfigRegistryControllerGetNetworkConfigByCaip2ChainIdAction,\n} from './ConfigRegistryController-method-action-types.js';\nexport {\n ConfigRegistryController,\n DEFAULT_POLLING_INTERVAL,\n} from './ConfigRegistryController.js';\nexport { selectFeaturedNetworks, selectNetworks } from './selectors.js';\nexport type {\n FetchConfigOptions,\n FetchConfigResult,\n RegistryNetworkConfig,\n RegistryConfigApiResponse,\n} from './config-registry-api-service/types.js';\nexport type {\n ConfigRegistryApiServiceOptions,\n ConfigRegistryApiServiceActions,\n ConfigRegistryApiServiceEvents,\n ConfigRegistryApiServiceMessenger,\n} from './config-registry-api-service/config-registry-api-service.js';\nexport type {\n ConfigRegistryApiServiceFetchConfigAction,\n ConfigRegistryApiServiceMethodActions,\n} from './config-registry-api-service/config-registry-api-service-method-action-types.js';\nexport type { NetworkFilterOptions } from './config-registry-api-service/filters.js';\nexport { ConfigRegistryApiService } from './config-registry-api-service/config-registry-api-service.js';\nexport { filterNetworks } from './config-registry-api-service/filters.js';\n"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { ConfigRegistryControllerState, ConfigRegistryControllerOptions, ConfigRegistryControllerActions, ConfigRegistryControllerGetStateAction, ConfigRegistryControllerEvents, ConfigRegistryControllerMessenger, } from "./ConfigRegistryController.cjs";
|
|
2
|
-
export type { ConfigRegistryControllerStartPollingAction, ConfigRegistryControllerStopPollingAction,
|
|
2
|
+
export type { ConfigRegistryControllerStartPollingAction, ConfigRegistryControllerStopPollingAction, ConfigRegistryControllerGetNetworkConfigByCaip2ChainIdAction, } from "./ConfigRegistryController-method-action-types.cjs";
|
|
3
3
|
export { ConfigRegistryController, DEFAULT_POLLING_INTERVAL, } from "./ConfigRegistryController.cjs";
|
|
4
4
|
export { selectFeaturedNetworks, selectNetworks } from "./selectors.cjs";
|
|
5
5
|
export type { FetchConfigOptions, FetchConfigResult, RegistryNetworkConfig, RegistryConfigApiResponse, } from "./config-registry-api-service/types.cjs";
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,6BAA6B,EAC7B,+BAA+B,EAC/B,+BAA+B,EAC/B,sCAAsC,EACtC,8BAA8B,EAC9B,iCAAiC,GAClC,uCAAsC;AACvC,YAAY,EACV,0CAA0C,EAC1C,yCAAyC,EACzC,
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,6BAA6B,EAC7B,+BAA+B,EAC/B,+BAA+B,EAC/B,sCAAsC,EACtC,8BAA8B,EAC9B,iCAAiC,GAClC,uCAAsC;AACvC,YAAY,EACV,0CAA0C,EAC1C,yCAAyC,EACzC,4DAA4D,GAC7D,2DAA0D;AAC3D,OAAO,EACL,wBAAwB,EACxB,wBAAwB,GACzB,uCAAsC;AACvC,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,wBAAuB;AACxE,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,GAC1B,gDAA+C;AAChD,YAAY,EACV,+BAA+B,EAC/B,+BAA+B,EAC/B,8BAA8B,EAC9B,iCAAiC,GAClC,sEAAqE;AACtE,YAAY,EACV,yCAAyC,EACzC,qCAAqC,GACtC,0FAAyF;AAC1F,YAAY,EAAE,oBAAoB,EAAE,kDAAiD;AACrF,OAAO,EAAE,wBAAwB,EAAE,sEAAqE;AACxG,OAAO,EAAE,cAAc,EAAE,kDAAiD"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { ConfigRegistryControllerState, ConfigRegistryControllerOptions, ConfigRegistryControllerActions, ConfigRegistryControllerGetStateAction, ConfigRegistryControllerEvents, ConfigRegistryControllerMessenger, } from "./ConfigRegistryController.mjs";
|
|
2
|
-
export type { ConfigRegistryControllerStartPollingAction, ConfigRegistryControllerStopPollingAction,
|
|
2
|
+
export type { ConfigRegistryControllerStartPollingAction, ConfigRegistryControllerStopPollingAction, ConfigRegistryControllerGetNetworkConfigByCaip2ChainIdAction, } from "./ConfigRegistryController-method-action-types.mjs";
|
|
3
3
|
export { ConfigRegistryController, DEFAULT_POLLING_INTERVAL, } from "./ConfigRegistryController.mjs";
|
|
4
4
|
export { selectFeaturedNetworks, selectNetworks } from "./selectors.mjs";
|
|
5
5
|
export type { FetchConfigOptions, FetchConfigResult, RegistryNetworkConfig, RegistryConfigApiResponse, } from "./config-registry-api-service/types.mjs";
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,6BAA6B,EAC7B,+BAA+B,EAC/B,+BAA+B,EAC/B,sCAAsC,EACtC,8BAA8B,EAC9B,iCAAiC,GAClC,uCAAsC;AACvC,YAAY,EACV,0CAA0C,EAC1C,yCAAyC,EACzC,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,6BAA6B,EAC7B,+BAA+B,EAC/B,+BAA+B,EAC/B,sCAAsC,EACtC,8BAA8B,EAC9B,iCAAiC,GAClC,uCAAsC;AACvC,YAAY,EACV,0CAA0C,EAC1C,yCAAyC,EACzC,4DAA4D,GAC7D,2DAA0D;AAC3D,OAAO,EACL,wBAAwB,EACxB,wBAAwB,GACzB,uCAAsC;AACvC,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,wBAAuB;AACxE,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,GAC1B,gDAA+C;AAChD,YAAY,EACV,+BAA+B,EAC/B,+BAA+B,EAC/B,8BAA8B,EAC9B,iCAAiC,GAClC,sEAAqE;AACtE,YAAY,EACV,yCAAyC,EACzC,qCAAqC,GACtC,0FAAyF;AAC1F,YAAY,EAAE,oBAAoB,EAAE,kDAAiD;AACrF,OAAO,EAAE,wBAAwB,EAAE,sEAAqE;AACxG,OAAO,EAAE,cAAc,EAAE,kDAAiD"}
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACzB,uCAAsC;AACvC,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,wBAAuB;AAkBxE,OAAO,EAAE,wBAAwB,EAAE,sEAAqE;AACxG,OAAO,EAAE,cAAc,EAAE,kDAAiD","sourcesContent":["export type {\n ConfigRegistryControllerState,\n ConfigRegistryControllerOptions,\n ConfigRegistryControllerActions,\n ConfigRegistryControllerGetStateAction,\n ConfigRegistryControllerEvents,\n ConfigRegistryControllerMessenger,\n} from './ConfigRegistryController.js';\nexport type {\n ConfigRegistryControllerStartPollingAction,\n ConfigRegistryControllerStopPollingAction,\n
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACzB,uCAAsC;AACvC,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,wBAAuB;AAkBxE,OAAO,EAAE,wBAAwB,EAAE,sEAAqE;AACxG,OAAO,EAAE,cAAc,EAAE,kDAAiD","sourcesContent":["export type {\n ConfigRegistryControllerState,\n ConfigRegistryControllerOptions,\n ConfigRegistryControllerActions,\n ConfigRegistryControllerGetStateAction,\n ConfigRegistryControllerEvents,\n ConfigRegistryControllerMessenger,\n} from './ConfigRegistryController.js';\nexport type {\n ConfigRegistryControllerStartPollingAction,\n ConfigRegistryControllerStopPollingAction,\n ConfigRegistryControllerGetNetworkConfigByCaip2ChainIdAction,\n} from './ConfigRegistryController-method-action-types.js';\nexport {\n ConfigRegistryController,\n DEFAULT_POLLING_INTERVAL,\n} from './ConfigRegistryController.js';\nexport { selectFeaturedNetworks, selectNetworks } from './selectors.js';\nexport type {\n FetchConfigOptions,\n FetchConfigResult,\n RegistryNetworkConfig,\n RegistryConfigApiResponse,\n} from './config-registry-api-service/types.js';\nexport type {\n ConfigRegistryApiServiceOptions,\n ConfigRegistryApiServiceActions,\n ConfigRegistryApiServiceEvents,\n ConfigRegistryApiServiceMessenger,\n} from './config-registry-api-service/config-registry-api-service.js';\nexport type {\n ConfigRegistryApiServiceFetchConfigAction,\n ConfigRegistryApiServiceMethodActions,\n} from './config-registry-api-service/config-registry-api-service-method-action-types.js';\nexport type { NetworkFilterOptions } from './config-registry-api-service/filters.js';\nexport { ConfigRegistryApiService } from './config-registry-api-service/config-registry-api-service.js';\nexport { filterNetworks } from './config-registry-api-service/filters.js';\n"]}
|
package/dist/selectors.d.cts
CHANGED
|
@@ -60,6 +60,9 @@ export declare const selectFeaturedNetworks: ((state: ConfigRegistryControllerSt
|
|
|
60
60
|
priority: number;
|
|
61
61
|
};
|
|
62
62
|
geckoTerminalPlatformId?: string | undefined;
|
|
63
|
+
contracts?: {
|
|
64
|
+
multicall3?: `0x${string}` | undefined;
|
|
65
|
+
} | undefined;
|
|
63
66
|
}>) & {
|
|
64
67
|
clearCache: () => void;
|
|
65
68
|
resultsCount: () => number;
|
|
@@ -111,6 +114,9 @@ export declare const selectFeaturedNetworks: ((state: ConfigRegistryControllerSt
|
|
|
111
114
|
priority: number;
|
|
112
115
|
};
|
|
113
116
|
geckoTerminalPlatformId?: string | undefined;
|
|
117
|
+
contracts?: {
|
|
118
|
+
multicall3?: `0x${string}` | undefined;
|
|
119
|
+
} | undefined;
|
|
114
120
|
}>) => Record<string, {
|
|
115
121
|
name: string;
|
|
116
122
|
imageUrl: string;
|
|
@@ -157,6 +163,9 @@ export declare const selectFeaturedNetworks: ((state: ConfigRegistryControllerSt
|
|
|
157
163
|
priority: number;
|
|
158
164
|
};
|
|
159
165
|
geckoTerminalPlatformId?: string | undefined;
|
|
166
|
+
contracts?: {
|
|
167
|
+
multicall3?: `0x${string}` | undefined;
|
|
168
|
+
} | undefined;
|
|
160
169
|
}>;
|
|
161
170
|
memoizedResultFunc: ((resultFuncArgs_0: Record<string, {
|
|
162
171
|
name: string;
|
|
@@ -204,6 +213,9 @@ export declare const selectFeaturedNetworks: ((state: ConfigRegistryControllerSt
|
|
|
204
213
|
priority: number;
|
|
205
214
|
};
|
|
206
215
|
geckoTerminalPlatformId?: string | undefined;
|
|
216
|
+
contracts?: {
|
|
217
|
+
multicall3?: `0x${string}` | undefined;
|
|
218
|
+
} | undefined;
|
|
207
219
|
}>) => Record<string, {
|
|
208
220
|
name: string;
|
|
209
221
|
imageUrl: string;
|
|
@@ -250,6 +262,9 @@ export declare const selectFeaturedNetworks: ((state: ConfigRegistryControllerSt
|
|
|
250
262
|
priority: number;
|
|
251
263
|
};
|
|
252
264
|
geckoTerminalPlatformId?: string | undefined;
|
|
265
|
+
contracts?: {
|
|
266
|
+
multicall3?: `0x${string}` | undefined;
|
|
267
|
+
} | undefined;
|
|
253
268
|
}>) & {
|
|
254
269
|
clearCache: () => void;
|
|
255
270
|
resultsCount: () => number;
|
|
@@ -301,6 +316,9 @@ export declare const selectFeaturedNetworks: ((state: ConfigRegistryControllerSt
|
|
|
301
316
|
priority: number;
|
|
302
317
|
};
|
|
303
318
|
geckoTerminalPlatformId?: string | undefined;
|
|
319
|
+
contracts?: {
|
|
320
|
+
multicall3?: `0x${string}` | undefined;
|
|
321
|
+
} | undefined;
|
|
304
322
|
}>;
|
|
305
323
|
dependencies: [(state: ConfigRegistryControllerState) => Record<string, RegistryNetworkConfig>];
|
|
306
324
|
recomputations: () => number;
|
package/dist/selectors.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.d.cts","sourceRoot":"","sources":["../src/selectors.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,gDAA+C;AACpF,OAAO,KAAK,EAAE,6BAA6B,EAAE,uCAAsC;AAEnF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,UAClB,6BAA6B,KACnC,OAAO,MAAM,EAAE,qBAAqB,CAA2B,CAAC;AAEnE;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"selectors.d.cts","sourceRoot":"","sources":["../src/selectors.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,gDAA+C;AACpF,OAAO,KAAK,EAAE,6BAA6B,EAAE,uCAAsC;AAEnF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,UAClB,6BAA6B,KACnC,OAAO,MAAM,EAAE,qBAAqB,CAA2B,CAAC;AAEnE;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAV1B,6BAA6B,KACnC,OAAO,MAAM,EAAE,qBAAqB,CAAC;;;;;;;;CAwBvC,CAAC"}
|
package/dist/selectors.d.mts
CHANGED
|
@@ -60,6 +60,9 @@ export declare const selectFeaturedNetworks: ((state: ConfigRegistryControllerSt
|
|
|
60
60
|
priority: number;
|
|
61
61
|
};
|
|
62
62
|
geckoTerminalPlatformId?: string | undefined;
|
|
63
|
+
contracts?: {
|
|
64
|
+
multicall3?: `0x${string}` | undefined;
|
|
65
|
+
} | undefined;
|
|
63
66
|
}>) & {
|
|
64
67
|
clearCache: () => void;
|
|
65
68
|
resultsCount: () => number;
|
|
@@ -111,6 +114,9 @@ export declare const selectFeaturedNetworks: ((state: ConfigRegistryControllerSt
|
|
|
111
114
|
priority: number;
|
|
112
115
|
};
|
|
113
116
|
geckoTerminalPlatformId?: string | undefined;
|
|
117
|
+
contracts?: {
|
|
118
|
+
multicall3?: `0x${string}` | undefined;
|
|
119
|
+
} | undefined;
|
|
114
120
|
}>) => Record<string, {
|
|
115
121
|
name: string;
|
|
116
122
|
imageUrl: string;
|
|
@@ -157,6 +163,9 @@ export declare const selectFeaturedNetworks: ((state: ConfigRegistryControllerSt
|
|
|
157
163
|
priority: number;
|
|
158
164
|
};
|
|
159
165
|
geckoTerminalPlatformId?: string | undefined;
|
|
166
|
+
contracts?: {
|
|
167
|
+
multicall3?: `0x${string}` | undefined;
|
|
168
|
+
} | undefined;
|
|
160
169
|
}>;
|
|
161
170
|
memoizedResultFunc: ((resultFuncArgs_0: Record<string, {
|
|
162
171
|
name: string;
|
|
@@ -204,6 +213,9 @@ export declare const selectFeaturedNetworks: ((state: ConfigRegistryControllerSt
|
|
|
204
213
|
priority: number;
|
|
205
214
|
};
|
|
206
215
|
geckoTerminalPlatformId?: string | undefined;
|
|
216
|
+
contracts?: {
|
|
217
|
+
multicall3?: `0x${string}` | undefined;
|
|
218
|
+
} | undefined;
|
|
207
219
|
}>) => Record<string, {
|
|
208
220
|
name: string;
|
|
209
221
|
imageUrl: string;
|
|
@@ -250,6 +262,9 @@ export declare const selectFeaturedNetworks: ((state: ConfigRegistryControllerSt
|
|
|
250
262
|
priority: number;
|
|
251
263
|
};
|
|
252
264
|
geckoTerminalPlatformId?: string | undefined;
|
|
265
|
+
contracts?: {
|
|
266
|
+
multicall3?: `0x${string}` | undefined;
|
|
267
|
+
} | undefined;
|
|
253
268
|
}>) & {
|
|
254
269
|
clearCache: () => void;
|
|
255
270
|
resultsCount: () => number;
|
|
@@ -301,6 +316,9 @@ export declare const selectFeaturedNetworks: ((state: ConfigRegistryControllerSt
|
|
|
301
316
|
priority: number;
|
|
302
317
|
};
|
|
303
318
|
geckoTerminalPlatformId?: string | undefined;
|
|
319
|
+
contracts?: {
|
|
320
|
+
multicall3?: `0x${string}` | undefined;
|
|
321
|
+
} | undefined;
|
|
304
322
|
}>;
|
|
305
323
|
dependencies: [(state: ConfigRegistryControllerState) => Record<string, RegistryNetworkConfig>];
|
|
306
324
|
recomputations: () => number;
|
package/dist/selectors.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.d.mts","sourceRoot":"","sources":["../src/selectors.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,gDAA+C;AACpF,OAAO,KAAK,EAAE,6BAA6B,EAAE,uCAAsC;AAEnF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,UAClB,6BAA6B,KACnC,OAAO,MAAM,EAAE,qBAAqB,CAA2B,CAAC;AAEnE;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"selectors.d.mts","sourceRoot":"","sources":["../src/selectors.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,gDAA+C;AACpF,OAAO,KAAK,EAAE,6BAA6B,EAAE,uCAAsC;AAEnF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,UAClB,6BAA6B,KACnC,OAAO,MAAM,EAAE,qBAAqB,CAA2B,CAAC;AAEnE;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAV1B,6BAA6B,KACnC,OAAO,MAAM,EAAE,qBAAqB,CAAC;;;;;;;;CAwBvC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask-previews/config-registry-controller",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-preview-5a03e1b92",
|
|
4
4
|
"description": "Manages configuration registry for MetaMask",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Ethereum",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"@metamask/controller-utils": "^12.3.0",
|
|
61
61
|
"@metamask/keyring-controller": "^27.1.0",
|
|
62
62
|
"@metamask/messenger": "^2.0.0",
|
|
63
|
-
"@metamask/polling-controller": "^16.0.
|
|
63
|
+
"@metamask/polling-controller": "^16.0.9",
|
|
64
64
|
"@metamask/profile-sync-controller": "^28.3.0",
|
|
65
|
-
"@metamask/remote-feature-flag-controller": "^
|
|
65
|
+
"@metamask/remote-feature-flag-controller": "^5.0.0",
|
|
66
66
|
"@metamask/superstruct": "^3.1.0",
|
|
67
67
|
"@metamask/utils": "^11.11.0",
|
|
68
68
|
"reselect": "^5.1.1"
|