@metamask-previews/notification-services-controller 0.0.0-preview-b09c2ed
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 +14 -0
- package/LICENSE +20 -0
- package/README.md +15 -0
- package/dist/NotificationServicesController/NotificationServicesController.js +18 -0
- package/dist/NotificationServicesController/NotificationServicesController.js.map +1 -0
- package/dist/NotificationServicesController/NotificationServicesController.mjs +18 -0
- package/dist/NotificationServicesController/NotificationServicesController.mjs.map +1 -0
- package/dist/NotificationServicesController/constants/constants.js +10 -0
- package/dist/NotificationServicesController/constants/constants.js.map +1 -0
- package/dist/NotificationServicesController/constants/constants.mjs +10 -0
- package/dist/NotificationServicesController/constants/constants.mjs.map +1 -0
- package/dist/NotificationServicesController/constants/index.js +27 -0
- package/dist/NotificationServicesController/constants/index.js.map +1 -0
- package/dist/NotificationServicesController/constants/index.mjs +27 -0
- package/dist/NotificationServicesController/constants/index.mjs.map +1 -0
- package/dist/NotificationServicesController/constants/notification-schema.js +20 -0
- package/dist/NotificationServicesController/constants/notification-schema.js.map +1 -0
- package/dist/NotificationServicesController/constants/notification-schema.mjs +20 -0
- package/dist/NotificationServicesController/constants/notification-schema.mjs.map +1 -0
- package/dist/NotificationServicesController/index.js +44 -0
- package/dist/NotificationServicesController/index.js.map +1 -0
- package/dist/NotificationServicesController/index.mjs +44 -0
- package/dist/NotificationServicesController/index.mjs.map +1 -0
- package/dist/NotificationServicesController/processors/index.js +22 -0
- package/dist/NotificationServicesController/processors/index.js.map +1 -0
- package/dist/NotificationServicesController/processors/index.mjs +22 -0
- package/dist/NotificationServicesController/processors/index.mjs.map +1 -0
- package/dist/NotificationServicesController/processors/process-feature-announcement.js +10 -0
- package/dist/NotificationServicesController/processors/process-feature-announcement.js.map +1 -0
- package/dist/NotificationServicesController/processors/process-feature-announcement.mjs +10 -0
- package/dist/NotificationServicesController/processors/process-feature-announcement.mjs.map +1 -0
- package/dist/NotificationServicesController/processors/process-notifications.js +13 -0
- package/dist/NotificationServicesController/processors/process-notifications.js.map +1 -0
- package/dist/NotificationServicesController/processors/process-notifications.mjs +13 -0
- package/dist/NotificationServicesController/processors/process-notifications.mjs.map +1 -0
- package/dist/NotificationServicesController/processors/process-onchain-notifications.js +8 -0
- package/dist/NotificationServicesController/processors/process-onchain-notifications.js.map +1 -0
- package/dist/NotificationServicesController/processors/process-onchain-notifications.mjs +8 -0
- package/dist/NotificationServicesController/processors/process-onchain-notifications.mjs.map +1 -0
- package/dist/NotificationServicesController/services/feature-announcements.js +14 -0
- package/dist/NotificationServicesController/services/feature-announcements.js.map +1 -0
- package/dist/NotificationServicesController/services/feature-announcements.mjs +14 -0
- package/dist/NotificationServicesController/services/feature-announcements.mjs.map +1 -0
- package/dist/NotificationServicesController/services/onchain-notifications.js +29 -0
- package/dist/NotificationServicesController/services/onchain-notifications.js.map +1 -0
- package/dist/NotificationServicesController/services/onchain-notifications.mjs +29 -0
- package/dist/NotificationServicesController/services/onchain-notifications.mjs.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/feature-announcement.js +2 -0
- package/dist/NotificationServicesController/types/feature-announcement/feature-announcement.js.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/feature-announcement.mjs +2 -0
- package/dist/NotificationServicesController/types/feature-announcement/feature-announcement.mjs.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/index.js +5 -0
- package/dist/NotificationServicesController/types/feature-announcement/index.js.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/index.mjs +5 -0
- package/dist/NotificationServicesController/types/feature-announcement/index.mjs.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/type-feature-announcement.js +2 -0
- package/dist/NotificationServicesController/types/feature-announcement/type-feature-announcement.js.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/type-feature-announcement.mjs +2 -0
- package/dist/NotificationServicesController/types/feature-announcement/type-feature-announcement.mjs.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/type-links.js +2 -0
- package/dist/NotificationServicesController/types/feature-announcement/type-links.js.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/type-links.mjs +2 -0
- package/dist/NotificationServicesController/types/feature-announcement/type-links.mjs.map +1 -0
- package/dist/NotificationServicesController/types/index.js +12 -0
- package/dist/NotificationServicesController/types/index.js.map +1 -0
- package/dist/NotificationServicesController/types/index.mjs +12 -0
- package/dist/NotificationServicesController/types/index.mjs.map +1 -0
- package/dist/NotificationServicesController/types/notification/index.js +3 -0
- package/dist/NotificationServicesController/types/notification/index.js.map +1 -0
- package/dist/NotificationServicesController/types/notification/index.mjs +3 -0
- package/dist/NotificationServicesController/types/notification/index.mjs.map +1 -0
- package/dist/NotificationServicesController/types/notification/notification.js +2 -0
- package/dist/NotificationServicesController/types/notification/notification.js.map +1 -0
- package/dist/NotificationServicesController/types/notification/notification.mjs +2 -0
- package/dist/NotificationServicesController/types/notification/notification.mjs.map +1 -0
- package/dist/NotificationServicesController/types/on-chain-notification/index.js +3 -0
- package/dist/NotificationServicesController/types/on-chain-notification/index.js.map +1 -0
- package/dist/NotificationServicesController/types/on-chain-notification/index.mjs +3 -0
- package/dist/NotificationServicesController/types/on-chain-notification/index.mjs.map +1 -0
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.js +2 -0
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.js.map +1 -0
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.mjs +2 -0
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.mjs.map +1 -0
- package/dist/NotificationServicesController/types/on-chain-notification/schema.js +1 -0
- package/dist/NotificationServicesController/types/on-chain-notification/schema.js.map +1 -0
- package/dist/NotificationServicesController/types/on-chain-notification/schema.mjs +1 -0
- package/dist/NotificationServicesController/types/on-chain-notification/schema.mjs.map +1 -0
- package/dist/NotificationServicesController/types/type-utils.js +1 -0
- package/dist/NotificationServicesController/types/type-utils.js.map +1 -0
- package/dist/NotificationServicesController/types/type-utils.mjs +1 -0
- package/dist/NotificationServicesController/types/type-utils.mjs.map +1 -0
- package/dist/NotificationServicesController/types/user-storage/index.js +3 -0
- package/dist/NotificationServicesController/types/user-storage/index.js.map +1 -0
- package/dist/NotificationServicesController/types/user-storage/index.mjs +3 -0
- package/dist/NotificationServicesController/types/user-storage/index.mjs.map +1 -0
- package/dist/NotificationServicesController/types/user-storage/user-storage.js +2 -0
- package/dist/NotificationServicesController/types/user-storage/user-storage.js.map +1 -0
- package/dist/NotificationServicesController/types/user-storage/user-storage.mjs +2 -0
- package/dist/NotificationServicesController/types/user-storage/user-storage.mjs.map +1 -0
- package/dist/NotificationServicesController/utils/utils.js +32 -0
- package/dist/NotificationServicesController/utils/utils.js.map +1 -0
- package/dist/NotificationServicesController/utils/utils.mjs +32 -0
- package/dist/NotificationServicesController/utils/utils.mjs.map +1 -0
- package/dist/NotificationServicesPushController/NotificationServicesPushController.js +34 -0
- package/dist/NotificationServicesPushController/NotificationServicesPushController.js.map +1 -0
- package/dist/NotificationServicesPushController/NotificationServicesPushController.mjs +34 -0
- package/dist/NotificationServicesPushController/NotificationServicesPushController.mjs.map +1 -0
- package/dist/NotificationServicesPushController/constants.js +26 -0
- package/dist/NotificationServicesPushController/constants.js.map +1 -0
- package/dist/NotificationServicesPushController/constants.mjs +26 -0
- package/dist/NotificationServicesPushController/constants.mjs.map +1 -0
- package/dist/NotificationServicesPushController/index.js +49 -0
- package/dist/NotificationServicesPushController/index.js.map +1 -0
- package/dist/NotificationServicesPushController/index.mjs +49 -0
- package/dist/NotificationServicesPushController/index.mjs.map +1 -0
- package/dist/NotificationServicesPushController/services/endpoints.js +8 -0
- package/dist/NotificationServicesPushController/services/endpoints.js.map +1 -0
- package/dist/NotificationServicesPushController/services/endpoints.mjs +8 -0
- package/dist/NotificationServicesPushController/services/endpoints.mjs.map +1 -0
- package/dist/NotificationServicesPushController/services/push/index.js +1 -0
- package/dist/NotificationServicesPushController/services/push/index.js.map +1 -0
- package/dist/NotificationServicesPushController/services/push/index.mjs +1 -0
- package/dist/NotificationServicesPushController/services/push/index.mjs.map +1 -0
- package/dist/NotificationServicesPushController/services/push/push-web.js +37 -0
- package/dist/NotificationServicesPushController/services/push/push-web.js.map +1 -0
- package/dist/NotificationServicesPushController/services/push/push-web.mjs +37 -0
- package/dist/NotificationServicesPushController/services/push/push-web.mjs.map +1 -0
- package/dist/NotificationServicesPushController/services/services.js +43 -0
- package/dist/NotificationServicesPushController/services/services.js.map +1 -0
- package/dist/NotificationServicesPushController/services/services.mjs +43 -0
- package/dist/NotificationServicesPushController/services/services.mjs.map +1 -0
- package/dist/NotificationServicesPushController/types/firebase.js +2 -0
- package/dist/NotificationServicesPushController/types/firebase.js.map +1 -0
- package/dist/NotificationServicesPushController/types/firebase.mjs +2 -0
- package/dist/NotificationServicesPushController/types/firebase.mjs.map +1 -0
- package/dist/NotificationServicesPushController/types/index.js +3 -0
- package/dist/NotificationServicesPushController/types/index.js.map +1 -0
- package/dist/NotificationServicesPushController/types/index.mjs +3 -0
- package/dist/NotificationServicesPushController/types/index.mjs.map +1 -0
- package/dist/NotificationServicesPushController/utils/get-notification-data.js +14 -0
- package/dist/NotificationServicesPushController/utils/get-notification-data.js.map +1 -0
- package/dist/NotificationServicesPushController/utils/get-notification-data.mjs +14 -0
- package/dist/NotificationServicesPushController/utils/get-notification-data.mjs.map +1 -0
- package/dist/NotificationServicesPushController/utils/get-notification-message.js +36 -0
- package/dist/NotificationServicesPushController/utils/get-notification-message.js.map +1 -0
- package/dist/NotificationServicesPushController/utils/get-notification-message.mjs +36 -0
- package/dist/NotificationServicesPushController/utils/get-notification-message.mjs.map +1 -0
- package/dist/NotificationServicesPushController/utils/index.js +46 -0
- package/dist/NotificationServicesPushController/utils/index.js.map +1 -0
- package/dist/NotificationServicesPushController/utils/index.mjs +46 -0
- package/dist/NotificationServicesPushController/utils/index.mjs.map +1 -0
- package/dist/chunk-232HZSEV.js +7 -0
- package/dist/chunk-232HZSEV.js.map +1 -0
- package/dist/chunk-26CCETCM.mjs +70 -0
- package/dist/chunk-26CCETCM.mjs.map +1 -0
- package/dist/chunk-3F4M3OUO.mjs +119 -0
- package/dist/chunk-3F4M3OUO.mjs.map +1 -0
- package/dist/chunk-3ZS2HAEG.js +1 -0
- package/dist/chunk-3ZS2HAEG.js.map +1 -0
- package/dist/chunk-4BTNTREI.mjs +1 -0
- package/dist/chunk-4BTNTREI.mjs.map +1 -0
- package/dist/chunk-4QXAPVW3.mjs +1 -0
- package/dist/chunk-4QXAPVW3.mjs.map +1 -0
- package/dist/chunk-52CALMRA.js +28 -0
- package/dist/chunk-52CALMRA.js.map +1 -0
- package/dist/chunk-52NKJDI2.mjs +93 -0
- package/dist/chunk-52NKJDI2.mjs.map +1 -0
- package/dist/chunk-5OYPOYXZ.mjs +802 -0
- package/dist/chunk-5OYPOYXZ.mjs.map +1 -0
- package/dist/chunk-5WWCWQCE.js +214 -0
- package/dist/chunk-5WWCWQCE.js.map +1 -0
- package/dist/chunk-6B5FOWRH.js +119 -0
- package/dist/chunk-6B5FOWRH.js.map +1 -0
- package/dist/chunk-6ZDVTRRT.mjs +9 -0
- package/dist/chunk-6ZDVTRRT.mjs.map +1 -0
- package/dist/chunk-7LWR54U7.js +7 -0
- package/dist/chunk-7LWR54U7.js.map +1 -0
- package/dist/chunk-7RM3YNTD.mjs +1 -0
- package/dist/chunk-7RM3YNTD.mjs.map +1 -0
- package/dist/chunk-A2RPVX47.mjs +1 -0
- package/dist/chunk-A2RPVX47.mjs.map +1 -0
- package/dist/chunk-B25TJ7KS.js +8 -0
- package/dist/chunk-B25TJ7KS.js.map +1 -0
- package/dist/chunk-B4ECJJ5C.mjs +7 -0
- package/dist/chunk-B4ECJJ5C.mjs.map +1 -0
- package/dist/chunk-BONB66A2.mjs +14 -0
- package/dist/chunk-BONB66A2.mjs.map +1 -0
- package/dist/chunk-CQ6CGSKZ.js +35 -0
- package/dist/chunk-CQ6CGSKZ.js.map +1 -0
- package/dist/chunk-D42BBXBM.mjs +28 -0
- package/dist/chunk-D42BBXBM.mjs.map +1 -0
- package/dist/chunk-DMH4NSLF.js +1 -0
- package/dist/chunk-DMH4NSLF.js.map +1 -0
- package/dist/chunk-DNTK4U5M.js +4300 -0
- package/dist/chunk-DNTK4U5M.js.map +1 -0
- package/dist/chunk-DY4ELDRQ.js +176 -0
- package/dist/chunk-DY4ELDRQ.js.map +1 -0
- package/dist/chunk-EJ52BDLB.js +55 -0
- package/dist/chunk-EJ52BDLB.js.map +1 -0
- package/dist/chunk-EQWVJX6K.mjs +91 -0
- package/dist/chunk-EQWVJX6K.mjs.map +1 -0
- package/dist/chunk-FFQNSBPU.js +31 -0
- package/dist/chunk-FFQNSBPU.js.map +1 -0
- package/dist/chunk-G52DNXFH.mjs +1 -0
- package/dist/chunk-G52DNXFH.mjs.map +1 -0
- package/dist/chunk-GETQWOTI.js +1 -0
- package/dist/chunk-GETQWOTI.js.map +1 -0
- package/dist/chunk-GFAESVZA.js +48 -0
- package/dist/chunk-GFAESVZA.js.map +1 -0
- package/dist/chunk-HPUQYDVC.js +1 -0
- package/dist/chunk-HPUQYDVC.js.map +1 -0
- package/dist/chunk-IDO4JFV5.mjs +1 -0
- package/dist/chunk-IDO4JFV5.mjs.map +1 -0
- package/dist/chunk-IKWNHNJQ.mjs +8 -0
- package/dist/chunk-IKWNHNJQ.mjs.map +1 -0
- package/dist/chunk-IOMDG67D.mjs +7 -0
- package/dist/chunk-IOMDG67D.mjs.map +1 -0
- package/dist/chunk-IPI7BAW3.js +1 -0
- package/dist/chunk-IPI7BAW3.js.map +1 -0
- package/dist/chunk-JLHFZ2UG.mjs +31 -0
- package/dist/chunk-JLHFZ2UG.mjs.map +1 -0
- package/dist/chunk-JQ7WKFCI.mjs +1 -0
- package/dist/chunk-JQ7WKFCI.mjs.map +1 -0
- package/dist/chunk-KTQP5UDT.mjs +4300 -0
- package/dist/chunk-KTQP5UDT.mjs.map +1 -0
- package/dist/chunk-LYEXYTOI.js +14 -0
- package/dist/chunk-LYEXYTOI.js.map +1 -0
- package/dist/chunk-NJBJIZLR.js +93 -0
- package/dist/chunk-NJBJIZLR.js.map +1 -0
- package/dist/chunk-NMLYB3XT.js +149 -0
- package/dist/chunk-NMLYB3XT.js.map +1 -0
- package/dist/chunk-ODI2BTKS.mjs +55 -0
- package/dist/chunk-ODI2BTKS.mjs.map +1 -0
- package/dist/chunk-OUPWMPLU.mjs +214 -0
- package/dist/chunk-OUPWMPLU.mjs.map +1 -0
- package/dist/chunk-PGMXFZ6Y.js +207 -0
- package/dist/chunk-PGMXFZ6Y.js.map +1 -0
- package/dist/chunk-PIZCE3JD.js +243 -0
- package/dist/chunk-PIZCE3JD.js.map +1 -0
- package/dist/chunk-PNCS6GEX.mjs +1 -0
- package/dist/chunk-PNCS6GEX.mjs.map +1 -0
- package/dist/chunk-PROWNV4M.js +1 -0
- package/dist/chunk-PROWNV4M.js.map +1 -0
- package/dist/chunk-QB5IFRLA.mjs +1 -0
- package/dist/chunk-QB5IFRLA.mjs.map +1 -0
- package/dist/chunk-QTK2RMF7.mjs +29 -0
- package/dist/chunk-QTK2RMF7.mjs.map +1 -0
- package/dist/chunk-RAUV5UV4.mjs +1 -0
- package/dist/chunk-RAUV5UV4.mjs.map +1 -0
- package/dist/chunk-RQWUD2FB.mjs +48 -0
- package/dist/chunk-RQWUD2FB.mjs.map +1 -0
- package/dist/chunk-SMKJEA45.mjs +243 -0
- package/dist/chunk-SMKJEA45.mjs.map +1 -0
- package/dist/chunk-SSWX2N73.mjs +207 -0
- package/dist/chunk-SSWX2N73.mjs.map +1 -0
- package/dist/chunk-TLX5QQK5.js +9 -0
- package/dist/chunk-TLX5QQK5.js.map +1 -0
- package/dist/chunk-TT56I53C.mjs +149 -0
- package/dist/chunk-TT56I53C.mjs.map +1 -0
- package/dist/chunk-U74Q3BRP.mjs +1 -0
- package/dist/chunk-U74Q3BRP.mjs.map +1 -0
- package/dist/chunk-UIRZIKC3.mjs +187 -0
- package/dist/chunk-UIRZIKC3.mjs.map +1 -0
- package/dist/chunk-UPVIT75F.js +29 -0
- package/dist/chunk-UPVIT75F.js.map +1 -0
- package/dist/chunk-V46WVGWN.js +70 -0
- package/dist/chunk-V46WVGWN.js.map +1 -0
- package/dist/chunk-V5HMYDWE.js +1 -0
- package/dist/chunk-V5HMYDWE.js.map +1 -0
- package/dist/chunk-VC6J62JI.mjs +176 -0
- package/dist/chunk-VC6J62JI.mjs.map +1 -0
- package/dist/chunk-VE4DTN4R.mjs +35 -0
- package/dist/chunk-VE4DTN4R.mjs.map +1 -0
- package/dist/chunk-VOZ7Y2OO.js +187 -0
- package/dist/chunk-VOZ7Y2OO.js.map +1 -0
- package/dist/chunk-WRYFIWNK.js +1 -0
- package/dist/chunk-WRYFIWNK.js.map +1 -0
- package/dist/chunk-XNBTOK6G.js +802 -0
- package/dist/chunk-XNBTOK6G.js.map +1 -0
- package/dist/chunk-XZEVRYUE.js +1 -0
- package/dist/chunk-XZEVRYUE.js.map +1 -0
- package/dist/chunk-ZBNBZN5H.js +1 -0
- package/dist/chunk-ZBNBZN5H.js.map +1 -0
- package/dist/chunk-ZMNXLHAC.js +91 -0
- package/dist/chunk-ZMNXLHAC.js.map +1 -0
- package/dist/chunk-ZV3DFBO4.js +1 -0
- package/dist/chunk-ZV3DFBO4.js.map +1 -0
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +43 -0
- package/dist/index.mjs.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/types/NotificationServicesController/NotificationServicesController.d.ts +222 -0
- package/dist/types/NotificationServicesController/NotificationServicesController.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/__fixtures__/index.d.ts +7 -0
- package/dist/types/NotificationServicesController/__fixtures__/index.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/__fixtures__/mock-feature-announcements.d.ts +15 -0
- package/dist/types/NotificationServicesController/__fixtures__/mock-feature-announcements.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/__fixtures__/mock-notification-trigger.d.ts +9 -0
- package/dist/types/NotificationServicesController/__fixtures__/mock-notification-trigger.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/__fixtures__/mock-notification-user-storage.d.ts +35 -0
- package/dist/types/NotificationServicesController/__fixtures__/mock-notification-user-storage.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/__fixtures__/mock-raw-notifications.d.ts +82 -0
- package/dist/types/NotificationServicesController/__fixtures__/mock-raw-notifications.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/__fixtures__/mockResponses.d.ts +28 -0
- package/dist/types/NotificationServicesController/__fixtures__/mockResponses.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/__fixtures__/mockServices.d.ts +12 -0
- package/dist/types/NotificationServicesController/__fixtures__/mockServices.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/__fixtures__/test-utils.d.ts +14 -0
- package/dist/types/NotificationServicesController/__fixtures__/test-utils.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/constants/constants.d.ts +3 -0
- package/dist/types/NotificationServicesController/constants/constants.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/constants/index.d.ts +3 -0
- package/dist/types/NotificationServicesController/constants/index.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/constants/notification-schema.d.ts +42 -0
- package/dist/types/NotificationServicesController/constants/notification-schema.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/index.d.ts +6 -0
- package/dist/types/NotificationServicesController/index.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/processors/index.d.ts +4 -0
- package/dist/types/NotificationServicesController/processors/index.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/processors/process-feature-announcement.d.ts +19 -0
- package/dist/types/NotificationServicesController/processors/process-feature-announcement.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/processors/process-notifications.d.ts +19 -0
- package/dist/types/NotificationServicesController/processors/process-notifications.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/processors/process-onchain-notifications.d.ts +10 -0
- package/dist/types/NotificationServicesController/processors/process-onchain-notifications.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/services/feature-announcements.d.ts +28 -0
- package/dist/types/NotificationServicesController/services/feature-announcements.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/services/onchain-notifications.d.ts +62 -0
- package/dist/types/NotificationServicesController/services/onchain-notifications.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/types/feature-announcement/feature-announcement.d.ts +30 -0
- package/dist/types/NotificationServicesController/types/feature-announcement/feature-announcement.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/types/feature-announcement/index.d.ts +4 -0
- package/dist/types/NotificationServicesController/types/feature-announcement/index.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/types/feature-announcement/type-feature-announcement.d.ts +38 -0
- package/dist/types/NotificationServicesController/types/feature-announcement/type-feature-announcement.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/types/feature-announcement/type-links.d.ts +24 -0
- package/dist/types/NotificationServicesController/types/feature-announcement/type-links.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/types/index.d.ts +5 -0
- package/dist/types/NotificationServicesController/types/index.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/types/notification/index.d.ts +2 -0
- package/dist/types/NotificationServicesController/types/notification/index.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/types/notification/notification.d.ts +25 -0
- package/dist/types/NotificationServicesController/types/notification/notification.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/types/on-chain-notification/index.d.ts +2 -0
- package/dist/types/NotificationServicesController/types/on-chain-notification/index.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.ts +42 -0
- package/dist/types/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/types/on-chain-notification/schema.d.ts +283 -0
- package/dist/types/NotificationServicesController/types/on-chain-notification/schema.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/types/type-utils.d.ts +7 -0
- package/dist/types/NotificationServicesController/types/type-utils.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/types/user-storage/index.d.ts +2 -0
- package/dist/types/NotificationServicesController/types/user-storage/index.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/types/user-storage/user-storage.d.ts +26 -0
- package/dist/types/NotificationServicesController/types/user-storage/user-storage.d.ts.map +1 -0
- package/dist/types/NotificationServicesController/utils/utils.d.ts +144 -0
- package/dist/types/NotificationServicesController/utils/utils.d.ts.map +1 -0
- package/dist/types/NotificationServicesPushController/NotificationServicesPushController.d.ts +103 -0
- package/dist/types/NotificationServicesPushController/NotificationServicesPushController.d.ts.map +1 -0
- package/dist/types/NotificationServicesPushController/__fixtures__/index.d.ts +3 -0
- package/dist/types/NotificationServicesPushController/__fixtures__/index.d.ts.map +1 -0
- package/dist/types/NotificationServicesPushController/__fixtures__/mockResponse.d.ts +43 -0
- package/dist/types/NotificationServicesPushController/__fixtures__/mockResponse.d.ts.map +1 -0
- package/dist/types/NotificationServicesPushController/__fixtures__/mockServices.d.ts +9 -0
- package/dist/types/NotificationServicesPushController/__fixtures__/mockServices.d.ts.map +1 -0
- package/dist/types/NotificationServicesPushController/constants.d.ts +11 -0
- package/dist/types/NotificationServicesPushController/constants.d.ts.map +1 -0
- package/dist/types/NotificationServicesPushController/index.d.ts +5 -0
- package/dist/types/NotificationServicesPushController/index.d.ts.map +1 -0
- package/dist/types/NotificationServicesPushController/services/endpoints.d.ts +2 -0
- package/dist/types/NotificationServicesPushController/services/endpoints.d.ts.map +1 -0
- package/dist/types/NotificationServicesPushController/services/push/index.d.ts +6 -0
- package/dist/types/NotificationServicesPushController/services/push/index.d.ts.map +1 -0
- package/dist/types/NotificationServicesPushController/services/push/push-web.d.ts +32 -0
- package/dist/types/NotificationServicesPushController/services/push/push-web.d.ts.map +1 -0
- package/dist/types/NotificationServicesPushController/services/services.d.ts +95 -0
- package/dist/types/NotificationServicesPushController/services/services.d.ts.map +1 -0
- package/dist/types/NotificationServicesPushController/types/firebase.d.ts +53 -0
- package/dist/types/NotificationServicesPushController/types/firebase.d.ts.map +1 -0
- package/dist/types/NotificationServicesPushController/types/index.d.ts +2 -0
- package/dist/types/NotificationServicesPushController/types/index.d.ts.map +1 -0
- package/dist/types/NotificationServicesPushController/utils/get-notification-data.d.ts +42 -0
- package/dist/types/NotificationServicesPushController/utils/get-notification-data.d.ts.map +1 -0
- package/dist/types/NotificationServicesPushController/utils/get-notification-message.d.ts +67 -0
- package/dist/types/NotificationServicesPushController/utils/get-notification-message.d.ts.map +1 -0
- package/dist/types/NotificationServicesPushController/utils/index.d.ts +3 -0
- package/dist/types/NotificationServicesPushController/utils/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +80 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { BigNumber } from 'bignumber.js';
|
|
2
|
+
type FormatOptions = {
|
|
3
|
+
decimalPlaces?: number;
|
|
4
|
+
shouldEllipse?: boolean;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Calculates the token amount based on the given value and decimals.
|
|
8
|
+
*
|
|
9
|
+
* @param value - The value to calculate the token amount from.
|
|
10
|
+
* @param decimals - The number of decimals to use for the calculation.
|
|
11
|
+
* @returns The calculated token amount.
|
|
12
|
+
*/
|
|
13
|
+
export declare function calcTokenAmount(value: string, decimals: number): BigNumber;
|
|
14
|
+
/**
|
|
15
|
+
* Calculates the number of leading zeros in the fractional part of a number.
|
|
16
|
+
*
|
|
17
|
+
* This function converts a number or a string representation of a number into
|
|
18
|
+
* its decimal form and then counts the number of leading zeros present in the
|
|
19
|
+
* fractional part of the number. This is useful for determining the precision
|
|
20
|
+
* of very small numbers.
|
|
21
|
+
*
|
|
22
|
+
* @param num - The number to analyze, which can be in the form
|
|
23
|
+
* of a number or a string.
|
|
24
|
+
* @returns The count of leading zeros in the fractional part of the number.
|
|
25
|
+
*/
|
|
26
|
+
export declare const getLeadingZeroCount: (num: number | string) => number;
|
|
27
|
+
/**
|
|
28
|
+
* This formats a number using Intl
|
|
29
|
+
* It abbreviates large numbers (using K, M, B, T)
|
|
30
|
+
* And abbreviates small numbers in 2 ways:
|
|
31
|
+
* - Will format to the given number of decimal places
|
|
32
|
+
* - Will format up to 4 decimal places
|
|
33
|
+
* - Will ellipse the number if longer than given decimal places
|
|
34
|
+
*
|
|
35
|
+
* @param numericAmount - The number to format
|
|
36
|
+
* @param opts - The options to use when formatting
|
|
37
|
+
* @returns The formatted number
|
|
38
|
+
*/
|
|
39
|
+
export declare const formatAmount: (numericAmount: number, opts?: FormatOptions) => string;
|
|
40
|
+
export declare const getAmount: (amount: string, decimals: string, options?: FormatOptions) => string;
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=get-notification-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-notification-data.d.ts","sourceRoot":"","sources":["../../../../src/NotificationServicesPushController/utils/get-notification-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,KAAK,aAAa,GAAG;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAKF;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,aAG9D;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,QAAS,MAAM,GAAG,MAAM,WAIvD,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,kBAAmB,MAAM,SAAS,aAAa,WA+BvE,CAAC;AAEF,eAAO,MAAM,SAAS,WACZ,MAAM,YACJ,MAAM,YACN,aAAa,WAYxB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { Types } from '../../NotificationServicesController';
|
|
2
|
+
import { Constants } from '../../NotificationServicesController';
|
|
3
|
+
export type TranslationKeys = {
|
|
4
|
+
pushPlatformNotificationsFundsSentTitle: () => string;
|
|
5
|
+
pushPlatformNotificationsFundsSentDescriptionDefault: () => string;
|
|
6
|
+
pushPlatformNotificationsFundsSentDescription: (...args: [string, string]) => string;
|
|
7
|
+
pushPlatformNotificationsFundsReceivedTitle: () => string;
|
|
8
|
+
pushPlatformNotificationsFundsReceivedDescriptionDefault: () => string;
|
|
9
|
+
pushPlatformNotificationsFundsReceivedDescription: (...args: [string, string]) => string;
|
|
10
|
+
pushPlatformNotificationsSwapCompletedTitle: () => string;
|
|
11
|
+
pushPlatformNotificationsSwapCompletedDescription: () => string;
|
|
12
|
+
pushPlatformNotificationsNftSentTitle: () => string;
|
|
13
|
+
pushPlatformNotificationsNftSentDescription: () => string;
|
|
14
|
+
pushPlatformNotificationsNftReceivedTitle: () => string;
|
|
15
|
+
pushPlatformNotificationsNftReceivedDescription: () => string;
|
|
16
|
+
pushPlatformNotificationsStakingRocketpoolStakeCompletedTitle: () => string;
|
|
17
|
+
pushPlatformNotificationsStakingRocketpoolStakeCompletedDescription: () => string;
|
|
18
|
+
pushPlatformNotificationsStakingRocketpoolUnstakeCompletedTitle: () => string;
|
|
19
|
+
pushPlatformNotificationsStakingRocketpoolUnstakeCompletedDescription: () => string;
|
|
20
|
+
pushPlatformNotificationsStakingLidoStakeCompletedTitle: () => string;
|
|
21
|
+
pushPlatformNotificationsStakingLidoStakeCompletedDescription: () => string;
|
|
22
|
+
pushPlatformNotificationsStakingLidoStakeReadyToBeWithdrawnTitle: () => string;
|
|
23
|
+
pushPlatformNotificationsStakingLidoStakeReadyToBeWithdrawnDescription: () => string;
|
|
24
|
+
pushPlatformNotificationsStakingLidoWithdrawalRequestedTitle: () => string;
|
|
25
|
+
pushPlatformNotificationsStakingLidoWithdrawalRequestedDescription: () => string;
|
|
26
|
+
pushPlatformNotificationsStakingLidoWithdrawalCompletedTitle: () => string;
|
|
27
|
+
pushPlatformNotificationsStakingLidoWithdrawalCompletedDescription: () => string;
|
|
28
|
+
};
|
|
29
|
+
type PushNotificationMessage = {
|
|
30
|
+
title: string;
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
type NotificationMessage<N extends Types.INotification> = {
|
|
34
|
+
title: string | null;
|
|
35
|
+
defaultDescription: string | null;
|
|
36
|
+
getDescription?: (n: N) => string | null;
|
|
37
|
+
};
|
|
38
|
+
type NotificationMessageDict = {
|
|
39
|
+
[K in Constants.TRIGGER_TYPES]?: NotificationMessage<Extract<Types.INotification, {
|
|
40
|
+
type: K;
|
|
41
|
+
}>>;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* On Chain Push Notification Messages.
|
|
45
|
+
* This is a list of all the push notifications we support. Update this for synced notifications on mobile and extension
|
|
46
|
+
*
|
|
47
|
+
* @param translationKeys - all translations supported
|
|
48
|
+
* @returns A translation push message object.
|
|
49
|
+
*/
|
|
50
|
+
export declare const createOnChainPushNotificationMessages: (translationKeys: TranslationKeys) => NotificationMessageDict;
|
|
51
|
+
/**
|
|
52
|
+
* Checks if the given value is an OnChainRawNotification object.
|
|
53
|
+
*
|
|
54
|
+
* @param n - The value to check.
|
|
55
|
+
* @returns True if the value is an OnChainRawNotification object, false otherwise.
|
|
56
|
+
*/
|
|
57
|
+
export declare function isOnChainNotification(n: unknown): n is Types.OnChainRawNotification;
|
|
58
|
+
/**
|
|
59
|
+
* Creates a push notification message based on the given on-chain raw notification.
|
|
60
|
+
*
|
|
61
|
+
* @param n - processed notification.
|
|
62
|
+
* @param translations - translates keys into text
|
|
63
|
+
* @returns The push notification message object, or null if the notification is invalid.
|
|
64
|
+
*/
|
|
65
|
+
export declare function createOnChainPushNotificationMessage(n: Types.INotification, translations: TranslationKeys): PushNotificationMessage | null;
|
|
66
|
+
export {};
|
|
67
|
+
//# sourceMappingURL=get-notification-message.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-notification-message.d.ts","sourceRoot":"","sources":["../../../../src/NotificationServicesPushController/utils/get-notification-message.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAGjE,MAAM,MAAM,eAAe,GAAG;IAC5B,uCAAuC,EAAE,MAAM,MAAM,CAAC;IACtD,oDAAoD,EAAE,MAAM,MAAM,CAAC;IACnE,6CAA6C,EAAE,CAC7C,GAAG,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,KACtB,MAAM,CAAC;IACZ,2CAA2C,EAAE,MAAM,MAAM,CAAC;IAC1D,wDAAwD,EAAE,MAAM,MAAM,CAAC;IACvE,iDAAiD,EAAE,CACjD,GAAG,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,KACtB,MAAM,CAAC;IACZ,2CAA2C,EAAE,MAAM,MAAM,CAAC;IAC1D,iDAAiD,EAAE,MAAM,MAAM,CAAC;IAChE,qCAAqC,EAAE,MAAM,MAAM,CAAC;IACpD,2CAA2C,EAAE,MAAM,MAAM,CAAC;IAC1D,yCAAyC,EAAE,MAAM,MAAM,CAAC;IACxD,+CAA+C,EAAE,MAAM,MAAM,CAAC;IAC9D,6DAA6D,EAAE,MAAM,MAAM,CAAC;IAC5E,mEAAmE,EAAE,MAAM,MAAM,CAAC;IAClF,+DAA+D,EAAE,MAAM,MAAM,CAAC;IAC9E,qEAAqE,EAAE,MAAM,MAAM,CAAC;IACpF,uDAAuD,EAAE,MAAM,MAAM,CAAC;IACtE,6DAA6D,EAAE,MAAM,MAAM,CAAC;IAC5E,gEAAgE,EAAE,MAAM,MAAM,CAAC;IAC/E,sEAAsE,EAAE,MAAM,MAAM,CAAC;IACrF,4DAA4D,EAAE,MAAM,MAAM,CAAC;IAC3E,kEAAkE,EAAE,MAAM,MAAM,CAAC;IACjF,4DAA4D,EAAE,MAAM,MAAM,CAAC;IAC3E,kEAAkE,EAAE,MAAM,MAAM,CAAC;CAClF,CAAC;AAEF,KAAK,uBAAuB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,KAAK,mBAAmB,CAAC,CAAC,SAAS,KAAK,CAAC,aAAa,IAAI;IACxD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,MAAM,GAAG,IAAI,CAAC;CAC1C,CAAC;AAEF,KAAK,uBAAuB,GAAG;KAC5B,CAAC,IAAI,SAAS,CAAC,aAAa,CAAC,CAAC,EAAE,mBAAmB,CAClD,OAAO,CAAC,KAAK,CAAC,aAAa,EAAE;QAAE,IAAI,EAAE,CAAC,CAAA;KAAE,CAAC,CAC1C;CACF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,qCAAqC,oBAC/B,eAAe,KAC/B,uBAuKF,CAAC;AAYF;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,CAAC,EAAE,OAAO,GACT,CAAC,IAAI,KAAK,CAAC,sBAAsB,CAWnC;AAED;;;;;;GAMG;AACH,wBAAgB,oCAAoC,CAClD,CAAC,EAAE,KAAK,CAAC,aAAa,EACtB,YAAY,EAAE,eAAe,GAC5B,uBAAuB,GAAG,IAAI,CA0BhC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/NotificationServicesPushController/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,8BAA8B,MAAM,kCAAkC,CAAC;AACnF,OAAO,KAAK,mCAAmC,MAAM,sCAAsC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@metamask-previews/notification-services-controller",
|
|
3
|
+
"version": "0.0.0-preview-b09c2ed",
|
|
4
|
+
"description": "Manages New MetaMask decentralized Notification system",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"MetaMask",
|
|
7
|
+
"Ethereum"
|
|
8
|
+
],
|
|
9
|
+
"homepage": "https://github.com/MetaMask/core/tree/main/packages/notification-services-controller#readme",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/MetaMask/core/issues"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/MetaMask/core.git"
|
|
16
|
+
},
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"sideEffects": false,
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"import": "./dist/index.mjs",
|
|
22
|
+
"require": "./dist/index.js",
|
|
23
|
+
"types": "./dist/types/index.d.ts"
|
|
24
|
+
},
|
|
25
|
+
"./package.json": "./package.json"
|
|
26
|
+
},
|
|
27
|
+
"main": "./dist/index.js",
|
|
28
|
+
"types": "./dist/types/index.d.ts",
|
|
29
|
+
"files": [
|
|
30
|
+
"dist/"
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean",
|
|
34
|
+
"build:docs": "typedoc",
|
|
35
|
+
"changelog:update": "../../scripts/update-changelog.sh @metamask/notification-services-controller",
|
|
36
|
+
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/notification-services-controller",
|
|
37
|
+
"publish:preview": "yarn npm publish --tag preview",
|
|
38
|
+
"test": "jest --reporters=jest-silent-reporter",
|
|
39
|
+
"test:clean": "jest --clearCache",
|
|
40
|
+
"test:verbose": "jest --verbose",
|
|
41
|
+
"test:watch": "jest --watch"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@contentful/rich-text-html-renderer": "^16.5.2",
|
|
45
|
+
"@metamask/base-controller": "^6.0.0",
|
|
46
|
+
"@metamask/controller-utils": "^11.0.0",
|
|
47
|
+
"@metamask/keyring-controller": "^17.1.0",
|
|
48
|
+
"@metamask/profile-sync-controller": "^0.0.0",
|
|
49
|
+
"bignumber.js": "^4.1.0",
|
|
50
|
+
"contentful": "^10.3.6",
|
|
51
|
+
"firebase": "^10.11.0",
|
|
52
|
+
"loglevel": "^1.8.1",
|
|
53
|
+
"uuid": "^8.3.2"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@lavamoat/allow-scripts": "^3.0.4",
|
|
57
|
+
"@metamask/auto-changelog": "^3.4.4",
|
|
58
|
+
"@types/jest": "^27.4.1",
|
|
59
|
+
"@types/readable-stream": "^2.3.0",
|
|
60
|
+
"deepmerge": "^4.2.2",
|
|
61
|
+
"jest": "^27.5.1",
|
|
62
|
+
"jest-environment-jsdom": "^27.5.1",
|
|
63
|
+
"nock": "^13.3.1",
|
|
64
|
+
"ts-jest": "^27.1.4",
|
|
65
|
+
"typedoc": "^0.24.8",
|
|
66
|
+
"typedoc-plugin-missing-exports": "^2.0.0",
|
|
67
|
+
"typescript": "~4.9.5"
|
|
68
|
+
},
|
|
69
|
+
"peerDependencies": {
|
|
70
|
+
"@metamask/keyring-controller": "^17.0.0",
|
|
71
|
+
"@metamask/profile-sync-controller": "^0.0.0"
|
|
72
|
+
},
|
|
73
|
+
"engines": {
|
|
74
|
+
"node": "^18.18 || >=20"
|
|
75
|
+
},
|
|
76
|
+
"publishConfig": {
|
|
77
|
+
"access": "public",
|
|
78
|
+
"registry": "https://registry.npmjs.org/"
|
|
79
|
+
}
|
|
80
|
+
}
|