@metamask-previews/profile-sync-controller 29.0.0-preview-3866c0ff1 → 29.0.0-preview-e3275932a

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 (548) hide show
  1. package/CHANGELOG.md +0 -1
  2. package/dist/controllers/authentication/AuthenticationController-method-action-types.cjs +7 -0
  3. package/dist/controllers/authentication/AuthenticationController-method-action-types.cjs.map +1 -0
  4. package/dist/controllers/authentication/{AuthenticationController-method-action-types.d.ts → AuthenticationController-method-action-types.d.cts} +2 -2
  5. package/dist/controllers/authentication/AuthenticationController-method-action-types.d.cts.map +1 -0
  6. package/dist/controllers/authentication/AuthenticationController-method-action-types.d.mts +102 -0
  7. package/dist/controllers/authentication/AuthenticationController-method-action-types.d.mts.map +1 -0
  8. package/dist/controllers/authentication/{AuthenticationController-method-action-types.js → AuthenticationController-method-action-types.mjs} +1 -1
  9. package/dist/controllers/authentication/AuthenticationController-method-action-types.mjs.map +1 -0
  10. package/dist/controllers/authentication/AuthenticationController.cjs +489 -0
  11. package/dist/controllers/authentication/AuthenticationController.cjs.map +1 -0
  12. package/dist/controllers/authentication/{AuthenticationController.d.ts → AuthenticationController.d.cts} +10 -10
  13. package/dist/controllers/authentication/AuthenticationController.d.cts.map +1 -0
  14. package/dist/controllers/authentication/AuthenticationController.d.mts +130 -0
  15. package/dist/controllers/authentication/AuthenticationController.d.mts.map +1 -0
  16. package/dist/controllers/authentication/AuthenticationController.mjs +485 -0
  17. package/dist/controllers/authentication/AuthenticationController.mjs.map +1 -0
  18. package/dist/controllers/authentication/index.cjs +35 -0
  19. package/dist/controllers/authentication/index.cjs.map +1 -0
  20. package/dist/controllers/authentication/{index.d.ts → index.d.cts} +5 -5
  21. package/dist/controllers/authentication/index.d.cts.map +1 -0
  22. package/dist/controllers/authentication/index.d.mts +7 -0
  23. package/dist/controllers/authentication/index.d.mts.map +1 -0
  24. package/dist/controllers/authentication/index.mjs +6 -0
  25. package/dist/controllers/authentication/index.mjs.map +1 -0
  26. package/dist/controllers/authentication/mocks/index.cjs +18 -0
  27. package/dist/controllers/authentication/mocks/index.cjs.map +1 -0
  28. package/dist/controllers/authentication/mocks/index.d.cts +2 -0
  29. package/dist/controllers/authentication/mocks/index.d.cts.map +1 -0
  30. package/dist/controllers/authentication/mocks/index.d.mts +2 -0
  31. package/dist/controllers/authentication/mocks/index.d.mts.map +1 -0
  32. package/dist/controllers/authentication/mocks/index.mjs +2 -0
  33. package/dist/controllers/authentication/mocks/index.mjs.map +1 -0
  34. package/dist/controllers/authentication/mocks/mockResponses.cjs +126 -0
  35. package/dist/controllers/authentication/mocks/mockResponses.cjs.map +1 -0
  36. package/dist/controllers/authentication/mocks/{mockResponses.d.ts → mockResponses.d.cts} +1 -1
  37. package/dist/controllers/authentication/mocks/mockResponses.d.cts.map +1 -0
  38. package/dist/controllers/authentication/mocks/mockResponses.d.mts +58 -0
  39. package/dist/controllers/authentication/mocks/mockResponses.d.mts.map +1 -0
  40. package/dist/controllers/authentication/mocks/{mockResponses.js → mockResponses.mjs} +2 -2
  41. package/dist/controllers/authentication/mocks/mockResponses.mjs.map +1 -0
  42. package/dist/controllers/index.cjs +29 -0
  43. package/dist/controllers/index.cjs.map +1 -0
  44. package/dist/controllers/index.d.cts +3 -0
  45. package/dist/controllers/index.d.cts.map +1 -0
  46. package/dist/controllers/index.d.mts +3 -0
  47. package/dist/controllers/index.d.mts.map +1 -0
  48. package/dist/controllers/index.mjs +3 -0
  49. package/dist/controllers/index.mjs.map +1 -0
  50. package/dist/controllers/user-storage/UserStorageController-method-action-types.cjs +7 -0
  51. package/dist/controllers/user-storage/UserStorageController-method-action-types.cjs.map +1 -0
  52. package/dist/controllers/user-storage/{UserStorageController-method-action-types.d.ts → UserStorageController-method-action-types.d.cts} +2 -2
  53. package/dist/controllers/user-storage/UserStorageController-method-action-types.d.cts.map +1 -0
  54. package/dist/controllers/user-storage/UserStorageController-method-action-types.d.mts +137 -0
  55. package/dist/controllers/user-storage/UserStorageController-method-action-types.d.mts.map +1 -0
  56. package/dist/controllers/user-storage/{UserStorageController-method-action-types.js → UserStorageController-method-action-types.mjs} +1 -1
  57. package/dist/controllers/user-storage/UserStorageController-method-action-types.mjs.map +1 -0
  58. package/dist/controllers/user-storage/UserStorageController.cjs +412 -0
  59. package/dist/controllers/user-storage/UserStorageController.cjs.map +1 -0
  60. package/dist/controllers/user-storage/{UserStorageController.d.ts → UserStorageController.d.cts} +14 -14
  61. package/dist/controllers/user-storage/UserStorageController.d.cts.map +1 -0
  62. package/dist/controllers/user-storage/UserStorageController.d.mts +182 -0
  63. package/dist/controllers/user-storage/UserStorageController.d.mts.map +1 -0
  64. package/dist/controllers/user-storage/UserStorageController.mjs +408 -0
  65. package/dist/controllers/user-storage/UserStorageController.mjs.map +1 -0
  66. package/dist/controllers/user-storage/constants.cjs +19 -0
  67. package/dist/controllers/user-storage/constants.cjs.map +1 -0
  68. package/dist/controllers/user-storage/constants.d.cts +15 -0
  69. package/dist/controllers/user-storage/constants.d.cts.map +1 -0
  70. package/dist/controllers/user-storage/constants.d.mts +15 -0
  71. package/dist/controllers/user-storage/constants.d.mts.map +1 -0
  72. package/dist/controllers/user-storage/{constants.js → constants.mjs} +1 -1
  73. package/dist/controllers/user-storage/constants.mjs.map +1 -0
  74. package/dist/controllers/user-storage/contact-syncing/constants.cjs +12 -0
  75. package/dist/controllers/user-storage/contact-syncing/constants.cjs.map +1 -0
  76. package/dist/controllers/user-storage/contact-syncing/{constants.d.ts → constants.d.cts} +1 -1
  77. package/dist/controllers/user-storage/contact-syncing/constants.d.cts.map +1 -0
  78. package/dist/controllers/user-storage/contact-syncing/constants.d.mts +9 -0
  79. package/dist/controllers/user-storage/contact-syncing/constants.d.mts.map +1 -0
  80. package/dist/controllers/user-storage/contact-syncing/{constants.js → constants.mjs} +1 -1
  81. package/dist/controllers/user-storage/contact-syncing/constants.mjs.map +1 -0
  82. package/dist/controllers/user-storage/contact-syncing/controller-integration.cjs +346 -0
  83. package/dist/controllers/user-storage/contact-syncing/controller-integration.cjs.map +1 -0
  84. package/dist/controllers/user-storage/contact-syncing/{controller-integration.d.ts → controller-integration.d.cts} +3 -3
  85. package/dist/controllers/user-storage/contact-syncing/controller-integration.d.cts.map +1 -0
  86. package/dist/controllers/user-storage/contact-syncing/controller-integration.d.mts +47 -0
  87. package/dist/controllers/user-storage/contact-syncing/controller-integration.d.mts.map +1 -0
  88. package/dist/controllers/user-storage/contact-syncing/{controller-integration.js → controller-integration.mjs} +6 -6
  89. package/dist/controllers/user-storage/contact-syncing/controller-integration.mjs.map +1 -0
  90. package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.cjs +50 -0
  91. package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.cjs.map +1 -0
  92. package/dist/controllers/user-storage/contact-syncing/{setup-subscriptions.d.ts → setup-subscriptions.d.cts} +2 -2
  93. package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.d.cts.map +1 -0
  94. package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.d.mts +8 -0
  95. package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.d.mts.map +1 -0
  96. package/dist/controllers/user-storage/contact-syncing/{setup-subscriptions.js → setup-subscriptions.mjs} +4 -4
  97. package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.mjs.map +1 -0
  98. package/dist/controllers/user-storage/contact-syncing/sync-utils.cjs +23 -0
  99. package/dist/controllers/user-storage/contact-syncing/sync-utils.cjs.map +1 -0
  100. package/dist/controllers/user-storage/contact-syncing/{sync-utils.d.ts → sync-utils.d.cts} +2 -2
  101. package/dist/controllers/user-storage/contact-syncing/sync-utils.d.cts.map +1 -0
  102. package/dist/controllers/user-storage/contact-syncing/sync-utils.d.mts +9 -0
  103. package/dist/controllers/user-storage/contact-syncing/sync-utils.d.mts.map +1 -0
  104. package/dist/controllers/user-storage/contact-syncing/{sync-utils.js → sync-utils.mjs} +1 -1
  105. package/dist/controllers/user-storage/contact-syncing/sync-utils.mjs.map +1 -0
  106. package/dist/controllers/user-storage/contact-syncing/types.cjs +3 -0
  107. package/dist/controllers/user-storage/contact-syncing/types.cjs.map +1 -0
  108. package/dist/controllers/user-storage/contact-syncing/{types.d.ts → types.d.cts} +6 -6
  109. package/dist/controllers/user-storage/contact-syncing/types.d.cts.map +1 -0
  110. package/dist/controllers/user-storage/contact-syncing/types.d.mts +37 -0
  111. package/dist/controllers/user-storage/contact-syncing/types.d.mts.map +1 -0
  112. package/dist/controllers/user-storage/contact-syncing/types.mjs +2 -0
  113. package/dist/controllers/user-storage/contact-syncing/types.mjs.map +1 -0
  114. package/dist/controllers/user-storage/contact-syncing/utils.cjs +64 -0
  115. package/dist/controllers/user-storage/contact-syncing/utils.cjs.map +1 -0
  116. package/dist/controllers/user-storage/contact-syncing/{utils.d.ts → utils.d.cts} +3 -3
  117. package/dist/controllers/user-storage/contact-syncing/utils.d.cts.map +1 -0
  118. package/dist/controllers/user-storage/contact-syncing/utils.d.mts +36 -0
  119. package/dist/controllers/user-storage/contact-syncing/utils.d.mts.map +1 -0
  120. package/dist/controllers/user-storage/contact-syncing/{utils.js → utils.mjs} +2 -2
  121. package/dist/controllers/user-storage/contact-syncing/utils.mjs.map +1 -0
  122. package/dist/controllers/user-storage/index.cjs +38 -0
  123. package/dist/controllers/user-storage/index.cjs.map +1 -0
  124. package/dist/controllers/user-storage/{index.d.ts → index.d.cts} +8 -8
  125. package/dist/controllers/user-storage/index.d.cts.map +1 -0
  126. package/dist/controllers/user-storage/index.d.mts +10 -0
  127. package/dist/controllers/user-storage/index.d.mts.map +1 -0
  128. package/dist/controllers/user-storage/index.mjs +9 -0
  129. package/dist/controllers/user-storage/index.mjs.map +1 -0
  130. package/dist/controllers/user-storage/mocks/index.cjs +19 -0
  131. package/dist/controllers/user-storage/mocks/index.cjs.map +1 -0
  132. package/dist/controllers/user-storage/mocks/index.d.cts +3 -0
  133. package/dist/controllers/user-storage/mocks/index.d.cts.map +1 -0
  134. package/dist/controllers/user-storage/mocks/index.d.mts +3 -0
  135. package/dist/controllers/user-storage/mocks/index.d.mts.map +1 -0
  136. package/dist/controllers/user-storage/mocks/index.mjs +3 -0
  137. package/dist/controllers/user-storage/mocks/index.mjs.map +1 -0
  138. package/dist/controllers/user-storage/mocks/mockResponses.cjs +113 -0
  139. package/dist/controllers/user-storage/mocks/mockResponses.cjs.map +1 -0
  140. package/dist/controllers/user-storage/mocks/{mockResponses.d.ts → mockResponses.d.cts} +3 -3
  141. package/dist/controllers/user-storage/mocks/mockResponses.d.cts.map +1 -0
  142. package/dist/controllers/user-storage/mocks/mockResponses.d.mts +66 -0
  143. package/dist/controllers/user-storage/mocks/mockResponses.d.mts.map +1 -0
  144. package/dist/controllers/user-storage/mocks/{mockResponses.js → mockResponses.mjs} +4 -4
  145. package/dist/controllers/user-storage/mocks/mockResponses.mjs.map +1 -0
  146. package/dist/controllers/user-storage/mocks/mockStorage.cjs +36 -0
  147. package/dist/controllers/user-storage/mocks/mockStorage.cjs.map +1 -0
  148. package/dist/controllers/user-storage/mocks/{mockStorage.d.ts → mockStorage.d.cts} +1 -1
  149. package/dist/controllers/user-storage/mocks/mockStorage.d.cts.map +1 -0
  150. package/dist/controllers/user-storage/mocks/mockStorage.d.mts +5 -0
  151. package/dist/controllers/user-storage/mocks/mockStorage.d.mts.map +1 -0
  152. package/dist/controllers/user-storage/mocks/{mockStorage.js → mockStorage.mjs} +3 -3
  153. package/dist/controllers/user-storage/mocks/mockStorage.mjs.map +1 -0
  154. package/dist/controllers/user-storage/types.cjs +3 -0
  155. package/dist/controllers/user-storage/types.cjs.map +1 -0
  156. package/dist/controllers/user-storage/{types.d.ts → types.d.cts} +3 -3
  157. package/dist/controllers/user-storage/types.d.cts.map +1 -0
  158. package/dist/controllers/user-storage/types.d.mts +23 -0
  159. package/dist/controllers/user-storage/types.d.mts.map +1 -0
  160. package/dist/controllers/user-storage/types.mjs +2 -0
  161. package/dist/controllers/user-storage/types.mjs.map +1 -0
  162. package/dist/controllers/user-storage/utils.cjs +32 -0
  163. package/dist/controllers/user-storage/utils.cjs.map +1 -0
  164. package/dist/controllers/user-storage/{utils.d.ts → utils.d.cts} +1 -1
  165. package/dist/controllers/user-storage/utils.d.cts.map +1 -0
  166. package/dist/controllers/user-storage/utils.d.mts +19 -0
  167. package/dist/controllers/user-storage/utils.d.mts.map +1 -0
  168. package/dist/controllers/user-storage/{utils.js → utils.mjs} +1 -1
  169. package/dist/controllers/user-storage/utils.mjs.map +1 -0
  170. package/dist/index.cjs +30 -0
  171. package/dist/index.cjs.map +1 -0
  172. package/dist/index.d.cts +4 -0
  173. package/dist/index.d.cts.map +1 -0
  174. package/dist/index.d.mts +4 -0
  175. package/dist/index.d.mts.map +1 -0
  176. package/dist/index.mjs +4 -0
  177. package/dist/index.mjs.map +1 -0
  178. package/dist/sdk/authentication-jwt-bearer/flow-siwe.cjs +114 -0
  179. package/dist/sdk/authentication-jwt-bearer/flow-siwe.cjs.map +1 -0
  180. package/dist/sdk/authentication-jwt-bearer/{flow-siwe.d.ts → flow-siwe.d.cts} +2 -2
  181. package/dist/sdk/authentication-jwt-bearer/flow-siwe.d.cts.map +1 -0
  182. package/dist/sdk/authentication-jwt-bearer/flow-siwe.d.mts +25 -0
  183. package/dist/sdk/authentication-jwt-bearer/flow-siwe.d.mts.map +1 -0
  184. package/dist/sdk/authentication-jwt-bearer/flow-siwe.mjs +110 -0
  185. package/dist/sdk/authentication-jwt-bearer/flow-siwe.mjs.map +1 -0
  186. package/dist/sdk/authentication-jwt-bearer/flow-srp.cjs +290 -0
  187. package/dist/sdk/authentication-jwt-bearer/flow-srp.cjs.map +1 -0
  188. package/dist/sdk/authentication-jwt-bearer/{flow-srp.d.ts → flow-srp.d.cts} +5 -5
  189. package/dist/sdk/authentication-jwt-bearer/flow-srp.d.cts.map +1 -0
  190. package/dist/sdk/authentication-jwt-bearer/flow-srp.d.mts +44 -0
  191. package/dist/sdk/authentication-jwt-bearer/flow-srp.d.mts.map +1 -0
  192. package/dist/sdk/authentication-jwt-bearer/flow-srp.mjs +263 -0
  193. package/dist/sdk/authentication-jwt-bearer/flow-srp.mjs.map +1 -0
  194. package/dist/sdk/authentication-jwt-bearer/services.cjs +400 -0
  195. package/dist/sdk/authentication-jwt-bearer/services.cjs.map +1 -0
  196. package/dist/sdk/authentication-jwt-bearer/{services.d.ts → services.d.cts} +5 -5
  197. package/dist/sdk/authentication-jwt-bearer/services.d.cts.map +1 -0
  198. package/dist/sdk/authentication-jwt-bearer/services.d.mts +105 -0
  199. package/dist/sdk/authentication-jwt-bearer/services.d.mts.map +1 -0
  200. package/dist/sdk/authentication-jwt-bearer/{services.js → services.mjs} +6 -6
  201. package/dist/sdk/authentication-jwt-bearer/services.mjs.map +1 -0
  202. package/dist/sdk/authentication-jwt-bearer/types.cjs +12 -0
  203. package/dist/sdk/authentication-jwt-bearer/types.cjs.map +1 -0
  204. package/dist/sdk/authentication-jwt-bearer/{types.d.ts → types.d.cts} +2 -2
  205. package/dist/sdk/authentication-jwt-bearer/types.d.cts.map +1 -0
  206. package/dist/sdk/authentication-jwt-bearer/types.d.mts +114 -0
  207. package/dist/sdk/authentication-jwt-bearer/types.d.mts.map +1 -0
  208. package/dist/sdk/authentication-jwt-bearer/{types.js → types.mjs} +1 -1
  209. package/dist/sdk/authentication-jwt-bearer/types.mjs.map +1 -0
  210. package/dist/sdk/authentication-jwt-bearer/utils/identifier.cjs +27 -0
  211. package/dist/sdk/authentication-jwt-bearer/utils/identifier.cjs.map +1 -0
  212. package/dist/sdk/authentication-jwt-bearer/utils/{identifier.d.ts → identifier.d.cts} +2 -2
  213. package/dist/sdk/authentication-jwt-bearer/utils/identifier.d.cts.map +1 -0
  214. package/dist/sdk/authentication-jwt-bearer/utils/identifier.d.mts +13 -0
  215. package/dist/sdk/authentication-jwt-bearer/utils/identifier.d.mts.map +1 -0
  216. package/dist/sdk/authentication-jwt-bearer/utils/{identifier.js → identifier.mjs} +2 -2
  217. package/dist/sdk/authentication-jwt-bearer/utils/identifier.mjs.map +1 -0
  218. package/dist/sdk/authentication-jwt-bearer/utils/time.cjs +17 -0
  219. package/dist/sdk/authentication-jwt-bearer/utils/time.cjs.map +1 -0
  220. package/dist/sdk/authentication-jwt-bearer/utils/{time.d.ts → time.d.cts} +1 -1
  221. package/dist/sdk/authentication-jwt-bearer/utils/time.d.cts.map +1 -0
  222. package/dist/sdk/authentication-jwt-bearer/utils/time.d.mts +8 -0
  223. package/dist/sdk/authentication-jwt-bearer/utils/time.d.mts.map +1 -0
  224. package/dist/sdk/authentication-jwt-bearer/utils/{time.js → time.mjs} +1 -1
  225. package/dist/sdk/authentication-jwt-bearer/utils/time.mjs.map +1 -0
  226. package/dist/sdk/authentication.cjs +132 -0
  227. package/dist/sdk/authentication.cjs.map +1 -0
  228. package/dist/sdk/{authentication.d.ts → authentication.d.cts} +9 -9
  229. package/dist/sdk/authentication.d.cts.map +1 -0
  230. package/dist/sdk/authentication.d.mts +38 -0
  231. package/dist/sdk/authentication.d.mts.map +1 -0
  232. package/dist/sdk/authentication.mjs +112 -0
  233. package/dist/sdk/authentication.mjs.map +1 -0
  234. package/dist/sdk/constants.cjs +7 -0
  235. package/dist/sdk/constants.cjs.map +1 -0
  236. package/dist/sdk/{constants.d.ts → constants.d.cts} +1 -1
  237. package/dist/sdk/constants.d.cts.map +1 -0
  238. package/dist/sdk/constants.d.mts +4 -0
  239. package/dist/sdk/constants.d.mts.map +1 -0
  240. package/dist/sdk/{constants.js → constants.mjs} +1 -1
  241. package/dist/sdk/constants.mjs.map +1 -0
  242. package/dist/sdk/errors.cjs +76 -0
  243. package/dist/sdk/errors.cjs.map +1 -0
  244. package/dist/sdk/{errors.d.ts → errors.d.cts} +1 -1
  245. package/dist/sdk/errors.d.cts.map +1 -0
  246. package/dist/sdk/errors.d.mts +34 -0
  247. package/dist/sdk/errors.d.mts.map +1 -0
  248. package/dist/sdk/{errors.js → errors.mjs} +3 -4
  249. package/dist/sdk/errors.mjs.map +1 -0
  250. package/dist/sdk/index.cjs +24 -0
  251. package/dist/sdk/index.cjs.map +1 -0
  252. package/dist/sdk/index.d.cts +8 -0
  253. package/dist/sdk/index.d.cts.map +1 -0
  254. package/dist/sdk/index.d.mts +8 -0
  255. package/dist/sdk/index.d.mts.map +1 -0
  256. package/dist/sdk/index.mjs +8 -0
  257. package/dist/sdk/index.mjs.map +1 -0
  258. package/dist/sdk/mocks/auth.cjs +82 -0
  259. package/dist/sdk/mocks/auth.cjs.map +1 -0
  260. package/dist/sdk/mocks/{auth.d.ts → auth.d.cts} +2 -2
  261. package/dist/sdk/mocks/auth.d.cts.map +1 -0
  262. package/dist/sdk/mocks/auth.d.mts +69 -0
  263. package/dist/sdk/mocks/auth.d.mts.map +1 -0
  264. package/dist/sdk/mocks/{auth.js → auth.mjs} +3 -3
  265. package/dist/sdk/mocks/auth.mjs.map +1 -0
  266. package/dist/sdk/mocks/userstorage.cjs +43 -0
  267. package/dist/sdk/mocks/userstorage.cjs.map +1 -0
  268. package/dist/sdk/mocks/{userstorage.d.ts → userstorage.d.cts} +1 -1
  269. package/dist/sdk/mocks/userstorage.d.cts.map +1 -0
  270. package/dist/sdk/mocks/userstorage.d.mts +10 -0
  271. package/dist/sdk/mocks/userstorage.d.mts.map +1 -0
  272. package/dist/sdk/mocks/{userstorage.js → userstorage.mjs} +5 -5
  273. package/dist/sdk/mocks/userstorage.mjs.map +1 -0
  274. package/dist/sdk/user-storage.cjs +386 -0
  275. package/dist/sdk/user-storage.cjs.map +1 -0
  276. package/dist/sdk/{user-storage.d.ts → user-storage.d.cts} +5 -5
  277. package/dist/sdk/user-storage.d.cts.map +1 -0
  278. package/dist/sdk/user-storage.d.mts +47 -0
  279. package/dist/sdk/user-storage.d.mts.map +1 -0
  280. package/dist/sdk/user-storage.mjs +358 -0
  281. package/dist/sdk/user-storage.mjs.map +1 -0
  282. package/dist/sdk/utils/eip-6963-metamask-provider.cjs +70 -0
  283. package/dist/sdk/utils/eip-6963-metamask-provider.cjs.map +1 -0
  284. package/dist/sdk/utils/{eip-6963-metamask-provider.d.ts → eip-6963-metamask-provider.d.cts} +2 -2
  285. package/dist/sdk/utils/eip-6963-metamask-provider.d.cts.map +1 -0
  286. package/dist/sdk/utils/eip-6963-metamask-provider.d.mts +25 -0
  287. package/dist/sdk/utils/eip-6963-metamask-provider.d.mts.map +1 -0
  288. package/dist/sdk/utils/{eip-6963-metamask-provider.js → eip-6963-metamask-provider.mjs} +1 -1
  289. package/dist/sdk/utils/eip-6963-metamask-provider.mjs.map +1 -0
  290. package/dist/sdk/utils/messaging-signing-snap-requests.cjs +96 -0
  291. package/dist/sdk/utils/messaging-signing-snap-requests.cjs.map +1 -0
  292. package/dist/sdk/utils/{messaging-signing-snap-requests.d.ts → messaging-signing-snap-requests.d.cts} +2 -2
  293. package/dist/sdk/utils/messaging-signing-snap-requests.d.cts.map +1 -0
  294. package/dist/sdk/utils/messaging-signing-snap-requests.d.mts +41 -0
  295. package/dist/sdk/utils/messaging-signing-snap-requests.d.mts.map +1 -0
  296. package/dist/sdk/utils/{messaging-signing-snap-requests.js → messaging-signing-snap-requests.mjs} +1 -1
  297. package/dist/sdk/utils/messaging-signing-snap-requests.mjs.map +1 -0
  298. package/dist/sdk/utils/validate-login-response.cjs +49 -0
  299. package/dist/sdk/utils/validate-login-response.cjs.map +1 -0
  300. package/dist/sdk/utils/{validate-login-response.d.ts → validate-login-response.d.cts} +2 -2
  301. package/dist/sdk/utils/validate-login-response.d.cts.map +1 -0
  302. package/dist/sdk/utils/validate-login-response.d.mts +14 -0
  303. package/dist/sdk/utils/validate-login-response.d.mts.map +1 -0
  304. package/dist/sdk/utils/{validate-login-response.js → validate-login-response.mjs} +1 -1
  305. package/dist/sdk/utils/validate-login-response.mjs.map +1 -0
  306. package/dist/sdk/utils/validate-pair-response.cjs +29 -0
  307. package/dist/sdk/utils/validate-pair-response.cjs.map +1 -0
  308. package/dist/sdk/utils/{validate-pair-response.d.ts → validate-pair-response.d.cts} +1 -1
  309. package/dist/sdk/utils/validate-pair-response.d.cts.map +1 -0
  310. package/dist/sdk/utils/validate-pair-response.d.mts +26 -0
  311. package/dist/sdk/utils/validate-pair-response.d.mts.map +1 -0
  312. package/dist/sdk/utils/{validate-pair-response.js → validate-pair-response.mjs} +1 -1
  313. package/dist/sdk/utils/validate-pair-response.mjs.map +1 -0
  314. package/dist/shared/encryption/cache.cjs +77 -0
  315. package/dist/shared/encryption/cache.cjs.map +1 -0
  316. package/dist/shared/encryption/{cache.d.ts → cache.d.cts} +1 -1
  317. package/dist/shared/encryption/cache.d.cts.map +1 -0
  318. package/dist/shared/encryption/cache.d.mts +32 -0
  319. package/dist/shared/encryption/cache.d.mts.map +1 -0
  320. package/dist/shared/encryption/{cache.js → cache.mjs} +4 -4
  321. package/dist/shared/encryption/cache.mjs.map +1 -0
  322. package/dist/shared/encryption/constants.cjs +17 -0
  323. package/dist/shared/encryption/constants.cjs.map +1 -0
  324. package/dist/shared/encryption/{constants.d.ts → constants.d.cts} +2 -2
  325. package/dist/shared/encryption/constants.d.cts.map +1 -0
  326. package/dist/shared/encryption/constants.d.mts +9 -0
  327. package/dist/shared/encryption/constants.d.mts.map +1 -0
  328. package/dist/shared/encryption/{constants.js → constants.mjs} +1 -1
  329. package/dist/shared/encryption/constants.mjs.map +1 -0
  330. package/dist/shared/encryption/encryption.cjs +209 -0
  331. package/dist/shared/encryption/encryption.cjs.map +1 -0
  332. package/dist/shared/encryption/{encryption.d.ts → encryption.d.cts} +3 -3
  333. package/dist/shared/encryption/encryption.d.cts.map +1 -0
  334. package/dist/shared/encryption/encryption.d.mts +30 -0
  335. package/dist/shared/encryption/encryption.d.mts.map +1 -0
  336. package/dist/shared/encryption/encryption.mjs +205 -0
  337. package/dist/shared/encryption/encryption.mjs.map +1 -0
  338. package/dist/shared/encryption/index.cjs +25 -0
  339. package/dist/shared/encryption/index.cjs.map +1 -0
  340. package/dist/shared/encryption/index.d.cts +5 -0
  341. package/dist/shared/encryption/index.d.cts.map +1 -0
  342. package/dist/shared/encryption/index.d.mts +5 -0
  343. package/dist/shared/encryption/index.d.mts.map +1 -0
  344. package/dist/shared/encryption/index.mjs +5 -0
  345. package/dist/shared/encryption/index.mjs.map +1 -0
  346. package/dist/shared/encryption/utils.cjs +21 -0
  347. package/dist/shared/encryption/utils.cjs.map +1 -0
  348. package/dist/shared/encryption/{utils.d.ts → utils.d.cts} +3 -3
  349. package/dist/shared/encryption/utils.d.cts.map +1 -0
  350. package/dist/shared/encryption/utils.d.mts +5 -0
  351. package/dist/shared/encryption/utils.d.mts.map +1 -0
  352. package/dist/shared/encryption/{utils.js → utils.mjs} +1 -1
  353. package/dist/shared/encryption/utils.mjs.map +1 -0
  354. package/dist/shared/env.cjs +85 -0
  355. package/dist/shared/env.cjs.map +1 -0
  356. package/dist/shared/{env.d.ts → env.d.cts} +1 -1
  357. package/dist/shared/env.d.cts.map +1 -0
  358. package/dist/shared/env.d.mts +34 -0
  359. package/dist/shared/env.d.mts.map +1 -0
  360. package/dist/shared/{env.js → env.mjs} +1 -1
  361. package/dist/shared/env.mjs.map +1 -0
  362. package/dist/shared/storage-schema.cjs +42 -0
  363. package/dist/shared/storage-schema.cjs.map +1 -0
  364. package/dist/shared/{storage-schema.d.ts → storage-schema.d.cts} +1 -1
  365. package/dist/shared/storage-schema.d.cts.map +1 -0
  366. package/dist/shared/storage-schema.d.mts +34 -0
  367. package/dist/shared/storage-schema.d.mts.map +1 -0
  368. package/dist/shared/{storage-schema.js → storage-schema.mjs} +2 -2
  369. package/dist/shared/storage-schema.mjs.map +1 -0
  370. package/dist/shared/types/encryption.cjs +3 -0
  371. package/dist/shared/types/encryption.cjs.map +1 -0
  372. package/dist/shared/types/{encryption.d.ts → encryption.d.cts} +1 -1
  373. package/dist/shared/types/encryption.d.cts.map +1 -0
  374. package/dist/shared/types/encryption.d.mts +2 -0
  375. package/dist/shared/types/encryption.d.mts.map +1 -0
  376. package/dist/shared/types/encryption.mjs +2 -0
  377. package/dist/shared/types/encryption.mjs.map +1 -0
  378. package/dist/shared/types/services.cjs +3 -0
  379. package/dist/shared/types/services.cjs.map +1 -0
  380. package/dist/shared/types/{services.d.ts → services.d.cts} +2 -2
  381. package/dist/shared/types/services.d.cts.map +1 -0
  382. package/dist/shared/types/services.d.mts +17 -0
  383. package/dist/shared/types/services.d.mts.map +1 -0
  384. package/dist/shared/types/services.mjs +2 -0
  385. package/dist/shared/types/services.mjs.map +1 -0
  386. package/dist/shared/utils/entropy-source.cjs +37 -0
  387. package/dist/shared/utils/entropy-source.cjs.map +1 -0
  388. package/dist/shared/utils/{entropy-source.d.ts → entropy-source.d.cts} +2 -2
  389. package/dist/shared/utils/entropy-source.d.cts.map +1 -0
  390. package/dist/shared/utils/entropy-source.d.mts +22 -0
  391. package/dist/shared/utils/entropy-source.d.mts.map +1 -0
  392. package/dist/shared/utils/{entropy-source.js → entropy-source.mjs} +2 -2
  393. package/dist/shared/utils/entropy-source.mjs.map +1 -0
  394. package/dist/shared/utils/event-queue.cjs +24 -0
  395. package/dist/shared/utils/event-queue.cjs.map +1 -0
  396. package/dist/shared/utils/{event-queue.d.ts → event-queue.d.cts} +1 -1
  397. package/dist/shared/utils/event-queue.d.cts.map +1 -0
  398. package/dist/shared/utils/event-queue.d.mts +6 -0
  399. package/dist/shared/utils/event-queue.d.mts.map +1 -0
  400. package/dist/shared/utils/{event-queue.js → event-queue.mjs} +4 -2
  401. package/dist/shared/utils/event-queue.mjs.map +1 -0
  402. package/dist/shared/utils/hd-keyring-seed.cjs +49 -0
  403. package/dist/shared/utils/hd-keyring-seed.cjs.map +1 -0
  404. package/dist/shared/utils/{hd-keyring-seed.d.ts → hd-keyring-seed.d.cts} +3 -3
  405. package/dist/shared/utils/hd-keyring-seed.d.cts.map +1 -0
  406. package/dist/shared/utils/hd-keyring-seed.d.mts +27 -0
  407. package/dist/shared/utils/hd-keyring-seed.d.mts.map +1 -0
  408. package/dist/shared/utils/{hd-keyring-seed.js → hd-keyring-seed.mjs} +1 -1
  409. package/dist/shared/utils/hd-keyring-seed.mjs.map +1 -0
  410. package/dist/shared/utils/message-signing.cjs +147 -0
  411. package/dist/shared/utils/message-signing.cjs.map +1 -0
  412. package/dist/shared/utils/{message-signing.d.ts → message-signing.d.cts} +1 -1
  413. package/dist/shared/utils/message-signing.d.cts.map +1 -0
  414. package/dist/shared/utils/message-signing.d.mts +73 -0
  415. package/dist/shared/utils/message-signing.d.mts.map +1 -0
  416. package/dist/shared/utils/{message-signing.js → message-signing.mjs} +7 -7
  417. package/dist/shared/utils/message-signing.mjs.map +1 -0
  418. package/package.json +56 -22
  419. package/dist/controllers/authentication/AuthenticationController-method-action-types.d.ts.map +0 -1
  420. package/dist/controllers/authentication/AuthenticationController-method-action-types.js.map +0 -1
  421. package/dist/controllers/authentication/AuthenticationController.d.ts.map +0 -1
  422. package/dist/controllers/authentication/AuthenticationController.js +0 -536
  423. package/dist/controllers/authentication/AuthenticationController.js.map +0 -1
  424. package/dist/controllers/authentication/index.d.ts.map +0 -1
  425. package/dist/controllers/authentication/index.js +0 -6
  426. package/dist/controllers/authentication/index.js.map +0 -1
  427. package/dist/controllers/authentication/mocks/index.d.ts +0 -2
  428. package/dist/controllers/authentication/mocks/index.d.ts.map +0 -1
  429. package/dist/controllers/authentication/mocks/index.js +0 -2
  430. package/dist/controllers/authentication/mocks/index.js.map +0 -1
  431. package/dist/controllers/authentication/mocks/mockResponses.d.ts.map +0 -1
  432. package/dist/controllers/authentication/mocks/mockResponses.js.map +0 -1
  433. package/dist/controllers/index.d.ts +0 -3
  434. package/dist/controllers/index.d.ts.map +0 -1
  435. package/dist/controllers/index.js +0 -3
  436. package/dist/controllers/index.js.map +0 -1
  437. package/dist/controllers/user-storage/UserStorageController-method-action-types.d.ts.map +0 -1
  438. package/dist/controllers/user-storage/UserStorageController-method-action-types.js.map +0 -1
  439. package/dist/controllers/user-storage/UserStorageController.d.ts.map +0 -1
  440. package/dist/controllers/user-storage/UserStorageController.js +0 -429
  441. package/dist/controllers/user-storage/UserStorageController.js.map +0 -1
  442. package/dist/controllers/user-storage/constants.d.ts +0 -15
  443. package/dist/controllers/user-storage/constants.d.ts.map +0 -1
  444. package/dist/controllers/user-storage/constants.js.map +0 -1
  445. package/dist/controllers/user-storage/contact-syncing/constants.d.ts.map +0 -1
  446. package/dist/controllers/user-storage/contact-syncing/constants.js.map +0 -1
  447. package/dist/controllers/user-storage/contact-syncing/controller-integration.d.ts.map +0 -1
  448. package/dist/controllers/user-storage/contact-syncing/controller-integration.js.map +0 -1
  449. package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.d.ts.map +0 -1
  450. package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.js.map +0 -1
  451. package/dist/controllers/user-storage/contact-syncing/sync-utils.d.ts.map +0 -1
  452. package/dist/controllers/user-storage/contact-syncing/sync-utils.js.map +0 -1
  453. package/dist/controllers/user-storage/contact-syncing/types.d.ts.map +0 -1
  454. package/dist/controllers/user-storage/contact-syncing/types.js +0 -2
  455. package/dist/controllers/user-storage/contact-syncing/types.js.map +0 -1
  456. package/dist/controllers/user-storage/contact-syncing/utils.d.ts.map +0 -1
  457. package/dist/controllers/user-storage/contact-syncing/utils.js.map +0 -1
  458. package/dist/controllers/user-storage/index.d.ts.map +0 -1
  459. package/dist/controllers/user-storage/index.js +0 -9
  460. package/dist/controllers/user-storage/index.js.map +0 -1
  461. package/dist/controllers/user-storage/mocks/index.d.ts +0 -3
  462. package/dist/controllers/user-storage/mocks/index.d.ts.map +0 -1
  463. package/dist/controllers/user-storage/mocks/index.js +0 -3
  464. package/dist/controllers/user-storage/mocks/index.js.map +0 -1
  465. package/dist/controllers/user-storage/mocks/mockResponses.d.ts.map +0 -1
  466. package/dist/controllers/user-storage/mocks/mockResponses.js.map +0 -1
  467. package/dist/controllers/user-storage/mocks/mockStorage.d.ts.map +0 -1
  468. package/dist/controllers/user-storage/mocks/mockStorage.js.map +0 -1
  469. package/dist/controllers/user-storage/types.d.ts.map +0 -1
  470. package/dist/controllers/user-storage/types.js +0 -2
  471. package/dist/controllers/user-storage/types.js.map +0 -1
  472. package/dist/controllers/user-storage/utils.d.ts.map +0 -1
  473. package/dist/controllers/user-storage/utils.js.map +0 -1
  474. package/dist/index.d.ts +0 -4
  475. package/dist/index.d.ts.map +0 -1
  476. package/dist/index.js +0 -4
  477. package/dist/index.js.map +0 -1
  478. package/dist/sdk/authentication-jwt-bearer/flow-siwe.d.ts.map +0 -1
  479. package/dist/sdk/authentication-jwt-bearer/flow-siwe.js +0 -99
  480. package/dist/sdk/authentication-jwt-bearer/flow-siwe.js.map +0 -1
  481. package/dist/sdk/authentication-jwt-bearer/flow-srp.d.ts.map +0 -1
  482. package/dist/sdk/authentication-jwt-bearer/flow-srp.js +0 -255
  483. package/dist/sdk/authentication-jwt-bearer/flow-srp.js.map +0 -1
  484. package/dist/sdk/authentication-jwt-bearer/services.d.ts.map +0 -1
  485. package/dist/sdk/authentication-jwt-bearer/services.js.map +0 -1
  486. package/dist/sdk/authentication-jwt-bearer/types.d.ts.map +0 -1
  487. package/dist/sdk/authentication-jwt-bearer/types.js.map +0 -1
  488. package/dist/sdk/authentication-jwt-bearer/utils/identifier.d.ts.map +0 -1
  489. package/dist/sdk/authentication-jwt-bearer/utils/identifier.js.map +0 -1
  490. package/dist/sdk/authentication-jwt-bearer/utils/time.d.ts.map +0 -1
  491. package/dist/sdk/authentication-jwt-bearer/utils/time.js.map +0 -1
  492. package/dist/sdk/authentication.d.ts.map +0 -1
  493. package/dist/sdk/authentication.js +0 -100
  494. package/dist/sdk/authentication.js.map +0 -1
  495. package/dist/sdk/constants.d.ts.map +0 -1
  496. package/dist/sdk/constants.js.map +0 -1
  497. package/dist/sdk/errors.d.ts.map +0 -1
  498. package/dist/sdk/errors.js.map +0 -1
  499. package/dist/sdk/index.d.ts +0 -8
  500. package/dist/sdk/index.d.ts.map +0 -1
  501. package/dist/sdk/index.js +0 -8
  502. package/dist/sdk/index.js.map +0 -1
  503. package/dist/sdk/mocks/auth.d.ts.map +0 -1
  504. package/dist/sdk/mocks/auth.js.map +0 -1
  505. package/dist/sdk/mocks/userstorage.d.ts.map +0 -1
  506. package/dist/sdk/mocks/userstorage.js.map +0 -1
  507. package/dist/sdk/user-storage.d.ts.map +0 -1
  508. package/dist/sdk/user-storage.js +0 -364
  509. package/dist/sdk/user-storage.js.map +0 -1
  510. package/dist/sdk/utils/eip-6963-metamask-provider.d.ts.map +0 -1
  511. package/dist/sdk/utils/eip-6963-metamask-provider.js.map +0 -1
  512. package/dist/sdk/utils/messaging-signing-snap-requests.d.ts.map +0 -1
  513. package/dist/sdk/utils/messaging-signing-snap-requests.js.map +0 -1
  514. package/dist/sdk/utils/validate-login-response.d.ts.map +0 -1
  515. package/dist/sdk/utils/validate-login-response.js.map +0 -1
  516. package/dist/sdk/utils/validate-pair-response.d.ts.map +0 -1
  517. package/dist/sdk/utils/validate-pair-response.js.map +0 -1
  518. package/dist/shared/encryption/cache.d.ts.map +0 -1
  519. package/dist/shared/encryption/cache.js.map +0 -1
  520. package/dist/shared/encryption/constants.d.ts.map +0 -1
  521. package/dist/shared/encryption/constants.js.map +0 -1
  522. package/dist/shared/encryption/encryption.d.ts.map +0 -1
  523. package/dist/shared/encryption/encryption.js +0 -202
  524. package/dist/shared/encryption/encryption.js.map +0 -1
  525. package/dist/shared/encryption/index.d.ts +0 -5
  526. package/dist/shared/encryption/index.d.ts.map +0 -1
  527. package/dist/shared/encryption/index.js +0 -5
  528. package/dist/shared/encryption/index.js.map +0 -1
  529. package/dist/shared/encryption/utils.d.ts.map +0 -1
  530. package/dist/shared/encryption/utils.js.map +0 -1
  531. package/dist/shared/env.d.ts.map +0 -1
  532. package/dist/shared/env.js.map +0 -1
  533. package/dist/shared/storage-schema.d.ts.map +0 -1
  534. package/dist/shared/storage-schema.js.map +0 -1
  535. package/dist/shared/types/encryption.d.ts.map +0 -1
  536. package/dist/shared/types/encryption.js +0 -2
  537. package/dist/shared/types/encryption.js.map +0 -1
  538. package/dist/shared/types/services.d.ts.map +0 -1
  539. package/dist/shared/types/services.js +0 -2
  540. package/dist/shared/types/services.js.map +0 -1
  541. package/dist/shared/utils/entropy-source.d.ts.map +0 -1
  542. package/dist/shared/utils/entropy-source.js.map +0 -1
  543. package/dist/shared/utils/event-queue.d.ts.map +0 -1
  544. package/dist/shared/utils/event-queue.js.map +0 -1
  545. package/dist/shared/utils/hd-keyring-seed.d.ts.map +0 -1
  546. package/dist/shared/utils/hd-keyring-seed.js.map +0 -1
  547. package/dist/shared/utils/message-signing.d.ts.map +0 -1
  548. package/dist/shared/utils/message-signing.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"mockResponses.js","sourceRoot":"","sources":["../../../../src/controllers/authentication/mocks/mockResponses.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,IAAI,uBAAuB,EAC9C,QAAQ,IAAI,YAAY,EACxB,uBAAuB,IAAI,2BAA2B,EACtD,wBAAwB,IAAI,4BAA4B,EACxD,2BAA2B,IAAI,+BAA+B,EAC9D,oCAAoC,IAAI,wCAAwC,EAChF,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,+BAA+B,GAChC,MAAM,4BAA4B,CAAC;AAQpC,MAAM,CAAC,MAAM,mBAAmB,GAAG,uBAAuB,CAAC;AAC3D,MAAM,CAAC,MAAM,UAAU,GAAG,mBAAmB,CAAC,KAAK,CAAC;AACpD,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAC;AAErC,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAiB,EAAE;IACzD,OAAO;QACL,GAAG,EAAE,cAAc;QACnB,aAAa,EAAE,KAAK;QACpB,QAAQ,EAAE,CACR,CAAW,EACX,IAAa,EACb,+BAA+D,EACnC,EAAE;YAC9B,2FAA2F;YAC3F,oEAAoE;YACpE,MAAM,UAAU,GAAG,IAAI,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;YAClD,MAAM,aAAa,GAAG,+BAA+B,EAAE,CAAC,UAAU,IAAI,EAAE,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WAAW,CACZ,CAAC;YAEF,OAAO;gBACL,GAAG,wBAAwB;gBAC3B,YAAY,EAAE,aAAa;oBACzB,CAAC,CAAC,aAAa,CAAC,aAAa,CAAC;oBAC9B,CAAC,CAAC,wBAAwB,CAAC,YAAY;aAC1C,CAAC;QACJ,CAAC;KACqB,CAAC;AAC3B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oCAAoC,GAC/C,wCAAwC,CAAC;AAE3C,MAAM,CAAC,MAAM,mCAAmC,GAAG,GAAiB,EAAE;IACpE,OAAO;QACL,GAAG,EAAE,+BAA+B;QACpC,aAAa,EAAE,MAAM;QACrB,QAAQ,EAAE,oCAAoC;KACxB,CAAC;AAC3B,CAAC,CAAC","sourcesContent":["import {\n MOCK_NONCE_RESPONSE as SDK_MOCK_NONCE_RESPONSE,\n MOCK_JWT as SDK_MOCK_JWT,\n MOCK_SRP_LOGIN_RESPONSE as SDK_MOCK_SRP_LOGIN_RESPONSE,\n MOCK_OIDC_TOKEN_RESPONSE as SDK_MOCK_OIDC_TOKEN_RESPONSE,\n MOCK_PAIR_PROFILES_RESPONSE as SDK_MOCK_PAIR_PROFILES_RESPONSE,\n MOCK_CUSTOMER_SERVICE_TOKEN_RESPONSE as SDK_MOCK_CUSTOMER_SERVICE_TOKEN_RESPONSE,\n MOCK_NONCE_URL,\n MOCK_SRP_LOGIN_URL,\n MOCK_OIDC_TOKEN_URL,\n MOCK_PAIR_PROFILES_URL,\n MOCK_CUSTOMER_SERVICE_TOKEN_URL,\n} from '../../../sdk/mocks/auth.js';\n\ntype MockResponse = {\n url: string;\n requestMethod: 'GET' | 'POST' | 'PUT';\n response: unknown;\n};\n\nexport const MOCK_NONCE_RESPONSE = SDK_MOCK_NONCE_RESPONSE;\nexport const MOCK_NONCE = MOCK_NONCE_RESPONSE.nonce;\nexport const MOCK_JWT = SDK_MOCK_JWT;\n\nexport const getMockAuthNonceResponse = (): MockResponse => {\n return {\n url: MOCK_NONCE_URL,\n requestMethod: 'GET',\n response: (\n _?: unknown,\n path?: string,\n getE2ESrpIdentifierForPublicKey?: (publicKey: string) => string,\n ): typeof MOCK_NONCE_RESPONSE => {\n // The goal here is to have this identifier bubble all the way up to being the access token\n // That way, we can use it to segregate data in the test environment\n const identifier = path?.split('?identifier=')[1];\n const e2eIdentifier = getE2ESrpIdentifierForPublicKey?.(identifier ?? '');\n\n return {\n ...MOCK_NONCE_RESPONSE,\n nonce: e2eIdentifier ?? MOCK_NONCE_RESPONSE.nonce,\n identifier: MOCK_NONCE_RESPONSE.identifier,\n };\n },\n } satisfies MockResponse;\n};\n\nexport const MOCK_LOGIN_RESPONSE = SDK_MOCK_SRP_LOGIN_RESPONSE;\n\nexport const getMockAuthLoginResponse = (): MockResponse => {\n return {\n url: MOCK_SRP_LOGIN_URL,\n requestMethod: 'POST',\n // In case this mock is used in an E2E test, we populate token, profile_id and identifier_id with the e2eIdentifier\n // to make it easier to segregate data in the test environment.\n response: (requestJsonBody?: {\n raw_message: string;\n }): typeof MOCK_LOGIN_RESPONSE => {\n // Format: metamask:<nonce>:<pubkey>[:<tag>]. Nonce (index 1) carries the\n // e2e identifier set by getMockAuthNonceResponse — stable across the\n // optional login tag segment.\n const e2eIdentifier = requestJsonBody?.raw_message.split(':')[1];\n\n return {\n ...MOCK_LOGIN_RESPONSE,\n token: e2eIdentifier ?? MOCK_LOGIN_RESPONSE.token,\n profile: {\n ...MOCK_LOGIN_RESPONSE.profile,\n profile_id: e2eIdentifier ?? MOCK_LOGIN_RESPONSE.profile.profile_id,\n identifier_id:\n e2eIdentifier ?? MOCK_LOGIN_RESPONSE.profile.identifier_id,\n },\n };\n },\n } satisfies MockResponse;\n};\n\nexport const MOCK_OATH_TOKEN_RESPONSE = SDK_MOCK_OIDC_TOKEN_RESPONSE;\n\nconst MOCK_JWT_FAR_FUTURE_EXP = 4102444800; // 2100-01-01\n\n/**\n * Wraps a plain-text identifier in a minimal JWT so that client-side\n * JWT validation (exp check) passes in E2E tests. The identifier is\n * stored in the `sub` claim and can be extracted via {@link getE2EIdentifierFromJwt}.\n *\n * @param identifier - The plain-text E2E identifier to wrap.\n * @returns A JWT-shaped string containing the identifier.\n */\nconst wrapInMockJwt = (identifier: string): string => {\n const header = btoa(JSON.stringify({ alg: 'none', typ: 'JWT' }));\n const payload = btoa(\n JSON.stringify({ sub: identifier, exp: MOCK_JWT_FAR_FUTURE_EXP }),\n );\n return `${header}.${payload}.mock`;\n};\n\n/**\n * Extracts the E2E identifier (`sub` claim) from a mock JWT created\n * by {@link wrapInMockJwt}. Falls back to returning the raw token if\n * decoding fails (backward compatibility with raw-identifier headers).\n *\n * @param token - A bearer token string (JWT or raw identifier).\n * @returns The decoded identifier, or the original token as-is.\n */\nexport const getE2EIdentifierFromJwt = (token: string): string => {\n try {\n const parts = token.split('.');\n if (parts.length === 3) {\n const { sub } = JSON.parse(atob(parts[1]));\n if (typeof sub === 'string' && sub.length > 0) {\n return sub;\n }\n }\n } catch {\n // not a JWT — fall through\n }\n return token;\n};\n\nexport const MOCK_PAIR_PROFILES_RESPONSE = SDK_MOCK_PAIR_PROFILES_RESPONSE;\n\nexport const getMockAuthPairResponse = (): MockResponse => {\n return {\n url: MOCK_PAIR_PROFILES_URL,\n requestMethod: 'POST',\n response: MOCK_PAIR_PROFILES_RESPONSE,\n } satisfies MockResponse;\n};\n\nexport const getMockAuthAccessTokenResponse = (): MockResponse => {\n return {\n url: MOCK_OIDC_TOKEN_URL,\n requestMethod: 'POST',\n response: (requestJsonBody?: string): typeof MOCK_OATH_TOKEN_RESPONSE => {\n // We wrap the e2eIdentifier in a JWT so client-side JWT validation passes.\n // The mock server extracts the identifier back via getE2EIdentifierFromJwt.\n const e2eIdentifier = new URLSearchParams(requestJsonBody).get(\n 'assertion',\n );\n\n return {\n ...MOCK_OATH_TOKEN_RESPONSE,\n access_token: e2eIdentifier\n ? wrapInMockJwt(e2eIdentifier)\n : MOCK_OATH_TOKEN_RESPONSE.access_token,\n };\n },\n } satisfies MockResponse;\n};\n\nexport const MOCK_CUSTOMER_SERVICE_TOKEN_RESPONSE =\n SDK_MOCK_CUSTOMER_SERVICE_TOKEN_RESPONSE;\n\nexport const getMockCustomerServiceTokenResponse = (): MockResponse => {\n return {\n url: MOCK_CUSTOMER_SERVICE_TOKEN_URL,\n requestMethod: 'POST',\n response: MOCK_CUSTOMER_SERVICE_TOKEN_RESPONSE,\n } satisfies MockResponse;\n};\n"]}
