@metamask-previews/notification-services-controller 21.0.0-preview-7aeef9dd1 → 21.0.0-preview-d01b2f93d

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.
Files changed (59) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/NotificationServicesController/constants/notification-schema.cjs +1 -12
  3. package/dist/NotificationServicesController/constants/notification-schema.cjs.map +1 -1
  4. package/dist/NotificationServicesController/constants/notification-schema.d.cts +0 -12
  5. package/dist/NotificationServicesController/constants/notification-schema.d.cts.map +1 -1
  6. package/dist/NotificationServicesController/constants/notification-schema.d.mts +0 -12
  7. package/dist/NotificationServicesController/constants/notification-schema.d.mts.map +1 -1
  8. package/dist/NotificationServicesController/constants/notification-schema.mjs +0 -11
  9. package/dist/NotificationServicesController/constants/notification-schema.mjs.map +1 -1
  10. package/dist/NotificationServicesController/index.cjs +1 -2
  11. package/dist/NotificationServicesController/index.cjs.map +1 -1
  12. package/dist/NotificationServicesController/index.d.cts +0 -1
  13. package/dist/NotificationServicesController/index.d.cts.map +1 -1
  14. package/dist/NotificationServicesController/index.d.mts +0 -1
  15. package/dist/NotificationServicesController/index.d.mts.map +1 -1
  16. package/dist/NotificationServicesController/index.mjs +0 -1
  17. package/dist/NotificationServicesController/index.mjs.map +1 -1
  18. package/dist/NotificationServicesController/mocks/mock-raw-notifications.cjs +120 -0
  19. package/dist/NotificationServicesController/mocks/mock-raw-notifications.cjs.map +1 -1
  20. package/dist/NotificationServicesController/mocks/mock-raw-notifications.d.cts.map +1 -1
  21. package/dist/NotificationServicesController/mocks/mock-raw-notifications.d.mts.map +1 -1
  22. package/dist/NotificationServicesController/mocks/mock-raw-notifications.mjs +120 -0
  23. package/dist/NotificationServicesController/mocks/mock-raw-notifications.mjs.map +1 -1
  24. package/dist/NotificationServicesController/types/notification-api/notification-api.cjs.map +1 -1
  25. package/dist/NotificationServicesController/types/notification-api/notification-api.d.cts +2 -0
  26. package/dist/NotificationServicesController/types/notification-api/notification-api.d.cts.map +1 -1
  27. package/dist/NotificationServicesController/types/notification-api/notification-api.d.mts +2 -0
  28. package/dist/NotificationServicesController/types/notification-api/notification-api.d.mts.map +1 -1
  29. package/dist/NotificationServicesController/types/notification-api/notification-api.mjs.map +1 -1
  30. package/dist/NotificationServicesController/types/notification-api/schema.cjs.map +1 -1
  31. package/dist/NotificationServicesController/types/notification-api/schema.d.cts +23 -0
  32. package/dist/NotificationServicesController/types/notification-api/schema.d.cts.map +1 -1
  33. package/dist/NotificationServicesController/types/notification-api/schema.d.mts +23 -0
  34. package/dist/NotificationServicesController/types/notification-api/schema.d.mts.map +1 -1
  35. package/dist/NotificationServicesController/types/notification-api/schema.mjs.map +1 -1
  36. package/dist/NotificationServicesPushController/utils/get-notification-message.cjs +2 -12
  37. package/dist/NotificationServicesPushController/utils/get-notification-message.cjs.map +1 -1
  38. package/dist/NotificationServicesPushController/utils/get-notification-message.d.cts.map +1 -1
  39. package/dist/NotificationServicesPushController/utils/get-notification-message.d.mts.map +1 -1
  40. package/dist/NotificationServicesPushController/utils/get-notification-message.mjs +2 -12
  41. package/dist/NotificationServicesPushController/utils/get-notification-message.mjs.map +1 -1
  42. package/package.json +1 -11
  43. package/dist/NotificationServicesController/ui/constants.cjs +0 -75
  44. package/dist/NotificationServicesController/ui/constants.cjs.map +0 -1
  45. package/dist/NotificationServicesController/ui/constants.d.cts +0 -66
  46. package/dist/NotificationServicesController/ui/constants.d.cts.map +0 -1
  47. package/dist/NotificationServicesController/ui/constants.d.mts +0 -66
  48. package/dist/NotificationServicesController/ui/constants.d.mts.map +0 -1
  49. package/dist/NotificationServicesController/ui/constants.mjs +0 -71
  50. package/dist/NotificationServicesController/ui/constants.mjs.map +0 -1
  51. package/dist/NotificationServicesController/ui/index.cjs +0 -18
  52. package/dist/NotificationServicesController/ui/index.cjs.map +0 -1
  53. package/dist/NotificationServicesController/ui/index.d.cts +0 -2
  54. package/dist/NotificationServicesController/ui/index.d.cts.map +0 -1
  55. package/dist/NotificationServicesController/ui/index.d.mts +0 -2
  56. package/dist/NotificationServicesController/ui/index.d.mts.map +0 -1
  57. package/dist/NotificationServicesController/ui/index.mjs +0 -2
  58. package/dist/NotificationServicesController/ui/index.mjs.map +0 -1
  59. package/notification-services/ui/package.json +0 -9
