@metamask-previews/profile-sync-controller 29.0.0-preview-3e34650c2 → 29.0.0-preview-4f4c98e

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 (541) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/dist/controllers/authentication/{AuthenticationController-method-action-types.d.mts → AuthenticationController-method-action-types.d.ts} +2 -2
  3. package/dist/controllers/authentication/AuthenticationController-method-action-types.d.ts.map +1 -0
  4. package/dist/controllers/authentication/{AuthenticationController-method-action-types.mjs → AuthenticationController-method-action-types.js} +1 -1
  5. package/dist/controllers/authentication/AuthenticationController-method-action-types.js.map +1 -0
  6. package/dist/controllers/authentication/{AuthenticationController.d.mts → AuthenticationController.d.ts} +10 -10
  7. package/dist/controllers/authentication/AuthenticationController.d.ts.map +1 -0
  8. package/dist/controllers/authentication/{AuthenticationController.mjs → AuthenticationController.js} +11 -11
  9. package/dist/controllers/authentication/AuthenticationController.js.map +1 -0
  10. package/dist/controllers/authentication/{index.d.cts → index.d.ts} +5 -5
  11. package/dist/controllers/authentication/index.d.ts.map +1 -0
  12. package/dist/controllers/authentication/index.js +6 -0
  13. package/dist/controllers/authentication/index.js.map +1 -0
  14. package/dist/controllers/authentication/mocks/index.d.ts +2 -0
  15. package/dist/controllers/authentication/mocks/index.d.ts.map +1 -0
  16. package/dist/controllers/authentication/mocks/index.js +2 -0
  17. package/dist/controllers/authentication/mocks/index.js.map +1 -0
  18. package/dist/controllers/authentication/mocks/{mockResponses.d.mts → mockResponses.d.ts} +1 -1
  19. package/dist/controllers/authentication/mocks/mockResponses.d.ts.map +1 -0
  20. package/dist/controllers/authentication/mocks/{mockResponses.mjs → mockResponses.js} +2 -2
  21. package/dist/controllers/authentication/mocks/mockResponses.js.map +1 -0
  22. package/dist/controllers/index.d.ts +3 -0
  23. package/dist/controllers/index.d.ts.map +1 -0
  24. package/dist/controllers/index.js +3 -0
  25. package/dist/controllers/index.js.map +1 -0
  26. package/dist/controllers/user-storage/{UserStorageController-method-action-types.d.mts → UserStorageController-method-action-types.d.ts} +2 -2
  27. package/dist/controllers/user-storage/UserStorageController-method-action-types.d.ts.map +1 -0
  28. package/dist/controllers/user-storage/{UserStorageController-method-action-types.mjs → UserStorageController-method-action-types.js} +1 -1
  29. package/dist/controllers/user-storage/UserStorageController-method-action-types.js.map +1 -0
  30. package/dist/controllers/user-storage/{UserStorageController.d.cts → UserStorageController.d.ts} +14 -14
  31. package/dist/controllers/user-storage/UserStorageController.d.ts.map +1 -0
  32. package/dist/controllers/user-storage/{UserStorageController.mjs → UserStorageController.js} +15 -15
  33. package/dist/controllers/user-storage/UserStorageController.js.map +1 -0
  34. package/dist/controllers/user-storage/constants.d.ts +15 -0
  35. package/dist/controllers/user-storage/constants.d.ts.map +1 -0
  36. package/dist/controllers/user-storage/{constants.mjs → constants.js} +1 -1
  37. package/dist/controllers/user-storage/constants.js.map +1 -0
  38. package/dist/controllers/user-storage/contact-syncing/{constants.d.cts → constants.d.ts} +1 -1
  39. package/dist/controllers/user-storage/contact-syncing/constants.d.ts.map +1 -0
  40. package/dist/controllers/user-storage/contact-syncing/{constants.mjs → constants.js} +1 -1
  41. package/dist/controllers/user-storage/contact-syncing/constants.js.map +1 -0
  42. package/dist/controllers/user-storage/contact-syncing/{controller-integration.d.cts → controller-integration.d.ts} +3 -3
  43. package/dist/controllers/user-storage/contact-syncing/controller-integration.d.ts.map +1 -0
  44. package/dist/controllers/user-storage/contact-syncing/{controller-integration.mjs → controller-integration.js} +6 -6
  45. package/dist/controllers/user-storage/contact-syncing/controller-integration.js.map +1 -0
  46. package/dist/controllers/user-storage/contact-syncing/{setup-subscriptions.d.cts → setup-subscriptions.d.ts} +2 -2
  47. package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.d.ts.map +1 -0
  48. package/dist/controllers/user-storage/contact-syncing/{setup-subscriptions.mjs → setup-subscriptions.js} +4 -4
  49. package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.js.map +1 -0
  50. package/dist/controllers/user-storage/contact-syncing/{sync-utils.d.cts → sync-utils.d.ts} +2 -2
  51. package/dist/controllers/user-storage/contact-syncing/sync-utils.d.ts.map +1 -0
  52. package/dist/controllers/user-storage/contact-syncing/{sync-utils.mjs → sync-utils.js} +1 -1
  53. package/dist/controllers/user-storage/contact-syncing/sync-utils.js.map +1 -0
  54. package/dist/controllers/user-storage/contact-syncing/{types.d.cts → types.d.ts} +6 -6
  55. package/dist/controllers/user-storage/contact-syncing/types.d.ts.map +1 -0
  56. package/dist/controllers/user-storage/contact-syncing/types.js +2 -0
  57. package/dist/controllers/user-storage/contact-syncing/types.js.map +1 -0
  58. package/dist/controllers/user-storage/contact-syncing/{utils.d.mts → utils.d.ts} +3 -3
  59. package/dist/controllers/user-storage/contact-syncing/utils.d.ts.map +1 -0
  60. package/dist/controllers/user-storage/contact-syncing/{utils.mjs → utils.js} +2 -2
  61. package/dist/controllers/user-storage/contact-syncing/utils.js.map +1 -0
  62. package/dist/controllers/user-storage/{index.d.cts → index.d.ts} +8 -8
  63. package/dist/controllers/user-storage/index.d.ts.map +1 -0
  64. package/dist/controllers/user-storage/index.js +9 -0
  65. package/dist/controllers/user-storage/index.js.map +1 -0
  66. package/dist/controllers/user-storage/mocks/index.d.ts +3 -0
  67. package/dist/controllers/user-storage/mocks/index.d.ts.map +1 -0
  68. package/dist/controllers/user-storage/mocks/index.js +3 -0
  69. package/dist/controllers/user-storage/mocks/index.js.map +1 -0
  70. package/dist/controllers/user-storage/mocks/{mockResponses.d.mts → mockResponses.d.ts} +3 -3
  71. package/dist/controllers/user-storage/mocks/mockResponses.d.ts.map +1 -0
  72. package/dist/controllers/user-storage/mocks/{mockResponses.mjs → mockResponses.js} +4 -4
  73. package/dist/controllers/user-storage/mocks/mockResponses.js.map +1 -0
  74. package/dist/controllers/user-storage/mocks/{mockStorage.d.cts → mockStorage.d.ts} +1 -1
  75. package/dist/controllers/user-storage/mocks/mockStorage.d.ts.map +1 -0
  76. package/dist/controllers/user-storage/mocks/{mockStorage.mjs → mockStorage.js} +2 -2
  77. package/dist/controllers/user-storage/mocks/mockStorage.js.map +1 -0
  78. package/dist/controllers/user-storage/{types.d.cts → types.d.ts} +3 -3
  79. package/dist/controllers/user-storage/types.d.ts.map +1 -0
  80. package/dist/controllers/user-storage/types.js +2 -0
  81. package/dist/controllers/user-storage/types.js.map +1 -0
  82. package/dist/controllers/user-storage/{utils.d.cts → utils.d.ts} +1 -1
  83. package/dist/controllers/user-storage/utils.d.ts.map +1 -0
  84. package/dist/controllers/user-storage/{utils.mjs → utils.js} +1 -1
  85. package/dist/controllers/user-storage/utils.js.map +1 -0
  86. package/dist/index.d.ts +4 -0
  87. package/dist/index.d.ts.map +1 -0
  88. package/dist/index.js +4 -0
  89. package/dist/index.js.map +1 -0
  90. package/dist/sdk/authentication-jwt-bearer/{flow-siwe.d.cts → flow-siwe.d.ts} +2 -2
  91. package/dist/sdk/authentication-jwt-bearer/flow-siwe.d.ts.map +1 -0
  92. package/dist/sdk/authentication-jwt-bearer/{flow-siwe.mjs → flow-siwe.js} +5 -5
  93. package/dist/sdk/authentication-jwt-bearer/flow-siwe.js.map +1 -0
  94. package/dist/sdk/authentication-jwt-bearer/{flow-srp.d.cts → flow-srp.d.ts} +5 -5
  95. package/dist/sdk/authentication-jwt-bearer/flow-srp.d.ts.map +1 -0
  96. package/dist/sdk/authentication-jwt-bearer/{flow-srp.mjs → flow-srp.js} +8 -8
  97. package/dist/sdk/authentication-jwt-bearer/flow-srp.js.map +1 -0
  98. package/dist/sdk/authentication-jwt-bearer/{services.d.cts → services.d.ts} +5 -5
  99. package/dist/sdk/authentication-jwt-bearer/services.d.ts.map +1 -0
  100. package/dist/sdk/authentication-jwt-bearer/{services.mjs → services.js} +6 -6
  101. package/dist/sdk/authentication-jwt-bearer/services.js.map +1 -0
  102. package/dist/sdk/authentication-jwt-bearer/{types.d.cts → types.d.ts} +2 -2
  103. package/dist/sdk/authentication-jwt-bearer/types.d.ts.map +1 -0
  104. package/dist/sdk/authentication-jwt-bearer/{types.mjs → types.js} +1 -1
  105. package/dist/sdk/authentication-jwt-bearer/types.js.map +1 -0
  106. package/dist/sdk/authentication-jwt-bearer/utils/{identifier.d.cts → identifier.d.ts} +2 -2
  107. package/dist/sdk/authentication-jwt-bearer/utils/identifier.d.ts.map +1 -0
  108. package/dist/sdk/authentication-jwt-bearer/utils/{identifier.mjs → identifier.js} +2 -2
  109. package/dist/sdk/authentication-jwt-bearer/utils/identifier.js.map +1 -0
  110. package/dist/sdk/authentication-jwt-bearer/utils/{time.d.cts → time.d.ts} +1 -1
  111. package/dist/sdk/authentication-jwt-bearer/utils/time.d.ts.map +1 -0
  112. package/dist/sdk/authentication-jwt-bearer/utils/{time.mjs → time.js} +1 -1
  113. package/dist/sdk/authentication-jwt-bearer/utils/time.js.map +1 -0
  114. package/dist/sdk/{authentication.d.cts → authentication.d.ts} +9 -9
  115. package/dist/sdk/authentication.d.ts.map +1 -0
  116. package/dist/sdk/{authentication.mjs → authentication.js} +9 -9
  117. package/dist/sdk/authentication.js.map +1 -0
  118. package/dist/sdk/{constants.d.cts → constants.d.ts} +1 -1
  119. package/dist/sdk/constants.d.ts.map +1 -0
  120. package/dist/sdk/{constants.mjs → constants.js} +1 -1
  121. package/dist/sdk/constants.js.map +1 -0
  122. package/dist/sdk/{errors.d.cts → errors.d.ts} +1 -1
  123. package/dist/sdk/errors.d.ts.map +1 -0
  124. package/dist/sdk/{errors.mjs → errors.js} +2 -2
  125. package/dist/sdk/errors.js.map +1 -0
  126. package/dist/sdk/index.d.ts +8 -0
  127. package/dist/sdk/index.d.ts.map +1 -0
  128. package/dist/sdk/index.js +8 -0
  129. package/dist/sdk/index.js.map +1 -0
  130. package/dist/sdk/mocks/{auth.d.cts → auth.d.ts} +2 -2
  131. package/dist/sdk/mocks/auth.d.ts.map +1 -0
  132. package/dist/sdk/mocks/{auth.mjs → auth.js} +3 -3
  133. package/dist/sdk/mocks/auth.js.map +1 -0
  134. package/dist/sdk/mocks/{userstorage.d.cts → userstorage.d.ts} +1 -1
  135. package/dist/sdk/mocks/userstorage.d.ts.map +1 -0
  136. package/dist/sdk/mocks/{userstorage.mjs → userstorage.js} +5 -5
  137. package/dist/sdk/mocks/userstorage.js.map +1 -0
  138. package/dist/sdk/{user-storage.d.mts → user-storage.d.ts} +5 -5
  139. package/dist/sdk/user-storage.d.ts.map +1 -0
  140. package/dist/sdk/{user-storage.mjs → user-storage.js} +6 -6
  141. package/dist/sdk/user-storage.js.map +1 -0
  142. package/dist/sdk/utils/{eip-6963-metamask-provider.d.cts → eip-6963-metamask-provider.d.ts} +2 -2
  143. package/dist/sdk/utils/eip-6963-metamask-provider.d.ts.map +1 -0
  144. package/dist/sdk/utils/{eip-6963-metamask-provider.mjs → eip-6963-metamask-provider.js} +1 -1
  145. package/dist/sdk/utils/eip-6963-metamask-provider.js.map +1 -0
  146. package/dist/sdk/utils/{messaging-signing-snap-requests.d.cts → messaging-signing-snap-requests.d.ts} +2 -2
  147. package/dist/sdk/utils/messaging-signing-snap-requests.d.ts.map +1 -0
  148. package/dist/sdk/utils/{messaging-signing-snap-requests.mjs → messaging-signing-snap-requests.js} +1 -1
  149. package/dist/sdk/utils/messaging-signing-snap-requests.js.map +1 -0
  150. package/dist/sdk/utils/{validate-login-response.d.mts → validate-login-response.d.ts} +2 -2
  151. package/dist/sdk/utils/validate-login-response.d.ts.map +1 -0
  152. package/dist/sdk/utils/{validate-login-response.mjs → validate-login-response.js} +1 -1
  153. package/dist/sdk/utils/validate-login-response.js.map +1 -0
  154. package/dist/sdk/utils/{validate-pair-response.d.cts → validate-pair-response.d.ts} +1 -1
  155. package/dist/sdk/utils/validate-pair-response.d.ts.map +1 -0
  156. package/dist/sdk/utils/{validate-pair-response.mjs → validate-pair-response.js} +1 -1
  157. package/dist/sdk/utils/validate-pair-response.js.map +1 -0
  158. package/dist/shared/encryption/{cache.d.cts → cache.d.ts} +1 -1
  159. package/dist/shared/encryption/cache.d.ts.map +1 -0
  160. package/dist/shared/encryption/{cache.mjs → cache.js} +3 -3
  161. package/dist/shared/encryption/cache.js.map +1 -0
  162. package/dist/shared/encryption/{constants.d.cts → constants.d.ts} +2 -2
  163. package/dist/shared/encryption/constants.d.ts.map +1 -0
  164. package/dist/shared/encryption/{constants.mjs → constants.js} +1 -1
  165. package/dist/shared/encryption/constants.js.map +1 -0
  166. package/dist/shared/encryption/{encryption.d.cts → encryption.d.ts} +3 -3
  167. package/dist/shared/encryption/encryption.d.ts.map +1 -0
  168. package/dist/shared/encryption/{encryption.mjs → encryption.js} +9 -9
  169. package/dist/shared/encryption/encryption.js.map +1 -0
  170. package/dist/shared/encryption/index.d.ts +5 -0
  171. package/dist/shared/encryption/index.d.ts.map +1 -0
  172. package/dist/shared/encryption/index.js +5 -0
  173. package/dist/shared/encryption/index.js.map +1 -0
  174. package/dist/shared/encryption/{utils.d.cts → utils.d.ts} +3 -3
  175. package/dist/shared/encryption/utils.d.ts.map +1 -0
  176. package/dist/shared/encryption/{utils.mjs → utils.js} +1 -1
  177. package/dist/shared/encryption/utils.js.map +1 -0
  178. package/dist/shared/{env.d.cts → env.d.ts} +1 -1
  179. package/dist/shared/env.d.ts.map +1 -0
  180. package/dist/shared/{env.mjs → env.js} +1 -1
  181. package/dist/shared/env.js.map +1 -0
  182. package/dist/shared/{storage-schema.d.mts → storage-schema.d.ts} +1 -1
  183. package/dist/shared/storage-schema.d.ts.map +1 -0
  184. package/dist/shared/{storage-schema.mjs → storage-schema.js} +2 -2
  185. package/dist/shared/storage-schema.js.map +1 -0
  186. package/dist/shared/types/{encryption.d.cts → encryption.d.ts} +1 -1
  187. package/dist/shared/types/encryption.d.ts.map +1 -0
  188. package/dist/shared/types/encryption.js +2 -0
  189. package/dist/shared/types/encryption.js.map +1 -0
  190. package/dist/shared/types/{services.d.cts → services.d.ts} +2 -2
  191. package/dist/shared/types/services.d.ts.map +1 -0
  192. package/dist/shared/types/services.js +2 -0
  193. package/dist/shared/types/services.js.map +1 -0
  194. package/dist/shared/utils/{entropy-source.d.cts → entropy-source.d.ts} +2 -2
  195. package/dist/shared/utils/entropy-source.d.ts.map +1 -0
  196. package/dist/shared/utils/{entropy-source.mjs → entropy-source.js} +2 -2
  197. package/dist/shared/utils/entropy-source.js.map +1 -0
  198. package/dist/shared/utils/{event-queue.d.cts → event-queue.d.ts} +1 -1
  199. package/dist/shared/utils/event-queue.d.ts.map +1 -0
  200. package/dist/shared/utils/{event-queue.mjs → event-queue.js} +1 -1
  201. package/dist/shared/utils/event-queue.js.map +1 -0
  202. package/dist/shared/utils/{hd-keyring-seed.d.mts → hd-keyring-seed.d.ts} +3 -3
  203. package/dist/shared/utils/hd-keyring-seed.d.ts.map +1 -0
  204. package/dist/shared/utils/{hd-keyring-seed.mjs → hd-keyring-seed.js} +1 -1
  205. package/dist/shared/utils/hd-keyring-seed.js.map +1 -0
  206. package/dist/shared/utils/{message-signing.d.mts → message-signing.d.ts} +1 -1
  207. package/dist/shared/utils/message-signing.d.ts.map +1 -0
  208. package/dist/shared/utils/{message-signing.mjs → message-signing.js} +7 -7
  209. package/dist/shared/utils/message-signing.js.map +1 -0
  210. package/package.json +22 -56
  211. package/dist/controllers/authentication/AuthenticationController-method-action-types.cjs +0 -7
  212. package/dist/controllers/authentication/AuthenticationController-method-action-types.cjs.map +0 -1
  213. package/dist/controllers/authentication/AuthenticationController-method-action-types.d.cts +0 -102
  214. package/dist/controllers/authentication/AuthenticationController-method-action-types.d.cts.map +0 -1
  215. package/dist/controllers/authentication/AuthenticationController-method-action-types.d.mts.map +0 -1
  216. package/dist/controllers/authentication/AuthenticationController-method-action-types.mjs.map +0 -1
  217. package/dist/controllers/authentication/AuthenticationController.cjs +0 -489
  218. package/dist/controllers/authentication/AuthenticationController.cjs.map +0 -1
  219. package/dist/controllers/authentication/AuthenticationController.d.cts +0 -130
  220. package/dist/controllers/authentication/AuthenticationController.d.cts.map +0 -1
  221. package/dist/controllers/authentication/AuthenticationController.d.mts.map +0 -1
  222. package/dist/controllers/authentication/AuthenticationController.mjs.map +0 -1
  223. package/dist/controllers/authentication/index.cjs +0 -35
  224. package/dist/controllers/authentication/index.cjs.map +0 -1
  225. package/dist/controllers/authentication/index.d.cts.map +0 -1
  226. package/dist/controllers/authentication/index.d.mts +0 -7
  227. package/dist/controllers/authentication/index.d.mts.map +0 -1
  228. package/dist/controllers/authentication/index.mjs +0 -6
  229. package/dist/controllers/authentication/index.mjs.map +0 -1
  230. package/dist/controllers/authentication/mocks/index.cjs +0 -18
  231. package/dist/controllers/authentication/mocks/index.cjs.map +0 -1
  232. package/dist/controllers/authentication/mocks/index.d.cts +0 -2
  233. package/dist/controllers/authentication/mocks/index.d.cts.map +0 -1
  234. package/dist/controllers/authentication/mocks/index.d.mts +0 -2
  235. package/dist/controllers/authentication/mocks/index.d.mts.map +0 -1
  236. package/dist/controllers/authentication/mocks/index.mjs +0 -2
  237. package/dist/controllers/authentication/mocks/index.mjs.map +0 -1
  238. package/dist/controllers/authentication/mocks/mockResponses.cjs +0 -126
  239. package/dist/controllers/authentication/mocks/mockResponses.cjs.map +0 -1
  240. package/dist/controllers/authentication/mocks/mockResponses.d.cts +0 -58
  241. package/dist/controllers/authentication/mocks/mockResponses.d.cts.map +0 -1
  242. package/dist/controllers/authentication/mocks/mockResponses.d.mts.map +0 -1
  243. package/dist/controllers/authentication/mocks/mockResponses.mjs.map +0 -1
  244. package/dist/controllers/index.cjs +0 -29
  245. package/dist/controllers/index.cjs.map +0 -1
  246. package/dist/controllers/index.d.cts +0 -3
  247. package/dist/controllers/index.d.cts.map +0 -1
  248. package/dist/controllers/index.d.mts +0 -3
  249. package/dist/controllers/index.d.mts.map +0 -1
  250. package/dist/controllers/index.mjs +0 -3
  251. package/dist/controllers/index.mjs.map +0 -1
  252. package/dist/controllers/user-storage/UserStorageController-method-action-types.cjs +0 -7
  253. package/dist/controllers/user-storage/UserStorageController-method-action-types.cjs.map +0 -1
  254. package/dist/controllers/user-storage/UserStorageController-method-action-types.d.cts +0 -137
  255. package/dist/controllers/user-storage/UserStorageController-method-action-types.d.cts.map +0 -1
  256. package/dist/controllers/user-storage/UserStorageController-method-action-types.d.mts.map +0 -1
  257. package/dist/controllers/user-storage/UserStorageController-method-action-types.mjs.map +0 -1
  258. package/dist/controllers/user-storage/UserStorageController.cjs +0 -412
  259. package/dist/controllers/user-storage/UserStorageController.cjs.map +0 -1
  260. package/dist/controllers/user-storage/UserStorageController.d.cts.map +0 -1
  261. package/dist/controllers/user-storage/UserStorageController.d.mts +0 -182
  262. package/dist/controllers/user-storage/UserStorageController.d.mts.map +0 -1
  263. package/dist/controllers/user-storage/UserStorageController.mjs.map +0 -1
  264. package/dist/controllers/user-storage/constants.cjs +0 -19
  265. package/dist/controllers/user-storage/constants.cjs.map +0 -1
  266. package/dist/controllers/user-storage/constants.d.cts +0 -15
  267. package/dist/controllers/user-storage/constants.d.cts.map +0 -1
  268. package/dist/controllers/user-storage/constants.d.mts +0 -15
  269. package/dist/controllers/user-storage/constants.d.mts.map +0 -1
  270. package/dist/controllers/user-storage/constants.mjs.map +0 -1
  271. package/dist/controllers/user-storage/contact-syncing/constants.cjs +0 -12
  272. package/dist/controllers/user-storage/contact-syncing/constants.cjs.map +0 -1
  273. package/dist/controllers/user-storage/contact-syncing/constants.d.cts.map +0 -1
  274. package/dist/controllers/user-storage/contact-syncing/constants.d.mts +0 -9
  275. package/dist/controllers/user-storage/contact-syncing/constants.d.mts.map +0 -1
  276. package/dist/controllers/user-storage/contact-syncing/constants.mjs.map +0 -1
  277. package/dist/controllers/user-storage/contact-syncing/controller-integration.cjs +0 -346
  278. package/dist/controllers/user-storage/contact-syncing/controller-integration.cjs.map +0 -1
  279. package/dist/controllers/user-storage/contact-syncing/controller-integration.d.cts.map +0 -1
  280. package/dist/controllers/user-storage/contact-syncing/controller-integration.d.mts +0 -47
  281. package/dist/controllers/user-storage/contact-syncing/controller-integration.d.mts.map +0 -1
  282. package/dist/controllers/user-storage/contact-syncing/controller-integration.mjs.map +0 -1
  283. package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.cjs +0 -50
  284. package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.cjs.map +0 -1
  285. package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.d.cts.map +0 -1
  286. package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.d.mts +0 -8
  287. package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.d.mts.map +0 -1
  288. package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.mjs.map +0 -1
  289. package/dist/controllers/user-storage/contact-syncing/sync-utils.cjs +0 -23
  290. package/dist/controllers/user-storage/contact-syncing/sync-utils.cjs.map +0 -1
  291. package/dist/controllers/user-storage/contact-syncing/sync-utils.d.cts.map +0 -1
  292. package/dist/controllers/user-storage/contact-syncing/sync-utils.d.mts +0 -9
  293. package/dist/controllers/user-storage/contact-syncing/sync-utils.d.mts.map +0 -1
  294. package/dist/controllers/user-storage/contact-syncing/sync-utils.mjs.map +0 -1
  295. package/dist/controllers/user-storage/contact-syncing/types.cjs +0 -3
  296. package/dist/controllers/user-storage/contact-syncing/types.cjs.map +0 -1
  297. package/dist/controllers/user-storage/contact-syncing/types.d.cts.map +0 -1
  298. package/dist/controllers/user-storage/contact-syncing/types.d.mts +0 -37
  299. package/dist/controllers/user-storage/contact-syncing/types.d.mts.map +0 -1
  300. package/dist/controllers/user-storage/contact-syncing/types.mjs +0 -2
  301. package/dist/controllers/user-storage/contact-syncing/types.mjs.map +0 -1
  302. package/dist/controllers/user-storage/contact-syncing/utils.cjs +0 -64
  303. package/dist/controllers/user-storage/contact-syncing/utils.cjs.map +0 -1
  304. package/dist/controllers/user-storage/contact-syncing/utils.d.cts +0 -36
  305. package/dist/controllers/user-storage/contact-syncing/utils.d.cts.map +0 -1
  306. package/dist/controllers/user-storage/contact-syncing/utils.d.mts.map +0 -1
  307. package/dist/controllers/user-storage/contact-syncing/utils.mjs.map +0 -1
  308. package/dist/controllers/user-storage/index.cjs +0 -38
  309. package/dist/controllers/user-storage/index.cjs.map +0 -1
  310. package/dist/controllers/user-storage/index.d.cts.map +0 -1
  311. package/dist/controllers/user-storage/index.d.mts +0 -10
  312. package/dist/controllers/user-storage/index.d.mts.map +0 -1
  313. package/dist/controllers/user-storage/index.mjs +0 -9
  314. package/dist/controllers/user-storage/index.mjs.map +0 -1
  315. package/dist/controllers/user-storage/mocks/index.cjs +0 -19
  316. package/dist/controllers/user-storage/mocks/index.cjs.map +0 -1
  317. package/dist/controllers/user-storage/mocks/index.d.cts +0 -3
  318. package/dist/controllers/user-storage/mocks/index.d.cts.map +0 -1
  319. package/dist/controllers/user-storage/mocks/index.d.mts +0 -3
  320. package/dist/controllers/user-storage/mocks/index.d.mts.map +0 -1
  321. package/dist/controllers/user-storage/mocks/index.mjs +0 -3
  322. package/dist/controllers/user-storage/mocks/index.mjs.map +0 -1
  323. package/dist/controllers/user-storage/mocks/mockResponses.cjs +0 -113
  324. package/dist/controllers/user-storage/mocks/mockResponses.cjs.map +0 -1
  325. package/dist/controllers/user-storage/mocks/mockResponses.d.cts +0 -66
  326. package/dist/controllers/user-storage/mocks/mockResponses.d.cts.map +0 -1
  327. package/dist/controllers/user-storage/mocks/mockResponses.d.mts.map +0 -1
  328. package/dist/controllers/user-storage/mocks/mockResponses.mjs.map +0 -1
  329. package/dist/controllers/user-storage/mocks/mockStorage.cjs +0 -36
  330. package/dist/controllers/user-storage/mocks/mockStorage.cjs.map +0 -1
  331. package/dist/controllers/user-storage/mocks/mockStorage.d.cts.map +0 -1
  332. package/dist/controllers/user-storage/mocks/mockStorage.d.mts +0 -5
  333. package/dist/controllers/user-storage/mocks/mockStorage.d.mts.map +0 -1
  334. package/dist/controllers/user-storage/mocks/mockStorage.mjs.map +0 -1
  335. package/dist/controllers/user-storage/types.cjs +0 -3
  336. package/dist/controllers/user-storage/types.cjs.map +0 -1
  337. package/dist/controllers/user-storage/types.d.cts.map +0 -1
  338. package/dist/controllers/user-storage/types.d.mts +0 -23
  339. package/dist/controllers/user-storage/types.d.mts.map +0 -1
  340. package/dist/controllers/user-storage/types.mjs +0 -2
  341. package/dist/controllers/user-storage/types.mjs.map +0 -1
  342. package/dist/controllers/user-storage/utils.cjs +0 -32
  343. package/dist/controllers/user-storage/utils.cjs.map +0 -1
  344. package/dist/controllers/user-storage/utils.d.cts.map +0 -1
  345. package/dist/controllers/user-storage/utils.d.mts +0 -19
  346. package/dist/controllers/user-storage/utils.d.mts.map +0 -1
  347. package/dist/controllers/user-storage/utils.mjs.map +0 -1
  348. package/dist/index.cjs +0 -30
  349. package/dist/index.cjs.map +0 -1
  350. package/dist/index.d.cts +0 -4
  351. package/dist/index.d.cts.map +0 -1
  352. package/dist/index.d.mts +0 -4
  353. package/dist/index.d.mts.map +0 -1
  354. package/dist/index.mjs +0 -4
  355. package/dist/index.mjs.map +0 -1
  356. package/dist/sdk/authentication-jwt-bearer/flow-siwe.cjs +0 -114
  357. package/dist/sdk/authentication-jwt-bearer/flow-siwe.cjs.map +0 -1
  358. package/dist/sdk/authentication-jwt-bearer/flow-siwe.d.cts.map +0 -1
  359. package/dist/sdk/authentication-jwt-bearer/flow-siwe.d.mts +0 -25
  360. package/dist/sdk/authentication-jwt-bearer/flow-siwe.d.mts.map +0 -1
  361. package/dist/sdk/authentication-jwt-bearer/flow-siwe.mjs.map +0 -1
  362. package/dist/sdk/authentication-jwt-bearer/flow-srp.cjs +0 -290
  363. package/dist/sdk/authentication-jwt-bearer/flow-srp.cjs.map +0 -1
  364. package/dist/sdk/authentication-jwt-bearer/flow-srp.d.cts.map +0 -1
  365. package/dist/sdk/authentication-jwt-bearer/flow-srp.d.mts +0 -44
  366. package/dist/sdk/authentication-jwt-bearer/flow-srp.d.mts.map +0 -1
  367. package/dist/sdk/authentication-jwt-bearer/flow-srp.mjs.map +0 -1
  368. package/dist/sdk/authentication-jwt-bearer/services.cjs +0 -400
  369. package/dist/sdk/authentication-jwt-bearer/services.cjs.map +0 -1
  370. package/dist/sdk/authentication-jwt-bearer/services.d.cts.map +0 -1
  371. package/dist/sdk/authentication-jwt-bearer/services.d.mts +0 -105
  372. package/dist/sdk/authentication-jwt-bearer/services.d.mts.map +0 -1
  373. package/dist/sdk/authentication-jwt-bearer/services.mjs.map +0 -1
  374. package/dist/sdk/authentication-jwt-bearer/types.cjs +0 -12
  375. package/dist/sdk/authentication-jwt-bearer/types.cjs.map +0 -1
  376. package/dist/sdk/authentication-jwt-bearer/types.d.cts.map +0 -1
  377. package/dist/sdk/authentication-jwt-bearer/types.d.mts +0 -114
  378. package/dist/sdk/authentication-jwt-bearer/types.d.mts.map +0 -1
  379. package/dist/sdk/authentication-jwt-bearer/types.mjs.map +0 -1
  380. package/dist/sdk/authentication-jwt-bearer/utils/identifier.cjs +0 -27
  381. package/dist/sdk/authentication-jwt-bearer/utils/identifier.cjs.map +0 -1
  382. package/dist/sdk/authentication-jwt-bearer/utils/identifier.d.cts.map +0 -1
  383. package/dist/sdk/authentication-jwt-bearer/utils/identifier.d.mts +0 -13
  384. package/dist/sdk/authentication-jwt-bearer/utils/identifier.d.mts.map +0 -1
  385. package/dist/sdk/authentication-jwt-bearer/utils/identifier.mjs.map +0 -1
  386. package/dist/sdk/authentication-jwt-bearer/utils/time.cjs +0 -17
  387. package/dist/sdk/authentication-jwt-bearer/utils/time.cjs.map +0 -1
  388. package/dist/sdk/authentication-jwt-bearer/utils/time.d.cts.map +0 -1
  389. package/dist/sdk/authentication-jwt-bearer/utils/time.d.mts +0 -8
  390. package/dist/sdk/authentication-jwt-bearer/utils/time.d.mts.map +0 -1
  391. package/dist/sdk/authentication-jwt-bearer/utils/time.mjs.map +0 -1
  392. package/dist/sdk/authentication.cjs +0 -132
  393. package/dist/sdk/authentication.cjs.map +0 -1
  394. package/dist/sdk/authentication.d.cts.map +0 -1
  395. package/dist/sdk/authentication.d.mts +0 -38
  396. package/dist/sdk/authentication.d.mts.map +0 -1
  397. package/dist/sdk/authentication.mjs.map +0 -1
  398. package/dist/sdk/constants.cjs +0 -7
  399. package/dist/sdk/constants.cjs.map +0 -1
  400. package/dist/sdk/constants.d.cts.map +0 -1
  401. package/dist/sdk/constants.d.mts +0 -4
  402. package/dist/sdk/constants.d.mts.map +0 -1
  403. package/dist/sdk/constants.mjs.map +0 -1
  404. package/dist/sdk/errors.cjs +0 -76
  405. package/dist/sdk/errors.cjs.map +0 -1
  406. package/dist/sdk/errors.d.cts.map +0 -1
  407. package/dist/sdk/errors.d.mts +0 -34
  408. package/dist/sdk/errors.d.mts.map +0 -1
  409. package/dist/sdk/errors.mjs.map +0 -1
  410. package/dist/sdk/index.cjs +0 -24
  411. package/dist/sdk/index.cjs.map +0 -1
  412. package/dist/sdk/index.d.cts +0 -8
  413. package/dist/sdk/index.d.cts.map +0 -1
  414. package/dist/sdk/index.d.mts +0 -8
  415. package/dist/sdk/index.d.mts.map +0 -1
  416. package/dist/sdk/index.mjs +0 -8
  417. package/dist/sdk/index.mjs.map +0 -1
  418. package/dist/sdk/mocks/auth.cjs +0 -82
  419. package/dist/sdk/mocks/auth.cjs.map +0 -1
  420. package/dist/sdk/mocks/auth.d.cts.map +0 -1
  421. package/dist/sdk/mocks/auth.d.mts +0 -69
  422. package/dist/sdk/mocks/auth.d.mts.map +0 -1
  423. package/dist/sdk/mocks/auth.mjs.map +0 -1
  424. package/dist/sdk/mocks/userstorage.cjs +0 -43
  425. package/dist/sdk/mocks/userstorage.cjs.map +0 -1
  426. package/dist/sdk/mocks/userstorage.d.cts.map +0 -1
  427. package/dist/sdk/mocks/userstorage.d.mts +0 -10
  428. package/dist/sdk/mocks/userstorage.d.mts.map +0 -1
  429. package/dist/sdk/mocks/userstorage.mjs.map +0 -1
  430. package/dist/sdk/user-storage.cjs +0 -386
  431. package/dist/sdk/user-storage.cjs.map +0 -1
  432. package/dist/sdk/user-storage.d.cts +0 -47
  433. package/dist/sdk/user-storage.d.cts.map +0 -1
  434. package/dist/sdk/user-storage.d.mts.map +0 -1
  435. package/dist/sdk/user-storage.mjs.map +0 -1
  436. package/dist/sdk/utils/eip-6963-metamask-provider.cjs +0 -70
  437. package/dist/sdk/utils/eip-6963-metamask-provider.cjs.map +0 -1
  438. package/dist/sdk/utils/eip-6963-metamask-provider.d.cts.map +0 -1
  439. package/dist/sdk/utils/eip-6963-metamask-provider.d.mts +0 -25
  440. package/dist/sdk/utils/eip-6963-metamask-provider.d.mts.map +0 -1
  441. package/dist/sdk/utils/eip-6963-metamask-provider.mjs.map +0 -1
  442. package/dist/sdk/utils/messaging-signing-snap-requests.cjs +0 -96
  443. package/dist/sdk/utils/messaging-signing-snap-requests.cjs.map +0 -1
  444. package/dist/sdk/utils/messaging-signing-snap-requests.d.cts.map +0 -1
  445. package/dist/sdk/utils/messaging-signing-snap-requests.d.mts +0 -41
  446. package/dist/sdk/utils/messaging-signing-snap-requests.d.mts.map +0 -1
  447. package/dist/sdk/utils/messaging-signing-snap-requests.mjs.map +0 -1
  448. package/dist/sdk/utils/validate-login-response.cjs +0 -49
  449. package/dist/sdk/utils/validate-login-response.cjs.map +0 -1
  450. package/dist/sdk/utils/validate-login-response.d.cts +0 -14
  451. package/dist/sdk/utils/validate-login-response.d.cts.map +0 -1
  452. package/dist/sdk/utils/validate-login-response.d.mts.map +0 -1
  453. package/dist/sdk/utils/validate-login-response.mjs.map +0 -1
  454. package/dist/sdk/utils/validate-pair-response.cjs +0 -29
  455. package/dist/sdk/utils/validate-pair-response.cjs.map +0 -1
  456. package/dist/sdk/utils/validate-pair-response.d.cts.map +0 -1
  457. package/dist/sdk/utils/validate-pair-response.d.mts +0 -26
  458. package/dist/sdk/utils/validate-pair-response.d.mts.map +0 -1
  459. package/dist/sdk/utils/validate-pair-response.mjs.map +0 -1
  460. package/dist/shared/encryption/cache.cjs +0 -77
  461. package/dist/shared/encryption/cache.cjs.map +0 -1
  462. package/dist/shared/encryption/cache.d.cts.map +0 -1
  463. package/dist/shared/encryption/cache.d.mts +0 -32
  464. package/dist/shared/encryption/cache.d.mts.map +0 -1
  465. package/dist/shared/encryption/cache.mjs.map +0 -1
  466. package/dist/shared/encryption/constants.cjs +0 -17
  467. package/dist/shared/encryption/constants.cjs.map +0 -1
  468. package/dist/shared/encryption/constants.d.cts.map +0 -1
  469. package/dist/shared/encryption/constants.d.mts +0 -9
  470. package/dist/shared/encryption/constants.d.mts.map +0 -1
  471. package/dist/shared/encryption/constants.mjs.map +0 -1
  472. package/dist/shared/encryption/encryption.cjs +0 -209
  473. package/dist/shared/encryption/encryption.cjs.map +0 -1
  474. package/dist/shared/encryption/encryption.d.cts.map +0 -1
  475. package/dist/shared/encryption/encryption.d.mts +0 -30
  476. package/dist/shared/encryption/encryption.d.mts.map +0 -1
  477. package/dist/shared/encryption/encryption.mjs.map +0 -1
  478. package/dist/shared/encryption/index.cjs +0 -25
  479. package/dist/shared/encryption/index.cjs.map +0 -1
  480. package/dist/shared/encryption/index.d.cts +0 -5
  481. package/dist/shared/encryption/index.d.cts.map +0 -1
  482. package/dist/shared/encryption/index.d.mts +0 -5
  483. package/dist/shared/encryption/index.d.mts.map +0 -1
  484. package/dist/shared/encryption/index.mjs +0 -5
  485. package/dist/shared/encryption/index.mjs.map +0 -1
  486. package/dist/shared/encryption/utils.cjs +0 -21
  487. package/dist/shared/encryption/utils.cjs.map +0 -1
  488. package/dist/shared/encryption/utils.d.cts.map +0 -1
  489. package/dist/shared/encryption/utils.d.mts +0 -5
  490. package/dist/shared/encryption/utils.d.mts.map +0 -1
  491. package/dist/shared/encryption/utils.mjs.map +0 -1
  492. package/dist/shared/env.cjs +0 -85
  493. package/dist/shared/env.cjs.map +0 -1
  494. package/dist/shared/env.d.cts.map +0 -1
  495. package/dist/shared/env.d.mts +0 -34
  496. package/dist/shared/env.d.mts.map +0 -1
  497. package/dist/shared/env.mjs.map +0 -1
  498. package/dist/shared/storage-schema.cjs +0 -42
  499. package/dist/shared/storage-schema.cjs.map +0 -1
  500. package/dist/shared/storage-schema.d.cts +0 -34
  501. package/dist/shared/storage-schema.d.cts.map +0 -1
  502. package/dist/shared/storage-schema.d.mts.map +0 -1
  503. package/dist/shared/storage-schema.mjs.map +0 -1
  504. package/dist/shared/types/encryption.cjs +0 -3
  505. package/dist/shared/types/encryption.cjs.map +0 -1
  506. package/dist/shared/types/encryption.d.cts.map +0 -1
  507. package/dist/shared/types/encryption.d.mts +0 -2
  508. package/dist/shared/types/encryption.d.mts.map +0 -1
  509. package/dist/shared/types/encryption.mjs +0 -2
  510. package/dist/shared/types/encryption.mjs.map +0 -1
  511. package/dist/shared/types/services.cjs +0 -3
  512. package/dist/shared/types/services.cjs.map +0 -1
  513. package/dist/shared/types/services.d.cts.map +0 -1
  514. package/dist/shared/types/services.d.mts +0 -17
  515. package/dist/shared/types/services.d.mts.map +0 -1
  516. package/dist/shared/types/services.mjs +0 -2
  517. package/dist/shared/types/services.mjs.map +0 -1
  518. package/dist/shared/utils/entropy-source.cjs +0 -37
  519. package/dist/shared/utils/entropy-source.cjs.map +0 -1
  520. package/dist/shared/utils/entropy-source.d.cts.map +0 -1
  521. package/dist/shared/utils/entropy-source.d.mts +0 -22
  522. package/dist/shared/utils/entropy-source.d.mts.map +0 -1
  523. package/dist/shared/utils/entropy-source.mjs.map +0 -1
  524. package/dist/shared/utils/event-queue.cjs +0 -24
  525. package/dist/shared/utils/event-queue.cjs.map +0 -1
  526. package/dist/shared/utils/event-queue.d.cts.map +0 -1
  527. package/dist/shared/utils/event-queue.d.mts +0 -6
  528. package/dist/shared/utils/event-queue.d.mts.map +0 -1
  529. package/dist/shared/utils/event-queue.mjs.map +0 -1
  530. package/dist/shared/utils/hd-keyring-seed.cjs +0 -49
  531. package/dist/shared/utils/hd-keyring-seed.cjs.map +0 -1
  532. package/dist/shared/utils/hd-keyring-seed.d.cts +0 -27
  533. package/dist/shared/utils/hd-keyring-seed.d.cts.map +0 -1
  534. package/dist/shared/utils/hd-keyring-seed.d.mts.map +0 -1
  535. package/dist/shared/utils/hd-keyring-seed.mjs.map +0 -1
  536. package/dist/shared/utils/message-signing.cjs +0 -147
  537. package/dist/shared/utils/message-signing.cjs.map +0 -1
  538. package/dist/shared/utils/message-signing.d.cts +0 -73
  539. package/dist/shared/utils/message-signing.d.cts.map +0 -1
  540. package/dist/shared/utils/message-signing.d.mts.map +0 -1
  541. package/dist/shared/utils/message-signing.mjs.map +0 -1
