@metamask-previews/notification-services-controller 10.0.0-preview-4e3fd4c0 → 12.0.0-preview-08a4995

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/CHANGELOG.md +39 -1
  2. package/dist/NotificationServicesController/NotificationServicesController.cjs +78 -188
  3. package/dist/NotificationServicesController/NotificationServicesController.cjs.map +1 -1
  4. package/dist/NotificationServicesController/NotificationServicesController.d.cts +10 -16
  5. package/dist/NotificationServicesController/NotificationServicesController.d.cts.map +1 -1
  6. package/dist/NotificationServicesController/NotificationServicesController.d.mts +10 -16
  7. package/dist/NotificationServicesController/NotificationServicesController.d.mts.map +1 -1
  8. package/dist/NotificationServicesController/NotificationServicesController.mjs +79 -189
  9. package/dist/NotificationServicesController/NotificationServicesController.mjs.map +1 -1
  10. package/dist/NotificationServicesController/constants/index.cjs +0 -1
  11. package/dist/NotificationServicesController/constants/index.cjs.map +1 -1
  12. package/dist/NotificationServicesController/constants/index.d.cts +0 -1
  13. package/dist/NotificationServicesController/constants/index.d.cts.map +1 -1
  14. package/dist/NotificationServicesController/constants/index.d.mts +0 -1
  15. package/dist/NotificationServicesController/constants/index.d.mts.map +1 -1
  16. package/dist/NotificationServicesController/constants/index.mjs +0 -1
  17. package/dist/NotificationServicesController/constants/index.mjs.map +1 -1
  18. package/dist/NotificationServicesController/constants/notification-schema.cjs +1 -0
  19. package/dist/NotificationServicesController/constants/notification-schema.cjs.map +1 -1
  20. package/dist/NotificationServicesController/constants/notification-schema.d.cts +1 -0
  21. package/dist/NotificationServicesController/constants/notification-schema.d.cts.map +1 -1
  22. package/dist/NotificationServicesController/constants/notification-schema.d.mts +1 -0
  23. package/dist/NotificationServicesController/constants/notification-schema.d.mts.map +1 -1
  24. package/dist/NotificationServicesController/constants/notification-schema.mjs +1 -0
  25. package/dist/NotificationServicesController/constants/notification-schema.mjs.map +1 -1
  26. package/dist/NotificationServicesController/mocks/index.cjs +0 -2
  27. package/dist/NotificationServicesController/mocks/index.cjs.map +1 -1
  28. package/dist/NotificationServicesController/mocks/index.d.cts +0 -2
  29. package/dist/NotificationServicesController/mocks/index.d.cts.map +1 -1
  30. package/dist/NotificationServicesController/mocks/index.d.mts +0 -2
  31. package/dist/NotificationServicesController/mocks/index.d.mts.map +1 -1
  32. package/dist/NotificationServicesController/mocks/index.mjs +0 -2
  33. package/dist/NotificationServicesController/mocks/index.mjs.map +1 -1
  34. package/dist/NotificationServicesController/mocks/mockResponses.cjs +9 -9
  35. package/dist/NotificationServicesController/mocks/mockResponses.cjs.map +1 -1
  36. package/dist/NotificationServicesController/mocks/mockResponses.d.cts +7 -4
  37. package/dist/NotificationServicesController/mocks/mockResponses.d.cts.map +1 -1
  38. package/dist/NotificationServicesController/mocks/mockResponses.d.mts +7 -4
  39. package/dist/NotificationServicesController/mocks/mockResponses.d.mts.map +1 -1
  40. package/dist/NotificationServicesController/mocks/mockResponses.mjs +7 -7
  41. package/dist/NotificationServicesController/mocks/mockResponses.mjs.map +1 -1
  42. package/dist/NotificationServicesController/processors/process-notifications.cjs +4 -1
  43. package/dist/NotificationServicesController/processors/process-notifications.cjs.map +1 -1
  44. package/dist/NotificationServicesController/processors/process-notifications.d.cts +623 -0
  45. package/dist/NotificationServicesController/processors/process-notifications.d.cts.map +1 -1
  46. package/dist/NotificationServicesController/processors/process-notifications.d.mts +623 -0
  47. package/dist/NotificationServicesController/processors/process-notifications.d.mts.map +1 -1
  48. package/dist/NotificationServicesController/processors/process-notifications.mjs +2 -0
  49. package/dist/NotificationServicesController/processors/process-notifications.mjs.map +1 -1
  50. package/dist/NotificationServicesController/services/notification-config-cache.cjs +61 -0
  51. package/dist/NotificationServicesController/services/notification-config-cache.cjs.map +1 -0
  52. package/dist/NotificationServicesController/services/notification-config-cache.d.cts +15 -0
  53. package/dist/NotificationServicesController/services/notification-config-cache.d.cts.map +1 -0
  54. package/dist/NotificationServicesController/services/notification-config-cache.d.mts +15 -0
  55. package/dist/NotificationServicesController/services/notification-config-cache.d.mts.map +1 -0
  56. package/dist/NotificationServicesController/services/notification-config-cache.mjs +57 -0
  57. package/dist/NotificationServicesController/services/notification-config-cache.mjs.map +1 -0
  58. package/dist/NotificationServicesController/services/onchain-notifications.cjs +67 -140
  59. package/dist/NotificationServicesController/services/onchain-notifications.cjs.map +1 -1
  60. package/dist/NotificationServicesController/services/onchain-notifications.d.cts +25 -31
  61. package/dist/NotificationServicesController/services/onchain-notifications.d.cts.map +1 -1
  62. package/dist/NotificationServicesController/services/onchain-notifications.d.mts +25 -31
  63. package/dist/NotificationServicesController/services/onchain-notifications.d.mts.map +1 -1
  64. package/dist/NotificationServicesController/services/onchain-notifications.mjs +65 -137
  65. package/dist/NotificationServicesController/services/onchain-notifications.mjs.map +1 -1
  66. package/dist/NotificationServicesController/types/index.cjs.map +1 -1
  67. package/dist/NotificationServicesController/types/index.d.cts +0 -1
  68. package/dist/NotificationServicesController/types/index.d.cts.map +1 -1
  69. package/dist/NotificationServicesController/types/index.d.mts +0 -1
  70. package/dist/NotificationServicesController/types/index.d.mts.map +1 -1
  71. package/dist/NotificationServicesController/types/index.mjs.map +1 -1
  72. package/dist/NotificationServicesController/ui/constants.cjs +6 -0
  73. package/dist/NotificationServicesController/ui/constants.cjs.map +1 -1
  74. package/dist/NotificationServicesController/ui/constants.d.cts +6 -0
  75. package/dist/NotificationServicesController/ui/constants.d.cts.map +1 -1
  76. package/dist/NotificationServicesController/ui/constants.d.mts +6 -0
  77. package/dist/NotificationServicesController/ui/constants.d.mts.map +1 -1
  78. package/dist/NotificationServicesController/ui/constants.mjs +6 -0
  79. package/dist/NotificationServicesController/ui/constants.mjs.map +1 -1
  80. package/dist/NotificationServicesController/utils/utils.cjs +1 -350
  81. package/dist/NotificationServicesController/utils/utils.cjs.map +1 -1
  82. package/dist/NotificationServicesController/utils/utils.d.cts +0 -141
  83. package/dist/NotificationServicesController/utils/utils.d.cts.map +1 -1
  84. package/dist/NotificationServicesController/utils/utils.d.mts +0 -141
  85. package/dist/NotificationServicesController/utils/utils.d.mts.map +1 -1
  86. package/dist/NotificationServicesController/utils/utils.mjs +0 -337
  87. package/dist/NotificationServicesController/utils/utils.mjs.map +1 -1
  88. package/dist/NotificationServicesPushController/NotificationServicesPushController.cjs +22 -15
  89. package/dist/NotificationServicesPushController/NotificationServicesPushController.cjs.map +1 -1
  90. package/dist/NotificationServicesPushController/NotificationServicesPushController.d.cts +6 -5
  91. package/dist/NotificationServicesPushController/NotificationServicesPushController.d.cts.map +1 -1
  92. package/dist/NotificationServicesPushController/NotificationServicesPushController.d.mts +6 -5
  93. package/dist/NotificationServicesPushController/NotificationServicesPushController.d.mts.map +1 -1
  94. package/dist/NotificationServicesPushController/NotificationServicesPushController.mjs +23 -16
  95. package/dist/NotificationServicesPushController/NotificationServicesPushController.mjs.map +1 -1
  96. package/dist/NotificationServicesPushController/mocks/mockResponse.cjs +1 -16
  97. package/dist/NotificationServicesPushController/mocks/mockResponse.cjs.map +1 -1
  98. package/dist/NotificationServicesPushController/mocks/mockResponse.d.cts +0 -7
  99. package/dist/NotificationServicesPushController/mocks/mockResponse.d.cts.map +1 -1
  100. package/dist/NotificationServicesPushController/mocks/mockResponse.d.mts +0 -7
  101. package/dist/NotificationServicesPushController/mocks/mockResponse.d.mts.map +1 -1
  102. package/dist/NotificationServicesPushController/mocks/mockResponse.mjs +0 -14
  103. package/dist/NotificationServicesPushController/mocks/mockResponse.mjs.map +1 -1
  104. package/dist/NotificationServicesPushController/services/endpoints.cjs +1 -1
  105. package/dist/NotificationServicesPushController/services/endpoints.cjs.map +1 -1
  106. package/dist/NotificationServicesPushController/services/endpoints.d.cts +1 -1
  107. package/dist/NotificationServicesPushController/services/endpoints.d.cts.map +1 -1
  108. package/dist/NotificationServicesPushController/services/endpoints.d.mts +1 -1
  109. package/dist/NotificationServicesPushController/services/endpoints.d.mts.map +1 -1
  110. package/dist/NotificationServicesPushController/services/endpoints.mjs +1 -1
  111. package/dist/NotificationServicesPushController/services/endpoints.mjs.map +1 -1
  112. package/dist/NotificationServicesPushController/services/services.cjs +18 -41
  113. package/dist/NotificationServicesPushController/services/services.cjs.map +1 -1
  114. package/dist/NotificationServicesPushController/services/services.d.cts +19 -33
  115. package/dist/NotificationServicesPushController/services/services.d.cts.map +1 -1
  116. package/dist/NotificationServicesPushController/services/services.d.mts +19 -33
  117. package/dist/NotificationServicesPushController/services/services.d.mts.map +1 -1
  118. package/dist/NotificationServicesPushController/services/services.mjs +17 -39
  119. package/dist/NotificationServicesPushController/services/services.mjs.map +1 -1
  120. package/package.json +3 -3
  121. package/dist/NotificationServicesController/constants/constants.cjs +0 -7
  122. package/dist/NotificationServicesController/constants/constants.cjs.map +0 -1
  123. package/dist/NotificationServicesController/constants/constants.d.cts +0 -3
  124. package/dist/NotificationServicesController/constants/constants.d.cts.map +0 -1
  125. package/dist/NotificationServicesController/constants/constants.d.mts +0 -3
  126. package/dist/NotificationServicesController/constants/constants.d.mts.map +0 -1
  127. package/dist/NotificationServicesController/constants/constants.mjs +0 -4
  128. package/dist/NotificationServicesController/constants/constants.mjs.map +0 -1
  129. package/dist/NotificationServicesController/mocks/mock-notification-trigger.cjs +0 -22
  130. package/dist/NotificationServicesController/mocks/mock-notification-trigger.cjs.map +0 -1
  131. package/dist/NotificationServicesController/mocks/mock-notification-trigger.d.cts +0 -9
  132. package/dist/NotificationServicesController/mocks/mock-notification-trigger.d.cts.map +0 -1
  133. package/dist/NotificationServicesController/mocks/mock-notification-trigger.d.mts +0 -9
  134. package/dist/NotificationServicesController/mocks/mock-notification-trigger.d.mts.map +0 -1
  135. package/dist/NotificationServicesController/mocks/mock-notification-trigger.mjs +0 -18
  136. package/dist/NotificationServicesController/mocks/mock-notification-trigger.mjs.map +0 -1
  137. package/dist/NotificationServicesController/mocks/mock-notification-user-storage.cjs +0 -82
  138. package/dist/NotificationServicesController/mocks/mock-notification-user-storage.cjs.map +0 -1
  139. package/dist/NotificationServicesController/mocks/mock-notification-user-storage.d.cts +0 -35
  140. package/dist/NotificationServicesController/mocks/mock-notification-user-storage.d.cts.map +0 -1
  141. package/dist/NotificationServicesController/mocks/mock-notification-user-storage.d.mts +0 -35
  142. package/dist/NotificationServicesController/mocks/mock-notification-user-storage.d.mts.map +0 -1
  143. package/dist/NotificationServicesController/mocks/mock-notification-user-storage.mjs +0 -76
  144. package/dist/NotificationServicesController/mocks/mock-notification-user-storage.mjs.map +0 -1
  145. package/dist/NotificationServicesController/types/user-storage/index.cjs +0 -3
  146. package/dist/NotificationServicesController/types/user-storage/index.cjs.map +0 -1
  147. package/dist/NotificationServicesController/types/user-storage/index.d.cts +0 -2
  148. package/dist/NotificationServicesController/types/user-storage/index.d.cts.map +0 -1
  149. package/dist/NotificationServicesController/types/user-storage/index.d.mts +0 -2
  150. package/dist/NotificationServicesController/types/user-storage/index.d.mts.map +0 -1
  151. package/dist/NotificationServicesController/types/user-storage/index.mjs +0 -2
  152. package/dist/NotificationServicesController/types/user-storage/index.mjs.map +0 -1
  153. package/dist/NotificationServicesController/types/user-storage/user-storage.cjs +0 -3
  154. package/dist/NotificationServicesController/types/user-storage/user-storage.cjs.map +0 -1
  155. package/dist/NotificationServicesController/types/user-storage/user-storage.d.cts +0 -26
  156. package/dist/NotificationServicesController/types/user-storage/user-storage.d.cts.map +0 -1
  157. package/dist/NotificationServicesController/types/user-storage/user-storage.d.mts +0 -26
  158. package/dist/NotificationServicesController/types/user-storage/user-storage.d.mts.map +0 -1
  159. package/dist/NotificationServicesController/types/user-storage/user-storage.mjs +0 -2
  160. package/dist/NotificationServicesController/types/user-storage/user-storage.mjs.map +0 -1