@@ -1,3 +0,0 @@
1
- export * as Authentication from './authentication/index.js';
2
- export * as UserStorage from './user-storage/index.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/controllers/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,WAAW,MAAM,yBAAyB,CAAC"}
@@ -1,3 +0,0 @@
1
- export * as Authentication from './authentication/index.js';
2
- export * as UserStorage from './user-storage/index.js';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/controllers/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,WAAW,MAAM,yBAAyB,CAAC","sourcesContent":["export * as Authentication from './authentication/index.js';\nexport * as UserStorage from './user-storage/index.js';\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"UserStorageController-method-action-types.d.ts","sourceRoot":"","sources":["../../../src/controllers/user-storage/UserStorageController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAExE;;;;;;;GAOG;AACH,MAAM,MAAM,4CAA4C,GAAG;IACzD,IAAI,EAAE,yCAAyC,CAAC;IAChD,OAAO,EAAE,qBAAqB,CAAC,mBAAmB,CAAC,CAAC;CACrD,CAAC;AAEF;;;;;;;GAOG;AACH,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/D,OAAO,EAAE,qBAAqB,CAAC,kCAAkC,CAAC,CAAC;CACpE,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,wDAAwD,GAAG;IACrE,IAAI,EAAE,qDAAqD,CAAC;IAC5D,OAAO,EAAE,qBAAqB,CAAC,+BAA+B,CAAC,CAAC;CACjE,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,sDAAsD,GAAG;IACnE,IAAI,EAAE,mDAAmD,CAAC;IAC1D,OAAO,EAAE,qBAAqB,CAAC,6BAA6B,CAAC,CAAC;CAC/D,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAC1C,4CAA4C,GAC5C,6DAA6D,GAC7D,4CAA4C,GAC5C,iDAAiD,GACjD,+CAA+C,GAC/C,gEAAgE,GAChE,oDAAoD,GACpD,wCAAwC,GACxC,6CAA6C,GAC7C,2DAA2D,GAC3D,wDAAwD,GACxD,sDAAsD,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"UserStorageController-method-action-types.js","sourceRoot":"","sources":["../../../src/controllers/user-storage/UserStorageController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { UserStorageController } from './UserStorageController.js';\n\n/**\n * Allows retrieval of stored data. Data stored is string formatted.\n * Developers can extend the entry path and entry name through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}.${key}` that matches schema\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns the decrypted string contents found from user storage (or null if not found)\n */\nexport type UserStorageControllerPerformGetStorageAction = {\n type: `UserStorageController:performGetStorage`;\n handler: UserStorageController['performGetStorage'];\n};\n\n/**\n * Allows retrieval of all stored data for a specific feature. Data stored is formatted as an array of strings.\n * Developers can extend the entry path through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}` that matches schema\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns the array of decrypted string contents found from user storage (or null if not found)\n */\nexport type UserStorageControllerPerformGetStorageAllFeatureEntriesAction = {\n type: `UserStorageController:performGetStorageAllFeatureEntries`;\n handler: UserStorageController['performGetStorageAllFeatureEntries'];\n};\n\n/**\n * Allows storage of user data. Data stored must be string formatted.\n * Developers can extend the entry path and entry name through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}.${key}` that matches schema\n * @param value - The string data you want to store.\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns nothing. NOTE that an error is thrown if fails to store data.\n */\nexport type UserStorageControllerPerformSetStorageAction = {\n type: `UserStorageController:performSetStorage`;\n handler: UserStorageController['performSetStorage'];\n};\n\n/**\n * Allows storage of multiple user data entries for one specific feature. Data stored must be string formatted.\n * Developers can extend the entry path through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}` that matches schema\n * @param values - data to store, in the form of an array of `[entryKey, entryValue]` pairs\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns nothing. NOTE that an error is thrown if fails to store data.\n */\nexport type UserStorageControllerPerformBatchSetStorageAction = {\n type: `UserStorageController:performBatchSetStorage`;\n handler: UserStorageController['performBatchSetStorage'];\n};\n\n/**\n * Allows deletion of user data. Developers can extend the entry path and entry name through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}.${key}` that matches schema\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns nothing. NOTE that an error is thrown if fails to delete data.\n */\nexport type UserStorageControllerPerformDeleteStorageAction = {\n type: `UserStorageController:performDeleteStorage`;\n handler: UserStorageController['performDeleteStorage'];\n};\n\n/**\n * Allows deletion of all user data entries for a specific feature.\n * Developers can extend the entry path through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}` that matches schema\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns nothing. NOTE that an error is thrown if fails to delete data.\n */\nexport type UserStorageControllerPerformDeleteStorageAllFeatureEntriesAction = {\n type: `UserStorageController:performDeleteStorageAllFeatureEntries`;\n handler: UserStorageController['performDeleteStorageAllFeatureEntries'];\n};\n\n/**\n * Allows delete of multiple user data entries for one specific feature. Data deleted must be string formatted.\n * Developers can extend the entry path through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}` that matches schema\n * @param values - data to store, in the form of an array of entryKey[]\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns nothing. NOTE that an error is thrown if fails to store data.\n */\nexport type UserStorageControllerPerformBatchDeleteStorageAction = {\n type: `UserStorageController:performBatchDeleteStorage`;\n handler: UserStorageController['performBatchDeleteStorage'];\n};\n\n/**\n * Retrieves the storage key, for internal use only!\n *\n * @returns the storage key\n */\nexport type UserStorageControllerGetStorageKeyAction = {\n type: `UserStorageController:getStorageKey`;\n handler: UserStorageController['getStorageKey'];\n};\n\n/**\n * Lists all the available HD keyring metadata IDs.\n * These IDs can be used in a multi-SRP context to segregate data specific to different SRPs.\n *\n * @returns A promise that resolves to an array of HD keyring metadata IDs.\n */\nexport type UserStorageControllerListEntropySourcesAction = {\n type: `UserStorageController:listEntropySources`;\n handler: UserStorageController['listEntropySources'];\n};\n\nexport type UserStorageControllerSetIsBackupAndSyncFeatureEnabledAction = {\n type: `UserStorageController:setIsBackupAndSyncFeatureEnabled`;\n handler: UserStorageController['setIsBackupAndSyncFeatureEnabled'];\n};\n\n/**\n * Sets the isContactSyncingInProgress flag to prevent infinite loops during contact synchronization\n *\n * @param isContactSyncingInProgress - Whether contact syncing is in progress\n */\nexport type UserStorageControllerSetIsContactSyncingInProgressAction = {\n type: `UserStorageController:setIsContactSyncingInProgress`;\n handler: UserStorageController['setIsContactSyncingInProgress'];\n};\n\n/**\n * Syncs the address book list with the user storage address book list.\n * This method is used to make sure that the address book list is up-to-date with the user storage address book list and vice-versa.\n * It will add new contacts to the address book list, update/merge conflicting contacts and re-upload the results in some cases to the user storage.\n */\nexport type UserStorageControllerSyncContactsWithUserStorageAction = {\n type: `UserStorageController:syncContactsWithUserStorage`;\n handler: UserStorageController['syncContactsWithUserStorage'];\n};\n\n/**\n * Union of all UserStorageController action types.\n */\nexport type UserStorageControllerMethodActions =\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"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"UserStorageController.d.ts","sourceRoot":"","sources":["../../../src/controllers/user-storage/UserStorageController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wCAAwC,EACxC,wCAAwC,EACxC,4BAA4B,EAC5B,+BAA+B,EAC/B,8BAA8B,EAC9B,iCAAiC,EAClC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAE3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EACV,aAAa,EAGd,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,+BAA+B,EAC/B,0BAA0B,EAC1B,4BAA4B,EAC5B,0CAA0C,EAC3C,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,KAAK,EACV,4BAA4B,EAC5B,uCAAuC,EACvC,qCAAqC,EACtC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,GAAG,EAAe,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAKrE,OAAO,EAAE,UAAU,EAAE,MAAM,m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C,EAC7C,KAAK,EAAE,MAAM,EACb,eAAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,IAAI,CAAC,CAKf;IAED;;;;;;;;OAQG;IACU,sBAAsB,CACjC,IAAI,EAAE,qCAAqC,EAC3C,MAAM,EAAE,CAAC,4BAA4B,EAAE,MAAM,CAAC,EAAE,EAChD,eAAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,IAAI,CAAC,CAKf;IAED;;;;;;OAMG;IACU,oBAAoB,CAC/B,IAAI,EAAE,uCAAuC,EAC7C,eAAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,IAAI,CAAC,CAKf;IAED;;;;;;;OAOG;IACU,qCAAqC,CAChD,IAAI,EAAE,qCAAqC,EAC3C,eAAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,IAAI,CAAC,CAKf;IAED;;;;;;;;OAQG;IACU,yBAAyB,CACpC,IAAI,EAAE,qCAAqC,EAC3C,MAAM,EAAE,4BAA4B,EAAE,EACtC,eAAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,IAAI,CAAC,CAKf;IAED;;;;OAIG;IACU,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,CAE5C;IAED;;;;OAIG;IACI,oBAAoB,IAAI,IAAI,CAElC;IAED;;;;;OAKG;IACG,kBAAkB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAQ5C;IAmFY,gCAAgC,CAC3C,OAAO,EAAE,MAAM,OAAO,sBAAsB,EAC5C,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,IAAI,CAAC,CAmCf;IAUD;;;;OAIG;IACG,6BAA6B,CACjC,0BAA0B,EAAE,OAAO,GAClC,OAAO,CAAC,IAAI,CAAC,CAIf;IAED;;;;OAIG;IACG,2BAA2B,IAAI,OAAO,CAAC,IAAI,CAAC,CA2BjD;CACF"}
@@ -1,429 +0,0 @@
1
- import { BaseController } from '@metamask/base-controller';
2
- import { Env, UserStorage } from '../../sdk/index.js';
3
- import { getHdKeyringEntropySourceIds, getPrimaryHdKeyringEntropySourceId, } from '../../shared/utils/entropy-source.js';
4
- import { EventQueue } from '../../shared/utils/event-queue.js';
5
- import { getHdKeyringSeed } from '../../shared/utils/hd-keyring-seed.js';
6
- import { signMessageWithMessageSigningKey } from '../../shared/utils/message-signing.js';
7
- import { BACKUPANDSYNC_FEATURES } from './constants.js';
8
- import { syncContactsWithUserStorage } from './contact-syncing/controller-integration.js';
9
- import { setupContactSyncingSubscriptions } from './contact-syncing/setup-subscriptions.js';
10
- const controllerName = 'UserStorageController';
11
- export const defaultState = {
12
- isBackupAndSyncEnabled: true,
13
- isBackupAndSyncUpdateLoading: false,
14
- isAccountSyncingEnabled: true,
15
- isContactSyncingEnabled: true,
16
- isContactSyncingInProgress: false,
17
- };
18
- const metadata = {
19
- isBackupAndSyncEnabled: {
20
- includeInStateLogs: true,
21
- persist: true,
22
- includeInDebugSnapshot: true,
23
- usedInUi: true,
24
- },
25
- isBackupAndSyncUpdateLoading: {
26
- includeInStateLogs: false,
27
- persist: false,
28
- includeInDebugSnapshot: false,
29
- usedInUi: true,
30
- },
31
- isAccountSyncingEnabled: {
32
- includeInStateLogs: true,
33
- persist: true,
34
- includeInDebugSnapshot: true,
35
- usedInUi: true,
36
- },
37
- isContactSyncingEnabled: {
38
- includeInStateLogs: true,
39
- persist: true,
40
- includeInDebugSnapshot: true,
41
- usedInUi: true,
42
- },
43
- isContactSyncingInProgress: {
44
- includeInStateLogs: false,
45
- persist: false,
46
- includeInDebugSnapshot: false,
47
- usedInUi: true,
48
- },
49
- };
50
- const MESSENGER_EXPOSED_METHODS = [
51
- 'performGetStorage',
52
- 'performGetStorageAllFeatureEntries',
53
- 'performSetStorage',
54
- 'performBatchSetStorage',
55
- 'performDeleteStorage',
56
- 'performBatchDeleteStorage',
57
- 'getStorageKey',
58
- 'performDeleteStorageAllFeatureEntries',
59
- 'listEntropySources',
60
- 'setIsBackupAndSyncFeatureEnabled',
61
- 'setIsContactSyncingInProgress',
62
- 'syncContactsWithUserStorage',
63
- ];
64
- /**
65
- * Reusable controller that allows any team to store synchronized data for a given user.
66
- * These can be settings shared cross MetaMask clients, or data we want to persist when uninstalling/reinstalling.
67
- *
68
- * NOTE:
69
- * - data stored on UserStorage is FULLY encrypted, with the only keys stored/managed on the client.
70
- * - No one can access this data unless they are have the SRP and are able to run the signing snap.
71
- */
72
- export class UserStorageController extends BaseController {
73
- #userStorage;
74
- #auth = {
75
- getProfileId: async (entropySourceId) => {
76
- const sessionProfile = await this.messenger.call('AuthenticationController:getSessionProfile', entropySourceId);
77
- return sessionProfile?.profileId;
78
- },
79
- isSignedIn: () => {
80
- return this.messenger.call('AuthenticationController:isSignedIn');
81
- },
82
- signIn: async () => {
83
- return await this.messenger.call('AuthenticationController:performSignIn');
84
- },
85
- };
86
- #config = {
87
- env: Env.PRD,
88
- };
89
- #trace;
90
- #isUnlocked = false;
91
- // Both caches are keyed by `${entropySourceId}:${message}` (the primary SRP
92
- // resolves to its HD keyring metadata ID) so two SRPs that transiently
93
- // resolve to the same `profileId` can never share a cached storage key /
94
- // signature and leak data across each other's user storage.
95
- #storageKeyCache = {};
96
- #signMessageCache = {};
97
- #keyringController = {
98
- setupLockedStateSubscriptions: () => {
99
- const { isUnlocked } = this.messenger.call('KeyringController:getState');
100
- this.#isUnlocked = isUnlocked;
101
- this.messenger.subscribe('KeyringController:unlock', () => {
102
- this.#isUnlocked = true;
103
- });
104
- this.messenger.subscribe('KeyringController:lock', () => {
105
- this.#isUnlocked = false;
106
- });
107
- },
108
- };
109
- #nativeScryptCrypto = undefined;
110
- eventQueue = new EventQueue();
111
- constructor({ messenger, state, config, nativeScryptCrypto, trace, }) {
112
- super({
113
- messenger,
114
- metadata,
115
- name: controllerName,
116
- state: { ...defaultState, ...state },
117
- });
118
- this.#config = {
119
- ...this.#config,
120
- ...config,
121
- };
122
- this.#trace =
123
- trace ??
124
- (async (_request, fn) => {
125
- if (!fn) {
126
- return undefined;
127
- }
128
- return await Promise.resolve(fn());
129
- });
130
- this.#userStorage = new UserStorage({
131
- env: this.#config.env,
132
- auth: {
133
- getAccessToken: (entropySourceId) => this.messenger.call('AuthenticationController:getBearerToken', entropySourceId),
134
- getUserProfile: async (entropySourceId) => {
135
- return await this.messenger.call('AuthenticationController:getSessionProfile', entropySourceId);
136
- },
137
- signMessage: (message, entropySourceId) => this.#signMessage(message, entropySourceId),
138
- },
139
- }, {
140
- storage: {
141
- getStorageKey: async (message, entropySourceId) => {
142
- // No derived key can exist while locked (the KeyringController
143
- // clears its keyrings on lock, so the scope is unresolvable).
144
- if (!this.#isUnlocked) {
145
- return null;
146
- }
147
- return (this.#storageKeyCache[this.#scopedCacheKey(message, entropySourceId)] ?? null);
148
- },
149
- // Only ever reached after a successful signature, i.e. while unlocked.
150
- setStorageKey: async (message, key, entropySourceId) => {
151
- this.#storageKeyCache[this.#scopedCacheKey(message, entropySourceId)] = key;
152
- },
153
- },
154
- });
155
- this.messenger.registerMethodActionHandlers(this, MESSENGER_EXPOSED_METHODS);
156
- this.#keyringController.setupLockedStateSubscriptions();
157
- this.#nativeScryptCrypto = nativeScryptCrypto;
158
- // Contact Syncing
159
- setupContactSyncingSubscriptions({
160
- getUserStorageControllerInstance: () => this,
161
- getMessenger: () => this.messenger,
162
- trace: this.#trace,
163
- });
164
- }
165
- /**
166
- * Allows retrieval of stored data. Data stored is string formatted.
167
- * Developers can extend the entry path and entry name through the `schema.ts` file.
168
- *
169
- * @param path - string in the form of `${feature}.${key}` that matches schema
170
- * @param entropySourceId - The entropy source ID used to generate the encryption key.
171
- * @returns the decrypted string contents found from user storage (or null if not found)
172
- */
173
- async performGetStorage(path, entropySourceId) {
174
- return await this.#userStorage.getItem(path, {
175
- nativeScryptCrypto: this.#nativeScryptCrypto,
176
- entropySourceId,
177
- });
178
- }
179
- /**
180
- * Allows retrieval of all stored data for a specific feature. Data stored is formatted as an array of strings.
181
- * Developers can extend the entry path through the `schema.ts` file.
182
- *
183
- * @param path - string in the form of `${feature}` that matches schema
184
- * @param entropySourceId - The entropy source ID used to generate the encryption key.
185
- * @returns the array of decrypted string contents found from user storage (or null if not found)
186
- */
187
- async performGetStorageAllFeatureEntries(path, entropySourceId) {
188
- return await this.#userStorage.getAllFeatureItems(path, {
189
- nativeScryptCrypto: this.#nativeScryptCrypto,
190
- entropySourceId,
191
- });
192
- }
193
- /**
194
- * Allows storage of user data. Data stored must be string formatted.
195
- * Developers can extend the entry path and entry name through the `schema.ts` file.
196
- *
197
- * @param path - string in the form of `${feature}.${key}` that matches schema
198
- * @param value - The string data you want to store.
199
- * @param entropySourceId - The entropy source ID used to generate the encryption key.
200
- * @returns nothing. NOTE that an error is thrown if fails to store data.
201
- */
202
- async performSetStorage(path, value, entropySourceId) {
203
- return await this.#userStorage.setItem(path, value, {
204
- nativeScryptCrypto: this.#nativeScryptCrypto,
205
- entropySourceId,
206
- });
207
- }
208
- /**
209
- * Allows storage of multiple user data entries for one specific feature. Data stored must be string formatted.
210
- * Developers can extend the entry path through the `schema.ts` file.
211
- *
212
- * @param path - string in the form of `${feature}` that matches schema
213
- * @param values - data to store, in the form of an array of `[entryKey, entryValue]` pairs
214
- * @param entropySourceId - The entropy source ID used to generate the encryption key.
215
- * @returns nothing. NOTE that an error is thrown if fails to store data.
216
- */
217
- async performBatchSetStorage(path, values, entropySourceId) {
218
- return await this.#userStorage.batchSetItems(path, values, {
219
- nativeScryptCrypto: this.#nativeScryptCrypto,
220
- entropySourceId,
221
- });
222
- }
223
- /**
224
- * Allows deletion of user data. Developers can extend the entry path and entry name through the `schema.ts` file.
225
- *
226
- * @param path - string in the form of `${feature}.${key}` that matches schema
227
- * @param entropySourceId - The entropy source ID used to generate the encryption key.
228
- * @returns nothing. NOTE that an error is thrown if fails to delete data.
229
- */
230
- async performDeleteStorage(path, entropySourceId) {
231
- return await this.#userStorage.deleteItem(path, {
232
- nativeScryptCrypto: this.#nativeScryptCrypto,
233
- entropySourceId,
234
- });
235
- }
236
- /**
237
- * Allows deletion of all user data entries for a specific feature.
238
- * Developers can extend the entry path through the `schema.ts` file.
239
- *
240
- * @param path - string in the form of `${feature}` that matches schema
241
- * @param entropySourceId - The entropy source ID used to generate the encryption key.
242
- * @returns nothing. NOTE that an error is thrown if fails to delete data.
243
- */
244
- async performDeleteStorageAllFeatureEntries(path, entropySourceId) {
245
- return await this.#userStorage.deleteAllFeatureItems(path, {
246
- nativeScryptCrypto: this.#nativeScryptCrypto,
247
- entropySourceId,
248
- });
249
- }
250
- /**
251
- * Allows delete of multiple user data entries for one specific feature. Data deleted must be string formatted.
252
- * Developers can extend the entry path through the `schema.ts` file.
253
- *
254
- * @param path - string in the form of `${feature}` that matches schema
255
- * @param values - data to store, in the form of an array of entryKey[]
256
- * @param entropySourceId - The entropy source ID used to generate the encryption key.
257
- * @returns nothing. NOTE that an error is thrown if fails to store data.
258
- */
259
- async performBatchDeleteStorage(path, values, entropySourceId) {
260
- return await this.#userStorage.batchDeleteItems(path, values, {
261
- nativeScryptCrypto: this.#nativeScryptCrypto,
262
- entropySourceId,
263
- });
264
- }
265
- /**
266
- * Retrieves the storage key, for internal use only!
267
- *
268
- * @returns the storage key
269
- */
270
- async getStorageKey() {
271
- return await this.#userStorage.getStorageKey();
272
- }
273
- /**
274
- * Flushes the storage key cache.
275
- * CAUTION: This is only public for testing purposes.
276
- * It should not be used in production code.
277
- */
278
- flushStorageKeyCache() {
279
- this.#storageKeyCache = {};
280
- }
281
- /**
282
- * Lists all the available HD keyring metadata IDs.
283
- * These IDs can be used in a multi-SRP context to segregate data specific to different SRPs.
284
- *
285
- * @returns A promise that resolves to an array of HD keyring metadata IDs.
286
- */
287
- async listEntropySources() {
288
- if (!this.#isUnlocked) {
289
- throw new Error('listEntropySources - unable to list entropy sources, wallet is locked');
290
- }
291
- return this.#getHdKeyringEntropySourceIds();
292
- }
293
- /**
294
- * Reads the HD keyring entropy source IDs from KeyringController.
295
- *
296
- * @returns The HD keyring metadata IDs, primary first.
297
- */
298
- #getHdKeyringEntropySourceIds() {
299
- const { keyrings } = this.messenger.call('KeyringController:getState');
300
- return getHdKeyringEntropySourceIds(keyrings);
301
- }
302
- /**
303
- * Resolves the primary SRP's entropy source ID, used to scope the primary's
304
- * cache entries. The ID is randomly regenerated whenever the vault is
305
- * recreated (e.g. on restore), so a new primary can never inherit a previous
306
- * vault's cached key.
307
- *
308
- * @returns The primary HD keyring metadata ID.
309
- * @throws If no HD keyring is available; callers must only resolve the scope
310
- * while the wallet is unlocked.
311
- */
312
- #getPrimaryEntropySourceId() {
313
- const { keyrings } = this.messenger.call('KeyringController:getState');
314
- return getPrimaryHdKeyringEntropySourceId(keyrings);
315
- }
316
- /**
317
- * Builds a cache key scoped to a specific entropy source, so each SRP's
318
- * signature/storage key derivation stays isolated even when two SRPs
319
- * transiently resolve to the same `profileId` (see `#storageKeyCache`).
320
- *
321
- * When `entropySourceId` is omitted (primary SRP), it is resolved to the
322
- * primary HD keyring's metadata ID rather than a stable literal. Because that
323
- * ID is randomly regenerated whenever the vault is recreated (e.g. on
324
- * restore), the cached entry is naturally invalidated across vaults — a
325
- * different SRP can never inherit the previous primary's cached key.
326
- *
327
- * @param message - The tagged message used for signing.
328
- * @param entropySourceId - The entropy source ID. Omit for the primary SRP.
329
- * @returns The scoped cache key.
330
- */
331
- #scopedCacheKey(message, entropySourceId) {
332
- return `${entropySourceId ?? this.#getPrimaryEntropySourceId()}:${message}`;
333
- }
334
- /**
335
- * Signs a `metamask:…` message with the native SIP-6 message-signing key
336
- * (same key as `@metamask/message-signing-snap` with empty salt).
337
- *
338
- * @param message - A specific tagged message to sign.
339
- * @param entropySourceId - The entropy source ID used to derive the key,
340
- * when multiple sources are available (Multi-SRP).
341
- * @returns Compact secp256k1 signature hex.
342
- */
343
- async #signMessage(message, entropySourceId) {
344
- if (!this.#isUnlocked) {
345
- throw new Error('#signMessage - unable to proceed, wallet is locked');
346
- }
347
- const cacheKey = this.#scopedCacheKey(message, entropySourceId);
348
- if (this.#signMessageCache[cacheKey]) {
349
- return this.#signMessageCache[cacheKey];
350
- }
351
- const resolvedId = entropySourceId ?? this.#getPrimaryEntropySourceId();
352
- const seed = await getHdKeyringSeed(this.messenger, resolvedId);
353
- const result = await signMessageWithMessageSigningKey(message, seed);
354
- this.#signMessageCache[cacheKey] = result;
355
- return result;
356
- }
357
- async setIsBackupAndSyncFeatureEnabled(feature, enabled) {
358
- try {
359
- this.#setIsBackupAndSyncUpdateLoading(true);
360
- if (enabled) {
361
- // If any of the features are enabled, we need to ensure the user is signed in
362
- const isSignedIn = this.#auth.isSignedIn();
363
- if (!isSignedIn) {
364
- await this.#auth.signIn();
365
- }
366
- }
367
- this.update((state) => {
368
- if (feature === BACKUPANDSYNC_FEATURES.main) {
369
- state.isBackupAndSyncEnabled = enabled;
370
- }
371
- if (feature === BACKUPANDSYNC_FEATURES.accountSyncing) {
372
- state.isAccountSyncingEnabled = enabled;
373
- }
374
- if (feature === BACKUPANDSYNC_FEATURES.contactSyncing) {
375
- state.isContactSyncingEnabled = enabled;
376
- }
377
- });
378
- }
379
- catch (e) {
380
- // istanbul ignore next
381
- const errorMessage = e instanceof Error ? e.message : JSON.stringify(e);
382
- // istanbul ignore next
383
- throw new Error(`${controllerName} - failed to ${enabled ? 'enable' : 'disable'} ${feature} - ${errorMessage}`);
384
- }
385
- finally {
386
- this.#setIsBackupAndSyncUpdateLoading(false);
387
- }
388
- }
389
- #setIsBackupAndSyncUpdateLoading(isBackupAndSyncUpdateLoading) {
390
- this.update((state) => {
391
- state.isBackupAndSyncUpdateLoading = isBackupAndSyncUpdateLoading;
392
- });
393
- }
394
- /**
395
- * Sets the isContactSyncingInProgress flag to prevent infinite loops during contact synchronization
396
- *
397
- * @param isContactSyncingInProgress - Whether contact syncing is in progress
398
- */
399
- async setIsContactSyncingInProgress(isContactSyncingInProgress) {
400
- this.update((state) => {
401
- state.isContactSyncingInProgress = isContactSyncingInProgress;
402
- });
403
- }
404
- /**
405
- * Syncs the address book list with the user storage address book list.
406
- * This method is used to make sure that the address book list is up-to-date with the user storage address book list and vice-versa.
407
- * It will add new contacts to the address book list, update/merge conflicting contacts and re-upload the results in some cases to the user storage.
408
- */
409
- async syncContactsWithUserStorage() {
410
- const profileId = await this.#auth.getProfileId();
411
- const config = {
412
- onContactUpdated: () => {
413
- this.#config?.contactSyncing?.onContactUpdated?.(profileId);
414
- },
415
- onContactDeleted: () => {
416
- this.#config?.contactSyncing?.onContactDeleted?.(profileId);
417
- },
418
- onContactSyncErroneousSituation: (errorMessage, sentryContext) => {
419
- this.#config?.contactSyncing?.onContactSyncErroneousSituation?.(profileId, errorMessage, sentryContext);
420
- },
421
- };
422
- await syncContactsWithUserStorage(config, {
423
- getMessenger: () => this.messenger,
424
- getUserStorageControllerInstance: () => this,
425
- trace: this.#trace,
426
- });
427
- }
428
- }
429
- //# sourceMappingURL=UserStorageController.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UserStorageController.js","sourceRoot":"","sources":["../../../src/controllers/user-storage/UserStorageController.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAwB3D,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EACL,4BAA4B,EAC5B,kCAAkC,GACnC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AAOzF,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,6CAA6C,CAAC;AAC1F,OAAO,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AAG5F,MAAM,cAAc,GAAG,uBAAuB,CAAC;AA0B/C,MAAM,CAAC,MAAM,YAAY,GAA+B;IACtD,sBAAsB,EAAE,IAAI;IAC5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AAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS;YAClC,gCAAgC,EAAE,GAAG,EAAE,CAAC,IAAI;YAC5C,KAAK,EAAE,IAAI,CAAC,MAAM;SACnB,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import type {\n AddressBookControllerContactUpdatedEvent,\n AddressBookControllerContactDeletedEvent,\n AddressBookControllerActions,\n AddressBookControllerListAction,\n AddressBookControllerSetAction,\n AddressBookControllerDeleteAction,\n} from '@metamask/address-book-controller';\nimport { BaseController } from '@metamask/base-controller';\nimport type {\n ControllerGetStateAction,\n ControllerStateChangeEvent,\n StateMetadata,\n} from '@metamask/base-controller';\nimport type {\n TraceCallback,\n TraceContext,\n TraceRequest,\n} from '@metamask/controller-utils';\nimport type {\n KeyringControllerGetStateAction,\n KeyringControllerLockEvent,\n KeyringControllerUnlockEvent,\n KeyringControllerWithKeyringV2UnsafeAction,\n} from '@metamask/keyring-controller';\nimport type { Messenger } from '@metamask/messenger';\n\nimport type {\n UserStorageGenericFeatureKey,\n UserStorageGenericPathWithFeatureAndKey,\n UserStorageGenericPathWithFeatureOnly,\n} from '../../sdk/index.js';\nimport { Env, UserStorage } from '../../sdk/index.js';\nimport type { NativeScrypt } from '../../shared/types/encryption.js';\nimport {\n getHdKeyringEntropySourceIds,\n getPrimaryHdKeyringEntropySourceId,\n} from '../../shared/utils/entropy-source.js';\nimport { EventQueue } from '../../shared/utils/event-queue.js';\nimport { getHdKeyringSeed } from '../../shared/utils/hd-keyring-seed.js';\nimport { signMessageWithMessageSigningKey } from '../../shared/utils/message-signing.js';\nimport type {\n AuthenticationControllerGetBearerTokenAction,\n AuthenticationControllerGetSessionProfileAction,\n AuthenticationControllerIsSignedInAction,\n AuthenticationControllerPerformSignInAction,\n} from '../authentication/AuthenticationController-method-action-types.js';\nimport { BACKUPANDSYNC_FEATURES } from './constants.js';\nimport { syncContactsWithUserStorage } from './contact-syncing/controller-integration.js';\nimport { setupContactSyncingSubscriptions } from './contact-syncing/setup-subscriptions.js';\nimport type { UserStorageControllerMethodActions } from './UserStorageController-method-action-types.js';\n\nconst controllerName = 'UserStorageController';\n\n// State\nexport type UserStorageControllerState = {\n /**\n * Condition used by UI and to determine if we can use some of the User Storage methods.\n */\n isBackupAndSyncEnabled: boolean;\n /**\n * Loading state for the backup and sync update\n */\n isBackupAndSyncUpdateLoading: boolean;\n /**\n * Condition used by UI to determine if account syncing is enabled.\n */\n isAccountSyncingEnabled: boolean;\n /**\n * Condition used by UI to determine if contact syncing is enabled.\n */\n isContactSyncingEnabled: boolean;\n /**\n * Condition used by UI to determine if contact syncing is in progress.\n */\n isContactSyncingInProgress: boolean;\n};\n\nexport const defaultState: UserStorageControllerState = {\n isBackupAndSyncEnabled: true,\n isBackupAndSyncUpdateLoading: false,\n isAccountSyncingEnabled: true,\n isContactSyncingEnabled: true,\n isContactSyncingInProgress: false,\n};\n\nconst metadata: StateMetadata<UserStorageControllerState> = {\n isBackupAndSyncEnabled: {\n includeInStateLogs: true,\n persist: true,\n includeInDebugSnapshot: true,\n usedInUi: true,\n },\n isBackupAndSyncUpdateLoading: {\n includeInStateLogs: false,\n persist: false,\n includeInDebugSnapshot: false,\n usedInUi: true,\n },\n isAccountSyncingEnabled: {\n includeInStateLogs: true,\n persist: true,\n includeInDebugSnapshot: true,\n usedInUi: true,\n },\n isContactSyncingEnabled: {\n includeInStateLogs: true,\n persist: true,\n includeInDebugSnapshot: true,\n usedInUi: true,\n },\n isContactSyncingInProgress: {\n includeInStateLogs: false,\n persist: false,\n includeInDebugSnapshot: false,\n usedInUi: true,\n },\n};\n\ntype ControllerConfig = {\n env: Env;\n contactSyncing?: {\n /**\n * Callback that fires when contact sync updates a contact.\n * This is used for analytics.\n */\n onContactUpdated?: (profileId: string) => void;\n\n /**\n * Callback that fires when contact sync deletes a contact.\n * This is used for analytics.\n */\n onContactDeleted?: (profileId: string) => void;\n\n /**\n * Callback that fires when an erroneous situation happens during contact sync.\n * This is used for analytics.\n */\n onContactSyncErroneousSituation?: (\n profileId: string,\n situationMessage: string,\n sentryContext?: Record<string, unknown>,\n ) => void;\n };\n};\n\nconst MESSENGER_EXPOSED_METHODS = [\n 'performGetStorage',\n 'performGetStorageAllFeatureEntries',\n 'performSetStorage',\n 'performBatchSetStorage',\n 'performDeleteStorage',\n 'performBatchDeleteStorage',\n 'getStorageKey',\n 'performDeleteStorageAllFeatureEntries',\n 'listEntropySources',\n 'setIsBackupAndSyncFeatureEnabled',\n 'setIsContactSyncingInProgress',\n 'syncContactsWithUserStorage',\n] as const;\n\nexport type UserStorageControllerGetStateAction = ControllerGetStateAction<\n typeof controllerName,\n UserStorageControllerState\n>;\nexport type Actions =\n | UserStorageControllerGetStateAction\n | UserStorageControllerMethodActions;\n\nexport type AllowedActions =\n // Keyring Requests\n | KeyringControllerGetStateAction\n | KeyringControllerWithKeyringV2UnsafeAction\n // Auth Requests\n | AuthenticationControllerGetBearerTokenAction\n | AuthenticationControllerGetSessionProfileAction\n | AuthenticationControllerPerformSignInAction\n | AuthenticationControllerIsSignedInAction\n // Contact Syncing\n | AddressBookControllerListAction\n | AddressBookControllerSetAction\n | AddressBookControllerDeleteAction\n | AddressBookControllerActions;\n\n// Messenger events\nexport type UserStorageControllerStateChangeEvent = ControllerStateChangeEvent<\n typeof controllerName,\n UserStorageControllerState\n>;\n\nexport type Events = UserStorageControllerStateChangeEvent;\n\nexport type AllowedEvents =\n | KeyringControllerLockEvent\n | KeyringControllerUnlockEvent\n // Address Book Events\n | AddressBookControllerContactUpdatedEvent\n | AddressBookControllerContactDeletedEvent;\n\n// Messenger\nexport type UserStorageControllerMessenger = Messenger<\n typeof controllerName,\n Actions | AllowedActions,\n Events | AllowedEvents\n>;\n\n/**\n * Reusable controller that allows any team to store synchronized data for a given user.\n * These can be settings shared cross MetaMask clients, or data we want to persist when uninstalling/reinstalling.\n *\n * NOTE:\n * - data stored on UserStorage is FULLY encrypted, with the only keys stored/managed on the client.\n * - No one can access this data unless they are have the SRP and are able to run the signing snap.\n */\nexport class UserStorageController extends BaseController<\n typeof controllerName,\n UserStorageControllerState,\n UserStorageControllerMessenger\n> {\n readonly #userStorage: UserStorage;\n\n readonly #auth = {\n getProfileId: async (entropySourceId?: string) => {\n const sessionProfile = await this.messenger.call(\n 'AuthenticationController:getSessionProfile',\n entropySourceId,\n );\n return sessionProfile?.profileId;\n },\n isSignedIn: () => {\n return this.messenger.call('AuthenticationController:isSignedIn');\n },\n signIn: async () => {\n return await this.messenger.call(\n 'AuthenticationController:performSignIn',\n );\n },\n };\n\n readonly #config: ControllerConfig = {\n env: Env.PRD,\n };\n\n readonly #trace: TraceCallback;\n\n #isUnlocked = false;\n\n // Both caches are keyed by `${entropySourceId}:${message}` (the primary SRP\n // resolves to its HD keyring metadata ID) so two SRPs that transiently\n // resolve to the same `profileId` can never share a cached storage key /\n // signature and leak data across each other's user storage.\n #storageKeyCache: Record<string, string> = {};\n\n #signMessageCache: Record<string, string> = {};\n\n readonly #keyringController = {\n setupLockedStateSubscriptions: () => {\n const { isUnlocked } = this.messenger.call('KeyringController:getState');\n this.#isUnlocked = isUnlocked;\n\n this.messenger.subscribe('KeyringController:unlock', () => {\n this.#isUnlocked = true;\n });\n\n this.messenger.subscribe('KeyringController:lock', () => {\n this.#isUnlocked = false;\n });\n },\n };\n\n readonly #nativeScryptCrypto: NativeScrypt | undefined = undefined;\n\n eventQueue = new EventQueue();\n\n constructor({\n messenger,\n state,\n config,\n nativeScryptCrypto,\n trace,\n }: {\n messenger: UserStorageControllerMessenger;\n state?: UserStorageControllerState;\n config?: Partial<ControllerConfig>;\n nativeScryptCrypto?: NativeScrypt;\n trace?: TraceCallback;\n }) {\n super({\n messenger,\n metadata,\n name: controllerName,\n state: { ...defaultState, ...state },\n });\n\n this.#config = {\n ...this.#config,\n ...config,\n };\n this.#trace =\n trace ??\n (async <ReturnType>(\n _request: TraceRequest,\n fn?: (context?: TraceContext) => ReturnType,\n ): Promise<ReturnType> => {\n if (!fn) {\n return undefined as ReturnType;\n }\n return await Promise.resolve(fn());\n });\n\n this.#userStorage = new UserStorage(\n {\n env: this.#config.env,\n auth: {\n getAccessToken: (entropySourceId?: string) =>\n this.messenger.call(\n 'AuthenticationController:getBearerToken',\n entropySourceId,\n ),\n getUserProfile: async (entropySourceId?: string) => {\n return await this.messenger.call(\n 'AuthenticationController:getSessionProfile',\n entropySourceId,\n );\n },\n signMessage: (message: string, entropySourceId?: string) =>\n this.#signMessage(message, entropySourceId),\n },\n },\n {\n storage: {\n getStorageKey: async (message, entropySourceId) => {\n // No derived key can exist while locked (the KeyringController\n // clears its keyrings on lock, so the scope is unresolvable).\n if (!this.#isUnlocked) {\n return null;\n }\n return (\n this.#storageKeyCache[\n this.#scopedCacheKey(message, entropySourceId)\n ] ?? null\n );\n },\n // Only ever reached after a successful signature, i.e. while unlocked.\n setStorageKey: async (message, key, entropySourceId) => {\n this.#storageKeyCache[\n this.#scopedCacheKey(message, entropySourceId)\n ] = key;\n },\n },\n },\n );\n\n this.messenger.registerMethodActionHandlers(\n this,\n MESSENGER_EXPOSED_METHODS,\n );\n\n this.#keyringController.setupLockedStateSubscriptions();\n this.#nativeScryptCrypto = nativeScryptCrypto;\n\n // Contact Syncing\n setupContactSyncingSubscriptions({\n getUserStorageControllerInstance: () => this,\n getMessenger: () => this.messenger,\n trace: this.#trace,\n });\n }\n\n /**\n * Allows retrieval of stored data. Data stored is string formatted.\n * Developers can extend the entry path and entry name through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}.${key}` that matches schema\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns the decrypted string contents found from user storage (or null if not found)\n */\n public async performGetStorage(\n path: UserStorageGenericPathWithFeatureAndKey,\n entropySourceId?: string,\n ): Promise<string | null> {\n return await this.#userStorage.getItem(path, {\n nativeScryptCrypto: this.#nativeScryptCrypto,\n entropySourceId,\n });\n }\n\n /**\n * Allows retrieval of all stored data for a specific feature. Data stored is formatted as an array of strings.\n * Developers can extend the entry path through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}` that matches schema\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns the array of decrypted string contents found from user storage (or null if not found)\n */\n public async performGetStorageAllFeatureEntries(\n path: UserStorageGenericPathWithFeatureOnly,\n entropySourceId?: string,\n ): Promise<string[] | null> {\n return await this.#userStorage.getAllFeatureItems(path, {\n nativeScryptCrypto: this.#nativeScryptCrypto,\n entropySourceId,\n });\n }\n\n /**\n * Allows storage of user data. Data stored must be string formatted.\n * Developers can extend the entry path and entry name through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}.${key}` that matches schema\n * @param value - The string data you want to store.\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns nothing. NOTE that an error is thrown if fails to store data.\n */\n public async performSetStorage(\n path: UserStorageGenericPathWithFeatureAndKey,\n value: string,\n entropySourceId?: string,\n ): Promise<void> {\n return await this.#userStorage.setItem(path, value, {\n nativeScryptCrypto: this.#nativeScryptCrypto,\n entropySourceId,\n });\n }\n\n /**\n * Allows storage of multiple user data entries for one specific feature. Data stored must be string formatted.\n * Developers can extend the entry path through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}` that matches schema\n * @param values - data to store, in the form of an array of `[entryKey, entryValue]` pairs\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns nothing. NOTE that an error is thrown if fails to store data.\n */\n public async performBatchSetStorage(\n path: UserStorageGenericPathWithFeatureOnly,\n values: [UserStorageGenericFeatureKey, string][],\n entropySourceId?: string,\n ): Promise<void> {\n return await this.#userStorage.batchSetItems(path, values, {\n nativeScryptCrypto: this.#nativeScryptCrypto,\n entropySourceId,\n });\n }\n\n /**\n * Allows deletion of user data. Developers can extend the entry path and entry name through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}.${key}` that matches schema\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns nothing. NOTE that an error is thrown if fails to delete data.\n */\n public async performDeleteStorage(\n path: UserStorageGenericPathWithFeatureAndKey,\n entropySourceId?: string,\n ): Promise<void> {\n return await this.#userStorage.deleteItem(path, {\n nativeScryptCrypto: this.#nativeScryptCrypto,\n entropySourceId,\n });\n }\n\n /**\n * Allows deletion of all user data entries for a specific feature.\n * Developers can extend the entry path through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}` that matches schema\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns nothing. NOTE that an error is thrown if fails to delete data.\n */\n public async performDeleteStorageAllFeatureEntries(\n path: UserStorageGenericPathWithFeatureOnly,\n entropySourceId?: string,\n ): Promise<void> {\n return await this.#userStorage.deleteAllFeatureItems(path, {\n nativeScryptCrypto: this.#nativeScryptCrypto,\n entropySourceId,\n });\n }\n\n /**\n * Allows delete of multiple user data entries for one specific feature. Data deleted must be string formatted.\n * Developers can extend the entry path through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}` that matches schema\n * @param values - data to store, in the form of an array of entryKey[]\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns nothing. NOTE that an error is thrown if fails to store data.\n */\n public async performBatchDeleteStorage(\n path: UserStorageGenericPathWithFeatureOnly,\n values: UserStorageGenericFeatureKey[],\n entropySourceId?: string,\n ): Promise<void> {\n return await this.#userStorage.batchDeleteItems(path, values, {\n nativeScryptCrypto: this.#nativeScryptCrypto,\n entropySourceId,\n });\n }\n\n /**\n * Retrieves the storage key, for internal use only!\n *\n * @returns the storage key\n */\n public async getStorageKey(): Promise<string> {\n return await this.#userStorage.getStorageKey();\n }\n\n /**\n * Flushes the storage key cache.\n * CAUTION: This is only public for testing purposes.\n * It should not be used in production code.\n */\n public flushStorageKeyCache(): void {\n this.#storageKeyCache = {};\n }\n\n /**\n * Lists all the available HD keyring metadata IDs.\n * These IDs can be used in a multi-SRP context to segregate data specific to different SRPs.\n *\n * @returns A promise that resolves to an array of HD keyring metadata IDs.\n */\n async listEntropySources(): Promise<string[]> {\n if (!this.#isUnlocked) {\n throw new Error(\n 'listEntropySources - unable to list entropy sources, wallet is locked',\n );\n }\n\n return this.#getHdKeyringEntropySourceIds();\n }\n\n /**\n * Reads the HD keyring entropy source IDs from KeyringController.\n *\n * @returns The HD keyring metadata IDs, primary first.\n */\n #getHdKeyringEntropySourceIds(): string[] {\n const { keyrings } = this.messenger.call('KeyringController:getState');\n return getHdKeyringEntropySourceIds(keyrings);\n }\n\n /**\n * Resolves the primary SRP's entropy source ID, used to scope the primary's\n * cache entries. The ID is randomly regenerated whenever the vault is\n * recreated (e.g. on restore), so a new primary can never inherit a previous\n * vault's cached key.\n *\n * @returns The primary HD keyring metadata ID.\n * @throws If no HD keyring is available; callers must only resolve the scope\n * while the wallet is unlocked.\n */\n #getPrimaryEntropySourceId(): string {\n const { keyrings } = this.messenger.call('KeyringController:getState');\n return getPrimaryHdKeyringEntropySourceId(keyrings);\n }\n\n /**\n * Builds a cache key scoped to a specific entropy source, so each SRP's\n * signature/storage key derivation stays isolated even when two SRPs\n * transiently resolve to the same `profileId` (see `#storageKeyCache`).\n *\n * When `entropySourceId` is omitted (primary SRP), it is resolved to the\n * primary HD keyring's metadata ID rather than a stable literal. Because that\n * ID is randomly regenerated whenever the vault is recreated (e.g. on\n * restore), the cached entry is naturally invalidated across vaults — a\n * different SRP can never inherit the previous primary's cached key.\n *\n * @param message - The tagged message used for signing.\n * @param entropySourceId - The entropy source ID. Omit for the primary SRP.\n * @returns The scoped cache key.\n */\n #scopedCacheKey(\n message: `metamask:${string}`,\n entropySourceId?: string,\n ): string {\n return `${entropySourceId ?? this.#getPrimaryEntropySourceId()}:${message}`;\n }\n\n /**\n * Signs a `metamask:…` message with the native SIP-6 message-signing key\n * (same key as `@metamask/message-signing-snap` with empty salt).\n *\n * @param message - A specific tagged message to sign.\n * @param entropySourceId - The entropy source ID used to derive the key,\n * when multiple sources are available (Multi-SRP).\n * @returns Compact secp256k1 signature hex.\n */\n async #signMessage(\n message: string,\n entropySourceId?: string,\n ): Promise<string> {\n if (!this.#isUnlocked) {\n throw new Error('#signMessage - unable to proceed, wallet is locked');\n }\n\n const cacheKey = this.#scopedCacheKey(\n message as `metamask:${string}`,\n entropySourceId,\n );\n if (this.#signMessageCache[cacheKey]) {\n return this.#signMessageCache[cacheKey];\n }\n\n const resolvedId = entropySourceId ?? this.#getPrimaryEntropySourceId();\n const seed = await getHdKeyringSeed(this.messenger, resolvedId);\n const result = await signMessageWithMessageSigningKey(message, seed);\n\n this.#signMessageCache[cacheKey] = result;\n\n return result;\n }\n\n public async setIsBackupAndSyncFeatureEnabled(\n feature: keyof typeof BACKUPANDSYNC_FEATURES,\n enabled: boolean,\n ): Promise<void> {\n try {\n this.#setIsBackupAndSyncUpdateLoading(true);\n\n if (enabled) {\n // If any of the features are enabled, we need to ensure the user is signed in\n const isSignedIn = this.#auth.isSignedIn();\n if (!isSignedIn) {\n await this.#auth.signIn();\n }\n }\n\n this.update((state) => {\n if (feature === BACKUPANDSYNC_FEATURES.main) {\n state.isBackupAndSyncEnabled = enabled;\n }\n\n if (feature === BACKUPANDSYNC_FEATURES.accountSyncing) {\n state.isAccountSyncingEnabled = enabled;\n }\n\n if (feature === BACKUPANDSYNC_FEATURES.contactSyncing) {\n state.isContactSyncingEnabled = enabled;\n }\n });\n } catch (e) {\n // istanbul ignore next\n const errorMessage = e instanceof Error ? e.message : JSON.stringify(e);\n // istanbul ignore next\n throw new Error(\n `${controllerName} - failed to ${enabled ? 'enable' : 'disable'} ${feature} - ${errorMessage}`,\n );\n } finally {\n this.#setIsBackupAndSyncUpdateLoading(false);\n }\n }\n\n #setIsBackupAndSyncUpdateLoading(\n isBackupAndSyncUpdateLoading: boolean,\n ): void {\n this.update((state) => {\n state.isBackupAndSyncUpdateLoading = isBackupAndSyncUpdateLoading;\n });\n }\n\n /**\n * Sets the isContactSyncingInProgress flag to prevent infinite loops during contact synchronization\n *\n * @param isContactSyncingInProgress - Whether contact syncing is in progress\n */\n async setIsContactSyncingInProgress(\n isContactSyncingInProgress: boolean,\n ): Promise<void> {\n this.update((state) => {\n state.isContactSyncingInProgress = isContactSyncingInProgress;\n });\n }\n\n /**\n * Syncs the address book list with the user storage address book list.\n * This method is used to make sure that the address book list is up-to-date with the user storage address book list and vice-versa.\n * It will add new contacts to the address book list, update/merge conflicting contacts and re-upload the results in some cases to the user storage.\n */\n async syncContactsWithUserStorage(): Promise<void> {\n const profileId = await this.#auth.getProfileId();\n\n const config = {\n onContactUpdated: () => {\n this.#config?.contactSyncing?.onContactUpdated?.(profileId);\n },\n onContactDeleted: () => {\n this.#config?.contactSyncing?.onContactDeleted?.(profileId);\n },\n onContactSyncErroneousSituation: (\n errorMessage: string,\n sentryContext?: Record<string, unknown>,\n ) => {\n this.#config?.contactSyncing?.onContactSyncErroneousSituation?.(\n profileId,\n errorMessage,\n sentryContext,\n );\n },\n };\n\n await syncContactsWithUserStorage(config, {\n getMessenger: () => this.messenger,\n getUserStorageControllerInstance: () => this,\n trace: this.#trace,\n });\n }\n}\n"]}
@@ -1,15 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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"]}
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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 +0,0 @@
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"}