@@ -1,71 +0,0 @@
1
- import { NOTIFICATION_CHAINS_ID } from "../constants/notification-schema.mjs";
2
- export const NOTIFICATION_NETWORK_CURRENCY_NAME = {
3
- [NOTIFICATION_CHAINS_ID.ETHEREUM]: 'Ethereum',
4
- [NOTIFICATION_CHAINS_ID.ARBITRUM]: 'Arbitrum',
5
- [NOTIFICATION_CHAINS_ID.AVALANCHE]: 'Avalanche',
6
- [NOTIFICATION_CHAINS_ID.BSC]: 'Binance',
7
- [NOTIFICATION_CHAINS_ID.BASE]: 'Base',
8
- [NOTIFICATION_CHAINS_ID.LINEA]: 'Linea',
9
- [NOTIFICATION_CHAINS_ID.OPTIMISM]: 'Optimism',
10
- [NOTIFICATION_CHAINS_ID.POLYGON]: 'Polygon',
11
- [NOTIFICATION_CHAINS_ID.SEI]: 'Sei Network',
12
- };
13
- export const NOTIFICATION_NETWORK_CURRENCY_SYMBOL = {
14
- [NOTIFICATION_CHAINS_ID.ETHEREUM]: 'ETH',
15
- [NOTIFICATION_CHAINS_ID.ARBITRUM]: 'ETH',
16
- [NOTIFICATION_CHAINS_ID.AVALANCHE]: 'AVAX',
17
- [NOTIFICATION_CHAINS_ID.BSC]: 'BNB',
18
- [NOTIFICATION_CHAINS_ID.BASE]: 'ETH',
19
- [NOTIFICATION_CHAINS_ID.LINEA]: 'ETH',
20
- [NOTIFICATION_CHAINS_ID.OPTIMISM]: 'ETH',
21
- [NOTIFICATION_CHAINS_ID.POLYGON]: 'POL',
22
- [NOTIFICATION_CHAINS_ID.SEI]: 'SEI',
23
- };
24
- export const SUPPORTED_NOTIFICATION_BLOCK_EXPLORERS = {
25
- // ETHEREUM
26
- [NOTIFICATION_CHAINS_ID.ETHEREUM]: {
27
- url: 'https://etherscan.io',
28
- name: 'Etherscan',
29
- },
30
- // OPTIMISM
31
- [NOTIFICATION_CHAINS_ID.OPTIMISM]: {
32
- url: 'https://optimistic.etherscan.io',
33
- name: 'Optimistic Etherscan',
34
- },
35
- // BSC
36
- [NOTIFICATION_CHAINS_ID.BSC]: {
37
- url: 'https://bscscan.com',
38
- name: 'BscScan',
39
- },
40
- // BASE
41
- [NOTIFICATION_CHAINS_ID.BASE]: {
42
- url: 'https://basescan.org',
43
- name: 'BaseScan',
44
- },
45
- // POLYGON
46
- [NOTIFICATION_CHAINS_ID.POLYGON]: {
47
- url: 'https://polygonscan.com',
48
- name: 'PolygonScan',
49
- },
50
- // ARBITRUM
51
- [NOTIFICATION_CHAINS_ID.ARBITRUM]: {
52
- url: 'https://arbiscan.io',
53
- name: 'Arbiscan',
54
- },
55
- // AVALANCHE
56
- [NOTIFICATION_CHAINS_ID.AVALANCHE]: {
57
- url: 'https://snowtrace.io',
58
- name: 'Snowtrace',
59
- },
60
- // LINEA
61
- [NOTIFICATION_CHAINS_ID.LINEA]: {
62
- url: 'https://lineascan.build',
63
- name: 'LineaScan',
64
- },
65
- [NOTIFICATION_CHAINS_ID.SEI]: {
66
- url: 'https://seitrace.com/',
67
- name: 'SeiTrace',
68
- },
69
- };
70
- export { NOTIFICATION_CHAINS_ID } from "../constants/notification-schema.mjs";
71
- //# sourceMappingURL=constants.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/ui/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,6CAAyC;AAG1E,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,CAAC,sBAAsB,CAAC,QAAQ,CAAC,EAAE,UAAU;IAC7C,CAAC,sBAAsB,CAAC,QAAQ,CAAC,EAAE,UAAU;IAC7C,CAAC,sBAAsB,CAAC,SAAS,CAAC,EAAE,WAAW;IAC/C,CAAC,s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,IAAI,CAAC,EAAE;QAC7B,GAAG,EAAE,sBAAsB;QAC3B,IAAI,EAAE,UAAU;KACjB;IACD,UAAU;IACV,CAAC,sBAAsB,CAAC,OAAO,CAAC,EAAE;QAChC,GAAG,EAAE,yBAAyB;QAC9B,IAAI,EAAE,aAAa;KACpB;IACD,WAAW;IACX,CAAC,sBAAsB,CAAC,QAAQ,CAAC,EAAE;QACjC,GAAG,EAAE,qBAAqB;QAC1B,IAAI,EAAE,UAAU;KACjB;IACD,YAAY;IACZ,CAAC,sBAAsB,CAAC,SAAS,CAAC,EAAE;QAClC,GAAG,EAAE,sBAAsB;QAC3B,IAAI,EAAE,WAAW;KAClB;IACD,QAAQ;IACR,CAAC,sBAAsB,CAAC,KAAK,CAAC,EAAE;QAC9B,GAAG,EAAE,yBAAyB;QAC9B,IAAI,EAAE,WAAW;KAClB;IACD,CAAC,sBAAsB,CAAC,GAAG,CAAC,EAAE;QAC5B,GAAG,EAAE,uBAAuB;QAC5B,IAAI,EAAE,UAAU;KACjB;CAC6D,CAAC;AAEjE,OAAO,EAAE,sBAAsB,EAAE,6CAAyC","sourcesContent":["import { NOTIFICATION_CHAINS_ID } from '../constants/notification-schema';\nimport type { NOTIFICATION_CHAINS_IDS } from '../constants/notification-schema';\n\nexport const NOTIFICATION_NETWORK_CURRENCY_NAME = {\n [NOTIFICATION_CHAINS_ID.ETHEREUM]: 'Ethereum',\n [NOTIFICATION_CHAINS_ID.ARBITRUM]: 'Arbitrum',\n [NOTIFICATION_CHAINS_ID.AVALANCHE]: 'Avalanche',\n [NOTIFICATION_CHAINS_ID.BSC]: 'Binance',\n [NOTIFICATION_CHAINS_ID.BASE]: 'Base',\n [NOTIFICATION_CHAINS_ID.LINEA]: 'Linea',\n [NOTIFICATION_CHAINS_ID.OPTIMISM]: 'Optimism',\n [NOTIFICATION_CHAINS_ID.POLYGON]: 'Polygon',\n [NOTIFICATION_CHAINS_ID.SEI]: 'Sei Network',\n} satisfies Record<NOTIFICATION_CHAINS_IDS, string>;\n\nexport const NOTIFICATION_NETWORK_CURRENCY_SYMBOL = {\n [NOTIFICATION_CHAINS_ID.ETHEREUM]: 'ETH',\n [NOTIFICATION_CHAINS_ID.ARBITRUM]: 'ETH',\n [NOTIFICATION_CHAINS_ID.AVALANCHE]: 'AVAX',\n [NOTIFICATION_CHAINS_ID.BSC]: 'BNB',\n [NOTIFICATION_CHAINS_ID.BASE]: 'ETH',\n [NOTIFICATION_CHAINS_ID.LINEA]: 'ETH',\n [NOTIFICATION_CHAINS_ID.OPTIMISM]: 'ETH',\n [NOTIFICATION_CHAINS_ID.POLYGON]: 'POL',\n [NOTIFICATION_CHAINS_ID.SEI]: 'SEI',\n} satisfies Record<NOTIFICATION_CHAINS_IDS, string>;\n\nexport type BlockExplorerConfig = {\n url: string;\n name: string;\n};\n\nexport const SUPPORTED_NOTIFICATION_BLOCK_EXPLORERS = {\n // ETHEREUM\n [NOTIFICATION_CHAINS_ID.ETHEREUM]: {\n url: 'https://etherscan.io',\n name: 'Etherscan',\n },\n // OPTIMISM\n [NOTIFICATION_CHAINS_ID.OPTIMISM]: {\n url: 'https://optimistic.etherscan.io',\n name: 'Optimistic Etherscan',\n },\n // BSC\n [NOTIFICATION_CHAINS_ID.BSC]: {\n url: 'https://bscscan.com',\n name: 'BscScan',\n },\n // BASE\n [NOTIFICATION_CHAINS_ID.BASE]: {\n url: 'https://basescan.org',\n name: 'BaseScan',\n },\n // POLYGON\n [NOTIFICATION_CHAINS_ID.POLYGON]: {\n url: 'https://polygonscan.com',\n name: 'PolygonScan',\n },\n // ARBITRUM\n [NOTIFICATION_CHAINS_ID.ARBITRUM]: {\n url: 'https://arbiscan.io',\n name: 'Arbiscan',\n },\n // AVALANCHE\n [NOTIFICATION_CHAINS_ID.AVALANCHE]: {\n url: 'https://snowtrace.io',\n name: 'Snowtrace',\n },\n // LINEA\n [NOTIFICATION_CHAINS_ID.LINEA]: {\n url: 'https://lineascan.build',\n name: 'LineaScan',\n },\n [NOTIFICATION_CHAINS_ID.SEI]: {\n url: 'https://seitrace.com/',\n name: 'SeiTrace',\n },\n} satisfies Record<NOTIFICATION_CHAINS_IDS, BlockExplorerConfig>;\n\nexport { NOTIFICATION_CHAINS_ID } from '../constants/notification-schema';\n"]}
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./constants.cjs"), exports);
18
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/ui/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA4B","sourcesContent":["export * from './constants';\n"]}
@@ -1,2 +0,0 @@
1
- export * from "./constants.cjs";
2
- //# sourceMappingURL=index.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/NotificationServicesController/ui/index.ts"],"names":[],"mappings":"AAAA,gCAA4B"}
@@ -1,2 +0,0 @@
1
- export * from "./constants.mjs";
2
- //# sourceMappingURL=index.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/NotificationServicesController/ui/index.ts"],"names":[],"mappings":"AAAA,gCAA4B"}
@@ -1,2 +0,0 @@
1
- export * from "./constants.mjs";
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/ui/index.ts"],"names":[],"mappings":"AAAA,gCAA4B","sourcesContent":["export * from './constants';\n"]}
@@ -1,9 +0,0 @@
1
- {
2
- "version": "1.0.0",
3
- "private": true,
4
- "description": "",
5
- "license": "MIT",
6
- "sideEffects": false,
7
- "main": "../../dist/NotificationServicesController/ui/index.cjs",
8
- "types": "../../dist/NotificationServicesController/ui/index.d.cts"
9
- }