@metamask-previews/notification-services-controller 0.5.0-preview-9edcf0e0 → 0.5.0-preview-cf09c0a
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/dist/NotificationServicesController/NotificationServicesController.cjs +803 -0
- package/dist/NotificationServicesController/NotificationServicesController.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/NotificationServicesController.d.ts → NotificationServicesController/NotificationServicesController.d.cts} +7 -7
- package/dist/NotificationServicesController/NotificationServicesController.d.cts.map +1 -0
- package/dist/NotificationServicesController/NotificationServicesController.d.mts +238 -0
- package/dist/NotificationServicesController/NotificationServicesController.d.mts.map +1 -0
- package/dist/NotificationServicesController/NotificationServicesController.mjs +779 -17
- package/dist/NotificationServicesController/NotificationServicesController.mjs.map +1 -1
- package/dist/NotificationServicesController/__fixtures__/index.cjs +22 -0
- package/dist/NotificationServicesController/__fixtures__/index.cjs.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/index.d.cts +6 -0
- package/dist/NotificationServicesController/__fixtures__/index.d.cts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/index.d.mts +6 -0
- package/dist/NotificationServicesController/__fixtures__/index.d.mts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/index.mjs +6 -0
- package/dist/NotificationServicesController/__fixtures__/index.mjs.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mock-feature-announcements.cjs +210 -0
- package/dist/NotificationServicesController/__fixtures__/mock-feature-announcements.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/__fixtures__/mock-feature-announcements.d.ts → NotificationServicesController/__fixtures__/mock-feature-announcements.d.cts} +3 -3
- package/dist/NotificationServicesController/__fixtures__/mock-feature-announcements.d.cts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mock-feature-announcements.d.mts +15 -0
- package/dist/NotificationServicesController/__fixtures__/mock-feature-announcements.d.mts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mock-feature-announcements.mjs +205 -0
- package/dist/NotificationServicesController/__fixtures__/mock-feature-announcements.mjs.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mock-notification-trigger.cjs +22 -0
- package/dist/NotificationServicesController/__fixtures__/mock-notification-trigger.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/__fixtures__/mock-notification-trigger.d.ts → NotificationServicesController/__fixtures__/mock-notification-trigger.d.cts} +2 -2
- package/dist/NotificationServicesController/__fixtures__/mock-notification-trigger.d.cts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mock-notification-trigger.d.mts +9 -0
- package/dist/NotificationServicesController/__fixtures__/mock-notification-trigger.d.mts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mock-notification-trigger.mjs +18 -0
- package/dist/NotificationServicesController/__fixtures__/mock-notification-trigger.mjs.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mock-notification-user-storage.cjs +82 -0
- package/dist/NotificationServicesController/__fixtures__/mock-notification-user-storage.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/__fixtures__/mock-notification-user-storage.d.ts → NotificationServicesController/__fixtures__/mock-notification-user-storage.d.cts} +3 -3
- package/dist/NotificationServicesController/__fixtures__/mock-notification-user-storage.d.cts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mock-notification-user-storage.d.mts +35 -0
- package/dist/NotificationServicesController/__fixtures__/mock-notification-user-storage.d.mts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mock-notification-user-storage.mjs +76 -0
- package/dist/NotificationServicesController/__fixtures__/mock-notification-user-storage.mjs.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mock-raw-notifications.cjs +624 -0
- package/dist/NotificationServicesController/__fixtures__/mock-raw-notifications.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/__fixtures__/mock-raw-notifications.d.ts → NotificationServicesController/__fixtures__/mock-raw-notifications.d.cts} +2 -2
- package/dist/NotificationServicesController/__fixtures__/mock-raw-notifications.d.cts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mock-raw-notifications.d.mts +82 -0
- package/dist/NotificationServicesController/__fixtures__/mock-raw-notifications.d.mts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mock-raw-notifications.mjs +605 -0
- package/dist/NotificationServicesController/__fixtures__/mock-raw-notifications.mjs.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mockResponses.cjs +50 -0
- package/dist/NotificationServicesController/__fixtures__/mockResponses.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/__fixtures__/mockResponses.d.ts → NotificationServicesController/__fixtures__/mockResponses.d.cts} +5 -5
- package/dist/NotificationServicesController/__fixtures__/mockResponses.d.cts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mockResponses.d.mts +28 -0
- package/dist/NotificationServicesController/__fixtures__/mockResponses.d.mts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mockResponses.mjs +42 -0
- package/dist/NotificationServicesController/__fixtures__/mockResponses.mjs.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mockServices.cjs +56 -0
- package/dist/NotificationServicesController/__fixtures__/mockServices.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/__fixtures__/mockServices.d.ts → NotificationServicesController/__fixtures__/mockServices.d.cts} +2 -2
- package/dist/NotificationServicesController/__fixtures__/mockServices.d.cts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mockServices.d.mts +12 -0
- package/dist/NotificationServicesController/__fixtures__/mockServices.d.mts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mockServices.mjs +52 -0
- package/dist/NotificationServicesController/__fixtures__/mockServices.mjs.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/test-utils.cjs +31 -0
- package/dist/NotificationServicesController/__fixtures__/test-utils.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/__fixtures__/test-utils.d.ts → NotificationServicesController/__fixtures__/test-utils.d.cts} +1 -1
- package/dist/NotificationServicesController/__fixtures__/test-utils.d.cts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/test-utils.d.mts +14 -0
- package/dist/NotificationServicesController/__fixtures__/test-utils.d.mts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/test-utils.mjs +27 -0
- package/dist/NotificationServicesController/__fixtures__/test-utils.mjs.map +1 -0
- package/dist/NotificationServicesController/constants/constants.cjs +7 -0
- package/dist/NotificationServicesController/constants/constants.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/constants/constants.d.ts → NotificationServicesController/constants/constants.d.cts} +1 -1
- package/dist/NotificationServicesController/constants/constants.d.cts.map +1 -0
- package/dist/NotificationServicesController/constants/constants.d.mts +3 -0
- package/dist/NotificationServicesController/constants/constants.d.mts.map +1 -0
- package/dist/NotificationServicesController/constants/constants.mjs +3 -9
- package/dist/NotificationServicesController/constants/constants.mjs.map +1 -1
- package/dist/NotificationServicesController/constants/index.cjs +19 -0
- package/dist/NotificationServicesController/constants/index.cjs.map +1 -0
- package/dist/NotificationServicesController/constants/index.d.cts +3 -0
- package/dist/NotificationServicesController/constants/index.d.cts.map +1 -0
- package/dist/NotificationServicesController/constants/index.d.mts +3 -0
- package/dist/NotificationServicesController/constants/index.d.mts.map +1 -0
- package/dist/NotificationServicesController/constants/index.mjs +2 -28
- package/dist/NotificationServicesController/constants/index.mjs.map +1 -1
- package/dist/NotificationServicesController/constants/notification-schema.cjs +170 -0
- package/dist/NotificationServicesController/constants/notification-schema.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/constants/notification-schema.d.ts → NotificationServicesController/constants/notification-schema.d.cts} +2 -2
- package/dist/NotificationServicesController/constants/notification-schema.d.cts.map +1 -0
- package/dist/NotificationServicesController/constants/notification-schema.d.mts +48 -0
- package/dist/NotificationServicesController/constants/notification-schema.d.mts.map +1 -0
- package/dist/NotificationServicesController/constants/notification-schema.mjs +165 -20
- package/dist/NotificationServicesController/constants/notification-schema.mjs.map +1 -1
- package/dist/NotificationServicesController/index.cjs +46 -0
- package/dist/NotificationServicesController/index.cjs.map +1 -0
- package/dist/NotificationServicesController/index.d.cts +14 -0
- package/dist/NotificationServicesController/index.d.cts.map +1 -0
- package/dist/NotificationServicesController/index.d.mts +14 -0
- package/dist/NotificationServicesController/index.d.mts.map +1 -0
- package/dist/NotificationServicesController/index.mjs +13 -86
- package/dist/NotificationServicesController/index.mjs.map +1 -1
- package/dist/NotificationServicesController/processors/index.cjs +20 -0
- package/dist/NotificationServicesController/processors/index.cjs.map +1 -0
- package/dist/NotificationServicesController/processors/index.d.cts +4 -0
- package/dist/NotificationServicesController/processors/index.d.cts.map +1 -0
- package/dist/NotificationServicesController/processors/index.d.mts +4 -0
- package/dist/NotificationServicesController/processors/index.d.mts.map +1 -0
- package/dist/NotificationServicesController/processors/index.mjs +3 -21
- package/dist/NotificationServicesController/processors/index.mjs.map +1 -1
- package/dist/NotificationServicesController/processors/process-feature-announcement.cjs +41 -0
- package/dist/{chunk-52CALMRA.js.map → NotificationServicesController/processors/process-feature-announcement.cjs.map} +1 -1
- package/dist/{types/NotificationServicesController/processors/process-feature-announcement.d.ts → NotificationServicesController/processors/process-feature-announcement.d.cts} +3 -3
- package/dist/NotificationServicesController/processors/process-feature-announcement.d.cts.map +1 -0
- package/dist/NotificationServicesController/processors/process-feature-announcement.d.mts +19 -0
- package/dist/NotificationServicesController/processors/process-feature-announcement.d.mts.map +1 -0
- package/dist/NotificationServicesController/processors/process-feature-announcement.mjs +34 -8
- package/dist/NotificationServicesController/processors/process-feature-announcement.mjs.map +1 -1
- package/dist/NotificationServicesController/processors/process-notifications.cjs +50 -0
- package/dist/NotificationServicesController/processors/process-notifications.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/processors/process-notifications.d.ts → NotificationServicesController/processors/process-notifications.d.cts} +2 -2
- package/dist/NotificationServicesController/processors/process-notifications.d.cts.map +1 -0
- package/dist/NotificationServicesController/processors/process-notifications.d.mts +19 -0
- package/dist/NotificationServicesController/processors/process-notifications.d.mts.map +1 -0
- package/dist/NotificationServicesController/processors/process-notifications.mjs +44 -12
- package/dist/NotificationServicesController/processors/process-notifications.mjs.map +1 -1
- package/dist/NotificationServicesController/processors/process-onchain-notifications.cjs +19 -0
- package/dist/NotificationServicesController/processors/process-onchain-notifications.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/processors/process-onchain-notifications.d.ts → NotificationServicesController/processors/process-onchain-notifications.d.cts} +3 -3
- package/dist/NotificationServicesController/processors/process-onchain-notifications.d.cts.map +1 -0
- package/dist/NotificationServicesController/processors/process-onchain-notifications.d.mts +10 -0
- package/dist/NotificationServicesController/processors/process-onchain-notifications.d.mts.map +1 -0
- package/dist/NotificationServicesController/processors/process-onchain-notifications.mjs +14 -7
- package/dist/NotificationServicesController/processors/process-onchain-notifications.mjs.map +1 -1
- package/dist/NotificationServicesController/services/feature-announcements.cjs +97 -0
- package/dist/NotificationServicesController/services/feature-announcements.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/services/feature-announcements.d.ts → NotificationServicesController/services/feature-announcements.d.cts} +4 -4
- package/dist/NotificationServicesController/services/feature-announcements.d.cts.map +1 -0
- package/dist/NotificationServicesController/services/feature-announcements.d.mts +28 -0
- package/dist/NotificationServicesController/services/feature-announcements.d.mts.map +1 -0
- package/dist/NotificationServicesController/services/feature-announcements.mjs +91 -12
- package/dist/NotificationServicesController/services/feature-announcements.mjs.map +1 -1
- package/dist/NotificationServicesController/services/onchain-notifications.cjs +195 -0
- package/dist/NotificationServicesController/services/onchain-notifications.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/services/onchain-notifications.d.ts → NotificationServicesController/services/onchain-notifications.d.cts} +3 -3
- package/dist/NotificationServicesController/services/onchain-notifications.d.cts.map +1 -0
- package/dist/NotificationServicesController/services/onchain-notifications.d.mts +62 -0
- package/dist/NotificationServicesController/services/onchain-notifications.d.mts.map +1 -0
- package/dist/NotificationServicesController/services/onchain-notifications.mjs +190 -29
- package/dist/NotificationServicesController/services/onchain-notifications.mjs.map +1 -1
- package/dist/NotificationServicesController/types/feature-announcement/feature-announcement.cjs +3 -0
- package/dist/NotificationServicesController/types/feature-announcement/feature-announcement.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/types/feature-announcement/feature-announcement.d.ts → NotificationServicesController/types/feature-announcement/feature-announcement.d.cts} +3 -3
- package/dist/NotificationServicesController/types/feature-announcement/feature-announcement.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/feature-announcement.d.mts +32 -0
- package/dist/NotificationServicesController/types/feature-announcement/feature-announcement.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/feature-announcement.mjs +1 -1
- package/dist/NotificationServicesController/types/feature-announcement/feature-announcement.mjs.map +1 -1
- package/dist/NotificationServicesController/types/feature-announcement/index.cjs +20 -0
- package/dist/NotificationServicesController/types/feature-announcement/index.cjs.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/index.d.cts +4 -0
- package/dist/NotificationServicesController/types/feature-announcement/index.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/index.d.mts +4 -0
- package/dist/NotificationServicesController/types/feature-announcement/index.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/index.mjs +3 -4
- package/dist/NotificationServicesController/types/feature-announcement/index.mjs.map +1 -1
- package/dist/NotificationServicesController/types/feature-announcement/type-feature-announcement.cjs +3 -0
- package/dist/NotificationServicesController/types/feature-announcement/type-feature-announcement.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/types/feature-announcement/type-feature-announcement.d.ts → NotificationServicesController/types/feature-announcement/type-feature-announcement.d.cts} +3 -3
- package/dist/NotificationServicesController/types/feature-announcement/type-feature-announcement.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/type-feature-announcement.d.mts +39 -0
- package/dist/NotificationServicesController/types/feature-announcement/type-feature-announcement.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/type-feature-announcement.mjs +1 -1
- package/dist/NotificationServicesController/types/feature-announcement/type-feature-announcement.mjs.map +1 -1
- package/dist/NotificationServicesController/types/feature-announcement/type-links.cjs +3 -0
- package/dist/NotificationServicesController/types/feature-announcement/type-links.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/types/feature-announcement/type-links.d.ts → NotificationServicesController/types/feature-announcement/type-links.d.cts} +1 -1
- package/dist/NotificationServicesController/types/feature-announcement/type-links.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/type-links.d.mts +29 -0
- package/dist/NotificationServicesController/types/feature-announcement/type-links.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/type-links.mjs +1 -1
- package/dist/NotificationServicesController/types/feature-announcement/type-links.mjs.map +1 -1
- package/dist/NotificationServicesController/types/index.cjs +21 -0
- package/dist/NotificationServicesController/types/index.cjs.map +1 -0
- package/dist/NotificationServicesController/types/index.d.cts +5 -0
- package/dist/NotificationServicesController/types/index.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/index.d.mts +5 -0
- package/dist/NotificationServicesController/types/index.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/index.mjs +4 -11
- package/dist/NotificationServicesController/types/index.mjs.map +1 -1
- package/dist/NotificationServicesController/types/notification/index.cjs +18 -0
- package/dist/NotificationServicesController/types/notification/index.cjs.map +1 -0
- package/dist/NotificationServicesController/types/notification/index.d.cts +2 -0
- package/dist/NotificationServicesController/types/notification/index.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/notification/index.d.mts +2 -0
- package/dist/NotificationServicesController/types/notification/index.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/notification/index.mjs +1 -2
- package/dist/NotificationServicesController/types/notification/index.mjs.map +1 -1
- package/dist/NotificationServicesController/types/notification/notification.cjs +3 -0
- package/dist/NotificationServicesController/types/notification/notification.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/types/notification/notification.d.ts → NotificationServicesController/types/notification/notification.d.cts} +4 -4
- package/dist/NotificationServicesController/types/notification/notification.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/notification/notification.d.mts +25 -0
- package/dist/NotificationServicesController/types/notification/notification.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/notification/notification.mjs +1 -1
- package/dist/NotificationServicesController/types/notification/notification.mjs.map +1 -1
- package/dist/NotificationServicesController/types/on-chain-notification/index.cjs +18 -0
- package/dist/NotificationServicesController/types/on-chain-notification/index.cjs.map +1 -0
- package/dist/NotificationServicesController/types/on-chain-notification/index.d.cts +2 -0
- package/dist/NotificationServicesController/types/on-chain-notification/index.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/on-chain-notification/index.d.mts +2 -0
- package/dist/NotificationServicesController/types/on-chain-notification/index.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/on-chain-notification/index.mjs +1 -2
- package/dist/NotificationServicesController/types/on-chain-notification/index.mjs.map +1 -1
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.cjs +3 -0
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.ts → NotificationServicesController/types/on-chain-notification/on-chain-notification.d.cts} +4 -4
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.mts +43 -0
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.mjs +1 -1
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.mjs.map +1 -1
- package/dist/NotificationServicesController/types/on-chain-notification/schema.cjs +9 -0
- package/dist/NotificationServicesController/types/on-chain-notification/schema.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/types/on-chain-notification/schema.d.ts → NotificationServicesController/types/on-chain-notification/schema.d.cts} +1 -1
- package/dist/NotificationServicesController/types/on-chain-notification/schema.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/on-chain-notification/schema.d.mts +283 -0
- package/dist/NotificationServicesController/types/on-chain-notification/schema.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/on-chain-notification/schema.mjs +7 -0
- package/dist/NotificationServicesController/types/on-chain-notification/schema.mjs.map +1 -1
- package/dist/NotificationServicesController/types/type-utils.cjs +3 -0
- package/dist/NotificationServicesController/types/type-utils.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/types/type-utils.d.ts → NotificationServicesController/types/type-utils.d.cts} +1 -1
- package/dist/NotificationServicesController/types/type-utils.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/type-utils.d.mts +7 -0
- package/dist/NotificationServicesController/types/type-utils.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/type-utils.mjs +1 -0
- package/dist/NotificationServicesController/types/type-utils.mjs.map +1 -1
- package/dist/NotificationServicesController/types/user-storage/index.cjs +18 -0
- package/dist/NotificationServicesController/types/user-storage/index.cjs.map +1 -0
- package/dist/NotificationServicesController/types/user-storage/index.d.cts +2 -0
- package/dist/NotificationServicesController/types/user-storage/index.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/user-storage/index.d.mts +2 -0
- package/dist/NotificationServicesController/types/user-storage/index.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/user-storage/index.mjs +1 -2
- package/dist/NotificationServicesController/types/user-storage/index.mjs.map +1 -1
- package/dist/NotificationServicesController/types/user-storage/user-storage.cjs +3 -0
- package/dist/NotificationServicesController/types/user-storage/user-storage.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/types/user-storage/user-storage.d.ts → NotificationServicesController/types/user-storage/user-storage.d.cts} +3 -3
- package/dist/NotificationServicesController/types/user-storage/user-storage.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/user-storage/user-storage.d.mts +26 -0
- package/dist/NotificationServicesController/types/user-storage/user-storage.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/user-storage/user-storage.mjs +1 -1
- package/dist/NotificationServicesController/types/user-storage/user-storage.mjs.map +1 -1
- package/dist/NotificationServicesController/ui/constants.cjs +62 -0
- package/dist/NotificationServicesController/ui/constants.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/ui/constants.d.ts → NotificationServicesController/ui/constants.d.cts} +2 -2
- package/dist/NotificationServicesController/ui/constants.d.cts.map +1 -0
- package/dist/NotificationServicesController/ui/constants.d.mts +54 -0
- package/dist/NotificationServicesController/ui/constants.d.mts.map +1 -0
- package/dist/NotificationServicesController/ui/constants.mjs +56 -14
- package/dist/NotificationServicesController/ui/constants.mjs.map +1 -1
- package/dist/NotificationServicesController/ui/index.cjs +18 -0
- package/dist/NotificationServicesController/ui/index.cjs.map +1 -0
- package/dist/NotificationServicesController/ui/index.d.cts +2 -0
- package/dist/NotificationServicesController/ui/index.d.cts.map +1 -0
- package/dist/NotificationServicesController/ui/index.d.mts +2 -0
- package/dist/NotificationServicesController/ui/index.d.mts.map +1 -0
- package/dist/NotificationServicesController/ui/index.mjs +1 -16
- package/dist/NotificationServicesController/ui/index.mjs.map +1 -1
- package/dist/NotificationServicesController/utils/utils.cjs +348 -0
- package/dist/NotificationServicesController/utils/utils.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/utils/utils.d.ts → NotificationServicesController/utils/utils.d.cts} +3 -3
- package/dist/NotificationServicesController/utils/utils.d.cts.map +1 -0
- package/dist/NotificationServicesController/utils/utils.d.mts +142 -0
- package/dist/NotificationServicesController/utils/utils.d.mts.map +1 -0
- package/dist/NotificationServicesController/utils/utils.mjs +332 -31
- package/dist/NotificationServicesController/utils/utils.mjs.map +1 -1
- package/dist/NotificationServicesPushController/NotificationServicesPushController.cjs +215 -0
- package/dist/NotificationServicesPushController/NotificationServicesPushController.cjs.map +1 -0
- package/dist/{types/NotificationServicesPushController/NotificationServicesPushController.d.ts → NotificationServicesPushController/NotificationServicesPushController.d.cts} +6 -6
- package/dist/NotificationServicesPushController/NotificationServicesPushController.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/NotificationServicesPushController.d.mts +112 -0
- package/dist/NotificationServicesPushController/NotificationServicesPushController.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/NotificationServicesPushController.mjs +214 -37
- package/dist/NotificationServicesPushController/NotificationServicesPushController.mjs.map +1 -1
- package/dist/NotificationServicesPushController/__fixtures__/index.cjs +18 -0
- package/dist/NotificationServicesPushController/__fixtures__/index.cjs.map +1 -0
- package/dist/NotificationServicesPushController/__fixtures__/index.d.cts +2 -0
- package/dist/NotificationServicesPushController/__fixtures__/index.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/__fixtures__/index.d.mts +2 -0
- package/dist/NotificationServicesPushController/__fixtures__/index.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/__fixtures__/index.mjs +2 -0
- package/dist/NotificationServicesPushController/__fixtures__/index.mjs.map +1 -0
- package/dist/NotificationServicesPushController/__fixtures__/mockResponse.cjs +57 -0
- package/dist/NotificationServicesPushController/__fixtures__/mockResponse.cjs.map +1 -0
- package/dist/{types/NotificationServicesPushController/__fixtures__/mockResponse.d.ts → NotificationServicesPushController/__fixtures__/mockResponse.d.cts} +2 -2
- package/dist/NotificationServicesPushController/__fixtures__/mockResponse.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/__fixtures__/mockResponse.d.mts +43 -0
- package/dist/NotificationServicesPushController/__fixtures__/mockResponse.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/__fixtures__/mockResponse.mjs +50 -0
- package/dist/NotificationServicesPushController/__fixtures__/mockResponse.mjs.map +1 -0
- package/dist/NotificationServicesPushController/__fixtures__/mockServices.cjs +31 -0
- package/dist/NotificationServicesPushController/__fixtures__/mockServices.cjs.map +1 -0
- package/dist/{types/NotificationServicesPushController/__fixtures__/mockServices.d.ts → NotificationServicesPushController/__fixtures__/mockServices.d.cts} +2 -2
- package/dist/NotificationServicesPushController/__fixtures__/mockServices.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/__fixtures__/mockServices.d.mts +9 -0
- package/dist/NotificationServicesPushController/__fixtures__/mockServices.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/__fixtures__/mockServices.mjs +30 -0
- package/dist/NotificationServicesPushController/__fixtures__/mockServices.mjs.map +1 -0
- package/dist/NotificationServicesPushController/constants.cjs +14 -0
- package/dist/NotificationServicesPushController/constants.cjs.map +1 -0
- package/dist/{types/NotificationServicesPushController/constants.d.ts → NotificationServicesPushController/constants.d.cts} +1 -1
- package/dist/NotificationServicesPushController/constants.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/constants.d.mts +11 -0
- package/dist/NotificationServicesPushController/constants.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/constants.mjs +10 -25
- package/dist/NotificationServicesPushController/constants.mjs.map +1 -1
- package/dist/NotificationServicesPushController/index.cjs +43 -0
- package/dist/NotificationServicesPushController/index.cjs.map +1 -0
- package/dist/NotificationServicesPushController/index.d.cts +11 -0
- package/dist/NotificationServicesPushController/index.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/index.d.mts +11 -0
- package/dist/NotificationServicesPushController/index.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/index.mjs +10 -71
- package/dist/NotificationServicesPushController/index.mjs.map +1 -1
- package/dist/NotificationServicesPushController/services/endpoints.cjs +6 -0
- package/dist/NotificationServicesPushController/services/endpoints.cjs.map +1 -0
- package/dist/{types/NotificationServicesPushController/services/endpoints.d.ts → NotificationServicesPushController/services/endpoints.d.cts} +1 -1
- package/dist/NotificationServicesPushController/services/endpoints.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/services/endpoints.d.mts +2 -0
- package/dist/NotificationServicesPushController/services/endpoints.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/services/endpoints.mjs +2 -7
- package/dist/NotificationServicesPushController/services/endpoints.mjs.map +1 -1
- package/dist/NotificationServicesPushController/services/push/index.cjs +3 -0
- package/dist/NotificationServicesPushController/services/push/index.cjs.map +1 -0
- package/dist/{types/NotificationServicesPushController/services/push/index.d.ts → NotificationServicesPushController/services/push/index.d.cts} +2 -2
- package/dist/NotificationServicesPushController/services/push/index.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/services/push/index.d.mts +6 -0
- package/dist/NotificationServicesPushController/services/push/index.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/services/push/index.mjs +1 -0
- package/dist/NotificationServicesPushController/services/push/index.mjs.map +1 -1
- package/dist/NotificationServicesPushController/services/push/push-web.cjs +121 -0
- package/dist/NotificationServicesPushController/services/push/push-web.cjs.map +1 -0
- package/dist/{types/NotificationServicesPushController/services/push/push-web.d.ts → NotificationServicesPushController/services/push/push-web.d.cts} +3 -3
- package/dist/NotificationServicesPushController/services/push/push-web.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/services/push/push-web.d.mts +32 -0
- package/dist/NotificationServicesPushController/services/push/push-web.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/services/push/push-web.mjs +116 -38
- package/dist/NotificationServicesPushController/services/push/push-web.mjs.map +1 -1
- package/dist/NotificationServicesPushController/services/services.cjs +197 -0
- package/dist/NotificationServicesPushController/services/services.cjs.map +1 -0
- package/dist/{types/NotificationServicesPushController/services/services.d.ts → NotificationServicesPushController/services/services.d.cts} +4 -4
- package/dist/NotificationServicesPushController/services/services.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/services/services.d.mts +95 -0
- package/dist/NotificationServicesPushController/services/services.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/services/services.mjs +168 -45
- package/dist/NotificationServicesPushController/services/services.mjs.map +1 -1
- package/dist/NotificationServicesPushController/types/firebase.cjs +3 -0
- package/dist/NotificationServicesPushController/types/firebase.cjs.map +1 -0
- package/dist/{types/NotificationServicesPushController/types/firebase.d.ts → NotificationServicesPushController/types/firebase.d.cts} +1 -1
- package/dist/NotificationServicesPushController/types/firebase.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/types/firebase.d.mts +53 -0
- package/dist/NotificationServicesPushController/types/firebase.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/types/firebase.mjs +1 -1
- package/dist/NotificationServicesPushController/types/firebase.mjs.map +1 -1
- package/dist/NotificationServicesPushController/types/index.cjs +18 -0
- package/dist/NotificationServicesPushController/types/index.cjs.map +1 -0
- package/dist/NotificationServicesPushController/types/index.d.cts +2 -0
- package/dist/NotificationServicesPushController/types/index.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/types/index.d.mts +2 -0
- package/dist/NotificationServicesPushController/types/index.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/types/index.mjs +1 -2
- package/dist/NotificationServicesPushController/types/index.mjs.map +1 -1
- package/dist/NotificationServicesPushController/utils/get-notification-data.cjs +84 -0
- package/dist/NotificationServicesPushController/utils/get-notification-data.cjs.map +1 -0
- package/dist/{types/NotificationServicesPushController/utils/get-notification-data.d.ts → NotificationServicesPushController/utils/get-notification-data.d.cts} +2 -2
- package/dist/NotificationServicesPushController/utils/get-notification-data.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/utils/get-notification-data.d.mts +42 -0
- package/dist/NotificationServicesPushController/utils/get-notification-data.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/utils/get-notification-data.mjs +76 -12
- package/dist/NotificationServicesPushController/utils/get-notification-data.mjs.map +1 -1
- package/dist/NotificationServicesPushController/utils/get-notification-message.cjs +190 -0
- package/dist/NotificationServicesPushController/utils/get-notification-message.cjs.map +1 -0
- package/dist/{types/NotificationServicesPushController/utils/get-notification-message.d.ts → NotificationServicesPushController/utils/get-notification-message.d.cts} +3 -3
- package/dist/NotificationServicesPushController/utils/get-notification-message.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/utils/get-notification-message.d.mts +67 -0
- package/dist/NotificationServicesPushController/utils/get-notification-message.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/utils/get-notification-message.mjs +182 -37
- package/dist/NotificationServicesPushController/utils/get-notification-message.mjs.map +1 -1
- package/dist/NotificationServicesPushController/utils/index.cjs +19 -0
- package/dist/NotificationServicesPushController/utils/index.cjs.map +1 -0
- package/dist/NotificationServicesPushController/utils/index.d.cts +3 -0
- package/dist/NotificationServicesPushController/utils/index.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/utils/index.d.mts +3 -0
- package/dist/NotificationServicesPushController/utils/index.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/utils/index.mjs +2 -48
- package/dist/NotificationServicesPushController/utils/index.mjs.map +1 -1
- package/dist/index.cjs +29 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +2 -45
- package/dist/index.mjs.map +1 -1
- package/dist/shared/to-raw-notification.cjs +19 -0
- package/dist/shared/to-raw-notification.cjs.map +1 -0
- package/dist/{types/shared/to-raw-notification.d.ts → shared/to-raw-notification.d.cts} +2 -2
- package/dist/shared/to-raw-notification.d.cts.map +1 -0
- package/dist/shared/to-raw-notification.d.mts +11 -0
- package/dist/shared/to-raw-notification.d.mts.map +1 -0
- package/dist/shared/to-raw-notification.mjs +14 -7
- package/dist/shared/to-raw-notification.mjs.map +1 -1
- package/package.json +12 -7
- package/dist/NotificationServicesController/NotificationServicesController.js +0 -19
- package/dist/NotificationServicesController/NotificationServicesController.js.map +0 -1
- package/dist/NotificationServicesController/constants/constants.js +0 -10
- package/dist/NotificationServicesController/constants/constants.js.map +0 -1
- package/dist/NotificationServicesController/constants/index.js +0 -29
- package/dist/NotificationServicesController/constants/index.js.map +0 -1
- package/dist/NotificationServicesController/constants/notification-schema.js +0 -22
- package/dist/NotificationServicesController/constants/notification-schema.js.map +0 -1
- package/dist/NotificationServicesController/index.js +0 -87
- package/dist/NotificationServicesController/index.js.map +0 -1
- package/dist/NotificationServicesController/processors/index.js +0 -22
- package/dist/NotificationServicesController/processors/index.js.map +0 -1
- package/dist/NotificationServicesController/processors/process-feature-announcement.js +0 -10
- package/dist/NotificationServicesController/processors/process-feature-announcement.js.map +0 -1
- package/dist/NotificationServicesController/processors/process-notifications.js +0 -13
- package/dist/NotificationServicesController/processors/process-notifications.js.map +0 -1
- package/dist/NotificationServicesController/processors/process-onchain-notifications.js +0 -8
- package/dist/NotificationServicesController/processors/process-onchain-notifications.js.map +0 -1
- package/dist/NotificationServicesController/services/feature-announcements.js +0 -14
- package/dist/NotificationServicesController/services/feature-announcements.js.map +0 -1
- package/dist/NotificationServicesController/services/onchain-notifications.js +0 -30
- package/dist/NotificationServicesController/services/onchain-notifications.js.map +0 -1
- package/dist/NotificationServicesController/types/feature-announcement/feature-announcement.js +0 -2
- package/dist/NotificationServicesController/types/feature-announcement/feature-announcement.js.map +0 -1
- package/dist/NotificationServicesController/types/feature-announcement/index.js +0 -5
- package/dist/NotificationServicesController/types/feature-announcement/index.js.map +0 -1
- package/dist/NotificationServicesController/types/feature-announcement/type-feature-announcement.js +0 -2
- package/dist/NotificationServicesController/types/feature-announcement/type-feature-announcement.js.map +0 -1
- package/dist/NotificationServicesController/types/feature-announcement/type-links.js +0 -2
- package/dist/NotificationServicesController/types/feature-announcement/type-links.js.map +0 -1
- package/dist/NotificationServicesController/types/index.js +0 -12
- package/dist/NotificationServicesController/types/index.js.map +0 -1
- package/dist/NotificationServicesController/types/notification/index.js +0 -3
- package/dist/NotificationServicesController/types/notification/index.js.map +0 -1
- package/dist/NotificationServicesController/types/notification/notification.js +0 -2
- package/dist/NotificationServicesController/types/notification/notification.js.map +0 -1
- package/dist/NotificationServicesController/types/on-chain-notification/index.js +0 -3
- package/dist/NotificationServicesController/types/on-chain-notification/index.js.map +0 -1
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.js +0 -2
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.js.map +0 -1
- package/dist/NotificationServicesController/types/on-chain-notification/schema.js +0 -1
- package/dist/NotificationServicesController/types/on-chain-notification/schema.js.map +0 -1
- package/dist/NotificationServicesController/types/type-utils.js +0 -1
- package/dist/NotificationServicesController/types/type-utils.js.map +0 -1
- package/dist/NotificationServicesController/types/user-storage/index.js +0 -3
- package/dist/NotificationServicesController/types/user-storage/index.js.map +0 -1
- package/dist/NotificationServicesController/types/user-storage/user-storage.js +0 -2
- package/dist/NotificationServicesController/types/user-storage/user-storage.js.map +0 -1
- package/dist/NotificationServicesController/ui/constants.js +0 -16
- package/dist/NotificationServicesController/ui/constants.js.map +0 -1
- package/dist/NotificationServicesController/ui/index.js +0 -17
- package/dist/NotificationServicesController/ui/index.js.map +0 -1
- package/dist/NotificationServicesController/utils/utils.js +0 -32
- package/dist/NotificationServicesController/utils/utils.js.map +0 -1
- package/dist/NotificationServicesPushController/NotificationServicesPushController.js +0 -39
- package/dist/NotificationServicesPushController/NotificationServicesPushController.js.map +0 -1
- package/dist/NotificationServicesPushController/constants.js +0 -26
- package/dist/NotificationServicesPushController/constants.js.map +0 -1
- package/dist/NotificationServicesPushController/index.js +0 -72
- package/dist/NotificationServicesPushController/index.js.map +0 -1
- package/dist/NotificationServicesPushController/services/endpoints.js +0 -8
- package/dist/NotificationServicesPushController/services/endpoints.js.map +0 -1
- package/dist/NotificationServicesPushController/services/push/index.js +0 -1
- package/dist/NotificationServicesPushController/services/push/index.js.map +0 -1
- package/dist/NotificationServicesPushController/services/push/push-web.js +0 -40
- package/dist/NotificationServicesPushController/services/push/push-web.js.map +0 -1
- package/dist/NotificationServicesPushController/services/services.js +0 -46
- package/dist/NotificationServicesPushController/services/services.js.map +0 -1
- package/dist/NotificationServicesPushController/types/firebase.js +0 -2
- package/dist/NotificationServicesPushController/types/firebase.js.map +0 -1
- package/dist/NotificationServicesPushController/types/index.js +0 -3
- package/dist/NotificationServicesPushController/types/index.js.map +0 -1
- package/dist/NotificationServicesPushController/utils/get-notification-data.js +0 -14
- package/dist/NotificationServicesPushController/utils/get-notification-data.js.map +0 -1
- package/dist/NotificationServicesPushController/utils/get-notification-message.js +0 -39
- package/dist/NotificationServicesPushController/utils/get-notification-message.js.map +0 -1
- package/dist/NotificationServicesPushController/utils/index.js +0 -49
- package/dist/NotificationServicesPushController/utils/index.js.map +0 -1
- package/dist/chunk-232HZSEV.js +0 -7
- package/dist/chunk-232HZSEV.js.map +0 -1
- package/dist/chunk-2P5WP5NT.mjs +0 -37
- package/dist/chunk-2P5WP5NT.mjs.map +0 -1
- package/dist/chunk-3ZS2HAEG.js +0 -1
- package/dist/chunk-3ZS2HAEG.js.map +0 -1
- package/dist/chunk-4BTNTREI.mjs +0 -1
- package/dist/chunk-4BTNTREI.mjs.map +0 -1
- package/dist/chunk-4QXAPVW3.mjs +0 -1
- package/dist/chunk-4QXAPVW3.mjs.map +0 -1
- package/dist/chunk-52CALMRA.js +0 -28
- package/dist/chunk-53F3SYYM.mjs +0 -178
- package/dist/chunk-53F3SYYM.mjs.map +0 -1
- package/dist/chunk-5FAAZCBK.mjs +0 -29
- package/dist/chunk-5FAAZCBK.mjs.map +0 -1
- package/dist/chunk-6FLC6CJD.js +0 -149
- package/dist/chunk-6FLC6CJD.js.map +0 -1
- package/dist/chunk-6ZDVTRRT.mjs +0 -9
- package/dist/chunk-6ZDVTRRT.mjs.map +0 -1
- package/dist/chunk-77QIITUL.mjs +0 -67
- package/dist/chunk-77QIITUL.mjs.map +0 -1
- package/dist/chunk-7LWR54U7.js +0 -7
- package/dist/chunk-7LWR54U7.js.map +0 -1
- package/dist/chunk-7PWKQSM2.mjs +0 -972
- package/dist/chunk-7PWKQSM2.mjs.map +0 -1
- package/dist/chunk-7RM3YNTD.mjs +0 -1
- package/dist/chunk-7RM3YNTD.mjs.map +0 -1
- package/dist/chunk-A2RPVX47.mjs +0 -1
- package/dist/chunk-A2RPVX47.mjs.map +0 -1
- package/dist/chunk-B25TJ7KS.js +0 -8
- package/dist/chunk-B25TJ7KS.js.map +0 -1
- package/dist/chunk-B4ECJJ5C.mjs +0 -7
- package/dist/chunk-B4ECJJ5C.mjs.map +0 -1
- package/dist/chunk-BONB66A2.mjs +0 -14
- package/dist/chunk-BONB66A2.mjs.map +0 -1
- package/dist/chunk-C62SK2KY.mjs +0 -92
- package/dist/chunk-C62SK2KY.mjs.map +0 -1
- package/dist/chunk-CGPMMFUQ.mjs +0 -96
- package/dist/chunk-CGPMMFUQ.mjs.map +0 -1
- package/dist/chunk-CWZQMK63.mjs +0 -118
- package/dist/chunk-CWZQMK63.mjs.map +0 -1
- package/dist/chunk-D42BBXBM.mjs +0 -28
- package/dist/chunk-D42BBXBM.mjs.map +0 -1
- package/dist/chunk-DINCLRZT.mjs +0 -12
- package/dist/chunk-DINCLRZT.mjs.map +0 -1
- package/dist/chunk-DMH4NSLF.js +0 -1
- package/dist/chunk-DMH4NSLF.js.map +0 -1
- package/dist/chunk-DT6SLUWJ.js +0 -12
- package/dist/chunk-DT6SLUWJ.js.map +0 -1
- package/dist/chunk-EJ52BDLB.js +0 -55
- package/dist/chunk-EJ52BDLB.js.map +0 -1
- package/dist/chunk-ER475D6V.mjs +0 -231
- package/dist/chunk-ER475D6V.mjs.map +0 -1
- package/dist/chunk-G52DNXFH.mjs +0 -1
- package/dist/chunk-G52DNXFH.mjs.map +0 -1
- package/dist/chunk-GETQWOTI.js +0 -1
- package/dist/chunk-GETQWOTI.js.map +0 -1
- package/dist/chunk-HCDICNYK.js +0 -207
- package/dist/chunk-HCDICNYK.js.map +0 -1
- package/dist/chunk-HE3P5RM7.js +0 -178
- package/dist/chunk-HE3P5RM7.js.map +0 -1
- package/dist/chunk-HPUQYDVC.js +0 -1
- package/dist/chunk-HPUQYDVC.js.map +0 -1
- package/dist/chunk-HT6T5R4U.js +0 -96
- package/dist/chunk-HT6T5R4U.js.map +0 -1
- package/dist/chunk-IDO4JFV5.mjs +0 -1
- package/dist/chunk-IDO4JFV5.mjs.map +0 -1
- package/dist/chunk-IGY2S5BC.js +0 -36
- package/dist/chunk-IGY2S5BC.js.map +0 -1
- package/dist/chunk-IKWNHNJQ.mjs +0 -8
- package/dist/chunk-IKWNHNJQ.mjs.map +0 -1
- package/dist/chunk-IOMDG67D.mjs +0 -7
- package/dist/chunk-IOMDG67D.mjs.map +0 -1
- package/dist/chunk-IPI7BAW3.js +0 -1
- package/dist/chunk-IPI7BAW3.js.map +0 -1
- package/dist/chunk-JIJXHO5V.js +0 -885
- package/dist/chunk-JIJXHO5V.js.map +0 -1
- package/dist/chunk-JQ7WKFCI.mjs +0 -1
- package/dist/chunk-JQ7WKFCI.mjs.map +0 -1
- package/dist/chunk-JW3TK3NU.js +0 -221
- package/dist/chunk-JW3TK3NU.js.map +0 -1
- package/dist/chunk-KGLHGLER.js +0 -231
- package/dist/chunk-KGLHGLER.js.map +0 -1
- package/dist/chunk-LGXHJ24K.js +0 -92
- package/dist/chunk-LGXHJ24K.js.map +0 -1
- package/dist/chunk-LYEXYTOI.js +0 -14
- package/dist/chunk-LYEXYTOI.js.map +0 -1
- package/dist/chunk-LZMC2QML.mjs +0 -25
- package/dist/chunk-LZMC2QML.mjs.map +0 -1
- package/dist/chunk-MG5QDUDI.mjs +0 -48
- package/dist/chunk-MG5QDUDI.mjs.map +0 -1
- package/dist/chunk-MNBV5FJI.mjs +0 -31
- package/dist/chunk-MNBV5FJI.mjs.map +0 -1
- package/dist/chunk-NIPCK74T.js +0 -185
- package/dist/chunk-NIPCK74T.js.map +0 -1
- package/dist/chunk-O45HYLIV.js +0 -67
- package/dist/chunk-O45HYLIV.js.map +0 -1
- package/dist/chunk-ODI2BTKS.mjs +0 -55
- package/dist/chunk-ODI2BTKS.mjs.map +0 -1
- package/dist/chunk-OHFX4S6R.mjs +0 -185
- package/dist/chunk-OHFX4S6R.mjs.map +0 -1
- package/dist/chunk-OMBFVTP2.js +0 -37
- package/dist/chunk-OMBFVTP2.js.map +0 -1
- package/dist/chunk-PJMQ2XEG.js +0 -29
- package/dist/chunk-PJMQ2XEG.js.map +0 -1
- package/dist/chunk-PNCS6GEX.mjs +0 -1
- package/dist/chunk-PNCS6GEX.mjs.map +0 -1
- package/dist/chunk-PROWNV4M.js +0 -1
- package/dist/chunk-PROWNV4M.js.map +0 -1
- package/dist/chunk-QAOZN4AX.js +0 -25
- package/dist/chunk-QAOZN4AX.js.map +0 -1
- package/dist/chunk-QB5IFRLA.mjs +0 -1
- package/dist/chunk-QB5IFRLA.mjs.map +0 -1
- package/dist/chunk-RAUV5UV4.mjs +0 -1
- package/dist/chunk-RAUV5UV4.mjs.map +0 -1
- package/dist/chunk-SGLVWM4N.js +0 -48
- package/dist/chunk-SGLVWM4N.js.map +0 -1
- package/dist/chunk-TLX5QQK5.js +0 -9
- package/dist/chunk-TLX5QQK5.js.map +0 -1
- package/dist/chunk-U5UIDVOO.mjs +0 -36
- package/dist/chunk-U5UIDVOO.mjs.map +0 -1
- package/dist/chunk-U74Q3BRP.mjs +0 -1
- package/dist/chunk-U74Q3BRP.mjs.map +0 -1
- package/dist/chunk-UQ6MTYIR.js +0 -972
- package/dist/chunk-UQ6MTYIR.js.map +0 -1
- package/dist/chunk-UZHUVXRM.js +0 -31
- package/dist/chunk-UZHUVXRM.js.map +0 -1
- package/dist/chunk-V5HMYDWE.js +0 -1
- package/dist/chunk-V5HMYDWE.js.map +0 -1
- package/dist/chunk-VZMQIJMK.mjs +0 -149
- package/dist/chunk-VZMQIJMK.mjs.map +0 -1
- package/dist/chunk-W7IP4LDB.js +0 -118
- package/dist/chunk-W7IP4LDB.js.map +0 -1
- package/dist/chunk-WE4RFGT7.mjs +0 -885
- package/dist/chunk-WE4RFGT7.mjs.map +0 -1
- package/dist/chunk-WGBEAP2F.mjs +0 -207
- package/dist/chunk-WGBEAP2F.mjs.map +0 -1
- package/dist/chunk-WRYFIWNK.js +0 -1
- package/dist/chunk-WRYFIWNK.js.map +0 -1
- package/dist/chunk-XZEVRYUE.js +0 -1
- package/dist/chunk-XZEVRYUE.js.map +0 -1
- package/dist/chunk-YUMIJSUD.mjs +0 -221
- package/dist/chunk-YUMIJSUD.mjs.map +0 -1
- package/dist/chunk-ZBNBZN5H.js +0 -1
- package/dist/chunk-ZBNBZN5H.js.map +0 -1
- package/dist/chunk-ZV3DFBO4.js +0 -1
- package/dist/chunk-ZV3DFBO4.js.map +0 -1
- package/dist/index.js +0 -46
- package/dist/index.js.map +0 -1
- package/dist/shared/to-raw-notification.js +0 -8
- package/dist/shared/to-raw-notification.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
- package/dist/types/NotificationServicesController/NotificationServicesController.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/__fixtures__/index.d.ts +0 -6
- package/dist/types/NotificationServicesController/__fixtures__/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/__fixtures__/mock-feature-announcements.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/__fixtures__/mock-notification-trigger.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/__fixtures__/mock-notification-user-storage.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/__fixtures__/mock-raw-notifications.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/__fixtures__/mockResponses.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/__fixtures__/mockServices.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/__fixtures__/test-utils.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/constants/constants.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/constants/index.d.ts +0 -3
- package/dist/types/NotificationServicesController/constants/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/constants/notification-schema.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/index.d.ts +0 -14
- package/dist/types/NotificationServicesController/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/processors/index.d.ts +0 -4
- package/dist/types/NotificationServicesController/processors/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/processors/process-feature-announcement.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/processors/process-notifications.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/processors/process-onchain-notifications.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/services/feature-announcements.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/services/onchain-notifications.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/feature-announcement/feature-announcement.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/feature-announcement/index.d.ts +0 -4
- package/dist/types/NotificationServicesController/types/feature-announcement/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/feature-announcement/type-feature-announcement.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/feature-announcement/type-links.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/index.d.ts +0 -5
- package/dist/types/NotificationServicesController/types/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/notification/index.d.ts +0 -2
- package/dist/types/NotificationServicesController/types/notification/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/notification/notification.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/on-chain-notification/index.d.ts +0 -2
- package/dist/types/NotificationServicesController/types/on-chain-notification/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/on-chain-notification/schema.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/type-utils.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/user-storage/index.d.ts +0 -2
- package/dist/types/NotificationServicesController/types/user-storage/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/user-storage/user-storage.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/ui/constants.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/ui/index.d.ts +0 -2
- package/dist/types/NotificationServicesController/ui/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/utils/utils.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/NotificationServicesPushController.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/__fixtures__/index.d.ts +0 -2
- package/dist/types/NotificationServicesPushController/__fixtures__/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/__fixtures__/mockResponse.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/__fixtures__/mockServices.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/constants.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/index.d.ts +0 -11
- package/dist/types/NotificationServicesPushController/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/services/endpoints.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/services/push/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/services/push/push-web.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/services/services.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/types/firebase.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/types/index.d.ts +0 -2
- package/dist/types/NotificationServicesPushController/types/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/utils/get-notification-data.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/utils/get-notification-message.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/utils/index.d.ts +0 -3
- package/dist/types/NotificationServicesPushController/utils/index.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -3
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/shared/to-raw-notification.d.ts.map +0 -1
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-UZHUVXRM.js');
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _chunkHCDICNYKjs = require('../../chunk-HCDICNYK.js');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _chunkEJ52BDLBjs = require('../../chunk-EJ52BDLB.js');
|
|
13
|
-
require('../../chunk-UQ6MTYIR.js');
|
|
14
|
-
require('../../chunk-232HZSEV.js');
|
|
15
|
-
require('../../chunk-XZEVRYUE.js');
|
|
16
|
-
require('../../chunk-3ZS2HAEG.js');
|
|
17
|
-
require('../../chunk-ZV3DFBO4.js');
|
|
18
|
-
require('../../chunk-DMH4NSLF.js');
|
|
19
|
-
require('../../chunk-IPI7BAW3.js');
|
|
20
|
-
require('../../chunk-HPUQYDVC.js');
|
|
21
|
-
require('../../chunk-WRYFIWNK.js');
|
|
22
|
-
require('../../chunk-V5HMYDWE.js');
|
|
23
|
-
require('../../chunk-ZBNBZN5H.js');
|
|
24
|
-
require('../../chunk-PROWNV4M.js');
|
|
25
|
-
require('../../chunk-QAOZN4AX.js');
|
|
26
|
-
require('../../chunk-O45HYLIV.js');
|
|
27
|
-
require('../../chunk-OMBFVTP2.js');
|
|
28
|
-
require('../../chunk-PJMQ2XEG.js');
|
|
29
|
-
require('../../chunk-JIJXHO5V.js');
|
|
30
|
-
require('../../chunk-SGLVWM4N.js');
|
|
31
|
-
require('../../chunk-LYEXYTOI.js');
|
|
32
|
-
require('../../chunk-LGXHJ24K.js');
|
|
33
|
-
require('../../chunk-52CALMRA.js');
|
|
34
|
-
require('../../chunk-NIPCK74T.js');
|
|
35
|
-
require('../../chunk-JW3TK3NU.js');
|
|
36
|
-
require('../../chunk-HE3P5RM7.js');
|
|
37
|
-
require('../../chunk-DT6SLUWJ.js');
|
|
38
|
-
require('../../chunk-TLX5QQK5.js');
|
|
39
|
-
require('../../chunk-IGY2S5BC.js');
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
exports.calcTokenAmount = _chunkEJ52BDLBjs.calcTokenAmount; exports.createOnChainPushNotificationMessage = _chunkHCDICNYKjs.createOnChainPushNotificationMessage; exports.createOnChainPushNotificationMessages = _chunkHCDICNYKjs.createOnChainPushNotificationMessages; exports.formatAmount = _chunkEJ52BDLBjs.formatAmount; exports.getAmount = _chunkEJ52BDLBjs.getAmount; exports.getLeadingZeroCount = _chunkEJ52BDLBjs.getLeadingZeroCount; exports.isOnChainNotification = _chunkHCDICNYKjs.isOnChainNotification;
|
|
49
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/dist/chunk-232HZSEV.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/NotificationServicesController/types/index.ts"],"names":[],"mappings":";AAAA","sourcesContent":["export * from './feature-announcement';\nexport * from './notification';\nexport * from './on-chain-notification';\nexport * from './user-storage';\n"]}
|
package/dist/chunk-2P5WP5NT.mjs
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CHAIN_SYMBOLS,
|
|
3
|
-
NOTIFICATION_CHAINS,
|
|
4
|
-
NOTIFICATION_CHAINS_ID,
|
|
5
|
-
SUPPORTED_CHAINS,
|
|
6
|
-
TRIGGERS,
|
|
7
|
-
TRIGGER_TYPES,
|
|
8
|
-
TRIGGER_TYPES_GROUPS,
|
|
9
|
-
TRIGGER_TYPES_WALLET_SET
|
|
10
|
-
} from "./chunk-53F3SYYM.mjs";
|
|
11
|
-
import {
|
|
12
|
-
USER_STORAGE_VERSION,
|
|
13
|
-
USER_STORAGE_VERSION_KEY
|
|
14
|
-
} from "./chunk-6ZDVTRRT.mjs";
|
|
15
|
-
import {
|
|
16
|
-
__export
|
|
17
|
-
} from "./chunk-U5UIDVOO.mjs";
|
|
18
|
-
|
|
19
|
-
// src/NotificationServicesController/constants/index.ts
|
|
20
|
-
var constants_exports = {};
|
|
21
|
-
__export(constants_exports, {
|
|
22
|
-
CHAIN_SYMBOLS: () => CHAIN_SYMBOLS,
|
|
23
|
-
NOTIFICATION_CHAINS: () => NOTIFICATION_CHAINS,
|
|
24
|
-
NOTIFICATION_CHAINS_ID: () => NOTIFICATION_CHAINS_ID,
|
|
25
|
-
SUPPORTED_CHAINS: () => SUPPORTED_CHAINS,
|
|
26
|
-
TRIGGERS: () => TRIGGERS,
|
|
27
|
-
TRIGGER_TYPES: () => TRIGGER_TYPES,
|
|
28
|
-
TRIGGER_TYPES_GROUPS: () => TRIGGER_TYPES_GROUPS,
|
|
29
|
-
TRIGGER_TYPES_WALLET_SET: () => TRIGGER_TYPES_WALLET_SET,
|
|
30
|
-
USER_STORAGE_VERSION: () => USER_STORAGE_VERSION,
|
|
31
|
-
USER_STORAGE_VERSION_KEY: () => USER_STORAGE_VERSION_KEY
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
export {
|
|
35
|
-
constants_exports
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=chunk-2P5WP5NT.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/NotificationServicesController/constants/index.ts"],"sourcesContent":["export * from './constants';\nexport * from './notification-schema';\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;","names":[]}
|
package/dist/chunk-3ZS2HAEG.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";//# sourceMappingURL=chunk-3ZS2HAEG.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/dist/chunk-4BTNTREI.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=chunk-4BTNTREI.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/chunk-4QXAPVW3.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=chunk-4QXAPVW3.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/chunk-52CALMRA.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/NotificationServicesController/processors/process-feature-announcement.ts
|
|
2
|
-
var ONE_DAY_MS = 1e3 * 60 * 60 * 24;
|
|
3
|
-
var shouldAutoExpire = (oldDate) => {
|
|
4
|
-
const differenceInTime = Date.now() - oldDate.getTime();
|
|
5
|
-
const differenceInDays = differenceInTime / ONE_DAY_MS;
|
|
6
|
-
return differenceInDays >= 90;
|
|
7
|
-
};
|
|
8
|
-
function isFeatureAnnouncementRead(notification, readPlatformNotificationsList) {
|
|
9
|
-
if (readPlatformNotificationsList.includes(notification.id)) {
|
|
10
|
-
return true;
|
|
11
|
-
}
|
|
12
|
-
return shouldAutoExpire(new Date(notification.createdAt));
|
|
13
|
-
}
|
|
14
|
-
function processFeatureAnnouncement(notification) {
|
|
15
|
-
return {
|
|
16
|
-
type: notification.type,
|
|
17
|
-
id: notification.data.id,
|
|
18
|
-
createdAt: new Date(notification.createdAt).toISOString(),
|
|
19
|
-
data: notification.data,
|
|
20
|
-
isRead: false
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
exports.isFeatureAnnouncementRead = isFeatureAnnouncementRead; exports.processFeatureAnnouncement = processFeatureAnnouncement;
|
|
28
|
-
//# sourceMappingURL=chunk-52CALMRA.js.map
|
package/dist/chunk-53F3SYYM.mjs
DELETED
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
// src/NotificationServicesController/constants/notification-schema.ts
|
|
2
|
-
var TRIGGER_TYPES = /* @__PURE__ */ ((TRIGGER_TYPES2) => {
|
|
3
|
-
TRIGGER_TYPES2["FEATURES_ANNOUNCEMENT"] = "features_announcement";
|
|
4
|
-
TRIGGER_TYPES2["METAMASK_SWAP_COMPLETED"] = "metamask_swap_completed";
|
|
5
|
-
TRIGGER_TYPES2["ERC20_SENT"] = "erc20_sent";
|
|
6
|
-
TRIGGER_TYPES2["ERC20_RECEIVED"] = "erc20_received";
|
|
7
|
-
TRIGGER_TYPES2["ETH_SENT"] = "eth_sent";
|
|
8
|
-
TRIGGER_TYPES2["ETH_RECEIVED"] = "eth_received";
|
|
9
|
-
TRIGGER_TYPES2["ROCKETPOOL_STAKE_COMPLETED"] = "rocketpool_stake_completed";
|
|
10
|
-
TRIGGER_TYPES2["ROCKETPOOL_UNSTAKE_COMPLETED"] = "rocketpool_unstake_completed";
|
|
11
|
-
TRIGGER_TYPES2["LIDO_STAKE_COMPLETED"] = "lido_stake_completed";
|
|
12
|
-
TRIGGER_TYPES2["LIDO_WITHDRAWAL_REQUESTED"] = "lido_withdrawal_requested";
|
|
13
|
-
TRIGGER_TYPES2["LIDO_WITHDRAWAL_COMPLETED"] = "lido_withdrawal_completed";
|
|
14
|
-
TRIGGER_TYPES2["LIDO_STAKE_READY_TO_BE_WITHDRAWN"] = "lido_stake_ready_to_be_withdrawn";
|
|
15
|
-
TRIGGER_TYPES2["ERC721_SENT"] = "erc721_sent";
|
|
16
|
-
TRIGGER_TYPES2["ERC721_RECEIVED"] = "erc721_received";
|
|
17
|
-
TRIGGER_TYPES2["ERC1155_SENT"] = "erc1155_sent";
|
|
18
|
-
TRIGGER_TYPES2["ERC1155_RECEIVED"] = "erc1155_received";
|
|
19
|
-
return TRIGGER_TYPES2;
|
|
20
|
-
})(TRIGGER_TYPES || {});
|
|
21
|
-
var TRIGGER_TYPES_WALLET_SET = /* @__PURE__ */ new Set([
|
|
22
|
-
"metamask_swap_completed" /* METAMASK_SWAP_COMPLETED */,
|
|
23
|
-
"erc20_sent" /* ERC20_SENT */,
|
|
24
|
-
"erc20_received" /* ERC20_RECEIVED */,
|
|
25
|
-
"eth_sent" /* ETH_SENT */,
|
|
26
|
-
"eth_received" /* ETH_RECEIVED */,
|
|
27
|
-
"rocketpool_stake_completed" /* ROCKETPOOL_STAKE_COMPLETED */,
|
|
28
|
-
"rocketpool_unstake_completed" /* ROCKETPOOL_UNSTAKE_COMPLETED */,
|
|
29
|
-
"lido_stake_completed" /* LIDO_STAKE_COMPLETED */,
|
|
30
|
-
"lido_withdrawal_requested" /* LIDO_WITHDRAWAL_REQUESTED */,
|
|
31
|
-
"lido_withdrawal_completed" /* LIDO_WITHDRAWAL_COMPLETED */,
|
|
32
|
-
"lido_stake_ready_to_be_withdrawn" /* LIDO_STAKE_READY_TO_BE_WITHDRAWN */,
|
|
33
|
-
"erc721_sent" /* ERC721_SENT */,
|
|
34
|
-
"erc721_received" /* ERC721_RECEIVED */,
|
|
35
|
-
"erc1155_sent" /* ERC1155_SENT */,
|
|
36
|
-
"erc1155_received" /* ERC1155_RECEIVED */
|
|
37
|
-
]);
|
|
38
|
-
var TRIGGER_TYPES_GROUPS = /* @__PURE__ */ ((TRIGGER_TYPES_GROUPS2) => {
|
|
39
|
-
TRIGGER_TYPES_GROUPS2["RECEIVED"] = "received";
|
|
40
|
-
TRIGGER_TYPES_GROUPS2["SENT"] = "sent";
|
|
41
|
-
TRIGGER_TYPES_GROUPS2["DEFI"] = "defi";
|
|
42
|
-
return TRIGGER_TYPES_GROUPS2;
|
|
43
|
-
})(TRIGGER_TYPES_GROUPS || {});
|
|
44
|
-
var NOTIFICATION_CHAINS_ID = {
|
|
45
|
-
ETHEREUM: "1",
|
|
46
|
-
OPTIMISM: "10",
|
|
47
|
-
BSC: "56",
|
|
48
|
-
POLYGON: "137",
|
|
49
|
-
ARBITRUM: "42161",
|
|
50
|
-
AVALANCHE: "43114",
|
|
51
|
-
LINEA: "59144"
|
|
52
|
-
};
|
|
53
|
-
var NOTIFICATION_CHAINS = NOTIFICATION_CHAINS_ID;
|
|
54
|
-
var CHAIN_SYMBOLS = {
|
|
55
|
-
[NOTIFICATION_CHAINS.ETHEREUM]: "ETH",
|
|
56
|
-
[NOTIFICATION_CHAINS.OPTIMISM]: "ETH",
|
|
57
|
-
[NOTIFICATION_CHAINS.BSC]: "BNB",
|
|
58
|
-
[NOTIFICATION_CHAINS.POLYGON]: "POL",
|
|
59
|
-
[NOTIFICATION_CHAINS.ARBITRUM]: "ETH",
|
|
60
|
-
[NOTIFICATION_CHAINS.AVALANCHE]: "AVAX",
|
|
61
|
-
[NOTIFICATION_CHAINS.LINEA]: "ETH"
|
|
62
|
-
};
|
|
63
|
-
var SUPPORTED_CHAINS = [
|
|
64
|
-
NOTIFICATION_CHAINS.ETHEREUM,
|
|
65
|
-
NOTIFICATION_CHAINS.OPTIMISM,
|
|
66
|
-
NOTIFICATION_CHAINS.BSC,
|
|
67
|
-
NOTIFICATION_CHAINS.POLYGON,
|
|
68
|
-
NOTIFICATION_CHAINS.ARBITRUM,
|
|
69
|
-
NOTIFICATION_CHAINS.AVALANCHE,
|
|
70
|
-
NOTIFICATION_CHAINS.LINEA
|
|
71
|
-
];
|
|
72
|
-
var TRIGGERS = {
|
|
73
|
-
["metamask_swap_completed" /* METAMASK_SWAP_COMPLETED */]: {
|
|
74
|
-
supported_chains: [
|
|
75
|
-
NOTIFICATION_CHAINS.ETHEREUM,
|
|
76
|
-
NOTIFICATION_CHAINS.OPTIMISM,
|
|
77
|
-
NOTIFICATION_CHAINS.BSC,
|
|
78
|
-
NOTIFICATION_CHAINS.POLYGON,
|
|
79
|
-
NOTIFICATION_CHAINS.ARBITRUM,
|
|
80
|
-
NOTIFICATION_CHAINS.AVALANCHE
|
|
81
|
-
]
|
|
82
|
-
},
|
|
83
|
-
["erc20_sent" /* ERC20_SENT */]: {
|
|
84
|
-
supported_chains: [
|
|
85
|
-
NOTIFICATION_CHAINS.ETHEREUM,
|
|
86
|
-
NOTIFICATION_CHAINS.OPTIMISM,
|
|
87
|
-
NOTIFICATION_CHAINS.BSC,
|
|
88
|
-
NOTIFICATION_CHAINS.POLYGON,
|
|
89
|
-
NOTIFICATION_CHAINS.ARBITRUM,
|
|
90
|
-
NOTIFICATION_CHAINS.AVALANCHE,
|
|
91
|
-
NOTIFICATION_CHAINS.LINEA
|
|
92
|
-
]
|
|
93
|
-
},
|
|
94
|
-
["erc20_received" /* ERC20_RECEIVED */]: {
|
|
95
|
-
supported_chains: [
|
|
96
|
-
NOTIFICATION_CHAINS.ETHEREUM,
|
|
97
|
-
NOTIFICATION_CHAINS.OPTIMISM,
|
|
98
|
-
NOTIFICATION_CHAINS.BSC,
|
|
99
|
-
NOTIFICATION_CHAINS.POLYGON,
|
|
100
|
-
NOTIFICATION_CHAINS.ARBITRUM,
|
|
101
|
-
NOTIFICATION_CHAINS.AVALANCHE,
|
|
102
|
-
NOTIFICATION_CHAINS.LINEA
|
|
103
|
-
]
|
|
104
|
-
},
|
|
105
|
-
["erc721_sent" /* ERC721_SENT */]: {
|
|
106
|
-
supported_chains: [
|
|
107
|
-
NOTIFICATION_CHAINS.ETHEREUM,
|
|
108
|
-
NOTIFICATION_CHAINS.POLYGON
|
|
109
|
-
]
|
|
110
|
-
},
|
|
111
|
-
["erc721_received" /* ERC721_RECEIVED */]: {
|
|
112
|
-
supported_chains: [
|
|
113
|
-
NOTIFICATION_CHAINS.ETHEREUM,
|
|
114
|
-
NOTIFICATION_CHAINS.POLYGON
|
|
115
|
-
]
|
|
116
|
-
},
|
|
117
|
-
["erc1155_sent" /* ERC1155_SENT */]: {
|
|
118
|
-
supported_chains: [
|
|
119
|
-
NOTIFICATION_CHAINS.ETHEREUM,
|
|
120
|
-
NOTIFICATION_CHAINS.POLYGON
|
|
121
|
-
]
|
|
122
|
-
},
|
|
123
|
-
["erc1155_received" /* ERC1155_RECEIVED */]: {
|
|
124
|
-
supported_chains: [
|
|
125
|
-
NOTIFICATION_CHAINS.ETHEREUM,
|
|
126
|
-
NOTIFICATION_CHAINS.POLYGON
|
|
127
|
-
]
|
|
128
|
-
},
|
|
129
|
-
["eth_sent" /* ETH_SENT */]: {
|
|
130
|
-
supported_chains: [
|
|
131
|
-
NOTIFICATION_CHAINS.ETHEREUM,
|
|
132
|
-
NOTIFICATION_CHAINS.OPTIMISM,
|
|
133
|
-
NOTIFICATION_CHAINS.BSC,
|
|
134
|
-
NOTIFICATION_CHAINS.POLYGON,
|
|
135
|
-
NOTIFICATION_CHAINS.ARBITRUM,
|
|
136
|
-
NOTIFICATION_CHAINS.AVALANCHE,
|
|
137
|
-
NOTIFICATION_CHAINS.LINEA
|
|
138
|
-
]
|
|
139
|
-
},
|
|
140
|
-
["eth_received" /* ETH_RECEIVED */]: {
|
|
141
|
-
supported_chains: [
|
|
142
|
-
NOTIFICATION_CHAINS.ETHEREUM,
|
|
143
|
-
NOTIFICATION_CHAINS.OPTIMISM,
|
|
144
|
-
NOTIFICATION_CHAINS.BSC,
|
|
145
|
-
NOTIFICATION_CHAINS.POLYGON,
|
|
146
|
-
NOTIFICATION_CHAINS.ARBITRUM,
|
|
147
|
-
NOTIFICATION_CHAINS.AVALANCHE,
|
|
148
|
-
NOTIFICATION_CHAINS.LINEA
|
|
149
|
-
]
|
|
150
|
-
},
|
|
151
|
-
["rocketpool_stake_completed" /* ROCKETPOOL_STAKE_COMPLETED */]: {
|
|
152
|
-
supported_chains: [NOTIFICATION_CHAINS.ETHEREUM]
|
|
153
|
-
},
|
|
154
|
-
["rocketpool_unstake_completed" /* ROCKETPOOL_UNSTAKE_COMPLETED */]: {
|
|
155
|
-
supported_chains: [NOTIFICATION_CHAINS.ETHEREUM]
|
|
156
|
-
},
|
|
157
|
-
["lido_stake_completed" /* LIDO_STAKE_COMPLETED */]: {
|
|
158
|
-
supported_chains: [NOTIFICATION_CHAINS.ETHEREUM]
|
|
159
|
-
},
|
|
160
|
-
["lido_withdrawal_requested" /* LIDO_WITHDRAWAL_REQUESTED */]: {
|
|
161
|
-
supported_chains: [NOTIFICATION_CHAINS.ETHEREUM]
|
|
162
|
-
},
|
|
163
|
-
["lido_withdrawal_completed" /* LIDO_WITHDRAWAL_COMPLETED */]: {
|
|
164
|
-
supported_chains: [NOTIFICATION_CHAINS.ETHEREUM]
|
|
165
|
-
}
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
export {
|
|
169
|
-
TRIGGER_TYPES,
|
|
170
|
-
TRIGGER_TYPES_WALLET_SET,
|
|
171
|
-
TRIGGER_TYPES_GROUPS,
|
|
172
|
-
NOTIFICATION_CHAINS_ID,
|
|
173
|
-
NOTIFICATION_CHAINS,
|
|
174
|
-
CHAIN_SYMBOLS,
|
|
175
|
-
SUPPORTED_CHAINS,
|
|
176
|
-
TRIGGERS
|
|
177
|
-
};
|
|
178
|
-
//# sourceMappingURL=chunk-53F3SYYM.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/NotificationServicesController/constants/notification-schema.ts"],"sourcesContent":["import type { Compute } from '../types/type-utils';\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum TRIGGER_TYPES {\n FEATURES_ANNOUNCEMENT = 'features_announcement',\n METAMASK_SWAP_COMPLETED = 'metamask_swap_completed',\n ERC20_SENT = 'erc20_sent',\n ERC20_RECEIVED = 'erc20_received',\n ETH_SENT = 'eth_sent',\n ETH_RECEIVED = 'eth_received',\n ROCKETPOOL_STAKE_COMPLETED = 'rocketpool_stake_completed',\n ROCKETPOOL_UNSTAKE_COMPLETED = 'rocketpool_unstake_completed',\n LIDO_STAKE_COMPLETED = 'lido_stake_completed',\n LIDO_WITHDRAWAL_REQUESTED = 'lido_withdrawal_requested',\n LIDO_WITHDRAWAL_COMPLETED = 'lido_withdrawal_completed',\n LIDO_STAKE_READY_TO_BE_WITHDRAWN = 'lido_stake_ready_to_be_withdrawn',\n ERC721_SENT = 'erc721_sent',\n ERC721_RECEIVED = 'erc721_received',\n ERC1155_SENT = 'erc1155_sent',\n ERC1155_RECEIVED = 'erc1155_received',\n}\n\nexport const TRIGGER_TYPES_WALLET_SET: Set<string> = new Set([\n TRIGGER_TYPES.METAMASK_SWAP_COMPLETED,\n TRIGGER_TYPES.ERC20_SENT,\n TRIGGER_TYPES.ERC20_RECEIVED,\n TRIGGER_TYPES.ETH_SENT,\n TRIGGER_TYPES.ETH_RECEIVED,\n TRIGGER_TYPES.ROCKETPOOL_STAKE_COMPLETED,\n TRIGGER_TYPES.ROCKETPOOL_UNSTAKE_COMPLETED,\n TRIGGER_TYPES.LIDO_STAKE_COMPLETED,\n TRIGGER_TYPES.LIDO_WITHDRAWAL_REQUESTED,\n TRIGGER_TYPES.LIDO_WITHDRAWAL_COMPLETED,\n TRIGGER_TYPES.LIDO_STAKE_READY_TO_BE_WITHDRAWN,\n TRIGGER_TYPES.ERC721_SENT,\n TRIGGER_TYPES.ERC721_RECEIVED,\n TRIGGER_TYPES.ERC1155_SENT,\n TRIGGER_TYPES.ERC1155_RECEIVED,\n]) satisfies Set<Exclude<TRIGGER_TYPES, TRIGGER_TYPES.FEATURES_ANNOUNCEMENT>>;\n\nexport enum TRIGGER_TYPES_GROUPS {\n RECEIVED = 'received',\n SENT = 'sent',\n DEFI = 'defi',\n}\n\nexport const NOTIFICATION_CHAINS_ID = {\n ETHEREUM: '1',\n OPTIMISM: '10',\n BSC: '56',\n POLYGON: '137',\n ARBITRUM: '42161',\n AVALANCHE: '43114',\n LINEA: '59144',\n} as const;\n\ntype ToPrimitiveKeys<TObj> = Compute<{\n [K in keyof TObj]: TObj[K] extends string ? string : TObj[K];\n}>;\nexport const NOTIFICATION_CHAINS: ToPrimitiveKeys<\n typeof NOTIFICATION_CHAINS_ID\n> = NOTIFICATION_CHAINS_ID;\n\nexport const CHAIN_SYMBOLS = {\n [NOTIFICATION_CHAINS.ETHEREUM]: 'ETH',\n [NOTIFICATION_CHAINS.OPTIMISM]: 'ETH',\n [NOTIFICATION_CHAINS.BSC]: 'BNB',\n [NOTIFICATION_CHAINS.POLYGON]: 'POL',\n [NOTIFICATION_CHAINS.ARBITRUM]: 'ETH',\n [NOTIFICATION_CHAINS.AVALANCHE]: 'AVAX',\n [NOTIFICATION_CHAINS.LINEA]: 'ETH',\n};\n\nexport const SUPPORTED_CHAINS = [\n NOTIFICATION_CHAINS.ETHEREUM,\n NOTIFICATION_CHAINS.OPTIMISM,\n NOTIFICATION_CHAINS.BSC,\n NOTIFICATION_CHAINS.POLYGON,\n NOTIFICATION_CHAINS.ARBITRUM,\n NOTIFICATION_CHAINS.AVALANCHE,\n NOTIFICATION_CHAINS.LINEA,\n];\n\nexport type Trigger = {\n supported_chains: (typeof SUPPORTED_CHAINS)[number][];\n};\n\nexport const TRIGGERS: Partial<Record<TRIGGER_TYPES, Trigger>> = {\n [TRIGGER_TYPES.METAMASK_SWAP_COMPLETED]: {\n supported_chains: [\n NOTIFICATION_CHAINS.ETHEREUM,\n NOTIFICATION_CHAINS.OPTIMISM,\n NOTIFICATION_CHAINS.BSC,\n NOTIFICATION_CHAINS.POLYGON,\n NOTIFICATION_CHAINS.ARBITRUM,\n NOTIFICATION_CHAINS.AVALANCHE,\n ],\n },\n [TRIGGER_TYPES.ERC20_SENT]: {\n supported_chains: [\n NOTIFICATION_CHAINS.ETHEREUM,\n NOTIFICATION_CHAINS.OPTIMISM,\n NOTIFICATION_CHAINS.BSC,\n NOTIFICATION_CHAINS.POLYGON,\n NOTIFICATION_CHAINS.ARBITRUM,\n NOTIFICATION_CHAINS.AVALANCHE,\n NOTIFICATION_CHAINS.LINEA,\n ],\n },\n [TRIGGER_TYPES.ERC20_RECEIVED]: {\n supported_chains: [\n NOTIFICATION_CHAINS.ETHEREUM,\n NOTIFICATION_CHAINS.OPTIMISM,\n NOTIFICATION_CHAINS.BSC,\n NOTIFICATION_CHAINS.POLYGON,\n NOTIFICATION_CHAINS.ARBITRUM,\n NOTIFICATION_CHAINS.AVALANCHE,\n NOTIFICATION_CHAINS.LINEA,\n ],\n },\n [TRIGGER_TYPES.ERC721_SENT]: {\n supported_chains: [\n NOTIFICATION_CHAINS.ETHEREUM,\n NOTIFICATION_CHAINS.POLYGON,\n ],\n },\n [TRIGGER_TYPES.ERC721_RECEIVED]: {\n supported_chains: [\n NOTIFICATION_CHAINS.ETHEREUM,\n NOTIFICATION_CHAINS.POLYGON,\n ],\n },\n [TRIGGER_TYPES.ERC1155_SENT]: {\n supported_chains: [\n NOTIFICATION_CHAINS.ETHEREUM,\n NOTIFICATION_CHAINS.POLYGON,\n ],\n },\n [TRIGGER_TYPES.ERC1155_RECEIVED]: {\n supported_chains: [\n NOTIFICATION_CHAINS.ETHEREUM,\n NOTIFICATION_CHAINS.POLYGON,\n ],\n },\n [TRIGGER_TYPES.ETH_SENT]: {\n supported_chains: [\n NOTIFICATION_CHAINS.ETHEREUM,\n NOTIFICATION_CHAINS.OPTIMISM,\n NOTIFICATION_CHAINS.BSC,\n NOTIFICATION_CHAINS.POLYGON,\n NOTIFICATION_CHAINS.ARBITRUM,\n NOTIFICATION_CHAINS.AVALANCHE,\n NOTIFICATION_CHAINS.LINEA,\n ],\n },\n [TRIGGER_TYPES.ETH_RECEIVED]: {\n supported_chains: [\n NOTIFICATION_CHAINS.ETHEREUM,\n NOTIFICATION_CHAINS.OPTIMISM,\n NOTIFICATION_CHAINS.BSC,\n NOTIFICATION_CHAINS.POLYGON,\n NOTIFICATION_CHAINS.ARBITRUM,\n NOTIFICATION_CHAINS.AVALANCHE,\n NOTIFICATION_CHAINS.LINEA,\n ],\n },\n [TRIGGER_TYPES.ROCKETPOOL_STAKE_COMPLETED]: {\n supported_chains: [NOTIFICATION_CHAINS.ETHEREUM],\n },\n [TRIGGER_TYPES.ROCKETPOOL_UNSTAKE_COMPLETED]: {\n supported_chains: [NOTIFICATION_CHAINS.ETHEREUM],\n },\n [TRIGGER_TYPES.LIDO_STAKE_COMPLETED]: {\n supported_chains: [NOTIFICATION_CHAINS.ETHEREUM],\n },\n [TRIGGER_TYPES.LIDO_WITHDRAWAL_REQUESTED]: {\n supported_chains: [NOTIFICATION_CHAINS.ETHEREUM],\n },\n [TRIGGER_TYPES.LIDO_WITHDRAWAL_COMPLETED]: {\n supported_chains: [NOTIFICATION_CHAINS.ETHEREUM],\n },\n};\n"],"mappings":"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","names":["TRIGGER_TYPES","TRIGGER_TYPES_GROUPS"]}
|
package/dist/chunk-5FAAZCBK.mjs
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
processNotification,
|
|
3
|
-
safeProcessNotification
|
|
4
|
-
} from "./chunk-MG5QDUDI.mjs";
|
|
5
|
-
import {
|
|
6
|
-
processOnChainNotification
|
|
7
|
-
} from "./chunk-BONB66A2.mjs";
|
|
8
|
-
import {
|
|
9
|
-
isFeatureAnnouncementRead,
|
|
10
|
-
processFeatureAnnouncement
|
|
11
|
-
} from "./chunk-D42BBXBM.mjs";
|
|
12
|
-
import {
|
|
13
|
-
__export
|
|
14
|
-
} from "./chunk-U5UIDVOO.mjs";
|
|
15
|
-
|
|
16
|
-
// src/NotificationServicesController/processors/index.ts
|
|
17
|
-
var processors_exports = {};
|
|
18
|
-
__export(processors_exports, {
|
|
19
|
-
isFeatureAnnouncementRead: () => isFeatureAnnouncementRead,
|
|
20
|
-
processFeatureAnnouncement: () => processFeatureAnnouncement,
|
|
21
|
-
processNotification: () => processNotification,
|
|
22
|
-
processOnChainNotification: () => processOnChainNotification,
|
|
23
|
-
safeProcessNotification: () => safeProcessNotification
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
export {
|
|
27
|
-
processors_exports
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=chunk-5FAAZCBK.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/NotificationServicesController/processors/index.ts"],"sourcesContent":["export * from './process-feature-announcement';\nexport * from './process-notifications';\nexport * from './process-onchain-notifications';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;","names":[]}
|
package/dist/chunk-6FLC6CJD.js
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var _chunkHT6T5R4Ujs = require('./chunk-HT6T5R4U.js');
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var _chunkB25TJ7KSjs = require('./chunk-B25TJ7KS.js');
|
|
8
|
-
|
|
9
|
-
// src/NotificationServicesPushController/services/services.ts
|
|
10
|
-
var _loglevel = require('loglevel'); var _loglevel2 = _interopRequireDefault(_loglevel);
|
|
11
|
-
async function getPushNotificationLinks(bearerToken) {
|
|
12
|
-
try {
|
|
13
|
-
const response = await fetch(_chunkB25TJ7KSjs.REGISTRATION_TOKENS_ENDPOINT, {
|
|
14
|
-
headers: { Authorization: `Bearer ${bearerToken}` }
|
|
15
|
-
});
|
|
16
|
-
if (!response.ok) {
|
|
17
|
-
_loglevel2.default.error("Failed to fetch the push notification links");
|
|
18
|
-
throw new Error("Failed to fetch the push notification links");
|
|
19
|
-
}
|
|
20
|
-
return response.json();
|
|
21
|
-
} catch (error) {
|
|
22
|
-
_loglevel2.default.error("Failed to fetch the push notification links", error);
|
|
23
|
-
return null;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
async function updateLinksAPI(bearerToken, triggers, regTokens) {
|
|
27
|
-
try {
|
|
28
|
-
const body = {
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
30
|
-
trigger_ids: triggers,
|
|
31
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
32
|
-
registration_tokens: regTokens
|
|
33
|
-
};
|
|
34
|
-
const response = await fetch(_chunkB25TJ7KSjs.REGISTRATION_TOKENS_ENDPOINT, {
|
|
35
|
-
method: "POST",
|
|
36
|
-
headers: {
|
|
37
|
-
Authorization: `Bearer ${bearerToken}`,
|
|
38
|
-
"Content-Type": "application/json"
|
|
39
|
-
},
|
|
40
|
-
body: JSON.stringify(body)
|
|
41
|
-
});
|
|
42
|
-
return response.status === 200;
|
|
43
|
-
} catch {
|
|
44
|
-
return false;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
async function activatePushNotifications(params) {
|
|
48
|
-
const { bearerToken, triggers, env, createRegToken, platform } = params;
|
|
49
|
-
const notificationLinks = await getPushNotificationLinks(bearerToken);
|
|
50
|
-
if (!notificationLinks) {
|
|
51
|
-
return null;
|
|
52
|
-
}
|
|
53
|
-
const regToken = await createRegToken(env).catch(() => null);
|
|
54
|
-
if (!regToken) {
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
const newRegTokens = new Set(notificationLinks.registration_tokens);
|
|
58
|
-
newRegTokens.add({ token: regToken, platform });
|
|
59
|
-
await updateLinksAPI(bearerToken, triggers, Array.from(newRegTokens));
|
|
60
|
-
return regToken;
|
|
61
|
-
}
|
|
62
|
-
async function deactivatePushNotifications(params) {
|
|
63
|
-
const { regToken, bearerToken, triggers, env, deleteRegToken } = params;
|
|
64
|
-
if (!regToken) {
|
|
65
|
-
return true;
|
|
66
|
-
}
|
|
67
|
-
const notificationLinks = await getPushNotificationLinks(bearerToken);
|
|
68
|
-
if (!notificationLinks) {
|
|
69
|
-
return false;
|
|
70
|
-
}
|
|
71
|
-
const filteredRegTokens = notificationLinks.registration_tokens.filter(
|
|
72
|
-
(r) => r.token !== regToken
|
|
73
|
-
);
|
|
74
|
-
const isTokenRemovedFromAPI = await updateLinksAPI(
|
|
75
|
-
bearerToken,
|
|
76
|
-
triggers,
|
|
77
|
-
filteredRegTokens
|
|
78
|
-
);
|
|
79
|
-
if (!isTokenRemovedFromAPI) {
|
|
80
|
-
return false;
|
|
81
|
-
}
|
|
82
|
-
const isTokenRemovedFromFCM = await deleteRegToken(env);
|
|
83
|
-
if (!isTokenRemovedFromFCM) {
|
|
84
|
-
return false;
|
|
85
|
-
}
|
|
86
|
-
return true;
|
|
87
|
-
}
|
|
88
|
-
async function updateTriggerPushNotifications(params) {
|
|
89
|
-
const {
|
|
90
|
-
bearerToken,
|
|
91
|
-
regToken,
|
|
92
|
-
triggers,
|
|
93
|
-
createRegToken,
|
|
94
|
-
platform,
|
|
95
|
-
deleteRegToken,
|
|
96
|
-
env
|
|
97
|
-
} = params;
|
|
98
|
-
const notificationLinks = await getPushNotificationLinks(bearerToken);
|
|
99
|
-
if (!notificationLinks) {
|
|
100
|
-
return { isTriggersLinkedToPushNotifications: false };
|
|
101
|
-
}
|
|
102
|
-
const hasRegToken = Boolean(
|
|
103
|
-
regToken && notificationLinks.registration_tokens.some((r) => r.token === regToken)
|
|
104
|
-
);
|
|
105
|
-
let newRegToken = null;
|
|
106
|
-
if (!hasRegToken) {
|
|
107
|
-
await deleteRegToken(env);
|
|
108
|
-
newRegToken = await createRegToken(env);
|
|
109
|
-
if (!newRegToken) {
|
|
110
|
-
throw new Error("Failed to create a new registration token");
|
|
111
|
-
}
|
|
112
|
-
notificationLinks.registration_tokens.push({
|
|
113
|
-
token: newRegToken,
|
|
114
|
-
platform
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
const isTriggersLinkedToPushNotifications = await updateLinksAPI(
|
|
118
|
-
bearerToken,
|
|
119
|
-
triggers,
|
|
120
|
-
notificationLinks.registration_tokens
|
|
121
|
-
);
|
|
122
|
-
return {
|
|
123
|
-
isTriggersLinkedToPushNotifications,
|
|
124
|
-
fcmToken: newRegToken ?? null
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
async function listenToPushNotifications(params) {
|
|
128
|
-
const { env, listenToPushReceived, listenToPushClicked } = params;
|
|
129
|
-
const unsubscribePushNotifications = await _chunkHT6T5R4Ujs.listenToPushNotificationsReceived.call(void 0,
|
|
130
|
-
env,
|
|
131
|
-
listenToPushReceived
|
|
132
|
-
);
|
|
133
|
-
const unsubscribeNotificationClicks = _chunkHT6T5R4Ujs.listenToPushNotificationsClicked.call(void 0, listenToPushClicked);
|
|
134
|
-
const unsubscribe = () => {
|
|
135
|
-
unsubscribePushNotifications();
|
|
136
|
-
unsubscribeNotificationClicks();
|
|
137
|
-
};
|
|
138
|
-
return unsubscribe;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
exports.getPushNotificationLinks = getPushNotificationLinks; exports.updateLinksAPI = updateLinksAPI; exports.activatePushNotifications = activatePushNotifications; exports.deactivatePushNotifications = deactivatePushNotifications; exports.updateTriggerPushNotifications = updateTriggerPushNotifications; exports.listenToPushNotifications = listenToPushNotifications;
|
|
149
|
-
//# sourceMappingURL=chunk-6FLC6CJD.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/NotificationServicesPushController/services/services.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,SAAS;AAgChB,eAAsB,yBACpB,aAC6B;AAC7B,MAAI;AACF,UAAM,WAAW,MAAM,MAAgB,8BAA8B;AAAA,MACnE,SAAS,EAAE,eAAe,UAAU,WAAW,GAAG;AAAA,IACpD,CAAC;AACD,QAAI,CAAC,SAAS,IAAI;AAChB,UAAI,MAAM,6CAA6C;AACvD,YAAM,IAAI,MAAM,6CAA6C;AAAA,IAC/D;AACA,WAAO,SAAS,KAAK;AAAA,EACvB,SAAS,OAAO;AACd,QAAI,MAAM,+CAA+C,KAAK;AAC9D,WAAO;AAAA,EACT;AACF;AAUA,eAAsB,eACpB,aACA,UACA,WACkB;AAClB,MAAI;AACF,UAAM,OAAoB;AAAA;AAAA,MAExB,aAAa;AAAA;AAAA,MAEb,qBAAqB;AAAA,IACvB;AACA,UAAM,WAAW,MAAM,MAAgB,8BAA8B;AAAA,MACnE,QAAQ;AAAA,MACR,SAAS;AAAA,QACP,eAAe,UAAU,WAAW;AAAA,QACpC,gBAAgB;AAAA,MAClB;AAAA,MACA,MAAM,KAAK,UAAU,IAAI;AAAA,IAC3B,CAAC;AACD,WAAO,SAAS,WAAW;AAAA,EAC7B,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAmBA,eAAsB,0BACpB,QACwB;AACxB,QAAM,EAAE,aAAa,UAAU,KAAK,gBAAgB,SAAS,IAAI;AAEjE,QAAM,oBAAoB,MAAM,yBAAyB,WAAW;AAEpE,MAAI,CAAC,mBAAmB;AACtB,WAAO;AAAA,EACT;AAEA,QAAM,WAAW,MAAM,eAAe,GAAG,EAAE,MAAM,MAAM,IAAI;AAC3D,MAAI,CAAC,UAAU;AACb,WAAO;AAAA,EACT;AAEA,QAAM,eAAe,IAAI,IAAI,kBAAkB,mBAAmB;AAClE,eAAa,IAAI,EAAE,OAAO,UAAU,SAAS,CAAC;AAE9C,QAAM,eAAe,aAAa,UAAU,MAAM,KAAK,YAAY,CAAC;AACpE,SAAO;AACT;AAmBA,eAAsB,4BACpB,QACkB;AAClB,QAAM,EAAE,UAAU,aAAa,UAAU,KAAK,eAAe,IAAI;AAGjE,MAAI,CAAC,UAAU;AACb,WAAO;AAAA,EACT;AAEA,QAAM,oBAAoB,MAAM,yBAAyB,WAAW;AACpE,MAAI,CAAC,mBAAmB;AACtB,WAAO;AAAA,EACT;AAEA,QAAM,oBAAoB,kBAAkB,oBAAoB;AAAA,IAC9D,CAAC,MAAM,EAAE,UAAU;AAAA,EACrB;AAEA,QAAM,wBAAwB,MAAM;AAAA,IAClC;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACA,MAAI,CAAC,uBAAuB;AAC1B,WAAO;AAAA,EACT;AAEA,QAAM,wBAAwB,MAAM,eAAe,GAAG;AACtD,MAAI,CAAC,uBAAuB;AAC1B,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AA2BA,eAAsB,+BACpB,QAIC;AACD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,oBAAoB,MAAM,yBAAyB,WAAW;AACpE,MAAI,CAAC,mBAAmB;AACtB,WAAO,EAAE,qCAAqC,MAAM;AAAA,EACtD;AAEA,QAAM,cAAc;AAAA,IAClB,YACE,kBAAkB,oBAAoB,KAAK,CAAC,MAAM,EAAE,UAAU,QAAQ;AAAA,EAC1E;AAEA,MAAI,cAA6B;AACjC,MAAI,CAAC,aAAa;AAChB,UAAM,eAAe,GAAG;AACxB,kBAAc,MAAM,eAAe,GAAG;AACtC,QAAI,CAAC,aAAa;AAChB,YAAM,IAAI,MAAM,2CAA2C;AAAA,IAC7D;AACA,sBAAkB,oBAAoB,KAAK;AAAA,MACzC,OAAO;AAAA,MACP;AAAA,IACF,CAAC;AAAA,EACH;AAEA,QAAM,sCAAsC,MAAM;AAAA,IAChD;AAAA,IACA;AAAA,IACA,kBAAkB;AAAA,EACpB;AAEA,SAAO;AAAA,IACL;AAAA,IACA,UAAU,eAAe;AAAA,EAC3B;AACF;AAmBA,eAAsB,0BACpB,QACqB;AACrB,QAAM,EAAE,KAAK,sBAAsB,oBAAoB,IAAI;AAO3D,QAAM,+BAA+B,MAAM;AAAA,IACzC;AAAA,IACA;AAAA,EACF;AACA,QAAM,gCACJ,iCAAiC,mBAAmB;AAEtD,QAAM,cAAc,MAAM;AACxB,iCAA6B;AAC7B,kCAA8B;AAAA,EAChC;AAEA,SAAO;AACT","sourcesContent":["import log from 'loglevel';\n\nimport type { Types } from '../../NotificationServicesController';\nimport type { PushNotificationEnv } from '../types';\nimport * as endpoints from './endpoints';\nimport type { CreateRegToken, DeleteRegToken } from './push';\nimport {\n listenToPushNotificationsClicked,\n listenToPushNotificationsReceived,\n} from './push/push-web';\n\nexport type RegToken = {\n token: string;\n platform: 'extension' | 'mobile' | 'portfolio';\n};\n\n/**\n * Links API Response Shape\n */\nexport type LinksResult = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n trigger_ids: string[];\n // eslint-disable-next-line @typescript-eslint/naming-convention\n registration_tokens: RegToken[];\n};\n\n/**\n * Fetches push notification links from a remote endpoint using a BearerToken for authorization.\n *\n * @param bearerToken - The JSON Web Token used for authorization.\n * @returns A promise that resolves with the links result or null if an error occurs.\n */\nexport async function getPushNotificationLinks(\n bearerToken: string,\n): Promise<LinksResult | null> {\n try {\n const response = await fetch(endpoints.REGISTRATION_TOKENS_ENDPOINT, {\n headers: { Authorization: `Bearer ${bearerToken}` },\n });\n if (!response.ok) {\n log.error('Failed to fetch the push notification links');\n throw new Error('Failed to fetch the push notification links');\n }\n return response.json() as Promise<LinksResult>;\n } catch (error) {\n log.error('Failed to fetch the push notification links', error);\n return null;\n }\n}\n\n/**\n * Updates the push notification links on a remote API.\n *\n * @param bearerToken - The JSON Web Token used for authorization.\n * @param triggers - An array of trigger identifiers.\n * @param regTokens - An array of registration tokens.\n * @returns A promise that resolves with true if the update was successful, false otherwise.\n */\nexport async function updateLinksAPI(\n bearerToken: string,\n triggers: string[],\n regTokens: RegToken[],\n): Promise<boolean> {\n try {\n const body: LinksResult = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n trigger_ids: triggers,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n registration_tokens: regTokens,\n };\n const response = await fetch(endpoints.REGISTRATION_TOKENS_ENDPOINT, {\n method: 'POST',\n headers: {\n Authorization: `Bearer ${bearerToken}`,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(body),\n });\n return response.status === 200;\n } catch {\n return false;\n }\n}\n\ntype ActivatePushNotificationsParams = {\n // Push Links\n bearerToken: string;\n triggers: string[];\n\n // Push Registration\n env: PushNotificationEnv;\n createRegToken: CreateRegToken;\n platform: 'extension' | 'mobile' | 'portfolio';\n};\n\n/**\n * Enables push notifications by registering the device and linking triggers.\n *\n * @param params - Activate Push Params\n * @returns A promise that resolves with an object containing the success status and the BearerToken token.\n */\nexport async function activatePushNotifications(\n params: ActivatePushNotificationsParams,\n): Promise<string | null> {\n const { bearerToken, triggers, env, createRegToken, platform } = params;\n\n const notificationLinks = await getPushNotificationLinks(bearerToken);\n\n if (!notificationLinks) {\n return null;\n }\n\n const regToken = await createRegToken(env).catch(() => null);\n if (!regToken) {\n return null;\n }\n\n const newRegTokens = new Set(notificationLinks.registration_tokens);\n newRegTokens.add({ token: regToken, platform });\n\n await updateLinksAPI(bearerToken, triggers, Array.from(newRegTokens));\n return regToken;\n}\n\ntype DeactivatePushNotificationsParams = {\n // Push Links\n regToken: string;\n bearerToken: string;\n triggers: string[];\n\n // Push Un-registration\n env: PushNotificationEnv;\n deleteRegToken: DeleteRegToken;\n};\n\n/**\n * Disables push notifications by removing the registration token and unlinking triggers.\n *\n * @param params - Deactivate Push Params\n * @returns A promise that resolves with true if notifications were successfully disabled, false otherwise.\n */\nexport async function deactivatePushNotifications(\n params: DeactivatePushNotificationsParams,\n): Promise<boolean> {\n const { regToken, bearerToken, triggers, env, deleteRegToken } = params;\n\n // if we don't have a reg token, then we can early return\n if (!regToken) {\n return true;\n }\n\n const notificationLinks = await getPushNotificationLinks(bearerToken);\n if (!notificationLinks) {\n return false;\n }\n\n const filteredRegTokens = notificationLinks.registration_tokens.filter(\n (r) => r.token !== regToken,\n );\n\n const isTokenRemovedFromAPI = await updateLinksAPI(\n bearerToken,\n triggers,\n filteredRegTokens,\n );\n if (!isTokenRemovedFromAPI) {\n return false;\n }\n\n const isTokenRemovedFromFCM = await deleteRegToken(env);\n if (!isTokenRemovedFromFCM) {\n return false;\n }\n\n return true;\n}\n\ntype UpdateTriggerPushNotificationsParams = {\n // Push Links\n regToken: string;\n bearerToken: string;\n triggers: string[];\n\n // Push Registration\n env: PushNotificationEnv;\n createRegToken: CreateRegToken;\n platform: 'extension' | 'mobile' | 'portfolio';\n\n // Push Un-registration\n deleteRegToken: DeleteRegToken;\n};\n\n/**\n * Updates the triggers linked to push notifications for a given registration token.\n * If the provided registration token does not exist or is not in the current set of registration tokens,\n * a new registration token is created and used for the update.\n *\n * @param params - Update Push Params\n * @returns A promise that resolves with an object containing:\n * - isTriggersLinkedToPushNotifications: boolean indicating if the triggers were successfully updated.\n * - fcmToken: the new or existing Firebase Cloud Messaging token used for the update, if applicable.\n */\nexport async function updateTriggerPushNotifications(\n params: UpdateTriggerPushNotificationsParams,\n): Promise<{\n isTriggersLinkedToPushNotifications: boolean;\n fcmToken?: string | null;\n}> {\n const {\n bearerToken,\n regToken,\n triggers,\n createRegToken,\n platform,\n deleteRegToken,\n env,\n } = params;\n\n const notificationLinks = await getPushNotificationLinks(bearerToken);\n if (!notificationLinks) {\n return { isTriggersLinkedToPushNotifications: false };\n }\n // Create new registration token if doesn't exist\n const hasRegToken = Boolean(\n regToken &&\n notificationLinks.registration_tokens.some((r) => r.token === regToken),\n );\n\n let newRegToken: string | null = null;\n if (!hasRegToken) {\n await deleteRegToken(env);\n newRegToken = await createRegToken(env);\n if (!newRegToken) {\n throw new Error('Failed to create a new registration token');\n }\n notificationLinks.registration_tokens.push({\n token: newRegToken,\n platform,\n });\n }\n\n const isTriggersLinkedToPushNotifications = await updateLinksAPI(\n bearerToken,\n triggers,\n notificationLinks.registration_tokens,\n );\n\n return {\n isTriggersLinkedToPushNotifications,\n fcmToken: newRegToken ?? null,\n };\n}\n\ntype ListenToPushNotificationsParams = {\n env: PushNotificationEnv;\n listenToPushReceived: (\n notification: Types.INotification,\n ) => void | Promise<void>;\n listenToPushClicked: (\n event: NotificationEvent,\n notification?: Types.INotification,\n ) => void;\n};\n\n/**\n * Listens to push notifications and invokes the provided callback function with the received notification data.\n *\n * @param params - listen params\n * @returns A promise that resolves to an unsubscribe function to stop listening to push notifications.\n */\nexport async function listenToPushNotifications(\n params: ListenToPushNotificationsParams,\n): Promise<() => void> {\n const { env, listenToPushReceived, listenToPushClicked } = params;\n\n /*\n Push notifications require 2 listeners that need tracking (when creating and for tearing down):\n 1. handling receiving a push notification (and the content we want to display)\n 2. handling when a user clicks on a push notification\n */\n const unsubscribePushNotifications = await listenToPushNotificationsReceived(\n env,\n listenToPushReceived,\n );\n const unsubscribeNotificationClicks =\n listenToPushNotificationsClicked(listenToPushClicked);\n\n const unsubscribe = () => {\n unsubscribePushNotifications();\n unsubscribeNotificationClicks();\n };\n\n return unsubscribe;\n}\n"]}
|
package/dist/chunk-6ZDVTRRT.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/NotificationServicesController/constants/constants.ts"],"sourcesContent":["export const USER_STORAGE_VERSION = '1';\n\n// Force cast. We don't really care about the type here since we treat it as a unique symbol\nexport const USER_STORAGE_VERSION_KEY: unique symbol = 'v' as never;\n"],"mappings":";AAAO,IAAM,uBAAuB;AAG7B,IAAM,2BAA0C;","names":[]}
|
package/dist/chunk-77QIITUL.mjs
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
NOTIFICATION_CHAINS_ID
|
|
3
|
-
} from "./chunk-53F3SYYM.mjs";
|
|
4
|
-
|
|
5
|
-
// src/NotificationServicesController/ui/constants.ts
|
|
6
|
-
var NOTIFICATION_NETWORK_CURRENCY_NAME = {
|
|
7
|
-
[NOTIFICATION_CHAINS_ID.ETHEREUM]: "Ethereum",
|
|
8
|
-
[NOTIFICATION_CHAINS_ID.ARBITRUM]: "Arbitrum",
|
|
9
|
-
[NOTIFICATION_CHAINS_ID.AVALANCHE]: "Avalanche",
|
|
10
|
-
[NOTIFICATION_CHAINS_ID.BSC]: "Binance",
|
|
11
|
-
[NOTIFICATION_CHAINS_ID.LINEA]: "Linea",
|
|
12
|
-
[NOTIFICATION_CHAINS_ID.OPTIMISM]: "Optimism",
|
|
13
|
-
[NOTIFICATION_CHAINS_ID.POLYGON]: "Polygon"
|
|
14
|
-
};
|
|
15
|
-
var NOTIFICATION_NETWORK_CURRENCY_SYMBOL = {
|
|
16
|
-
[NOTIFICATION_CHAINS_ID.ETHEREUM]: "ETH",
|
|
17
|
-
[NOTIFICATION_CHAINS_ID.ARBITRUM]: "ETH",
|
|
18
|
-
[NOTIFICATION_CHAINS_ID.AVALANCHE]: "AVAX",
|
|
19
|
-
[NOTIFICATION_CHAINS_ID.BSC]: "BNB",
|
|
20
|
-
[NOTIFICATION_CHAINS_ID.LINEA]: "ETH",
|
|
21
|
-
[NOTIFICATION_CHAINS_ID.OPTIMISM]: "ETH",
|
|
22
|
-
[NOTIFICATION_CHAINS_ID.POLYGON]: "MATIC"
|
|
23
|
-
};
|
|
24
|
-
var 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
|
-
// POLYGON
|
|
41
|
-
[NOTIFICATION_CHAINS_ID.POLYGON]: {
|
|
42
|
-
url: "https://polygonscan.com",
|
|
43
|
-
name: "PolygonScan"
|
|
44
|
-
},
|
|
45
|
-
// ARBITRUM
|
|
46
|
-
[NOTIFICATION_CHAINS_ID.ARBITRUM]: {
|
|
47
|
-
url: "https://arbiscan.io",
|
|
48
|
-
name: "Arbiscan"
|
|
49
|
-
},
|
|
50
|
-
// AVALANCHE
|
|
51
|
-
[NOTIFICATION_CHAINS_ID.AVALANCHE]: {
|
|
52
|
-
url: "https://snowtrace.io",
|
|
53
|
-
name: "Snowtrace"
|
|
54
|
-
},
|
|
55
|
-
// LINEA
|
|
56
|
-
[NOTIFICATION_CHAINS_ID.LINEA]: {
|
|
57
|
-
url: "https://lineascan.build",
|
|
58
|
-
name: "LineaScan"
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export {
|
|
63
|
-
NOTIFICATION_NETWORK_CURRENCY_NAME,
|
|
64
|
-
NOTIFICATION_NETWORK_CURRENCY_SYMBOL,
|
|
65
|
-
SUPPORTED_NOTIFICATION_BLOCK_EXPLORERS
|
|
66
|
-
};
|
|
67
|
-
//# sourceMappingURL=chunk-77QIITUL.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/NotificationServicesController/ui/constants.ts"],"sourcesContent":["import { NOTIFICATION_CHAINS_ID } 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.LINEA]: 'Linea',\n [NOTIFICATION_CHAINS_ID.OPTIMISM]: 'Optimism',\n [NOTIFICATION_CHAINS_ID.POLYGON]: 'Polygon',\n} as const;\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.LINEA]: 'ETH',\n [NOTIFICATION_CHAINS_ID.OPTIMISM]: 'ETH',\n [NOTIFICATION_CHAINS_ID.POLYGON]: 'MATIC',\n};\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 // 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} satisfies Record<string, BlockExplorerConfig>;\n\nexport { NOTIFICATION_CHAINS_ID } from '../constants/notification-schema';\n"],"mappings":";;;;;AAEO,IAAM,qCAAqC;AAAA,EAChD,CAAC,uBAAuB,QAAQ,GAAG;AAAA,EACnC,CAAC,uBAAuB,QAAQ,GAAG;AAAA,EACnC,CAAC,uBAAuB,SAAS,GAAG;AAAA,EACpC,CAAC,uBAAuB,GAAG,GAAG;AAAA,EAC9B,CAAC,uBAAuB,KAAK,GAAG;AAAA,EAChC,CAAC,uBAAuB,QAAQ,GAAG;AAAA,EACnC,CAAC,uBAAuB,OAAO,GAAG;AACpC;AAEO,IAAM,uCAAuC;AAAA,EAClD,CAAC,uBAAuB,QAAQ,GAAG;AAAA,EACnC,CAAC,uBAAuB,QAAQ,GAAG;AAAA,EACnC,CAAC,uBAAuB,SAAS,GAAG;AAAA,EACpC,CAAC,uBAAuB,GAAG,GAAG;AAAA,EAC9B,CAAC,uBAAuB,KAAK,GAAG;AAAA,EAChC,CAAC,uBAAuB,QAAQ,GAAG;AAAA,EACnC,CAAC,uBAAuB,OAAO,GAAG;AACpC;AAOO,IAAM,yCAAyC;AAAA;AAAA,EAEpD,CAAC,uBAAuB,QAAQ,GAAG;AAAA,IACjC,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AAAA;AAAA,EAEA,CAAC,uBAAuB,QAAQ,GAAG;AAAA,IACjC,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AAAA;AAAA,EAEA,CAAC,uBAAuB,GAAG,GAAG;AAAA,IAC5B,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AAAA;AAAA,EAEA,CAAC,uBAAuB,OAAO,GAAG;AAAA,IAChC,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AAAA;AAAA,EAEA,CAAC,uBAAuB,QAAQ,GAAG;AAAA,IACjC,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AAAA;AAAA,EAEA,CAAC,uBAAuB,SAAS,GAAG;AAAA,IAClC,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AAAA;AAAA,EAEA,CAAC,uBAAuB,KAAK,GAAG;AAAA,IAC9B,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AACF;","names":[]}
|