@@ -0,0 +1,15 @@
1
+ export declare const BACKUPANDSYNC_FEATURES: {
2
+ readonly main: 'main';
3
+ readonly accountSyncing: 'accountSyncing';
4
+ readonly contactSyncing: 'contactSyncing';
5
+ };
6
+ /**
7
+ * Trace names for UserStorage syncing operations
8
+ */
9
+ export declare const TraceName: {
10
+ readonly ContactSyncFull: 'Contact Sync Full';
11
+ readonly ContactSyncSaveBatch: 'Contact Sync Save Batch';
12
+ readonly ContactSyncUpdateRemote: 'Contact Sync Update Remote';
13
+ readonly ContactSyncDeleteRemote: 'Contact Sync Delete Remote';
14
+ };
15
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/controllers/user-storage/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB;aACjC,IAAI,EAAE,MAAM;aACZ,cAAc,EAAE,gBAAgB;aAChC,cAAc,EAAE,gBAAgB;CACxB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,SAAS;aAEpB,eAAe,EAAE,mBAAmB;aACpC,oBAAoB,EAAE,yBAAyB;aAC/C,uBAAuB,EAAE,4BAA4B;aACrD,uBAAuB,EAAE,4BAA4B;CAC7C,CAAC"}
@@ -13,4 +13,4 @@ export const TraceName = {
13
13
  ContactSyncUpdateRemote: 'Contact Sync Update Remote',
14
14
  ContactSyncDeleteRemote: 'Contact Sync Delete Remote',
15
15
  };