@@ -1,3 +1,4 @@
1
+ import { TRIGGER_TYPES } from "../constants/notification-schema.cjs";
1
2
  import type { INotification, RawNotificationUnion } from "../types/notification/notification.cjs";
2
3
  /**
3
4
  * Process feature announcement and wallet notifications into a shared/normalised notification shape.
@@ -16,4 +17,626 @@ export declare function processNotification(notification: RawNotificationUnion,
16
17
  * @returns a process notification or undefined if failed to process
17
18
  */
18
19
  export declare function safeProcessNotification(notification: RawNotificationUnion, readNotifications?: string[]): INotification | undefined;
20
+ export declare const processAndFilterNotifications: (ns: RawNotificationUnion[], readIds: string[]) => ({
21
+ type: TRIGGER_TYPES.FEATURES_ANNOUNCEMENT;
22
+ createdAt: string;
23
+ data: import("../types/feature-announcement/feature-announcement.cjs").FeatureAnnouncementRawNotificationData;
24
+ id: string;
25
+ isRead: boolean;
26
+ } | {
27
+ id: string;
28
+ trigger_id: string;
29
+ chain_id: number;
30
+ block_number: number;
31
+ block_timestamp: string;
32
+ tx_hash: string;
33
+ unread: boolean;
34
+ created_at: string;
35
+ address: string;
36
+ type: TRIGGER_TYPES.METAMASK_SWAP_COMPLETED;
37
+ data: {
38
+ kind: "metamask_swap_completed";
39
+ network_fee: {
40
+ gas_price: string;
41
+ native_token_price_in_usd: string;
42
+ };
43
+ rate: string;
44
+ token_in: {
45
+ address: string;
46
+ symbol: string;
47
+ name: string;
48
+ amount: string;
49
+ decimals: string;
50
+ image: string;
51
+ usd: string;
52
+ };
53
+ token_out: {
54
+ address: string;
55
+ symbol: string;
56
+ name: string;
57
+ amount: string;
58
+ decimals: string;
59
+ image: string;
60
+ usd: string;
61
+ };
62
+ };
63
+ createdAt: string;
64
+ isRead: boolean;
65
+ } | {
66
+ id: string;
67
+ trigger_id: string;
68
+ chain_id: number;
69
+ block_number: number;
70
+ block_timestamp: string;
71
+ tx_hash: string;
72
+ unread: boolean;
73
+ created_at: string;
74
+ address: string;
75
+ type: TRIGGER_TYPES.ERC20_SENT;
76
+ data: {
77
+ kind: "erc20_sent";
78
+ network_fee: {
79
+ gas_price: string;
80
+ native_token_price_in_usd: string;
81
+ };
82
+ from: string;
83
+ to: string;
84
+ token: {
85
+ address: string;
86
+ symbol: string;
87
+ name: string;
88
+ amount: string;
89
+ decimals: string;
90
+ image: string;
91
+ usd: string;
92
+ };
93
+ };
94
+ createdAt: string;
95
+ isRead: boolean;
96
+ } | {
97
+ id: string;
98
+ trigger_id: string;
99
+ chain_id: number;
100
+ block_number: number;
101
+ block_timestamp: string;
102
+ tx_hash: string;
103
+ unread: boolean;
104
+ created_at: string;
105
+ address: string;
106
+ type: TRIGGER_TYPES.ERC20_RECEIVED;
107
+ data: {
108
+ kind: "erc20_received";
109
+ network_fee: {
110
+ gas_price: string;
111
+ native_token_price_in_usd: string;
112
+ };
113
+ from: string;
114
+ to: string;
115
+ token: {
116
+ address: string;
117
+ symbol: string;
118
+ name: string;
119
+ amount: string;
120
+ decimals: string;
121
+ image: string;
122
+ usd: string;
123
+ };
124
+ };
125
+ createdAt: string;
126
+ isRead: boolean;
127
+ } | {
128
+ id: string;
129
+ trigger_id: string;
130
+ chain_id: number;
131
+ block_number: number;
132
+ block_timestamp: string;
133
+ tx_hash: string;
134
+ unread: boolean;
135
+ created_at: string;
136
+ address: string;
137
+ type: TRIGGER_TYPES.ETH_SENT;
138
+ data: {
139
+ kind: "eth_sent";
140
+ network_fee: {
141
+ gas_price: string;
142
+ native_token_price_in_usd: string;
143
+ };
144
+ from: string;
145
+ to: string;
146
+ amount: {
147
+ usd: string;
148
+ eth: string;
149
+ };
150
+ };
151
+ createdAt: string;
152
+ isRead: boolean;
153
+ } | {
154
+ id: string;
155
+ trigger_id: string;
156
+ chain_id: number;
157
+ block_number: number;
158
+ block_timestamp: string;
159
+ tx_hash: string;
160
+ unread: boolean;
161
+ created_at: string;
162
+ address: string;
163
+ type: TRIGGER_TYPES.ETH_RECEIVED;
164
+ data: {
165
+ kind: "eth_received";
166
+ network_fee: {
167
+ gas_price: string;
168
+ native_token_price_in_usd: string;
169
+ };
170
+ from: string;
171
+ to: string;
172
+ amount: {
173
+ usd: string;
174
+ eth: string;
175
+ };
176
+ };
177
+ createdAt: string;
178
+ isRead: boolean;
179
+ } | {
180
+ id: string;
181
+ trigger_id: string;
182
+ chain_id: number;
183
+ block_number: number;
184
+ block_timestamp: string;
185
+ tx_hash: string;
186
+ unread: boolean;
187
+ created_at: string;
188
+ address: string;
189
+ type: TRIGGER_TYPES.ROCKETPOOL_STAKE_COMPLETED;
190
+ data: {
191
+ kind: "rocketpool_stake_completed";
192
+ network_fee: {
193
+ gas_price: string;
194
+ native_token_price_in_usd: string;
195
+ };
196
+ stake_in: {
197
+ address: string;
198
+ symbol: string;
199
+ name: string;
200
+ amount: string;
201
+ decimals: string;
202
+ image: string;
203
+ usd: string;
204
+ };
205
+ stake_out: {
206
+ address: string;
207
+ symbol: string;
208
+ name: string;
209
+ amount: string;
210
+ decimals: string;
211
+ image: string;
212
+ usd: string;
213
+ };
214
+ };
215
+ createdAt: string;
216
+ isRead: boolean;
217
+ } | {
218
+ id: string;
219
+ trigger_id: string;
220
+ chain_id: number;
221
+ block_number: number;
222
+ block_timestamp: string;
223
+ tx_hash: string;
224
+ unread: boolean;
225
+ created_at: string;
226
+ address: string;
227
+ type: TRIGGER_TYPES.ROCKETPOOL_UNSTAKE_COMPLETED;
228
+ data: {
229
+ kind: "rocketpool_unstake_completed";
230
+ network_fee: {
231
+ gas_price: string;
232
+ native_token_price_in_usd: string;
233
+ };
234
+ stake_in: {
235
+ address: string;
236
+ symbol: string;
237
+ name: string;
238
+ amount: string;
239
+ decimals: string;
240
+ image: string;
241
+ usd: string;
242
+ };
243
+ stake_out: {
244
+ address: string;
245
+ symbol: string;
246
+ name: string;
247
+ amount: string;
248
+ decimals: string;
249
+ image: string;
250
+ usd: string;
251
+ };
252
+ };
253
+ createdAt: string;
254
+ isRead: boolean;
255
+ } | {
256
+ id: string;
257
+ trigger_id: string;
258
+ chain_id: number;
259
+ block_number: number;
260
+ block_timestamp: string;
261
+ tx_hash: string;
262
+ unread: boolean;
263
+ created_at: string;
264
+ address: string;
265
+ type: TRIGGER_TYPES.LIDO_STAKE_COMPLETED;
266
+ data: {
267
+ kind: "lido_stake_completed";
268
+ network_fee: {
269
+ gas_price: string;
270
+ native_token_price_in_usd: string;
271
+ };
272
+ stake_in: {
273
+ address: string;
274
+ symbol: string;
275
+ name: string;
276
+ amount: string;
277
+ decimals: string;
278
+ image: string;
279
+ usd: string;
280
+ };
281
+ stake_out: {
282
+ address: string;
283
+ symbol: string;
284
+ name: string;
285
+ amount: string;
286
+ decimals: string;
287
+ image: string;
288
+ usd: string;
289
+ };
290
+ };
291
+ createdAt: string;
292
+ isRead: boolean;
293
+ } | {
294
+ id: string;
295
+ trigger_id: string;
296
+ chain_id: number;
297
+ block_number: number;
298
+ block_timestamp: string;
299
+ tx_hash: string;
300
+ unread: boolean;
301
+ created_at: string;
302
+ address: string;
303
+ type: TRIGGER_TYPES.LIDO_WITHDRAWAL_REQUESTED;
304
+ data: {
305
+ kind: "lido_withdrawal_requested";
306
+ network_fee: {
307
+ gas_price: string;
308
+ native_token_price_in_usd: string;
309
+ };
310
+ stake_in: {
311
+ address: string;
312
+ symbol: string;
313
+ name: string;
314
+ amount: string;
315
+ decimals: string;
316
+ image: string;
317
+ usd: string;
318
+ };
319
+ stake_out: {
320
+ address: string;
321
+ symbol: string;
322
+ name: string;
323
+ amount: string;
324
+ decimals: string;
325
+ image: string;
326
+ usd: string;
327
+ };
328
+ };
329
+ createdAt: string;
330
+ isRead: boolean;
331
+ } | {
332
+ id: string;
333
+ trigger_id: string;
334
+ chain_id: number;
335
+ block_number: number;
336
+ block_timestamp: string;
337
+ tx_hash: string;
338
+ unread: boolean;
339
+ created_at: string;
340
+ address: string;
341
+ type: TRIGGER_TYPES.LIDO_WITHDRAWAL_COMPLETED;
342
+ data: {
343
+ kind: "lido_withdrawal_completed";
344
+ network_fee: {
345
+ gas_price: string;
346
+ native_token_price_in_usd: string;
347
+ };
348
+ stake_in: {
349
+ address: string;
350
+ symbol: string;
351
+ name: string;
352
+ amount: string;
353
+ decimals: string;
354
+ image: string;
355
+ usd: string;
356
+ };
357
+ stake_out: {
358
+ address: string;
359
+ symbol: string;
360
+ name: string;
361
+ amount: string;
362
+ decimals: string;
363
+ image: string;
364
+ usd: string;
365
+ };
366
+ };
367
+ createdAt: string;
368
+ isRead: boolean;
369
+ } | {
370
+ id: string;
371
+ trigger_id: string;
372
+ chain_id: number;
373
+ block_number: number;
374
+ block_timestamp: string;
375
+ tx_hash: string;
376
+ unread: boolean;
377
+ created_at: string;
378
+ address: string;
379
+ type: TRIGGER_TYPES.LIDO_STAKE_READY_TO_BE_WITHDRAWN;
380
+ data: {
381
+ kind: "lido_stake_ready_to_be_withdrawn";
382
+ request_id: string;
383
+ staked_eth: {
384
+ address: string;
385
+ symbol: string;
386
+ name: string;
387
+ amount: string;
388
+ decimals: string;
389
+ image: string;
390
+ usd: string;
391
+ };
392
+ };
393
+ createdAt: string;
394
+ isRead: boolean;
395
+ } | {
396
+ id: string;
397
+ trigger_id: string;
398
+ chain_id: number;
399
+ block_number: number;
400
+ block_timestamp: string;
401
+ tx_hash: string;
402
+ unread: boolean;
403
+ created_at: string;
404
+ address: string;
405
+ type: TRIGGER_TYPES.ERC721_SENT;
406
+ data: {
407
+ kind: "erc721_sent";
408
+ network_fee: {
409
+ gas_price: string;
410
+ native_token_price_in_usd: string;
411
+ };
412
+ from: string;
413
+ to: string;
414
+ nft: {
415
+ name: string;
416
+ token_id: string;
417
+ image: string;
418
+ collection: {
419
+ address: string;
420
+ name: string;
421
+ symbol: string;
422
+ image: string;
423
+ };
424
+ };
425
+ };
426
+ createdAt: string;
427
+ isRead: boolean;
428
+ } | {
429
+ id: string;
430
+ trigger_id: string;
431
+ chain_id: number;
432
+ block_number: number;
433
+ block_timestamp: string;
434
+ tx_hash: string;
435
+ unread: boolean;
436
+ created_at: string;
437
+ address: string;
438
+ type: TRIGGER_TYPES.ERC721_RECEIVED;
439
+ data: {
440
+ kind: "erc721_received";
441
+ network_fee: {
442
+ gas_price: string;
443
+ native_token_price_in_usd: string;
444
+ };
445
+ from: string;
446
+ to: string;
447
+ nft: {
448
+ name: string;
449
+ token_id: string;
450
+ image: string;
451
+ collection: {
452
+ address: string;
453
+ name: string;
454
+ symbol: string;
455
+ image: string;
456
+ };
457
+ };
458
+ };
459
+ createdAt: string;
460
+ isRead: boolean;
461
+ } | {
462
+ id: string;
463
+ trigger_id: string;
464
+ chain_id: number;
465
+ block_number: number;
466
+ block_timestamp: string;
467
+ tx_hash: string;
468
+ unread: boolean;
469
+ created_at: string;
470
+ address: string;
471
+ type: TRIGGER_TYPES.ERC1155_SENT;
472
+ data: {
473
+ kind: "erc1155_sent";
474
+ network_fee: {
475
+ gas_price: string;
476
+ native_token_price_in_usd: string;
477
+ };
478
+ from: string;
479
+ to: string;
480
+ nft?: {
481
+ name: string;
482
+ token_id: string;
483
+ image: string;
484
+ collection: {
485
+ address: string;
486
+ name: string;
487
+ symbol: string;
488
+ image: string;
489
+ };
490
+ } | undefined;
491
+ };
492
+ createdAt: string;
493
+ isRead: boolean;
494
+ } | {
495
+ id: string;
496
+ trigger_id: string;
497
+ chain_id: number;
498
+ block_number: number;
499
+ block_timestamp: string;
500
+ tx_hash: string;
501
+ unread: boolean;
502
+ created_at: string;
503
+ address: string;
504
+ type: TRIGGER_TYPES.ERC1155_RECEIVED;
505
+ data: {
506
+ kind: "erc1155_received";
507
+ network_fee: {
508
+ gas_price: string;
509
+ native_token_price_in_usd: string;
510
+ };
511
+ from: string;
512
+ to: string;
513
+ nft?: {
514
+ name: string;
515
+ token_id: string;
516
+ image: string;
517
+ collection: {
518
+ address: string;
519
+ name: string;
520
+ symbol: string;
521
+ image: string;
522
+ };
523
+ } | undefined;
524
+ };
525
+ createdAt: string;
526
+ isRead: boolean;
527
+ } | {
528
+ id: string;
529
+ trigger_id: string;
530
+ chain_id: number;
531
+ unread: boolean;
532
+ created_at: string;
533
+ address: string;
534
+ type: TRIGGER_TYPES.AAVE_V3_HEALTH_FACTOR;
535
+ data: {
536
+ kind: "aave_v3_health_factor";
537
+ chainId: number;
538
+ healthFactor: string;
539
+ threshold: string;
540
+ };
541
+ createdAt: string;
542
+ isRead: boolean;
543
+ } | {
544
+ id: string;
545
+ trigger_id: string;
546
+ chain_id: number;
547
+ unread: boolean;
548
+ created_at: string;
549
+ address: string;
550
+ type: TRIGGER_TYPES.ENS_EXPIRATION;
551
+ data: {
552
+ kind: "ens_expiration";
553
+ chainId: number;
554
+ reverseEnsName: string;
555
+ expirationDateIso: string;
556
+ reminderDelayInSeconds: number;
557
+ };
558
+ createdAt: string;
559
+ isRead: boolean;
560
+ } | {
561
+ id: string;
562
+ trigger_id: string;
563
+ chain_id: number;
564
+ unread: boolean;
565
+ created_at: string;
566
+ address: string;
567
+ type: TRIGGER_TYPES.LIDO_STAKING_REWARDS;
568
+ data: {
569
+ kind: "lido_staking_rewards";
570
+ chainId: number;
571
+ currentStethBalance: string;
572
+ currentEthValue: string;
573
+ estimatedTotalRewardInPeriod: string;
574
+ daysSinceLastNotification: number;
575
+ notificationIntervalDays: number;
576
+ };
577
+ createdAt: string;
578
+ isRead: boolean;
579
+ } | {
580
+ id: string;
581
+ trigger_id: string;
582
+ chain_id: number;
583
+ unread: boolean;
584
+ created_at: string;
585
+ address: string;
586
+ type: TRIGGER_TYPES.ROCKETPOOL_STAKING_REWARDS;
587
+ data: {
588
+ kind: "rocketpool_staking_rewards";
589
+ chainId: number;
590
+ currentRethBalance: string;
591
+ currentEthValue: string;
592
+ estimatedTotalRewardInPeriod: string;
593
+ daysSinceLastNotification: number;
594
+ notificationIntervalDays: number;
595
+ };
596
+ createdAt: string;
597
+ isRead: boolean;
598
+ } | {
599
+ id: string;
600
+ trigger_id: string;
601
+ chain_id: number;
602
+ unread: boolean;
603
+ created_at: string;
604
+ address: string;
605
+ type: TRIGGER_TYPES.NOTIONAL_LOAN_EXPIRATION;
606
+ data: {
607
+ kind: "notional_loan_expiration";
608
+ chainId: number;
609
+ loans: {
610
+ amount: string;
611
+ symbol: string;
612
+ maturityDateIso: string;
613
+ }[];
614
+ reminderDelayInSeconds: number;
615
+ };
616
+ createdAt: string;
617
+ isRead: boolean;
618
+ } | {
619
+ id: string;
620
+ trigger_id: string;
621
+ chain_id: number;
622
+ unread: boolean;
623
+ created_at: string;
624
+ address: string;
625
+ type: TRIGGER_TYPES.SPARK_FI_HEALTH_FACTOR;
626
+ data: {
627
+ kind: "spark_fi_health_factor";
628
+ chainId: number;
629
+ healthFactor: string;
630
+ threshold: string;
631
+ };
632
+ createdAt: string;
633
+ isRead: boolean;
634
+ } | {
635
+ type: TRIGGER_TYPES.SNAP;
636
+ data: import("../types/snaps/index.cjs").RawSnapNotificationData;
637
+ readDate: string | null;
638
+ id: string;
639
+ createdAt: string;
640
+ isRead: boolean;
641
+ })[];
19
642
  //# sourceMappingURL=process-notifications.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"process-notifications.d.cts","sourceRoot":"","sources":["../../../src/NotificationServicesController/processors/process-notifications.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,aAAa,EACb,oBAAoB,EACrB,+CAA2C;AAiB5C;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,oBAAoB,EAClC,iBAAiB,GAAE,MAAM,EAAO,GAC/B,aAAa,CAuBf;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,YAAY,EAAE,oBAAoB,EAClC,iBAAiB,GAAE,MAAM,EAAO,GAC/B,aAAa,GAAG,SAAS,CAU3B"}
1
+ {"version":3,"file":"process-notifications.d.cts","sourceRoot":"","sources":["../../../src/NotificationServicesController/processors/process-notifications.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,6CAAyC;AAEjE,OAAO,KAAK,EACV,aAAa,EACb,oBAAoB,EACrB,+CAA2C;AAiB5C;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,oBAAoB,EAClC,iBAAiB,GAAE,MAAM,EAAO,GAC/B,aAAa,CAuBf;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,YAAY,EAAE,oBAAoB,EAClC,iBAAiB,GAAE,MAAM,EAAO,GAC/B,aAAa,GAAG,SAAS,CAU3B;AAGD,eAAO,MAAM,6BAA6B,OACpC,oBAAoB,EAAE,WACjB,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAC2D,CAAC"}