@metamask-previews/config-registry-controller 5.0.0-preview-5c595e76a → 5.0.0-preview-310e0bb22
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 +0 -1
- package/dist/config-registry-api-service/types.d.ts +11 -63
- package/dist/config-registry-api-service/types.d.ts.map +1 -1
- package/dist/config-registry-api-service/types.js +1 -4
- package/dist/config-registry-api-service/types.js.map +1 -1
- package/dist/selectors.d.ts +8 -40
- package/dist/selectors.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -13,7 +13,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
13
13
|
|
|
14
14
|
### Changed
|
|
15
15
|
|
|
16
|
-
- Accept full RPC provider objects (not just URL strings) in `rpcProviders.fallbacks`, so a single chain using the new object form (e.g. Pharos Mainnet) no longer fails validation for the entire networks config response ([#11436](https://github.com/MetaMask/core/pull/11436))
|
|
17
16
|
- **BREAKING:** Change `FetchConfigResult` and `FetchEventsConfigResult` to use `null` instead of omitted properties ([#11134](https://github.com/MetaMask/core/pull/11134))
|
|
18
17
|
- `etag` is now `string | null`, and is `null` when the response has no `ETag` header. Previously it was `undefined`.
|
|
19
18
|
- `data` is now `null` when the server returns 304 and the service has no cached data. Previously it was omitted.
|
|
@@ -34,11 +34,7 @@ export declare const RegistryNetworkConfigSchema: import("@metamask/superstruct"
|
|
|
34
34
|
type: string;
|
|
35
35
|
networkClientId: string;
|
|
36
36
|
};
|
|
37
|
-
fallbacks:
|
|
38
|
-
url: string;
|
|
39
|
-
type: string;
|
|
40
|
-
networkClientId: string;
|
|
41
|
-
})[];
|
|
37
|
+
fallbacks: string[];
|
|
42
38
|
};
|
|
43
39
|
blockExplorerUrls: {
|
|
44
40
|
default: string;
|
|
@@ -120,11 +116,7 @@ export declare const RegistryNetworkConfigSchema: import("@metamask/superstruct"
|
|
|
120
116
|
type: string;
|
|
121
117
|
networkClientId: string;
|
|
122
118
|
};
|
|
123
|
-
fallbacks:
|
|
124
|
-
url: string;
|
|
125
|
-
type: string;
|
|
126
|
-
networkClientId: string;
|
|
127
|
-
})[];
|
|
119
|
+
fallbacks: string[];
|
|
128
120
|
}, {
|
|
129
121
|
default: import("@metamask/superstruct").Struct<{
|
|
130
122
|
url: string;
|
|
@@ -135,15 +127,7 @@ export declare const RegistryNetworkConfigSchema: import("@metamask/superstruct"
|
|
|
135
127
|
type: import("@metamask/superstruct").Struct<string, null>;
|
|
136
128
|
networkClientId: import("@metamask/superstruct").Struct<string, null>;
|
|
137
129
|
}>;
|
|
138
|
-
fallbacks: import("@metamask/superstruct").Struct<(string
|
|
139
|
-
url: string;
|
|
140
|
-
type: string;
|
|
141
|
-
networkClientId: string;
|
|
142
|
-
})[], import("@metamask/superstruct").Struct<string | {
|
|
143
|
-
url: string;
|
|
144
|
-
type: string;
|
|
145
|
-
networkClientId: string;
|
|
146
|
-
}, null>>;
|
|
130
|
+
fallbacks: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
|
147
131
|
}>;
|
|
148
132
|
blockExplorerUrls: import("@metamask/superstruct").Struct<{
|
|
149
133
|
default: string;
|
|
@@ -215,11 +199,7 @@ export declare const RegistryConfigApiResponseSchema: import("@metamask/superstr
|
|
|
215
199
|
type: string;
|
|
216
200
|
networkClientId: string;
|
|
217
201
|
};
|
|
218
|
-
fallbacks:
|
|
219
|
-
url: string;
|
|
220
|
-
type: string;
|
|
221
|
-
networkClientId: string;
|
|
222
|
-
})[];
|
|
202
|
+
fallbacks: string[];
|
|
223
203
|
};
|
|
224
204
|
blockExplorerUrls: {
|
|
225
205
|
default: string;
|
|
@@ -275,11 +255,7 @@ export declare const RegistryConfigApiResponseSchema: import("@metamask/superstr
|
|
|
275
255
|
type: string;
|
|
276
256
|
networkClientId: string;
|
|
277
257
|
};
|
|
278
|
-
fallbacks:
|
|
279
|
-
url: string;
|
|
280
|
-
type: string;
|
|
281
|
-
networkClientId: string;
|
|
282
|
-
})[];
|
|
258
|
+
fallbacks: string[];
|
|
283
259
|
};
|
|
284
260
|
blockExplorerUrls: {
|
|
285
261
|
default: string;
|
|
@@ -333,11 +309,7 @@ export declare const RegistryConfigApiResponseSchema: import("@metamask/superstr
|
|
|
333
309
|
type: string;
|
|
334
310
|
networkClientId: string;
|
|
335
311
|
};
|
|
336
|
-
fallbacks:
|
|
337
|
-
url: string;
|
|
338
|
-
type: string;
|
|
339
|
-
networkClientId: string;
|
|
340
|
-
})[];
|
|
312
|
+
fallbacks: string[];
|
|
341
313
|
};
|
|
342
314
|
blockExplorerUrls: {
|
|
343
315
|
default: string;
|
|
@@ -387,11 +359,7 @@ export declare const RegistryConfigApiResponseSchema: import("@metamask/superstr
|
|
|
387
359
|
type: string;
|
|
388
360
|
networkClientId: string;
|
|
389
361
|
};
|
|
390
|
-
fallbacks:
|
|
391
|
-
url: string;
|
|
392
|
-
type: string;
|
|
393
|
-
networkClientId: string;
|
|
394
|
-
})[];
|
|
362
|
+
fallbacks: string[];
|
|
395
363
|
};
|
|
396
364
|
blockExplorerUrls: {
|
|
397
365
|
default: string;
|
|
@@ -473,11 +441,7 @@ export declare const RegistryConfigApiResponseSchema: import("@metamask/superstr
|
|
|
473
441
|
type: string;
|
|
474
442
|
networkClientId: string;
|
|
475
443
|
};
|
|
476
|
-
fallbacks:
|
|
477
|
-
url: string;
|
|
478
|
-
type: string;
|
|
479
|
-
networkClientId: string;
|
|
480
|
-
})[];
|
|
444
|
+
fallbacks: string[];
|
|
481
445
|
}, {
|
|
482
446
|
default: import("@metamask/superstruct").Struct<{
|
|
483
447
|
url: string;
|
|
@@ -488,15 +452,7 @@ export declare const RegistryConfigApiResponseSchema: import("@metamask/superstr
|
|
|
488
452
|
type: import("@metamask/superstruct").Struct<string, null>;
|
|
489
453
|
networkClientId: import("@metamask/superstruct").Struct<string, null>;
|
|
490
454
|
}>;
|
|
491
|
-
fallbacks: import("@metamask/superstruct").Struct<(string
|
|
492
|
-
url: string;
|
|
493
|
-
type: string;
|
|
494
|
-
networkClientId: string;
|
|
495
|
-
})[], import("@metamask/superstruct").Struct<string | {
|
|
496
|
-
url: string;
|
|
497
|
-
type: string;
|
|
498
|
-
networkClientId: string;
|
|
499
|
-
}, null>>;
|
|
455
|
+
fallbacks: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
|
500
456
|
}>;
|
|
501
457
|
blockExplorerUrls: import("@metamask/superstruct").Struct<{
|
|
502
458
|
default: string;
|
|
@@ -598,11 +554,7 @@ export declare const FetchConfigResultStruct: import("@metamask/superstruct").St
|
|
|
598
554
|
type: string;
|
|
599
555
|
networkClientId: string;
|
|
600
556
|
};
|
|
601
|
-
fallbacks:
|
|
602
|
-
url: string;
|
|
603
|
-
type: string;
|
|
604
|
-
networkClientId: string;
|
|
605
|
-
})[];
|
|
557
|
+
fallbacks: string[];
|
|
606
558
|
};
|
|
607
559
|
blockExplorerUrls: {
|
|
608
560
|
default: string;
|
|
@@ -662,11 +614,7 @@ export declare const FetchConfigResultStruct: import("@metamask/superstruct").St
|
|
|
662
614
|
type: string;
|
|
663
615
|
networkClientId: string;
|
|
664
616
|
};
|
|
665
|
-
fallbacks:
|
|
666
|
-
url: string;
|
|
667
|
-
type: string;
|
|
668
|
-
networkClientId: string;
|
|
669
|
-
})[];
|
|
617
|
+
fallbacks: string[];
|
|
670
618
|
};
|
|
671
619
|
blockExplorerUrls: {
|
|
672
620
|
default: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/config-registry-api-service/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/config-registry-api-service/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CA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eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;QAWxC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,WAAW,CAAC,IAAI,IACjB;IACE,QAAQ,EAAE,KAAK,CAAC;IAChB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;;OAGG;IACH,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;CACnB,GACD;IACE,QAAQ,EAAE,IAAI,CAAC;IACf,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,IAAI,CAAC;CACZ,CAAC;AAEN,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,yBAAyB,CAAC,CAAC;AAEvE,MAAM,MAAM,uBAAuB,GACjC,WAAW,CAAC,+BAA+B,CAAC,CAAC"}
|
|
@@ -20,10 +20,7 @@ const RpcProviderSchema = type({
|
|
|
20
20
|
});
|
|
21
21
|
const RpcProvidersSchema = type({
|
|
22
22
|
default: RpcProviderSchema,
|
|
23
|
-
|
|
24
|
-
// also serves full provider objects; both shapes are accepted so a single
|
|
25
|
-
// new-style chain does not fail validation for the entire response.
|
|
26
|
-
fallbacks: array(union([string(), RpcProviderSchema])),
|
|
23
|
+
fallbacks: array(string()),
|
|
27
24
|
});
|
|
28
25
|
const BlockExplorerUrlsSchema = type({
|
|
29
26
|
default: string(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/config-registry-api-service/types.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,MAAM,EACN,MAAM,EACN,IAAI,EACJ,KAAK,GACN,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAErE,MAAM,WAAW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AC,qCAAqC,CAAC;KACtD,CAAC;IACF,IAAI,CAAC;QACH,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC;QACvB,IAAI,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;QACxB,IAAI,EAAE,qCAAqC;KAC5C,CAAC;CACH,CAAC,CAAC","sourcesContent":["import type { Infer } from '@metamask/superstruct';\nimport {\n array,\n boolean,\n literal,\n nullable,\n number,\n optional,\n record,\n string,\n type,\n union,\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 isAutoEnabled: optional(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\n/**\n * Schema for the events-config API response.\n * Maps event names to their allowed analytics purposes.\n */\nexport const RegistryEventsConfigApiResponseSchema = type({\n data: type({\n schemaVersion: string(),\n version: string(),\n timestamp: number(),\n events: record(string(), array(string())),\n }),\n});\n\nexport type RegistryEventsConfigApiResponse = Infer<\n typeof RegistryEventsConfigApiResponseSchema\n>;\n\nexport type RegistryEventsConfig = RegistryEventsConfigApiResponse['data'];\n\nexport const FetchConfigResultStruct = union([\n type({\n modified: literal(false),\n etag: nullable(string()),\n data: nullable(RegistryConfigApiResponseSchema),\n }),\n type({\n modified: literal(true),\n etag: nullable(string()),\n data: RegistryConfigApiResponseSchema,\n }),\n]);\n\nexport const FetchEventsConfigResultStruct = union([\n type({\n modified: literal(false),\n etag: nullable(string()),\n data: nullable(RegistryEventsConfigApiResponseSchema),\n }),\n type({\n modified: literal(true),\n etag: nullable(string()),\n data: RegistryEventsConfigApiResponseSchema,\n }),\n]);\n\nexport type FetchConfigOptions = {\n etag?: string;\n};\n\ntype FetchResult<Data> =\n | {\n modified: false;\n etag: string | null;\n /**\n * Cached data from the service when available (e.g. after a previous\n * successful fetch). `null` when the service has no cache yet.\n */\n data: Data | null;\n }\n | {\n modified: true;\n etag: string | null;\n data: Data;\n };\n\nexport type FetchConfigResult = FetchResult<RegistryConfigApiResponse>;\n\nexport type FetchEventsConfigResult =\n FetchResult<RegistryEventsConfigApiResponse>;\n"]}
|
package/dist/selectors.d.ts
CHANGED
|
@@ -45,11 +45,7 @@ export declare const selectFeaturedNetworks: ((state: ConfigRegistryControllerSt
|
|
|
45
45
|
type: string;
|
|
46
46
|
networkClientId: string;
|
|
47
47
|
};
|
|
48
|
-
fallbacks:
|
|
49
|
-
url: string;
|
|
50
|
-
type: string;
|
|
51
|
-
networkClientId: string;
|
|
52
|
-
})[];
|
|
48
|
+
fallbacks: string[];
|
|
53
49
|
};
|
|
54
50
|
blockExplorerUrls: {
|
|
55
51
|
default: string;
|
|
@@ -104,11 +100,7 @@ export declare const selectFeaturedNetworks: ((state: ConfigRegistryControllerSt
|
|
|
104
100
|
type: string;
|
|
105
101
|
networkClientId: string;
|
|
106
102
|
};
|
|
107
|
-
fallbacks:
|
|
108
|
-
url: string;
|
|
109
|
-
type: string;
|
|
110
|
-
networkClientId: string;
|
|
111
|
-
})[];
|
|
103
|
+
fallbacks: string[];
|
|
112
104
|
};
|
|
113
105
|
blockExplorerUrls: {
|
|
114
106
|
default: string;
|
|
@@ -158,11 +150,7 @@ export declare const selectFeaturedNetworks: ((state: ConfigRegistryControllerSt
|
|
|
158
150
|
type: string;
|
|
159
151
|
networkClientId: string;
|
|
160
152
|
};
|
|
161
|
-
fallbacks:
|
|
162
|
-
url: string;
|
|
163
|
-
type: string;
|
|
164
|
-
networkClientId: string;
|
|
165
|
-
})[];
|
|
153
|
+
fallbacks: string[];
|
|
166
154
|
};
|
|
167
155
|
blockExplorerUrls: {
|
|
168
156
|
default: string;
|
|
@@ -213,11 +201,7 @@ export declare const selectFeaturedNetworks: ((state: ConfigRegistryControllerSt
|
|
|
213
201
|
type: string;
|
|
214
202
|
networkClientId: string;
|
|
215
203
|
};
|
|
216
|
-
fallbacks:
|
|
217
|
-
url: string;
|
|
218
|
-
type: string;
|
|
219
|
-
networkClientId: string;
|
|
220
|
-
})[];
|
|
204
|
+
fallbacks: string[];
|
|
221
205
|
};
|
|
222
206
|
blockExplorerUrls: {
|
|
223
207
|
default: string;
|
|
@@ -267,11 +251,7 @@ export declare const selectFeaturedNetworks: ((state: ConfigRegistryControllerSt
|
|
|
267
251
|
type: string;
|
|
268
252
|
networkClientId: string;
|
|
269
253
|
};
|
|
270
|
-
fallbacks:
|
|
271
|
-
url: string;
|
|
272
|
-
type: string;
|
|
273
|
-
networkClientId: string;
|
|
274
|
-
})[];
|
|
254
|
+
fallbacks: string[];
|
|
275
255
|
};
|
|
276
256
|
blockExplorerUrls: {
|
|
277
257
|
default: string;
|
|
@@ -326,11 +306,7 @@ export declare const selectFeaturedNetworks: ((state: ConfigRegistryControllerSt
|
|
|
326
306
|
type: string;
|
|
327
307
|
networkClientId: string;
|
|
328
308
|
};
|
|
329
|
-
fallbacks:
|
|
330
|
-
url: string;
|
|
331
|
-
type: string;
|
|
332
|
-
networkClientId: string;
|
|
333
|
-
})[];
|
|
309
|
+
fallbacks: string[];
|
|
334
310
|
};
|
|
335
311
|
blockExplorerUrls: {
|
|
336
312
|
default: string;
|
|
@@ -402,11 +378,7 @@ export declare const selectEvmAutoEnabledNetworksChainIds: ((state: ConfigRegist
|
|
|
402
378
|
type: string;
|
|
403
379
|
networkClientId: string;
|
|
404
380
|
};
|
|
405
|
-
fallbacks:
|
|
406
|
-
url: string;
|
|
407
|
-
type: string;
|
|
408
|
-
networkClientId: string;
|
|
409
|
-
})[];
|
|
381
|
+
fallbacks: string[];
|
|
410
382
|
};
|
|
411
383
|
blockExplorerUrls: {
|
|
412
384
|
default: string;
|
|
@@ -457,11 +429,7 @@ export declare const selectEvmAutoEnabledNetworksChainIds: ((state: ConfigRegist
|
|
|
457
429
|
type: string;
|
|
458
430
|
networkClientId: string;
|
|
459
431
|
};
|
|
460
|
-
fallbacks:
|
|
461
|
-
url: string;
|
|
462
|
-
type: string;
|
|
463
|
-
networkClientId: string;
|
|
464
|
-
})[];
|
|
432
|
+
fallbacks: string[];
|
|
465
433
|
};
|
|
466
434
|
blockExplorerUrls: {
|
|
467
435
|
default: string;
|
package/dist/selectors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../src/selectors.ts"],"names":[],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