16
- //# sourceMappingURL=constants.mjs.map
16
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/controllers/user-storage/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,IAAI,EAAE,MAAM;IACZ,cAAc,EAAE,gBAAgB;IAChC,cAAc,EAAE,gBAAgB;CACxB,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,yBAAyB;IACzB,eAAe,EAAE,mBAAmB;IACpC,oBAAoB,EAAE,yBAAyB;IAC/C,uBAAuB,EAAE,4BAA4B;IACrD,uBAAuB,EAAE,4BAA4B;CAC7C,CAAC","sourcesContent":["export const BACKUPANDSYNC_FEATURES = {\n main: 'main',\n accountSyncing: 'accountSyncing',\n contactSyncing: 'contactSyncing',\n} as const;\n\n/**\n * Trace names for UserStorage syncing operations\n */\nexport const TraceName = {\n // Contact syncing traces\n ContactSyncFull: 'Contact Sync Full',\n ContactSyncSaveBatch: 'Contact Sync Save Batch',\n ContactSyncUpdateRemote: 'Contact Sync Update Remote',\n ContactSyncDeleteRemote: 'Contact Sync Delete Remote',\n} as const;\n"]}
@@ -6,4 +6,4 @@ export declare const USER_STORAGE_VERSION_KEY = "v";
6
6
  * Current version of User Storage schema
7
7
  */
8
8
  export declare const USER_STORAGE_VERSION = "1";
9
- //# sourceMappingURL=constants.d.cts.map
9
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/controllers/user-storage/contact-syncing/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,oBAAoB,MAAM,CAAC"}
@@ -6,4 +6,4 @@ export const USER_STORAGE_VERSION_KEY = 'v';
6
6
  * Current version of User Storage schema
7
7
  */
8
8
  export const USER_STORAGE_VERSION = '1';
9
- //# sourceMappingURL=constants.mjs.map
9
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/controllers/user-storage/contact-syncing/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAE5C;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAC","sourcesContent":["/**\n * Key for version in User Storage schema\n */\nexport const USER_STORAGE_VERSION_KEY = 'v';\n\n/**\n * Current version of User Storage schema\n */\nexport const USER_STORAGE_VERSION = '1';\n"]}
@@ -1,5 +1,5 @@
1
- import type { AddressBookEntry } from "@metamask/address-book-controller";
2
- import type { ContactSyncingOptions } from "./types.cjs";
1
+ import type { AddressBookEntry } from '@metamask/address-book-controller';
2
+ import type { ContactSyncingOptions } from './types.js';
3
3
  export type SyncContactsWithUserStorageConfig = {
4
4
  onContactSyncErroneousSituation?: (errorMessage: string, sentryContext?: Record<string, unknown>) => void;
5
5
  onContactUpdated?: () => void;
@@ -44,4 +44,4 @@ export declare function updateContactInRemoteStorage(contact: AddressBookEntry,
44
44
  * @returns Promise that resolves when the contact is marked as deleted
45
45
  */
46
46
  export declare function deleteContactInRemoteStorage(contact: AddressBookEntry, options: ContactSyncingOptions): Promise<void>;
47
- //# sourceMappingURL=controller-integration.d.cts.map
47
+ //# sourceMappingURL=controller-integration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controller-integration.d.ts","sourceRoot":"","sources":["../../../../src/controllers/user-storage/contact-syncing/controller-integration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAK1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AASxD,MAAM,MAAM,iCAAiC,GAAG;IAC9C,+BAA+B,CAAC,EAAE,CAChC,YAAY,EAAE,MAAM,EACpB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KACpC,IAAI,CAAC;IACV,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B,CAAC;AAeF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,2BAA2B,CAC/C,MAAM,EAAE,iCAAiC,EACzC,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,IAAI,CAAC,CAsNf;AAmFD;;;;;;;GAOG;AACH,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,IAAI,CAAC,CAgDf;AAED;;;;;;;GAOG;AACH,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,IAAI,CAAC,CAuDf"}
@@ -1,8 +1,8 @@
1
- import { USER_STORAGE_FEATURE_NAMES } from "../../../shared/storage-schema.mjs";
2
- import { TraceName } from "../constants.mjs";
3
- import { canPerformContactSyncing } from "./sync-utils.mjs";
4
- import { mapAddressBookEntryToUserStorageEntry, mapUserStorageEntryToAddressBookEntry } from "./utils.mjs";
5
- import { isContactBridgedFromAccounts } from "./utils.mjs";
1
+ import { USER_STORAGE_FEATURE_NAMES } from '../../../shared/storage-schema.js';
2
+ import { TraceName } from '../constants.js';
3
+ import { canPerformContactSyncing } from './sync-utils.js';
4
+ import { mapAddressBookEntryToUserStorageEntry, mapUserStorageEntryToAddressBookEntry, } from './utils.js';
5
+ import { isContactBridgedFromAccounts } from './utils.js';
6
6
  /**
7
7
  * Creates a unique key for a contact based on chainId and address
8
8
  *
@@ -337,4 +337,4 @@ export async function deleteContactInRemoteStorage(contact, options) {
337
337
  ? await trace({ name: TraceName.ContactSyncDeleteRemote }, deleteContact)
338
338
  : await deleteContact();
339
339
  }
340
- //# sourceMappingURL=controller-integration.mjs.map
340
+ //# sourceMappingURL=controller-integration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controller-integration.js","sourceRoot":"","sources":["../../../../src/controllers/user-storage/contact-syncing/controller-integration.ts"],"names":[],"mappings":"AAE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AC,OAAO,CAAC,CAAC;QAEtC,IAAI,CAAC;YACH,wCAAwC;YACxC,MAAM,mBAAmB,GACvB,MAAM,gCAAgC,EAAE,CAAC,iBAAiB,CACxD,GAAG,0BAA0B,CAAC,WAAW,IAAI,GAAG,EAAE,CACnD,CAAC;YAEJ,IAAI,mBAAmB,EAAE,CAAC;gBACxB,uCAAuC;gBACvC,MAAM,oBAAoB,GAAG,IAAI,CAAC,KAAK,CACrC,mBAAmB,CACO,CAAC;gBAC7B,MAAM,eAAe,GACnB,qCAAqC,CAAC,oBAAoB,CAAC,CAAC;gBAE9D,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;gBACvB,MAAM,cAAc,GAAG;oBACrB,GAAG,eAAe;oBAClB,SAAS,EAAE,GAAG;oBACd,aAAa,EAAE,GAAG;iBACK,CAAC;gBAE1B,MAAM,mBAAmB,GACvB,qCAAqC,CAAC,cAAc,CAAC,CAAC;gBAExD,2CAA2C;gBAC3C,MAAM,gCAAgC,EAAE,CAAC,iBAAiB,CACxD,GAAG,0BAA0B,CAAC,WAAW,IAAI,GAAG,EAAE,EAClD,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC,CACpC,CAAC;YACJ,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,yEAAyE;YACzE,OAAO,CAAC,IAAI,CAAC,mDAAmD,EAAE,GAAG,CAAC,CAAC;QACzE,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,KAAK;QACV,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,uBAAuB,EAAE,EAAE,aAAa,CAAC;QACzE,CAAC,CAAC,MAAM,aAAa,EAAE,CAAC;AAC5B,CAAC","sourcesContent":["import type { AddressBookEntry } from '@metamask/address-book-controller';\n\nimport { USER_STORAGE_FEATURE_NAMES } from '../../../shared/storage-schema.js';\nimport { TraceName } from '../constants.js';\nimport { canPerformContactSyncing } from './sync-utils.js';\nimport type { ContactSyncingOptions } from './types.js';\nimport type { UserStorageContactEntry } from './types.js';\nimport type { SyncAddressBookEntry } from './utils.js';\nimport {\n mapAddressBookEntryToUserStorageEntry,\n mapUserStorageEntryToAddressBookEntry,\n} from './utils.js';\nimport { isContactBridgedFromAccounts } from './utils.js';\n\nexport type SyncContactsWithUserStorageConfig = {\n onContactSyncErroneousSituation?: (\n errorMessage: string,\n sentryContext?: Record<string, unknown>,\n ) => void;\n onContactUpdated?: () => void;\n onContactDeleted?: () => void;\n};\n\n/**\n * Creates a unique key for a contact based on chainId and address\n *\n * @param contact - The contact to create a key for\n * @returns A unique string key\n */\nfunction createContactKey(contact: AddressBookEntry): string {\n if (!contact.address) {\n throw new Error('Contact address is required to create storage key');\n }\n return `${contact.chainId}_${contact.address.toLowerCase()}`;\n}\n\n/**\n * Syncs contacts between local storage and user storage (remote).\n *\n * Handles the following syncing scenarios:\n * 1. First Sync: When local contacts exist but there are no remote contacts, uploads all local contacts.\n * 2. New Device Sync: Downloads remote contacts that don't exist locally (empty local address book).\n * 3. Simple Merge: Ensures both sides (local & remote) have all contacts.\n * 4. Contact Naming Conflicts: When same contact has different names, uses most recent by timestamp.\n * 5. Local Updates: When a contact was updated locally, syncs changes to remote if local is newer.\n * 6. Remote Updates: When a contact was updated remotely, applies changes locally if remote is newer.\n * 7. Local Deletions: Handled by real-time event handlers (deleteContactInRemoteStorage) to prevent false positives.\n * 8. Remote Deletions: When a contact was deleted remotely, applies deletion locally.\n * 9. Concurrent Updates: Resolves conflicts using timestamps to determine the winner.\n * 10. Restore After Delete: If a contact is modified after being deleted, restores it.\n * 11. ChainId Differences: Treats same address on different chains as separate contacts.\n *\n * @param config - Parameters used for syncing callbacks\n * @param options - Parameters used for syncing operations\n * @returns Promise that resolves when contact synchronization is complete\n */\nexport async function syncContactsWithUserStorage(\n config: SyncContactsWithUserStorageConfig,\n options: ContactSyncingOptions,\n): Promise<void> {\n const { getMessenger, getUserStorageControllerInstance, trace } = options;\n const {\n onContactSyncErroneousSituation,\n onContactUpdated,\n onContactDeleted,\n } = config;\n\n // Cannot perform sync, conditions not met\n if (!canPerformContactSyncing(options)) {\n return;\n }\n\n // NOTE: Pre-sync operations (canPerformContactSyncing, AddressBookController:list, getRemoteContacts)\n // are intentionally outside try-catch to let errors bubble up to Sentry for better debugging.\n // Only \"erroneous situation\" errors during sync logic itself should be caught.\n\n // Get all local contacts from AddressBookController (exclude chain \"*\" contacts)\n const localVisibleContacts =\n getMessenger()\n .call('AddressBookController:list')\n .filter((contact) => !isContactBridgedFromAccounts(contact))\n .filter(\n (contact) => contact.address && contact.chainId && contact.name?.trim(),\n ) || [];\n\n // Get remote contacts from user storage API\n const remoteContacts = await getRemoteContacts(options);\n\n // Filter remote contacts to exclude invalid ones (or empty array if no remote contacts)\n const validRemoteContacts =\n remoteContacts?.filter(\n (contact) => contact.address && contact.chainId && contact.name?.trim(),\n ) || [];\n\n const performSync = async () => {\n try {\n // Activate sync semaphore to prevent event loops\n await getUserStorageControllerInstance().setIsContactSyncingInProgress(\n true,\n );\n\n // Prepare maps for efficient lookup\n const localContactsMap = new Map<string, AddressBookEntry>();\n const remoteContactsMap = new Map<string, SyncAddressBookEntry>();\n\n localVisibleContacts.forEach((contact) => {\n const key = createContactKey(contact);\n localContactsMap.set(key, contact);\n });\n\n validRemoteContacts.forEach((contact) => {\n const key = createContactKey(contact);\n remoteContactsMap.set(key, contact);\n });\n\n // Lists to track contacts that need to be synced\n const contactsToAddOrUpdateLocally: SyncAddressBookEntry[] = [];\n const contactsToDeleteLocally: SyncAddressBookEntry[] = [];\n const contactsToUpdateRemotely: AddressBookEntry[] = [];\n\n // SCENARIO 2 & 6: Process remote contacts - handle new device sync and remote updates\n for (const remoteContact of validRemoteContacts) {\n const key = createContactKey(remoteContact);\n const localContact = localContactsMap.get(key);\n\n // Handle remote contact based on its status and local existence\n if (remoteContact.deletedAt) {\n // SCENARIO 8: Remote deletion - should be applied locally if contact exists locally\n if (localContact) {\n contactsToDeleteLocally.push(remoteContact);\n }\n } else if (!localContact) {\n // SCENARIO 2: New contact from remote - import to local\n contactsToAddOrUpdateLocally.push(remoteContact);\n } else {\n // SCENARIO 4 & 6: Contact exists on both sides - check for conflicts\n const hasContentDifference =\n localContact.name !== remoteContact.name ||\n localContact.memo !== remoteContact.memo;\n\n if (hasContentDifference) {\n // Check timestamps to determine which version to keep\n const localTimestamp = localContact.lastUpdatedAt || 0;\n const remoteTimestamp = remoteContact.lastUpdatedAt || 0;\n\n if (localTimestamp >= remoteTimestamp) {\n // Local is newer (or same age) - use local version\n contactsToUpdateRemotely.push(localContact);\n } else {\n // Remote is newer - use remote version\n contactsToAddOrUpdateLocally.push(remoteContact);\n }\n }\n\n // Else: content is identical, no action needed\n }\n }\n\n // SCENARIO 1, 3 & 5: Process local contacts not in remote - handles first sync and new local contacts\n for (const localContact of localVisibleContacts) {\n const key = createContactKey(localContact);\n const remoteContact = remoteContactsMap.get(key);\n\n if (!remoteContact) {\n // New local contact or first sync - add to remote\n contactsToUpdateRemotely.push(localContact);\n }\n }\n\n // Apply local deletions\n // Note: Individual errors are intentionally NOT caught here to ensure they reach Sentry\n // for debugging. Previous versions silently suppressed these errors which made\n // troubleshooting contact sync issues difficult.\n for (const contact of contactsToDeleteLocally) {\n getMessenger().call(\n 'AddressBookController:delete',\n contact.chainId,\n contact.address,\n );\n\n if (onContactDeleted) {\n onContactDeleted();\n }\n }\n\n // Apply local additions/updates\n // Note: Individual errors are intentionally NOT caught here to ensure they reach Sentry\n // for debugging. Previous versions silently suppressed these errors which made\n // troubleshooting contact sync issues difficult.\n for (const contact of contactsToAddOrUpdateLocally) {\n if (!contact.deletedAt) {\n getMessenger().call(\n 'AddressBookController:set',\n contact.address,\n contact.name || '',\n contact.chainId,\n contact.memo || '',\n contact.addressType,\n );\n\n if (onContactUpdated) {\n onContactUpdated();\n }\n }\n }\n\n // Apply changes to remote storage\n if (contactsToUpdateRemotely.length > 0) {\n const updatedRemoteContacts: Record<string, SyncAddressBookEntry> = {};\n for (const localContact of contactsToUpdateRemotely) {\n const key = createContactKey(localContact);\n updatedRemoteContacts[key] = {\n ...remoteContactsMap.get(key), // Start with an existing remote contact if it exists\n ...localContact, // override with local changes\n lastUpdatedAt: Date.now(), // mark as updated\n };\n }\n // Save updated contacts to remote storage\n await saveContactsToUserStorage(\n Object.values(updatedRemoteContacts),\n options,\n );\n }\n } catch (error) {\n if (onContactSyncErroneousSituation) {\n onContactSyncErroneousSituation('Error synchronizing contacts', {\n error,\n });\n\n // Re-throw the error to be handled by the caller\n throw error;\n }\n } finally {\n await getUserStorageControllerInstance().setIsContactSyncingInProgress(\n false,\n );\n }\n };\n\n if (trace) {\n // Gather pre-sync metrics for performance analysis\n const initialLocalContacts = localVisibleContacts;\n const initialValidRemoteContacts = validRemoteContacts;\n\n await trace(\n {\n name: TraceName.ContactSyncFull,\n data: {\n localContactCount: initialLocalContacts.length,\n remoteContactCount: initialValidRemoteContacts.length,\n isFirstSync:\n initialValidRemoteContacts.length === 0 &&\n initialLocalContacts.length > 0,\n isNewDeviceSync:\n initialLocalContacts.length === 0 &&\n initialValidRemoteContacts.length > 0,\n isRegularSync:\n initialLocalContacts.length > 0 &&\n initialValidRemoteContacts.length > 0,\n hasDataToSync:\n initialLocalContacts.length > 0 ||\n initialValidRemoteContacts.length > 0,\n expectedWorkload:\n initialLocalContacts.length + initialValidRemoteContacts.length,\n },\n },\n performSync,\n );\n\n return;\n }\n\n await performSync();\n}\n\n/**\n * Retrieves remote contacts from user storage API\n *\n * @param options - Parameters used for retrieving remote contacts\n * @returns Array of contacts from remote storage, or null if none found\n */\nasync function getRemoteContacts(\n options: ContactSyncingOptions,\n): Promise<SyncAddressBookEntry[] | null> {\n const { getUserStorageControllerInstance } = options;\n\n try {\n const remoteContactsJsonArray =\n await getUserStorageControllerInstance().performGetStorageAllFeatureEntries(\n USER_STORAGE_FEATURE_NAMES.addressBook,\n );\n\n if (!remoteContactsJsonArray || remoteContactsJsonArray.length === 0) {\n return null;\n }\n\n // Parse each JSON entry and convert from UserStorageContactEntry to AddressBookEntry\n const remoteStorageEntries = remoteContactsJsonArray.map((contactJson) => {\n const entry = JSON.parse(contactJson) as UserStorageContactEntry;\n return mapUserStorageEntryToAddressBookEntry(entry);\n });\n\n return remoteStorageEntries;\n } catch {\n return null;\n }\n}\n\n/**\n * Saves local contacts to user storage\n *\n * @param contacts - The contacts to save to user storage\n * @param options - Parameters used for saving contacts\n * @returns Promise that resolves when contacts are saved\n */\nasync function saveContactsToUserStorage(\n contacts: AddressBookEntry[],\n options: ContactSyncingOptions,\n): Promise<void> {\n const { getUserStorageControllerInstance, trace } = options;\n\n const saveContacts = async () => {\n if (!contacts || contacts.length === 0) {\n return;\n }\n\n // Convert each AddressBookEntry to UserStorageContactEntry format and create key-value pairs\n const storageEntries: [string, string][] = contacts.map((contact) => {\n const key = createContactKey(contact);\n const storageEntry = mapAddressBookEntryToUserStorageEntry(contact);\n return [key, JSON.stringify(storageEntry)];\n });\n\n await getUserStorageControllerInstance().performBatchSetStorage(\n USER_STORAGE_FEATURE_NAMES.addressBook,\n storageEntries,\n );\n };\n\n return trace\n ? await trace(\n {\n name: TraceName.ContactSyncSaveBatch,\n data: {\n contactCount: contacts.length,\n // Performance scaling indicators\n hasBatchOperations: contacts.length > 1,\n chainCount: new Set(contacts.map((c) => c.chainId)).size,\n hasMemosCount: contacts.filter((c) => c.memo?.length).length,\n },\n },\n saveContacts,\n )\n : await saveContacts();\n}\n\n/**\n * Updates a single contact in remote storage without performing a full sync\n * This is used when a contact is updated locally to efficiently push changes to remote\n *\n * @param contact - The contact that was updated locally\n * @param options - Parameters used for syncing operations\n * @returns Promise that resolves when the contact is updated\n */\nexport async function updateContactInRemoteStorage(\n contact: AddressBookEntry,\n options: ContactSyncingOptions,\n): Promise<void> {\n const { trace } = options;\n\n const updateContact = async () => {\n if (\n !canPerformContactSyncing(options) ||\n !contact.address ||\n !contact.chainId ||\n !contact.name?.trim()\n ) {\n return;\n }\n\n const { getUserStorageControllerInstance } = options;\n\n // Create an updated entry with timestamp\n const updatedEntry = {\n ...contact,\n lastUpdatedAt: contact.lastUpdatedAt || Date.now(),\n } as SyncAddressBookEntry;\n\n const key = createContactKey(contact);\n const storageEntry = mapAddressBookEntryToUserStorageEntry(updatedEntry);\n\n // Save individual contact to remote storage\n await getUserStorageControllerInstance().performSetStorage(\n `${USER_STORAGE_FEATURE_NAMES.addressBook}.${key}`,\n JSON.stringify(storageEntry),\n );\n };\n\n if (trace) {\n return await trace(\n {\n name: TraceName.ContactSyncUpdateRemote,\n data: {\n chainId: contact.chainId,\n // Performance indicators\n hasTimestamp: Boolean(contact.lastUpdatedAt),\n hasMemo: Boolean(contact.memo?.length),\n isUpdate: Boolean(contact.lastUpdatedAt), // vs new contact\n },\n },\n updateContact,\n );\n }\n\n return await updateContact();\n}\n\n/**\n * Marks a single contact as deleted in remote storage without performing a full sync\n * This is used when a contact is deleted locally to efficiently push the deletion to remote\n *\n * @param contact - The contact that was deleted locally (contains at least address and chainId)\n * @param options - Parameters used for syncing operations\n * @returns Promise that resolves when the contact is marked as deleted\n */\nexport async function deleteContactInRemoteStorage(\n contact: AddressBookEntry,\n options: ContactSyncingOptions,\n): Promise<void> {\n const { trace } = options;\n const deleteContact = async () => {\n if (\n !canPerformContactSyncing(options) ||\n !contact.address ||\n !contact.chainId ||\n !contact.name?.trim()\n ) {\n return;\n }\n\n const { getUserStorageControllerInstance } = options;\n const key = createContactKey(contact);\n\n try {\n // Try to get the existing contact first\n const existingContactJson =\n await getUserStorageControllerInstance().performGetStorage(\n `${USER_STORAGE_FEATURE_NAMES.addressBook}.${key}`,\n );\n\n if (existingContactJson) {\n // Mark the existing contact as deleted\n const existingStorageEntry = JSON.parse(\n existingContactJson,\n ) as UserStorageContactEntry;\n const existingContact =\n mapUserStorageEntryToAddressBookEntry(existingStorageEntry);\n\n const now = Date.now();\n const deletedContact = {\n ...existingContact,\n deletedAt: now,\n lastUpdatedAt: now,\n } as SyncAddressBookEntry;\n\n const deletedStorageEntry =\n mapAddressBookEntryToUserStorageEntry(deletedContact);\n\n // Save the deleted contact back to storage\n await getUserStorageControllerInstance().performSetStorage(\n `${USER_STORAGE_FEATURE_NAMES.addressBook}.${key}`,\n JSON.stringify(deletedStorageEntry),\n );\n }\n } catch {\n // If contact doesn't exist in remote storage, no need to mark as deleted\n console.warn('Contact not found in remote storage for deletion:', key);\n }\n };\n\n return trace\n ? await trace({ name: TraceName.ContactSyncDeleteRemote }, deleteContact)\n : await deleteContact();\n}\n"]}
@@ -1,8 +1,8 @@
1
- import type { ContactSyncingOptions } from "./types.cjs";
1
+ import type { ContactSyncingOptions } from './types.js';
2
2
  /**
3
3
  * Initialize and setup events to listen to for contact syncing
4
4
  *
5
5
  * @param options - parameters used for initializing and enabling contact syncing
6
6
  */
7
7
  export declare function setupContactSyncingSubscriptions(options: ContactSyncingOptions): void;
8
- //# sourceMappingURL=setup-subscriptions.d.cts.map
8
+ //# sourceMappingURL=setup-subscriptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup-subscriptions.d.ts","sourceRoot":"","sources":["../../../../src/controllers/user-storage/contact-syncing/setup-subscriptions.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAGxD;;;;GAIG;AACH,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,qBAAqB,GAC7B,IAAI,CAgDN"}
@@ -1,6 +1,6 @@
1
- import { updateContactInRemoteStorage, deleteContactInRemoteStorage } from "./controller-integration.mjs";
2
- import { canPerformContactSyncing } from "./sync-utils.mjs";
3
- import { isContactBridgedFromAccounts } from "./utils.mjs";
1
+ import { updateContactInRemoteStorage, deleteContactInRemoteStorage, } from './controller-integration.js';
2
+ import { canPerformContactSyncing } from './sync-utils.js';
3
+ import { isContactBridgedFromAccounts } from './utils.js';
4
4
  /**
5
5
  * Initialize and setup events to listen to for contact syncing
6
6
  *
@@ -43,4 +43,4 @@ export function setupContactSyncingSubscriptions(options) {
43
43
  })();
44
44
  });
45
45
  }
46
- //# sourceMappingURL=setup-subscriptions.mjs.map
46
+ //# sourceMappingURL=setup-subscriptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup-subscriptions.js","sourceRoot":"","sources":["../../../../src/controllers/user-storage/contact-syncing/setup-subscriptions.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAE1D;;;;GAIG;AACH,MAAM,UAAU,gCAAgC,CAC9C,OAA8B;IAE9B,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC;IAEjC,yEAAyE;IACzE,YAAY,EAAE,CAAC,SAAS,CACtB,sCAAsC,EACtC,CAAC,YAA8B,EAAE,EAAE;QACjC,mEAAmE;QACnE,CAAC,KAAK,IAAI,EAAE;YACV,IACE,CAAC,wBAAwB,CAAC,OAAO,CAAC;gBAClC,4BAA4B,CAAC,YAAY,CAAC,EAC1C,CAAC;gBACD,OAAO;YACT,CAAC;YAED,IAAI,CAAC;gBACH,sDAAsD;gBACtD,MAAM,4BAA4B,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;YAC5D,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,KAAK,CAAC,2CAA2C,EAAE,KAAK,CAAC,CAAC;YACpE,CAAC;QACH,CAAC,CAAC,EAAE,CAAC;IACP,CAAC,CACF,CAAC;IAEF,4EAA4E;IAC5E,YAAY,EAAE,CAAC,SAAS,CACtB,sCAAsC,EACtC,CAAC,YAA8B,EAAE,EAAE;QACjC,mEAAmE;QACnE,CAAC,KAAK,IAAI,EAAE;YACV,IACE,CAAC,wBAAwB,CAAC,OAAO,CAAC;gBAClC,4BAA4B,CAAC,YAAY,CAAC,EAC1C,CAAC;gBACD,OAAO;YACT,CAAC;YAED,IAAI,CAAC;gBACH,sDAAsD;gBACtD,MAAM,4BAA4B,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;YAC5D,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,KAAK,CAAC,6CAA6C,EAAE,KAAK,CAAC,CAAC;YACtE,CAAC;QACH,CAAC,CAAC,EAAE,CAAC;IACP,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["import type { AddressBookEntry } from '@metamask/address-book-controller';\n\nimport {\n updateContactInRemoteStorage,\n deleteContactInRemoteStorage,\n} from './controller-integration.js';\nimport { canPerformContactSyncing } from './sync-utils.js';\nimport type { ContactSyncingOptions } from './types.js';\nimport { isContactBridgedFromAccounts } from './utils.js';\n\n/**\n * Initialize and setup events to listen to for contact syncing\n *\n * @param options - parameters used for initializing and enabling contact syncing\n */\nexport function setupContactSyncingSubscriptions(\n options: ContactSyncingOptions,\n): void {\n const { getMessenger } = options;\n\n // Listen for contact updates and immediately sync the individual contact\n getMessenger().subscribe(\n 'AddressBookController:contactUpdated',\n (contactEntry: AddressBookEntry) => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n (async () => {\n if (\n !canPerformContactSyncing(options) ||\n isContactBridgedFromAccounts(contactEntry)\n ) {\n return;\n }\n\n try {\n // Use the targeted method to update just this contact\n await updateContactInRemoteStorage(contactEntry, options);\n } catch (error) {\n console.error('Error updating contact in remote storage:', error);\n }\n })();\n },\n );\n\n // Listen for contact deletions and immediately sync the individual deletion\n getMessenger().subscribe(\n 'AddressBookController:contactDeleted',\n (contactEntry: AddressBookEntry) => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n (async () => {\n if (\n !canPerformContactSyncing(options) ||\n isContactBridgedFromAccounts(contactEntry)\n ) {\n return;\n }\n\n try {\n // Use the targeted method to delete just this contact\n await deleteContactInRemoteStorage(contactEntry, options);\n } catch (error) {\n console.error('Error deleting contact from remote storage:', error);\n }\n })();\n },\n );\n}\n"]}
@@ -1,4 +1,4 @@
1
- import type { ContactSyncingOptions } from "./types.cjs";
1
+ import type { ContactSyncingOptions } from './types.js';
2
2
  /**
3
3
  * Check if we can perform contact syncing
4
4
  *
@@ -6,4 +6,4 @@ import type { ContactSyncingOptions } from "./types.cjs";
6
6
  * @returns whether we can perform contact syncing
7
7
  */
8
8
  export declare function canPerformContactSyncing(options: ContactSyncingOptions): boolean;
9
- //# sourceMappingURL=sync-utils.d.cts.map
9
+ //# sourceMappingURL=sync-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-utils.d.ts","sourceRoot":"","sources":["../../../../src/controllers/user-storage/contact-syncing/sync-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAsBT"}
@@ -16,4 +16,4 @@ export function canPerformContactSyncing(options) {
16
16
  }
17
17
  return true;
18
18
  }
19
- //# sourceMappingURL=sync-utils.mjs.map
19
+ //# sourceMappingURL=sync-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-utils.js","sourceRoot":"","sources":["../../../../src/controllers/user-storage/contact-syncing/sync-utils.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CACtC,OAA8B;IAE9B,MAAM,EAAE,YAAY,EAAE,gCAAgC,EAAE,GAAG,OAAO,CAAC;IAEnE,MAAM,EACJ,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,GAC3B,GAAG,gCAAgC,EAAE,CAAC,KAAK,CAAC;IAC7C,MAAM,aAAa,GAAG,YAAY,EAAE,CAAC,IAAI,CACvC,qCAAqC,CACtC,CAAC;IAEF,IACE,CAAC,sBAAsB;QACvB,CAAC,uBAAuB;QACxB,0BAA0B;QAC1B,CAAC,aAAa,EACd,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import type { ContactSyncingOptions } from './types.js';\n\n/**\n * Check if we can perform contact syncing\n *\n * @param options - parameters used for checking if we can perform contact syncing\n * @returns whether we can perform contact syncing\n */\nexport function canPerformContactSyncing(\n options: ContactSyncingOptions,\n): boolean {\n const { getMessenger, getUserStorageControllerInstance } = options;\n\n const {\n isBackupAndSyncEnabled,\n isContactSyncingEnabled,\n isContactSyncingInProgress,\n } = getUserStorageControllerInstance().state;\n const isAuthEnabled = getMessenger().call(\n 'AuthenticationController:isSignedIn',\n );\n\n if (\n !isBackupAndSyncEnabled ||\n !isContactSyncingEnabled ||\n isContactSyncingInProgress ||\n !isAuthEnabled\n ) {\n return false;\n }\n\n return true;\n}\n"]}
@@ -1,8 +1,8 @@
1
- import type { TraceCallback } from "@metamask/controller-utils";
2
- import type { Hex } from "@metamask/utils";
3
- import type { UserStorageControllerMessenger } from "../UserStorageController.cjs";
4
- import type { UserStorageController } from "../UserStorageController.cjs";
5
- import type { USER_STORAGE_VERSION_KEY, USER_STORAGE_VERSION } from "./constants.cjs";
1
+ import type { TraceCallback } from '@metamask/controller-utils';
2
+ import type { Hex } from '@metamask/utils';
3
+ import type { UserStorageControllerMessenger } from '../UserStorageController.js';
4
+ import type { UserStorageController } from '../UserStorageController.js';
5
+ import type { USER_STORAGE_VERSION_KEY, USER_STORAGE_VERSION } from './constants.js';
6
6
  export type UserStorageContactEntry = {
7
7
  /**
8
8
  * The Version 'v' of the User Storage.
@@ -34,4 +34,4 @@ export type ContactSyncingOptions = {
34
34
  getMessenger: () => UserStorageControllerMessenger;
35
35
  trace?: TraceCallback;
36
36
  };
37
- //# sourceMappingURL=types.d.cts.map
37
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/controllers/user-storage/contact-syncing/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAClF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,gBAAgB,CAAC;AAExB,MAAM,MAAM,uBAAuB,GAAG;IACpC;;;OAGG;IACH,CAAC,wBAAwB,CAAC,EAAE,OAAO,oBAAoB,CAAC;IACxD,qCAAqC;IACrC,CAAC,EAAE,MAAM,CAAC;IACV,kCAAkC;IAClC,CAAC,EAAE,MAAM,CAAC;IACV,qCAAqC;IACrC,CAAC,EAAE,GAAG,CAAC;IACP,6CAA6C;IAC7C,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,oDAAoD;IACpD,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,mDAAmD;IACnD,CAAC,CAAC,EAAE,OAAO,CAAC;IACZ,sDAAsD;IACtD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,6DAA6D;IAC7D,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;IAC9D,YAAY,EAAE,MAAM,8BAA8B,CAAC;IACnD,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/controllers/user-storage/contact-syncing/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TraceCallback } from '@metamask/controller-utils';\nimport type { Hex } from '@metamask/utils';\n\nimport type { UserStorageControllerMessenger } from '../UserStorageController.js';\nimport type { UserStorageController } from '../UserStorageController.js';\nimport type {\n USER_STORAGE_VERSION_KEY,\n USER_STORAGE_VERSION,\n} from './constants.js';\n\nexport type UserStorageContactEntry = {\n /**\n * The Version 'v' of the User Storage.\n * NOTE - will allow us to support upgrade/downgrades in the future\n */\n [USER_STORAGE_VERSION_KEY]: typeof USER_STORAGE_VERSION;\n /** the address 'a' of the contact */\n a: string;\n /** the name 'n' of the contact */\n n: string;\n /** the chainId 'c' of the contact */\n c: Hex;\n /** the memo 'm' of the contact (optional) */\n m?: string;\n /** the addressType 't' of the contact (optional) */\n t?: string;\n /** the isEns flag 'e' of the contact (optional) */\n e?: boolean;\n /** the lastUpdatedAt timestamp 'lu' of the contact */\n lu?: number;\n /** the deletedAt timestamp 'dt' of the contact (optional) */\n dt?: number;\n};\n\n/**\n * Options for contact syncing operations\n */\nexport type ContactSyncingOptions = {\n getUserStorageControllerInstance: () => UserStorageController;\n getMessenger: () => UserStorageControllerMessenger;\n trace?: TraceCallback;\n};\n"]}
@@ -1,5 +1,5 @@
1
- import type { AddressBookEntry } from "@metamask/address-book-controller";
2
- import type { UserStorageContactEntry } from "./types.mjs";
1
+ import type { AddressBookEntry } from '@metamask/address-book-controller';
2
+ import type { UserStorageContactEntry } from './types.js';
3
3
  /**
4
4
  * Extends AddressBookEntry with sync metadata
5
5
  * This is only used internally during the sync process and is not stored in AddressBookController
@@ -33,4 +33,4 @@ export declare const mapUserStorageEntryToAddressBookEntry: (userStorageEntry: U
33
33
  * @returns True if the contact is bridged from accounts
34
34
  */
35
35
  export declare const isContactBridgedFromAccounts: (contactEntry: AddressBookEntry) => boolean;
36
- //# sourceMappingURL=utils.d.mts.map
36
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/controllers/user-storage/contact-syncing/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAEjB,MAAM,mCAAmC,CAAC;AAG3C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAE1D;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,GAAG;IACpD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,qCAAqC,qBAC9B,gBAAgB,KACjC,uBAyBF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,qCAAqC,qBAC9B,uBAAuB,KACxC,oBAgBF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,iBACzB,gBAAgB,KAC7B,OAEF,CAAC"}
@@ -1,4 +1,4 @@
1
- import { USER_STORAGE_VERSION_KEY, USER_STORAGE_VERSION } from "./constants.mjs";
1
+ import { USER_STORAGE_VERSION_KEY, USER_STORAGE_VERSION } from './constants.js';
2
2
  /**
3
3
  * Map an address book entry to a user storage address book entry
4
4
  * Always sets a current timestamp for entries going to remote storage
@@ -55,4 +55,4 @@ export const mapUserStorageEntryToAddressBookEntry = (userStorageEntry) => {
55
55
  export const isContactBridgedFromAccounts = (contactEntry) => {
56
56
  return String(contactEntry.chainId) === '*';
57
57
  };
58
- //# sourceMappingURL=utils.mjs.map
58
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/controllers/user-storage/contact-syncing/utils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAYhF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG,CACnD,gBAAkC,EACT,EAAE;IAC3B,MAAM,EACJ,OAAO,EACP,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,WAAW,EACX,KAAK,EACL,aAAa,EACb,SAAS,GACV,GAAG,gBAAwC,CAAC;IAE7C,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,C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gBAAgB,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,gBAAgB,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACvE,CAAC;IAEF,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAC1C,YAA8B,EACrB,EAAE;IACX,OAAO,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC;AAC9C,CAAC,CAAC","sourcesContent":["import type {\n AddressBookEntry,\n AddressType,\n} from '@metamask/address-book-controller';\n\nimport { USER_STORAGE_VERSION_KEY, USER_STORAGE_VERSION } from './constants.js';\nimport type { UserStorageContactEntry } from './types.js';\n\n/**\n * Extends AddressBookEntry with sync metadata\n * This is only used internally during the sync process and is not stored in AddressBookController\n */\nexport type SyncAddressBookEntry = AddressBookEntry & {\n lastUpdatedAt?: number;\n deletedAt?: number;\n};\n\n/**\n * Map an address book entry to a user storage address book entry\n * Always sets a current timestamp for entries going to remote storage\n *\n * @param addressBookEntry - An address book entry\n * @returns A user storage address book entry\n */\nexport const mapAddressBookEntryToUserStorageEntry = (\n addressBookEntry: AddressBookEntry,\n): UserStorageContactEntry => {\n const {\n address,\n name,\n chainId,\n memo,\n addressType,\n isEns,\n lastUpdatedAt,\n deletedAt,\n } = addressBookEntry as SyncAddressBookEntry;\n\n const now = Date.now();\n\n return {\n [USER_STORAGE_VERSION_KEY]: USER_STORAGE_VERSION,\n a: address,\n n: name,\n c: chainId,\n ...(memo ? { m: memo } : {}),\n ...(addressType ? { t: addressType } : {}),\n ...(isEns ? { e: isEns } : {}),\n lu: lastUpdatedAt || now,\n ...(deletedAt ? { dt: deletedAt } : {}),\n };\n};\n\n/**\n * Map a user storage address book entry to an address book entry\n * Preserves sync metadata from remote storage while keeping the\n * entry compatible with AddressBookController\n *\n * @param userStorageEntry - A user storage address book entry\n * @returns An address book entry with sync metadata for internal use\n */\nexport const mapUserStorageEntryToAddressBookEntry = (\n userStorageEntry: UserStorageContactEntry,\n): SyncAddressBookEntry => {\n const addressBookEntry: SyncAddressBookEntry = {\n address: userStorageEntry.a,\n name: userStorageEntry.n,\n chainId: userStorageEntry.c,\n memo: userStorageEntry.m || '',\n isEns: userStorageEntry.e || false,\n ...(userStorageEntry.t\n ? { addressType: userStorageEntry.t as AddressType }\n : {}),\n // Include remote metadata for sync operation only (not stored in AddressBookController)\n ...(userStorageEntry.dt ? { deletedAt: userStorageEntry.dt } : {}),\n ...(userStorageEntry.lu ? { lastUpdatedAt: userStorageEntry.lu } : {}),\n };\n\n return addressBookEntry;\n};\n\n/**\n * Check if a contact entry is bridged from accounts\n * Contacts with chainId \"*\" are global accounts bridged from the accounts system\n *\n * @param contactEntry - The contact entry to check\n * @returns True if the contact is bridged from accounts\n */\nexport const isContactBridgedFromAccounts = (\n contactEntry: AddressBookEntry,\n): boolean => {\n return String(contactEntry.chainId) === '*';\n};\n"]}
@@ -1,10 +1,10 @@
1
- import { UserStorageController } from "./UserStorageController.cjs";
1
+ import { UserStorageController } from './UserStorageController.js';
2
2
  export { UserStorageController as Controller };
3
3
  export default UserStorageController;
4
- export * from "./UserStorageController.cjs";
5
- export * as Mocks from "./mocks/index.cjs";
6
- export * from "./constants.cjs";
7
- export * from "../../shared/encryption/index.cjs";
8
- export * from "../../shared/storage-schema.cjs";
9
- export type { UserStorageControllerPerformGetStorageAction, UserStorageControllerPerformGetStorageAllFeatureEntriesAction, UserStorageControllerPerformSetStorageAction, UserStorageControllerPerformBatchSetStorageAction, UserStorageControllerPerformDeleteStorageAction, UserStorageControllerPerformDeleteStorageAllFeatureEntriesAction, UserStorageControllerPerformBatchDeleteStorageAction, UserStorageControllerGetStorageKeyAction, UserStorageControllerListEntropySourcesAction, UserStorageControllerSetIsBackupAndSyncFeatureEnabledAction, UserStorageControllerSetIsContactSyncingInProgressAction, UserStorageControllerSyncContactsWithUserStorageAction, } from "./UserStorageController-method-action-types.cjs";
10
- //# sourceMappingURL=index.d.cts.map
4
+ export * from './UserStorageController.js';
5
+ export * as Mocks from './mocks/index.js';
6
+ export * from './constants.js';
7
+ export * from '../../shared/encryption/index.js';
8
+ export * from '../../shared/storage-schema.js';
9
+ export type { UserStorageControllerPerformGetStorageAction, UserStorageControllerPerformGetStorageAllFeatureEntriesAction, UserStorageControllerPerformSetStorageAction, UserStorageControllerPerformBatchSetStorageAction, UserStorageControllerPerformDeleteStorageAction, UserStorageControllerPerformDeleteStorageAllFeatureEntriesAction, UserStorageControllerPerformBatchDeleteStorageAction, UserStorageControllerGetStorageKeyAction, UserStorageControllerListEntropySourcesAction, UserStorageControllerSetIsBackupAndSyncFeatureEnabledAction, UserStorageControllerSetIsContactSyncingInProgressAction, UserStorageControllerSyncContactsWithUserStorageAction, } from './UserStorageController-method-action-types.js';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/controllers/user-storage/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,OAAO,EAAE,qBAAqB,IAAI,UAAU,EAAE,CAAC;eAChC,qBAAqB;AACpC,cAAc,4BAA4B,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,YAAY,EACV,4CAA4C,EAC5C,6DAA6D,EAC7D,4CAA4C,EAC5C,iDAAiD,EACjD,+CAA+C,EAC/C,gEAAgE,EAChE,oDAAoD,EACpD,wCAAwC,EACxC,6CAA6C,EAC7C,2DAA2D,EAC3D,wDAAwD,EACxD,sDAAsD,GACvD,MAAM,gDAAgD,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { UserStorageController } from './UserStorageController.js';
2
+ export { UserStorageController as Controller };
3
+ export default UserStorageController;
4
+ export * from './UserStorageController.js';
5
+ export * as Mocks from './mocks/index.js';
6
+ export * from './constants.js';
7
+ export * from '../../shared/encryption/index.js';
8
+ export * from '../../shared/storage-schema.js';
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/controllers/user-storage/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,OAAO,EAAE,qBAAqB,IAAI,UAAU,EAAE,CAAC;AAC/C,eAAe,qBAAqB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC","sourcesContent":["import { UserStorageController } from './UserStorageController.js';\n\nexport { UserStorageController as Controller };\nexport default UserStorageController;\nexport * from './UserStorageController.js';\nexport * as Mocks from './mocks/index.js';\nexport * from './constants.js';\nexport * from '../../shared/encryption/index.js';\nexport * from '../../shared/storage-schema.js';\nexport type {\n UserStorageControllerPerformGetStorageAction,\n UserStorageControllerPerformGetStorageAllFeatureEntriesAction,\n UserStorageControllerPerformSetStorageAction,\n UserStorageControllerPerformBatchSetStorageAction,\n UserStorageControllerPerformDeleteStorageAction,\n UserStorageControllerPerformDeleteStorageAllFeatureEntriesAction,\n UserStorageControllerPerformBatchDeleteStorageAction,\n UserStorageControllerGetStorageKeyAction,\n UserStorageControllerListEntropySourcesAction,\n UserStorageControllerSetIsBackupAndSyncFeatureEnabledAction,\n UserStorageControllerSetIsContactSyncingInProgressAction,\n UserStorageControllerSyncContactsWithUserStorageAction,\n} from './UserStorageController-method-action-types.js';\n"]}
@@ -0,0 +1,3 @@
1
+ export * from './mockResponses.js';
2
+ export * from './mockStorage.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/controllers/user-storage/mocks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './mockResponses.js';
2
+ export * from './mockStorage.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/controllers/user-storage/mocks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC","sourcesContent":["export * from './mockResponses.js';\nexport * from './mockStorage.js';\n"]}
@@ -1,5 +1,5 @@
1
- import type { UserStorageGenericPathWithFeatureAndKey, UserStorageGenericPathWithFeatureOnly } from "../../../shared/storage-schema.mjs";
2
- import type { GetUserStorageAllFeatureEntriesResponse, GetUserStorageResponse } from "../types.mjs";
1
+ import type { UserStorageGenericPathWithFeatureAndKey, UserStorageGenericPathWithFeatureOnly } from '../../../shared/storage-schema.js';
2
+ import type { GetUserStorageAllFeatureEntriesResponse, GetUserStorageResponse } from '../types.js';
3
3
  export declare const getMockUserStorageEndpoint: (path: UserStorageGenericPathWithFeatureAndKey | UserStorageGenericPathWithFeatureOnly) => string;
4
4
  /**
5
5
  * Creates a mock GET user-storage response
@@ -63,4 +63,4 @@ export declare const deleteMockUserStorageAllFeatureEntriesResponse: (path?: Use
63
63
  requestMethod: "DELETE";
64
64
  response: null;
65
65
  };
66
- //# sourceMappingURL=mockResponses.d.mts.map
66
+ //# sourceMappingURL=mockResponses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mockResponses.d.ts","sourceRoot":"","sources":["../../../../src/controllers/user-storage/mocks/mockResponses.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,uCAAuC,EACvC,qCAAqC,EACtC,MAAM,mCAAmC,CAAC;AAK3C,OAAO,KAAK,EACV,uCAAuC,EACvC,sBAAsB,EACvB,MAAM,aAAa,CAAC;AAarB,eAAO,MAAM,0BAA0B,SAEjC,uCAAuC,GACvC,qCAAqC,WAU1C,CAAC;AAEF;;;;;GAKG;AACH,wBAAsB,4BAA4B,CAChD,IAAI,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC,sBAAsB,CAAC,CAKjC;AAED;;;;;GAKG;AACH,wBAAsB,mCAAmC,CACvD,OAAO,GAAE,MAAM,EAAwB,GACtC,OAAO,CAAC,uCAAuC,CAAC,CAWlD;AAED;;;;;GAKG;AACH,wBAAsB,6BAA6B,CACjD,IAAI,GAAE,uCAA6G;;;;GAOpH;AAED;;;;;;GAMG;AACH,wBAAsB,2CAA2C,CAC/D,IAAI,GAAE,qCAAgF,EACtF,OAAO,CAAC,EAAE,MAAM,EAAE;;;;GAOnB;AAED,eAAO,MAAM,6BAA6B,UAClC,uCAAuC;;;;CAO9C,CAAC;AAEF,eAAO,MAAM,kCAAkC,UACvC,qCAAqC;;;;CAO5C,CAAC;AAEF,eAAO,MAAM,qCAAqC,UAC1C,qCAAqC;;;;CAO5C,CAAC;AAEF,eAAO,MAAM,6BAA6B,UAClC,uCAAuC;;;;CAO9C,CAAC;AAEF,eAAO,MAAM,8CAA8C,UACnD,qCAAqC;;;;CAO5C,CAAC"}
@@ -1,6 +1,6 @@
1
- import { Env, getEnvUrls } from "../../../sdk/index.mjs";
2
- import { createEntryPath, USER_STORAGE_FEATURE_NAMES } from "../../../shared/storage-schema.mjs";
3
- import { MOCK_ENCRYPTED_STORAGE_DATA, MOCK_STORAGE_DATA, MOCK_STORAGE_KEY } from "./mockStorage.mjs";
1
+ import { Env, getEnvUrls } from '../../../sdk/index.js';
2
+ import { createEntryPath, USER_STORAGE_FEATURE_NAMES, } from '../../../shared/storage-schema.js';
3
+ import { MOCK_ENCRYPTED_STORAGE_DATA, MOCK_STORAGE_DATA, MOCK_STORAGE_KEY, } from './mockStorage.js';
4
4
  export const getMockUserStorageEndpoint = (path) => {
5
5
  if (path.split('.').length === 1) {
6
6
  return `${getEnvUrls(Env.PRD).userStorageApiUrl}/api/v1/userstorage/${path}`;
@@ -97,4 +97,4 @@ export const deleteMockUserStorageAllFeatureEntriesResponse = (path = USER_STORA
97
97
  response: null,
98
98
  };
99
99
  };
100
- //# sourceMappingURL=mockResponses.mjs.map
100
+ //# sourceMappingURL=mockResponses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mockResponses.js","sourceRoot":"","sources":["../../../../src/controllers/user-storage/mocks/mockResponses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAKxD,OAAO,EACL,eAAe,EACf,0BAA0B,GAC3B,MAAM,mCAAmC,CAAC;AAK3C,OAAO,EACL,2BAA2B,EAC3B,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAQ1B,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,IAEyC,EACzC,EAAE;IACF,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACjC,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,iBAAiB,uBAAuB,IAAI,EAAE,CAAC;IAC/E,CAAC;IAED,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,iBAAiB,uBAAuB,eAAe,CACnF,IAA+C,EAC/C,gBAAgB,CACjB,EAAE,CAAC;AACN,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAChD,IAAa;IAEb,OAAO;QACL,SAAS,EAAE,YAAY;QACvB,IAAI,EAAE,MAAM,2BAA2B,CAAC,IAAI,CAAC;KAC9C,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,mCAAmC,CACvD,OAAO,GAAa,CAAC,iBAAiB,CAAC;IAEvC,MAAM,aAAa,GAAG,EAAE,CAAC;IAEzB,KA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ACnD,IAAI,GAA0C,0BAA0B,CAAC,aAAa,EACtF,EAAE;IACF,OAAO;QACL,GAAG,EAAE,0BAA0B,CAAC,IAAI,CAAC;QACrC,aAAa,EAAE,KAAK;QACpB,QAAQ,EAAE,IAAI;KACQ,CAAC;AAC3B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAC3C,IAAI,GAA4C,GAAG,0BAA0B,CAAC,aAAa,wBAAwB,EACnH,EAAE;IACF,OAAO;QACL,GAAG,EAAE,0BAA0B,CAAC,IAAI,CAAC;QACrC,aAAa,EAAE,QAAQ;QACvB,QAAQ,EAAE,IAAI;KACQ,CAAC;AAC3B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,8CAA8C,GAAG,CAC5D,IAAI,GAA0C,0BAA0B,CAAC,aAAa,EACtF,EAAE;IACF,OAAO;QACL,GAAG,EAAE,0BAA0B,CAAC,IAAI,CAAC;QACrC,aAAa,EAAE,QAAQ;QACvB,QAAQ,EAAE,IAAI;KACQ,CAAC;AAC3B,CAAC,CAAC","sourcesContent":["import { Env, getEnvUrls } from '../../../sdk/index.js';\nimport type {\n UserStorageGenericPathWithFeatureAndKey,\n UserStorageGenericPathWithFeatureOnly,\n} from '../../../shared/storage-schema.js';\nimport {\n createEntryPath,\n USER_STORAGE_FEATURE_NAMES,\n} from '../../../shared/storage-schema.js';\nimport type {\n GetUserStorageAllFeatureEntriesResponse,\n GetUserStorageResponse,\n} from '../types.js';\nimport {\n MOCK_ENCRYPTED_STORAGE_DATA,\n MOCK_STORAGE_DATA,\n MOCK_STORAGE_KEY,\n} from './mockStorage.js';\n\ntype MockResponse = {\n url: string;\n requestMethod: 'GET' | 'POST' | 'PUT' | 'DELETE';\n response: unknown;\n};\n\nexport const getMockUserStorageEndpoint = (\n path:\n | UserStorageGenericPathWithFeatureAndKey\n | UserStorageGenericPathWithFeatureOnly,\n) => {\n if (path.split('.').length === 1) {\n return `${getEnvUrls(Env.PRD).userStorageApiUrl}/api/v1/userstorage/${path}`;\n }\n\n return `${getEnvUrls(Env.PRD).userStorageApiUrl}/api/v1/userstorage/${createEntryPath(\n path as UserStorageGenericPathWithFeatureAndKey,\n MOCK_STORAGE_KEY,\n )}`;\n};\n\n/**\n * Creates a mock GET user-storage response\n *\n * @param data - data to encrypt\n * @returns a realistic GET Response Body\n */\nexport async function createMockGetStorageResponse(\n data?: string,\n): Promise<GetUserStorageResponse> {\n return {\n HashedKey: 'HASHED_KEY',\n Data: await MOCK_ENCRYPTED_STORAGE_DATA(data),\n };\n}\n\n/**\n * Creates a mock GET ALL user-storage response\n *\n * @param dataArr - array of data to encrypt\n * @returns a realistic GET ALL Response Body\n */\nexport async function createMockAllFeatureEntriesResponse(\n dataArr: string[] = [MOCK_STORAGE_DATA],\n): Promise<GetUserStorageAllFeatureEntriesResponse> {\n const decryptedData = [];\n\n for (const data of dataArr) {\n decryptedData.push({\n HashedKey: 'HASHED_KEY',\n Data: await MOCK_ENCRYPTED_STORAGE_DATA(data),\n });\n }\n\n return decryptedData;\n}\n\n/**\n * Creates a mock user-storage api GET request\n *\n * @param path - path of the GET Url\n * @returns mock GET API request. Can be used by e2e or unit mock servers\n */\nexport async function getMockUserStorageGetResponse(\n path: UserStorageGenericPathWithFeatureAndKey = `${USER_STORAGE_FEATURE_NAMES.notifications}.notification_settings`,\n) {\n return {\n url: getMockUserStorageEndpoint(path),\n requestMethod: 'GET',\n response: await createMockGetStorageResponse(),\n } satisfies MockResponse;\n}\n\n/**\n * Creates a mock user-storage api GET ALL request\n *\n * @param path - path of the GET url\n * @param dataArr - data to encrypt\n * @returns mock GET ALL API request. Can be used by e2e or unit mock servers\n */\nexport async function getMockUserStorageAllFeatureEntriesResponse(\n path: UserStorageGenericPathWithFeatureOnly = USER_STORAGE_FEATURE_NAMES.notifications,\n dataArr?: string[],\n) {\n return {\n url: getMockUserStorageEndpoint(path),\n requestMethod: 'GET',\n response: await createMockAllFeatureEntriesResponse(dataArr),\n } satisfies MockResponse;\n}\n\nexport const getMockUserStoragePutResponse = (\n path: UserStorageGenericPathWithFeatureAndKey = `${USER_STORAGE_FEATURE_NAMES.notifications}.notification_settings`,\n) => {\n return {\n url: getMockUserStorageEndpoint(path),\n requestMethod: 'PUT',\n response: null,\n } satisfies MockResponse;\n};\n\nexport const getMockUserStorageBatchPutResponse = (\n path: UserStorageGenericPathWithFeatureOnly = USER_STORAGE_FEATURE_NAMES.notifications,\n) => {\n return {\n url: getMockUserStorageEndpoint(path),\n requestMethod: 'PUT',\n response: null,\n } satisfies MockResponse;\n};\n\nexport const getMockUserStorageBatchDeleteResponse = (\n path: UserStorageGenericPathWithFeatureOnly = USER_STORAGE_FEATURE_NAMES.notifications,\n) => {\n return {\n url: getMockUserStorageEndpoint(path),\n requestMethod: 'PUT',\n response: null,\n } satisfies MockResponse;\n};\n\nexport const deleteMockUserStorageResponse = (\n path: UserStorageGenericPathWithFeatureAndKey = `${USER_STORAGE_FEATURE_NAMES.notifications}.notification_settings`,\n) => {\n return {\n url: getMockUserStorageEndpoint(path),\n requestMethod: 'DELETE',\n response: null,\n } satisfies MockResponse;\n};\n\nexport const deleteMockUserStorageAllFeatureEntriesResponse = (\n path: UserStorageGenericPathWithFeatureOnly = USER_STORAGE_FEATURE_NAMES.notifications,\n) => {\n return {\n url: getMockUserStorageEndpoint(path),\n requestMethod: 'DELETE',\n response: null,\n } satisfies MockResponse;\n};\n"]}
@@ -2,4 +2,4 @@ export declare const MOCK_STORAGE_KEY_SIGNATURE = "mockStorageKey";
2
2
  export declare const MOCK_STORAGE_KEY: string;
3
3
  export declare const MOCK_STORAGE_DATA: string;
4
4
  export declare const MOCK_ENCRYPTED_STORAGE_DATA: (data?: string) => Promise<string>;
5
- //# sourceMappingURL=mockStorage.d.cts.map
5
+ //# sourceMappingURL=mockStorage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mockStorage.d.ts","sourceRoot":"","sources":["../../../../src/controllers/user-storage/mocks/mockStorage.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,0BAA0B,mBAAmB,CAAC;AAC3D,eAAO,MAAM,gBAAgB,QAA+C,CAAC;AAC7E,eAAO,MAAM,iBAAiB,QAAqC,CAAC;AAKpE,eAAO,MAAM,2BAA2B,UAAiB,MAAM,oBAI3D,CAAC"}
@@ -1,4 +1,4 @@
1
- import encryption, { createSHA256Hash } from "../../../shared/encryption/index.mjs";
1
+ import encryption, { createSHA256Hash, } from '../../../shared/encryption/index.js';
2
2
  export const MOCK_STORAGE_KEY_SIGNATURE = 'mockStorageKey';
3
3
  export const MOCK_STORAGE_KEY = createSHA256Hash(MOCK_STORAGE_KEY_SIGNATURE);
4
4
  export const MOCK_STORAGE_DATA = JSON.stringify({ hello: 'world' });
@@ -6,4 +6,4 @@ export const MOCK_STORAGE_DATA = JSON.stringify({ hello: 'world' });
6
6
  // This is because this fixture is getting added in at run time. Will be improved once we support multiple exports
7
7
  let cachedMockEncryptedData;
8
8
  export const MOCK_ENCRYPTED_STORAGE_DATA = async (data) => (cachedMockEncryptedData ?? (cachedMockEncryptedData = await encryption.encryptString(data ?? MOCK_STORAGE_DATA, MOCK_STORAGE_KEY)));
9
- //# sourceMappingURL=mockStorage.mjs.map
9
+ //# sourceMappingURL=mockStorage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mockStorage.js","sourceRoot":"","sources":["../../../../src/controllers/user-storage/mocks/mockStorage.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EACjB,gBAAgB,GACjB,MAAM,qCAAqC,CAAC;AAE7C,MAAM,CAAC,MAAM,0BAA0B,GAAG,gBAAgB,CAAC;AAC3D,MAAM,CAAC,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,0BAA0B,CAAC,CAAC;AAC7E,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;AAEpE,sFAAsF;AACtF,kHAAkH;AAClH,IAAI,uBAA+B,CAAC;AACpC,MAAM,CAAC,MAAM,2BAA2B,GAAG,KAAK,EAAE,IAAa,EAAE,EAAE,CACjE,CAAC,uBAAuB,KAAvB,uBAAuB,GAAK,MAAM,UAAU,CAAC,aAAa,CACzD,IAAI,IAAI,iBAAiB,EACzB,gBAAgB,CACjB,EAAC,CAAC","sourcesContent":["import encryption, {\n createSHA256Hash,\n} from '../../../shared/encryption/index.js';\n\nexport const MOCK_STORAGE_KEY_SIGNATURE = 'mockStorageKey';\nexport const MOCK_STORAGE_KEY = createSHA256Hash(MOCK_STORAGE_KEY_SIGNATURE);\nexport const MOCK_STORAGE_DATA = JSON.stringify({ hello: 'world' });\n\n// NOTE - using encryption.encryptString directly in fixtures causes issues on mobile.\n// This is because this fixture is getting added in at run time. Will be improved once we support multiple exports\nlet cachedMockEncryptedData: string;\nexport const MOCK_ENCRYPTED_STORAGE_DATA = async (data?: string) =>\n (cachedMockEncryptedData ??= await encryption.encryptString(\n data ?? MOCK_STORAGE_DATA,\n MOCK_STORAGE_KEY,\n ));\n"]}
@@ -1,5 +1,5 @@
1
- import type { UserStorageGenericPathWithFeatureAndKey, UserStorageGenericPathWithFeatureOnly } from "../../shared/storage-schema.cjs";
2
- import type { NativeScrypt } from "../../shared/types/encryption.cjs";
1
+ import type { UserStorageGenericPathWithFeatureAndKey, UserStorageGenericPathWithFeatureOnly } from '../../shared/storage-schema.js';
2
+ import type { NativeScrypt } from '../../shared/types/encryption.js';
3
3
  export type UserStorageBaseOptions = {
4
4
  bearerToken: string;
5
5
  storageKey: string;
@@ -20,4 +20,4 @@ export type GetUserStorageAllFeatureEntriesResponse = {
20
20
  HashedKey: string;
21
21
  Data: string;
22
22
  }[];
23
- //# sourceMappingURL=types.d.cts.map
23
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/controllers/user-storage/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uCAAuC,EACvC,qCAAqC,EACtC,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAErE,MAAM,MAAM,sBAAsB,GAAG;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,YAAY,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,sBAAsB,GAAG;IACxD,IAAI,EAAE,uCAAuC,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,mCAAmC,GAAG,sBAAsB,GAAG;IACzE,IAAI,EAAE,qCAAqC,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,mCAAmC,CAAC;AAEhF,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,uCAAuC,GAAG;IACpD,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/controllers/user-storage/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n UserStorageGenericPathWithFeatureAndKey,\n UserStorageGenericPathWithFeatureOnly,\n} from '../../shared/storage-schema.js';\nimport type { NativeScrypt } from '../../shared/types/encryption.js';\n\nexport type UserStorageBaseOptions = {\n bearerToken: string;\n storageKey: string;\n nativeScryptCrypto?: NativeScrypt;\n};\n\nexport type UserStorageOptions = UserStorageBaseOptions & {\n path: UserStorageGenericPathWithFeatureAndKey;\n};\n\nexport type UserStorageAllFeatureEntriesOptions = UserStorageBaseOptions & {\n path: UserStorageGenericPathWithFeatureOnly;\n};\n\nexport type UserStorageBatchUpsertOptions = UserStorageAllFeatureEntriesOptions;\n\nexport type GetUserStorageResponse = {\n HashedKey: string;\n Data: string;\n};\n\nexport type GetUserStorageAllFeatureEntriesResponse = {\n HashedKey: string;\n Data: string;\n}[];\n"]}
@@ -16,4 +16,4 @@ export declare function setDifference<TItem>(a: Set<TItem>, b: Set<TItem>): Set<
16
16
  * @returns The intersection between the first and second set.
17
17
  */
18
18
  export declare function setIntersection<TItem>(a: Set<TItem>, b: Set<TItem>): Set<TItem>;
19
- //# sourceMappingURL=utils.d.cts.map
19
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/controllers/user-storage/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAI7E;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,KAAK,EACnC,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,EACb,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,GACZ,GAAG,CAAC,KAAK,CAAC,CAIZ"}
@@ -24,4 +24,4 @@ export function setIntersection(a, b) {
24
24
  a.forEach((e) => b.has(e) && intersection.add(e));
25
25
  return intersection;
26
26
  }
27
- //# sourceMappingURL=utils.mjs.map
27
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/controllers/user-storage/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAQ,CAAa,EAAE,CAAa;IAC/D,MAAM,UAAU,GAAG,IAAI,GAAG,EAAS,CAAC;IACpC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACjD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAC7B,CAAa,EACb,CAAa;IAEb,MAAM,YAAY,GAAG,IAAI,GAAG,EAAS,CAAC;IACtC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAClD,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["/**\n * Returns the difference between 2 sets.\n * NOTE - this is temporary until we can support Set().difference method\n *\n * @param a - First Set\n * @param b - Second Set\n * @returns The difference between the first and second set.\n */\nexport function setDifference<TItem>(a: Set<TItem>, b: Set<TItem>): Set<TItem> {\n const difference = new Set<TItem>();\n a.forEach((e) => !b.has(e) && difference.add(e));\n return difference;\n}\n\n/**\n * Returns the intersection between 2 sets.\n * NOTE - this is temporary until we can support Set().intersection method\n *\n * @param a - First Set\n * @param b - Second Set\n * @returns The intersection between the first and second set.\n */\nexport function setIntersection<TItem>(\n a: Set<TItem>,\n b: Set<TItem>,\n): Set<TItem> {\n const intersection = new Set<TItem>();\n a.forEach((e) => b.has(e) && intersection.add(e));\n return intersection;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ export * as SDK from './sdk/index.js';
2
+ export * as AuthenticationController from './controllers/authentication/index.js';
3
+ export * as UserStorageController from './controllers/user-storage/index.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,wBAAwB,MAAM,uCAAuC,CAAC;AAClF,OAAO,KAAK,qBAAqB,MAAM,qCAAqC,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ export * as SDK from './sdk/index.js';
2
+ export * as AuthenticationController from './controllers/authentication/index.js';
3
+ export * as UserStorageController from './controllers/user-storage/index.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,wBAAwB,MAAM,uCAAuC,CAAC;AAClF,OAAO,KAAK,qBAAqB,MAAM,qCAAqC,CAAC","sourcesContent":["export * as SDK from './sdk/index.js';\nexport * as AuthenticationController from './controllers/authentication/index.js';\nexport * as UserStorageController from './controllers/user-storage/index.js';\n"]}
@@ -1,4 +1,4 @@
1
- import type { AuthConfig, AuthStorageOptions, AuthType, IBaseAuth, UserProfile, UserProfileLineage } from "./types.cjs";
1
+ import type { AuthConfig, AuthStorageOptions, AuthType, IBaseAuth, UserProfile, UserProfileLineage } from './types.js';
2
2
  type JwtBearerAuth_SIWE_Options = {
3
3
  storage: AuthStorageOptions;
4
4
  };
@@ -22,4 +22,4 @@ export declare class SIWEJwtBearerAuth implements IBaseAuth {
22
22
  prepare(signer: JwtBearerAuth_SIWE_Signer): void;
23
23
  }
24
24
  export {};
25
- //# sourceMappingURL=flow-siwe.d.cts.map
25
+ //# sourceMappingURL=flow-siwe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flow-siwe.d.ts","sourceRoot":"","sources":["../../../src/sdk/authentication-jwt-bearer/flow-siwe.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,UAAU,EACV,kBAAkB,EAClB,QAAQ,EACR,SAAS,EAET,WAAW,EACX,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAEpB,KAAK,0BAA0B,GAAG;IAChC,OAAO,EAAE,kBAAkB,CAAC;CAC7B,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAClD,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,qBAAa,iBAAkB,YAAW,SAAS;;IAOjD,YACE,MAAM,EAAE,UAAU,GAAG;QAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAA;KAAE,EAC5C,OAAO,EAAE,0BAA0B,EAIpC;IAEK,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAQtC;IAEK,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,CAQ3C;IAEK,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,CAGrC;IAEK,qBAAqB,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAGzD;IAEK,uBAAuB,IAAI,OAAO,CAAC,MAAM,CAAC,CAG/C;IAEK,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGlD;IAED,OAAO,CAAC,MAAM,EAAE,yBAAyB,QAExC;CA2EF"}