@metamask/profile-sync-controller 30.0.0 → 32.0.0

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 (547) hide show
  1. package/CHANGELOG.md +33 -1
  2. package/dist/controllers/authentication/{AuthenticationController-method-action-types.d.mts → AuthenticationController-method-action-types.d.ts} +11 -3
  3. package/dist/controllers/authentication/AuthenticationController-method-action-types.d.ts.map +1 -0
  4. package/dist/controllers/authentication/{AuthenticationController-method-action-types.mjs → AuthenticationController-method-action-types.js} +1 -1
  5. package/dist/controllers/authentication/AuthenticationController-method-action-types.js.map +1 -0
  6. package/dist/controllers/authentication/{AuthenticationController.d.mts → AuthenticationController.d.ts} +15 -10
  7. package/dist/controllers/authentication/AuthenticationController.d.ts.map +1 -0
  8. package/dist/controllers/authentication/AuthenticationController.js +666 -0
  9. package/dist/controllers/authentication/AuthenticationController.js.map +1 -0
  10. package/dist/controllers/authentication/{index.d.cts → index.d.ts} +5 -5
  11. package/dist/controllers/authentication/index.d.ts.map +1 -0
  12. package/dist/controllers/authentication/index.js +6 -0
  13. package/dist/controllers/authentication/index.js.map +1 -0
  14. package/dist/controllers/authentication/mocks/index.d.ts +2 -0
  15. package/dist/controllers/authentication/mocks/index.d.ts.map +1 -0
  16. package/dist/controllers/authentication/mocks/index.js +2 -0
  17. package/dist/controllers/authentication/mocks/index.js.map +1 -0
  18. package/dist/controllers/authentication/mocks/{mockResponses.d.mts → mockResponses.d.ts} +1 -1
  19. package/dist/controllers/authentication/mocks/mockResponses.d.ts.map +1 -0
  20. package/dist/controllers/authentication/mocks/{mockResponses.mjs → mockResponses.js} +2 -2
  21. package/dist/controllers/authentication/mocks/mockResponses.js.map +1 -0
  22. package/dist/controllers/index.d.ts +3 -0
  23. package/dist/controllers/index.d.ts.map +1 -0
  24. package/dist/controllers/index.js +3 -0
  25. package/dist/controllers/index.js.map +1 -0
  26. package/dist/controllers/user-storage/{UserStorageController-method-action-types.d.mts → UserStorageController-method-action-types.d.ts} +2 -2
  27. package/dist/controllers/user-storage/UserStorageController-method-action-types.d.ts.map +1 -0
  28. package/dist/controllers/user-storage/{UserStorageController-method-action-types.mjs → UserStorageController-method-action-types.js} +1 -1
  29. package/dist/controllers/user-storage/UserStorageController-method-action-types.js.map +1 -0
  30. package/dist/controllers/user-storage/{UserStorageController.d.mts → UserStorageController.d.ts} +18 -14
  31. package/dist/controllers/user-storage/UserStorageController.d.ts.map +1 -0
  32. package/dist/controllers/user-storage/UserStorageController.js +439 -0
  33. package/dist/controllers/user-storage/UserStorageController.js.map +1 -0
  34. package/dist/controllers/user-storage/constants.d.ts +16 -0
  35. package/dist/controllers/user-storage/constants.d.ts.map +1 -0
  36. package/dist/controllers/user-storage/{constants.mjs → constants.js} +2 -1
  37. package/dist/controllers/user-storage/constants.js.map +1 -0
  38. package/dist/controllers/user-storage/contact-syncing/{constants.d.cts → constants.d.ts} +1 -1
  39. package/dist/controllers/user-storage/contact-syncing/constants.d.ts.map +1 -0
  40. package/dist/controllers/user-storage/contact-syncing/{constants.mjs → constants.js} +1 -1
  41. package/dist/controllers/user-storage/contact-syncing/constants.js.map +1 -0
  42. package/dist/controllers/user-storage/contact-syncing/{controller-integration.d.cts → controller-integration.d.ts} +3 -3
  43. package/dist/controllers/user-storage/contact-syncing/controller-integration.d.ts.map +1 -0
  44. package/dist/controllers/user-storage/contact-syncing/{controller-integration.mjs → controller-integration.js} +6 -6
  45. package/dist/controllers/user-storage/contact-syncing/controller-integration.js.map +1 -0
  46. package/dist/controllers/user-storage/contact-syncing/{setup-subscriptions.d.cts → setup-subscriptions.d.ts} +2 -2
  47. package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.d.ts.map +1 -0
  48. package/dist/controllers/user-storage/contact-syncing/{setup-subscriptions.mjs → setup-subscriptions.js} +4 -4
  49. package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.js.map +1 -0
  50. package/dist/controllers/user-storage/contact-syncing/{sync-utils.d.cts → sync-utils.d.ts} +2 -2
  51. package/dist/controllers/user-storage/contact-syncing/sync-utils.d.ts.map +1 -0
  52. package/dist/controllers/user-storage/contact-syncing/{sync-utils.mjs → sync-utils.js} +1 -1
  53. package/dist/controllers/user-storage/contact-syncing/sync-utils.js.map +1 -0
  54. package/dist/controllers/user-storage/contact-syncing/{types.d.mts → types.d.ts} +6 -6
  55. package/dist/controllers/user-storage/contact-syncing/types.d.ts.map +1 -0
  56. package/dist/controllers/user-storage/contact-syncing/types.js +2 -0
  57. package/dist/controllers/user-storage/contact-syncing/types.js.map +1 -0
  58. package/dist/controllers/user-storage/contact-syncing/{utils.d.mts → utils.d.ts} +3 -3
  59. package/dist/controllers/user-storage/contact-syncing/utils.d.ts.map +1 -0
  60. package/dist/controllers/user-storage/contact-syncing/{utils.mjs → utils.js} +2 -2
  61. package/dist/controllers/user-storage/contact-syncing/utils.js.map +1 -0
  62. package/dist/controllers/user-storage/{index.d.cts → index.d.ts} +8 -8
  63. package/dist/controllers/user-storage/index.d.ts.map +1 -0
  64. package/dist/controllers/user-storage/index.js +9 -0
  65. package/dist/controllers/user-storage/index.js.map +1 -0
  66. package/dist/controllers/user-storage/mocks/index.d.ts +3 -0
  67. package/dist/controllers/user-storage/mocks/index.d.ts.map +1 -0
  68. package/dist/controllers/user-storage/mocks/index.js +3 -0
  69. package/dist/controllers/user-storage/mocks/index.js.map +1 -0
  70. package/dist/controllers/user-storage/mocks/{mockResponses.d.mts → mockResponses.d.ts} +3 -3
  71. package/dist/controllers/user-storage/mocks/mockResponses.d.ts.map +1 -0
  72. package/dist/controllers/user-storage/mocks/{mockResponses.mjs → mockResponses.js} +4 -4
  73. package/dist/controllers/user-storage/mocks/mockResponses.js.map +1 -0
  74. package/dist/controllers/user-storage/mocks/{mockStorage.d.cts → mockStorage.d.ts} +1 -1
  75. package/dist/controllers/user-storage/mocks/mockStorage.d.ts.map +1 -0
  76. package/dist/controllers/user-storage/mocks/{mockStorage.mjs → mockStorage.js} +3 -3
  77. package/dist/controllers/user-storage/mocks/mockStorage.js.map +1 -0
  78. package/dist/controllers/user-storage/{types.d.cts → types.d.ts} +3 -3
  79. package/dist/controllers/user-storage/types.d.ts.map +1 -0
  80. package/dist/controllers/user-storage/types.js +2 -0
  81. package/dist/controllers/user-storage/types.js.map +1 -0
  82. package/dist/controllers/user-storage/{utils.d.cts → utils.d.ts} +1 -1
  83. package/dist/controllers/user-storage/utils.d.ts.map +1 -0
  84. package/dist/controllers/user-storage/{utils.mjs → utils.js} +1 -1
  85. package/dist/controllers/user-storage/utils.js.map +1 -0
  86. package/dist/index.d.ts +4 -0
  87. package/dist/index.d.ts.map +1 -0
  88. package/dist/index.js +4 -0
  89. package/dist/index.js.map +1 -0
  90. package/dist/sdk/authentication-jwt-bearer/{flow-siwe.d.cts → flow-siwe.d.ts} +2 -2
  91. package/dist/sdk/authentication-jwt-bearer/flow-siwe.d.ts.map +1 -0
  92. package/dist/sdk/authentication-jwt-bearer/flow-siwe.js +99 -0
  93. package/dist/sdk/authentication-jwt-bearer/flow-siwe.js.map +1 -0
  94. package/dist/sdk/authentication-jwt-bearer/{flow-srp.d.mts → flow-srp.d.ts} +5 -5
  95. package/dist/sdk/authentication-jwt-bearer/flow-srp.d.ts.map +1 -0
  96. package/dist/sdk/authentication-jwt-bearer/flow-srp.js +258 -0
  97. package/dist/sdk/authentication-jwt-bearer/flow-srp.js.map +1 -0
  98. package/dist/sdk/authentication-jwt-bearer/{services.d.cts → services.d.ts} +5 -5
  99. package/dist/sdk/authentication-jwt-bearer/services.d.ts.map +1 -0
  100. package/dist/sdk/authentication-jwt-bearer/{services.mjs → services.js} +6 -6
  101. package/dist/sdk/authentication-jwt-bearer/{services.cjs.map → services.js.map} +1 -1
  102. package/dist/sdk/authentication-jwt-bearer/{types.d.cts → types.d.ts} +2 -2
  103. package/dist/sdk/authentication-jwt-bearer/types.d.ts.map +1 -0
  104. package/dist/sdk/authentication-jwt-bearer/{types.mjs → types.js} +1 -1
  105. package/dist/sdk/authentication-jwt-bearer/types.js.map +1 -0
  106. package/dist/sdk/authentication-jwt-bearer/utils/{identifier.d.cts → identifier.d.ts} +2 -2
  107. package/dist/sdk/authentication-jwt-bearer/utils/identifier.d.ts.map +1 -0
  108. package/dist/sdk/authentication-jwt-bearer/utils/{identifier.mjs → identifier.js} +2 -2
  109. package/dist/sdk/authentication-jwt-bearer/utils/identifier.js.map +1 -0
  110. package/dist/sdk/authentication-jwt-bearer/utils/{time.d.cts → time.d.ts} +1 -1
  111. package/dist/sdk/authentication-jwt-bearer/utils/time.d.ts.map +1 -0
  112. package/dist/sdk/authentication-jwt-bearer/utils/{time.mjs → time.js} +1 -1
  113. package/dist/sdk/authentication-jwt-bearer/utils/time.js.map +1 -0
  114. package/dist/sdk/{authentication.d.cts → authentication.d.ts} +9 -9
  115. package/dist/sdk/authentication.d.ts.map +1 -0
  116. package/dist/sdk/authentication.js +104 -0
  117. package/dist/sdk/authentication.js.map +1 -0
  118. package/dist/sdk/{constants.d.cts → constants.d.ts} +1 -1
  119. package/dist/sdk/constants.d.ts.map +1 -0
  120. package/dist/sdk/{constants.mjs → constants.js} +1 -1
  121. package/dist/sdk/constants.js.map +1 -0
  122. package/dist/sdk/{errors.d.cts → errors.d.ts} +1 -1
  123. package/dist/sdk/errors.d.ts.map +1 -0
  124. package/dist/sdk/{errors.mjs → errors.js} +5 -4
  125. package/dist/sdk/errors.js.map +1 -0
  126. package/dist/sdk/index.d.ts +8 -0
  127. package/dist/sdk/index.d.ts.map +1 -0
  128. package/dist/sdk/index.js +8 -0
  129. package/dist/sdk/index.js.map +1 -0
  130. package/dist/sdk/mocks/{auth.d.cts → auth.d.ts} +2 -2
  131. package/dist/sdk/mocks/auth.d.ts.map +1 -0
  132. package/dist/sdk/mocks/{auth.mjs → auth.js} +3 -3
  133. package/dist/sdk/mocks/auth.js.map +1 -0
  134. package/dist/sdk/mocks/{userstorage.d.cts → userstorage.d.ts} +1 -1
  135. package/dist/sdk/mocks/userstorage.d.ts.map +1 -0
  136. package/dist/sdk/mocks/{userstorage.mjs → userstorage.js} +5 -5
  137. package/dist/sdk/mocks/userstorage.js.map +1 -0
  138. package/dist/sdk/{user-storage.d.mts → user-storage.d.ts} +5 -5
  139. package/dist/sdk/user-storage.d.ts.map +1 -0
  140. package/dist/sdk/user-storage.js +364 -0
  141. package/dist/sdk/user-storage.js.map +1 -0
  142. package/dist/sdk/utils/{eip-6963-metamask-provider.d.cts → eip-6963-metamask-provider.d.ts} +2 -2
  143. package/dist/sdk/utils/eip-6963-metamask-provider.d.ts.map +1 -0
  144. package/dist/sdk/utils/{eip-6963-metamask-provider.mjs → eip-6963-metamask-provider.js} +1 -1
  145. package/dist/sdk/utils/eip-6963-metamask-provider.js.map +1 -0
  146. package/dist/sdk/utils/{messaging-signing-snap-requests.d.cts → messaging-signing-snap-requests.d.ts} +2 -2
  147. package/dist/sdk/utils/messaging-signing-snap-requests.d.ts.map +1 -0
  148. package/dist/sdk/utils/{messaging-signing-snap-requests.mjs → messaging-signing-snap-requests.js} +1 -1
  149. package/dist/sdk/utils/messaging-signing-snap-requests.js.map +1 -0
  150. package/dist/sdk/utils/{validate-login-response.d.mts → validate-login-response.d.ts} +2 -2
  151. package/dist/sdk/utils/validate-login-response.d.ts.map +1 -0
  152. package/dist/sdk/utils/{validate-login-response.mjs → validate-login-response.js} +1 -1
  153. package/dist/sdk/utils/validate-login-response.js.map +1 -0
  154. package/dist/sdk/utils/{validate-pair-response.d.cts → validate-pair-response.d.ts} +1 -1
  155. package/dist/sdk/utils/validate-pair-response.d.ts.map +1 -0
  156. package/dist/sdk/utils/{validate-pair-response.mjs → validate-pair-response.js} +1 -1
  157. package/dist/sdk/utils/validate-pair-response.js.map +1 -0
  158. package/dist/shared/encryption/{cache.d.cts → cache.d.ts} +1 -1
  159. package/dist/shared/encryption/cache.d.ts.map +1 -0
  160. package/dist/shared/encryption/{cache.mjs → cache.js} +4 -4
  161. package/dist/shared/encryption/cache.js.map +1 -0
  162. package/dist/shared/encryption/{constants.d.cts → constants.d.ts} +2 -2
  163. package/dist/shared/encryption/constants.d.ts.map +1 -0
  164. package/dist/shared/encryption/{constants.mjs → constants.js} +1 -1
  165. package/dist/shared/encryption/constants.js.map +1 -0
  166. package/dist/shared/encryption/{encryption.d.cts → encryption.d.ts} +3 -3
  167. package/dist/shared/encryption/encryption.d.ts.map +1 -0
  168. package/dist/shared/encryption/encryption.js +202 -0
  169. package/dist/shared/encryption/encryption.js.map +1 -0
  170. package/dist/shared/encryption/index.d.ts +5 -0
  171. package/dist/shared/encryption/index.d.ts.map +1 -0
  172. package/dist/shared/encryption/index.js +5 -0
  173. package/dist/shared/encryption/index.js.map +1 -0
  174. package/dist/shared/encryption/{utils.d.cts → utils.d.ts} +3 -3
  175. package/dist/shared/encryption/utils.d.ts.map +1 -0
  176. package/dist/shared/encryption/{utils.mjs → utils.js} +1 -1
  177. package/dist/shared/encryption/utils.js.map +1 -0
  178. package/dist/shared/{env.d.cts → env.d.ts} +1 -1
  179. package/dist/shared/env.d.ts.map +1 -0
  180. package/dist/shared/{env.mjs → env.js} +1 -1
  181. package/dist/shared/env.js.map +1 -0
  182. package/dist/shared/{storage-schema.d.mts → storage-schema.d.ts} +1 -1
  183. package/dist/shared/storage-schema.d.ts.map +1 -0
  184. package/dist/shared/{storage-schema.mjs → storage-schema.js} +2 -2
  185. package/dist/shared/storage-schema.js.map +1 -0
  186. package/dist/shared/types/{encryption.d.cts → encryption.d.ts} +1 -1
  187. package/dist/shared/types/encryption.d.ts.map +1 -0
  188. package/dist/shared/types/encryption.js +2 -0
  189. package/dist/shared/types/encryption.js.map +1 -0
  190. package/dist/shared/types/{services.d.cts → services.d.ts} +2 -2
  191. package/dist/shared/types/services.d.ts.map +1 -0
  192. package/dist/shared/types/services.js +2 -0
  193. package/dist/shared/types/services.js.map +1 -0
  194. package/dist/shared/utils/{entropy-source.d.cts → entropy-source.d.ts} +2 -2
  195. package/dist/shared/utils/entropy-source.d.ts.map +1 -0
  196. package/dist/shared/utils/{entropy-source.mjs → entropy-source.js} +2 -2
  197. package/dist/shared/utils/entropy-source.js.map +1 -0
  198. package/dist/shared/utils/{event-queue.d.cts → event-queue.d.ts} +1 -1
  199. package/dist/shared/utils/event-queue.d.ts.map +1 -0
  200. package/dist/shared/utils/{event-queue.mjs → event-queue.js} +2 -4
  201. package/dist/shared/utils/event-queue.js.map +1 -0
  202. package/dist/shared/utils/{hd-keyring-seed.d.mts → hd-keyring-seed.d.ts} +3 -3
  203. package/dist/shared/utils/hd-keyring-seed.d.ts.map +1 -0
  204. package/dist/shared/utils/{hd-keyring-seed.mjs → hd-keyring-seed.js} +1 -1
  205. package/dist/shared/utils/hd-keyring-seed.js.map +1 -0
  206. package/dist/shared/utils/{message-signing.d.mts → message-signing.d.ts} +1 -1
  207. package/dist/shared/utils/message-signing.d.ts.map +1 -0
  208. package/dist/shared/utils/{message-signing.mjs → message-signing.js} +7 -7
  209. package/dist/shared/utils/message-signing.js.map +1 -0
  210. package/package.json +29 -63
  211. package/dist/controllers/authentication/AuthenticationController-method-action-types.cjs +0 -7
  212. package/dist/controllers/authentication/AuthenticationController-method-action-types.cjs.map +0 -1
  213. package/dist/controllers/authentication/AuthenticationController-method-action-types.d.cts +0 -102
  214. package/dist/controllers/authentication/AuthenticationController-method-action-types.d.cts.map +0 -1
  215. package/dist/controllers/authentication/AuthenticationController-method-action-types.d.mts.map +0 -1
  216. package/dist/controllers/authentication/AuthenticationController-method-action-types.mjs.map +0 -1
  217. package/dist/controllers/authentication/AuthenticationController.cjs +0 -596
  218. package/dist/controllers/authentication/AuthenticationController.cjs.map +0 -1
  219. package/dist/controllers/authentication/AuthenticationController.d.cts +0 -149
  220. package/dist/controllers/authentication/AuthenticationController.d.cts.map +0 -1
  221. package/dist/controllers/authentication/AuthenticationController.d.mts.map +0 -1
  222. package/dist/controllers/authentication/AuthenticationController.mjs +0 -592
  223. package/dist/controllers/authentication/AuthenticationController.mjs.map +0 -1
  224. package/dist/controllers/authentication/index.cjs +0 -35
  225. package/dist/controllers/authentication/index.cjs.map +0 -1
  226. package/dist/controllers/authentication/index.d.cts.map +0 -1
  227. package/dist/controllers/authentication/index.d.mts +0 -7
  228. package/dist/controllers/authentication/index.d.mts.map +0 -1
  229. package/dist/controllers/authentication/index.mjs +0 -6
  230. package/dist/controllers/authentication/index.mjs.map +0 -1
  231. package/dist/controllers/authentication/mocks/index.cjs +0 -18
  232. package/dist/controllers/authentication/mocks/index.cjs.map +0 -1
  233. package/dist/controllers/authentication/mocks/index.d.cts +0 -2
  234. package/dist/controllers/authentication/mocks/index.d.cts.map +0 -1
  235. package/dist/controllers/authentication/mocks/index.d.mts +0 -2
  236. package/dist/controllers/authentication/mocks/index.d.mts.map +0 -1
  237. package/dist/controllers/authentication/mocks/index.mjs +0 -2
  238. package/dist/controllers/authentication/mocks/index.mjs.map +0 -1
  239. package/dist/controllers/authentication/mocks/mockResponses.cjs +0 -135
  240. package/dist/controllers/authentication/mocks/mockResponses.cjs.map +0 -1
  241. package/dist/controllers/authentication/mocks/mockResponses.d.cts +0 -69
  242. package/dist/controllers/authentication/mocks/mockResponses.d.cts.map +0 -1
  243. package/dist/controllers/authentication/mocks/mockResponses.d.mts.map +0 -1
  244. package/dist/controllers/authentication/mocks/mockResponses.mjs.map +0 -1
  245. package/dist/controllers/index.cjs +0 -29
  246. package/dist/controllers/index.cjs.map +0 -1
  247. package/dist/controllers/index.d.cts +0 -3
  248. package/dist/controllers/index.d.cts.map +0 -1
  249. package/dist/controllers/index.d.mts +0 -3
  250. package/dist/controllers/index.d.mts.map +0 -1
  251. package/dist/controllers/index.mjs +0 -3
  252. package/dist/controllers/index.mjs.map +0 -1
  253. package/dist/controllers/user-storage/UserStorageController-method-action-types.cjs +0 -7
  254. package/dist/controllers/user-storage/UserStorageController-method-action-types.cjs.map +0 -1
  255. package/dist/controllers/user-storage/UserStorageController-method-action-types.d.cts +0 -137
  256. package/dist/controllers/user-storage/UserStorageController-method-action-types.d.cts.map +0 -1
  257. package/dist/controllers/user-storage/UserStorageController-method-action-types.d.mts.map +0 -1
  258. package/dist/controllers/user-storage/UserStorageController-method-action-types.mjs.map +0 -1
  259. package/dist/controllers/user-storage/UserStorageController.cjs +0 -412
  260. package/dist/controllers/user-storage/UserStorageController.cjs.map +0 -1
  261. package/dist/controllers/user-storage/UserStorageController.d.cts +0 -182
  262. package/dist/controllers/user-storage/UserStorageController.d.cts.map +0 -1
  263. package/dist/controllers/user-storage/UserStorageController.d.mts.map +0 -1
  264. package/dist/controllers/user-storage/UserStorageController.mjs +0 -408
  265. package/dist/controllers/user-storage/UserStorageController.mjs.map +0 -1
  266. package/dist/controllers/user-storage/constants.cjs +0 -19
  267. package/dist/controllers/user-storage/constants.cjs.map +0 -1
  268. package/dist/controllers/user-storage/constants.d.cts +0 -15
  269. package/dist/controllers/user-storage/constants.d.cts.map +0 -1
  270. package/dist/controllers/user-storage/constants.d.mts +0 -15
  271. package/dist/controllers/user-storage/constants.d.mts.map +0 -1
  272. package/dist/controllers/user-storage/constants.mjs.map +0 -1
  273. package/dist/controllers/user-storage/contact-syncing/constants.cjs +0 -12
  274. package/dist/controllers/user-storage/contact-syncing/constants.cjs.map +0 -1
  275. package/dist/controllers/user-storage/contact-syncing/constants.d.cts.map +0 -1
  276. package/dist/controllers/user-storage/contact-syncing/constants.d.mts +0 -9
  277. package/dist/controllers/user-storage/contact-syncing/constants.d.mts.map +0 -1
  278. package/dist/controllers/user-storage/contact-syncing/constants.mjs.map +0 -1
  279. package/dist/controllers/user-storage/contact-syncing/controller-integration.cjs +0 -346
  280. package/dist/controllers/user-storage/contact-syncing/controller-integration.cjs.map +0 -1
  281. package/dist/controllers/user-storage/contact-syncing/controller-integration.d.cts.map +0 -1
  282. package/dist/controllers/user-storage/contact-syncing/controller-integration.d.mts +0 -47
  283. package/dist/controllers/user-storage/contact-syncing/controller-integration.d.mts.map +0 -1
  284. package/dist/controllers/user-storage/contact-syncing/controller-integration.mjs.map +0 -1
  285. package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.cjs +0 -50
  286. package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.cjs.map +0 -1
  287. package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.d.cts.map +0 -1
  288. package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.d.mts +0 -8
  289. package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.d.mts.map +0 -1
  290. package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.mjs.map +0 -1
  291. package/dist/controllers/user-storage/contact-syncing/sync-utils.cjs +0 -23
  292. package/dist/controllers/user-storage/contact-syncing/sync-utils.cjs.map +0 -1
  293. package/dist/controllers/user-storage/contact-syncing/sync-utils.d.cts.map +0 -1
  294. package/dist/controllers/user-storage/contact-syncing/sync-utils.d.mts +0 -9
  295. package/dist/controllers/user-storage/contact-syncing/sync-utils.d.mts.map +0 -1
  296. package/dist/controllers/user-storage/contact-syncing/sync-utils.mjs.map +0 -1
  297. package/dist/controllers/user-storage/contact-syncing/types.cjs +0 -3
  298. package/dist/controllers/user-storage/contact-syncing/types.cjs.map +0 -1
  299. package/dist/controllers/user-storage/contact-syncing/types.d.cts +0 -37
  300. package/dist/controllers/user-storage/contact-syncing/types.d.cts.map +0 -1
  301. package/dist/controllers/user-storage/contact-syncing/types.d.mts.map +0 -1
  302. package/dist/controllers/user-storage/contact-syncing/types.mjs +0 -2
  303. package/dist/controllers/user-storage/contact-syncing/types.mjs.map +0 -1
  304. package/dist/controllers/user-storage/contact-syncing/utils.cjs +0 -64
  305. package/dist/controllers/user-storage/contact-syncing/utils.cjs.map +0 -1
  306. package/dist/controllers/user-storage/contact-syncing/utils.d.cts +0 -36
  307. package/dist/controllers/user-storage/contact-syncing/utils.d.cts.map +0 -1
  308. package/dist/controllers/user-storage/contact-syncing/utils.d.mts.map +0 -1
  309. package/dist/controllers/user-storage/contact-syncing/utils.mjs.map +0 -1
  310. package/dist/controllers/user-storage/index.cjs +0 -38
  311. package/dist/controllers/user-storage/index.cjs.map +0 -1
  312. package/dist/controllers/user-storage/index.d.cts.map +0 -1
  313. package/dist/controllers/user-storage/index.d.mts +0 -10
  314. package/dist/controllers/user-storage/index.d.mts.map +0 -1
  315. package/dist/controllers/user-storage/index.mjs +0 -9
  316. package/dist/controllers/user-storage/index.mjs.map +0 -1
  317. package/dist/controllers/user-storage/mocks/index.cjs +0 -19
  318. package/dist/controllers/user-storage/mocks/index.cjs.map +0 -1
  319. package/dist/controllers/user-storage/mocks/index.d.cts +0 -3
  320. package/dist/controllers/user-storage/mocks/index.d.cts.map +0 -1
  321. package/dist/controllers/user-storage/mocks/index.d.mts +0 -3
  322. package/dist/controllers/user-storage/mocks/index.d.mts.map +0 -1
  323. package/dist/controllers/user-storage/mocks/index.mjs +0 -3
  324. package/dist/controllers/user-storage/mocks/index.mjs.map +0 -1
  325. package/dist/controllers/user-storage/mocks/mockResponses.cjs +0 -113
  326. package/dist/controllers/user-storage/mocks/mockResponses.cjs.map +0 -1
  327. package/dist/controllers/user-storage/mocks/mockResponses.d.cts +0 -66
  328. package/dist/controllers/user-storage/mocks/mockResponses.d.cts.map +0 -1
  329. package/dist/controllers/user-storage/mocks/mockResponses.d.mts.map +0 -1
  330. package/dist/controllers/user-storage/mocks/mockResponses.mjs.map +0 -1
  331. package/dist/controllers/user-storage/mocks/mockStorage.cjs +0 -36
  332. package/dist/controllers/user-storage/mocks/mockStorage.cjs.map +0 -1
  333. package/dist/controllers/user-storage/mocks/mockStorage.d.cts.map +0 -1
  334. package/dist/controllers/user-storage/mocks/mockStorage.d.mts +0 -5
  335. package/dist/controllers/user-storage/mocks/mockStorage.d.mts.map +0 -1
  336. package/dist/controllers/user-storage/mocks/mockStorage.mjs.map +0 -1
  337. package/dist/controllers/user-storage/types.cjs +0 -3
  338. package/dist/controllers/user-storage/types.cjs.map +0 -1
  339. package/dist/controllers/user-storage/types.d.cts.map +0 -1
  340. package/dist/controllers/user-storage/types.d.mts +0 -23
  341. package/dist/controllers/user-storage/types.d.mts.map +0 -1
  342. package/dist/controllers/user-storage/types.mjs +0 -2
  343. package/dist/controllers/user-storage/types.mjs.map +0 -1
  344. package/dist/controllers/user-storage/utils.cjs +0 -32
  345. package/dist/controllers/user-storage/utils.cjs.map +0 -1
  346. package/dist/controllers/user-storage/utils.d.cts.map +0 -1
  347. package/dist/controllers/user-storage/utils.d.mts +0 -19
  348. package/dist/controllers/user-storage/utils.d.mts.map +0 -1
  349. package/dist/controllers/user-storage/utils.mjs.map +0 -1
  350. package/dist/index.cjs +0 -30
  351. package/dist/index.cjs.map +0 -1
  352. package/dist/index.d.cts +0 -4
  353. package/dist/index.d.cts.map +0 -1
  354. package/dist/index.d.mts +0 -4
  355. package/dist/index.d.mts.map +0 -1
  356. package/dist/index.mjs +0 -4
  357. package/dist/index.mjs.map +0 -1
  358. package/dist/sdk/authentication-jwt-bearer/flow-siwe.cjs +0 -114
  359. package/dist/sdk/authentication-jwt-bearer/flow-siwe.cjs.map +0 -1
  360. package/dist/sdk/authentication-jwt-bearer/flow-siwe.d.cts.map +0 -1
  361. package/dist/sdk/authentication-jwt-bearer/flow-siwe.d.mts +0 -25
  362. package/dist/sdk/authentication-jwt-bearer/flow-siwe.d.mts.map +0 -1
  363. package/dist/sdk/authentication-jwt-bearer/flow-siwe.mjs +0 -110
  364. package/dist/sdk/authentication-jwt-bearer/flow-siwe.mjs.map +0 -1
  365. package/dist/sdk/authentication-jwt-bearer/flow-srp.cjs +0 -293
  366. package/dist/sdk/authentication-jwt-bearer/flow-srp.cjs.map +0 -1
  367. package/dist/sdk/authentication-jwt-bearer/flow-srp.d.cts +0 -45
  368. package/dist/sdk/authentication-jwt-bearer/flow-srp.d.cts.map +0 -1
  369. package/dist/sdk/authentication-jwt-bearer/flow-srp.d.mts.map +0 -1
  370. package/dist/sdk/authentication-jwt-bearer/flow-srp.mjs +0 -266
  371. package/dist/sdk/authentication-jwt-bearer/flow-srp.mjs.map +0 -1
  372. package/dist/sdk/authentication-jwt-bearer/services.cjs +0 -443
  373. package/dist/sdk/authentication-jwt-bearer/services.d.cts.map +0 -1
  374. package/dist/sdk/authentication-jwt-bearer/services.d.mts +0 -120
  375. package/dist/sdk/authentication-jwt-bearer/services.d.mts.map +0 -1
  376. package/dist/sdk/authentication-jwt-bearer/services.mjs.map +0 -1
  377. package/dist/sdk/authentication-jwt-bearer/types.cjs +0 -12
  378. package/dist/sdk/authentication-jwt-bearer/types.cjs.map +0 -1
  379. package/dist/sdk/authentication-jwt-bearer/types.d.cts.map +0 -1
  380. package/dist/sdk/authentication-jwt-bearer/types.d.mts +0 -133
  381. package/dist/sdk/authentication-jwt-bearer/types.d.mts.map +0 -1
  382. package/dist/sdk/authentication-jwt-bearer/types.mjs.map +0 -1
  383. package/dist/sdk/authentication-jwt-bearer/utils/identifier.cjs +0 -27
  384. package/dist/sdk/authentication-jwt-bearer/utils/identifier.cjs.map +0 -1
  385. package/dist/sdk/authentication-jwt-bearer/utils/identifier.d.cts.map +0 -1
  386. package/dist/sdk/authentication-jwt-bearer/utils/identifier.d.mts +0 -13
  387. package/dist/sdk/authentication-jwt-bearer/utils/identifier.d.mts.map +0 -1
  388. package/dist/sdk/authentication-jwt-bearer/utils/identifier.mjs.map +0 -1
  389. package/dist/sdk/authentication-jwt-bearer/utils/time.cjs +0 -17
  390. package/dist/sdk/authentication-jwt-bearer/utils/time.cjs.map +0 -1
  391. package/dist/sdk/authentication-jwt-bearer/utils/time.d.cts.map +0 -1
  392. package/dist/sdk/authentication-jwt-bearer/utils/time.d.mts +0 -8
  393. package/dist/sdk/authentication-jwt-bearer/utils/time.d.mts.map +0 -1
  394. package/dist/sdk/authentication-jwt-bearer/utils/time.mjs.map +0 -1
  395. package/dist/sdk/authentication.cjs +0 -136
  396. package/dist/sdk/authentication.cjs.map +0 -1
  397. package/dist/sdk/authentication.d.cts.map +0 -1
  398. package/dist/sdk/authentication.d.mts +0 -39
  399. package/dist/sdk/authentication.d.mts.map +0 -1
  400. package/dist/sdk/authentication.mjs +0 -116
  401. package/dist/sdk/authentication.mjs.map +0 -1
  402. package/dist/sdk/constants.cjs +0 -8
  403. package/dist/sdk/constants.cjs.map +0 -1
  404. package/dist/sdk/constants.d.cts.map +0 -1
  405. package/dist/sdk/constants.d.mts +0 -5
  406. package/dist/sdk/constants.d.mts.map +0 -1
  407. package/dist/sdk/constants.mjs.map +0 -1
  408. package/dist/sdk/errors.cjs +0 -89
  409. package/dist/sdk/errors.cjs.map +0 -1
  410. package/dist/sdk/errors.d.cts.map +0 -1
  411. package/dist/sdk/errors.d.mts +0 -43
  412. package/dist/sdk/errors.d.mts.map +0 -1
  413. package/dist/sdk/errors.mjs.map +0 -1
  414. package/dist/sdk/index.cjs +0 -24
  415. package/dist/sdk/index.cjs.map +0 -1
  416. package/dist/sdk/index.d.cts +0 -8
  417. package/dist/sdk/index.d.cts.map +0 -1
  418. package/dist/sdk/index.d.mts +0 -8
  419. package/dist/sdk/index.d.mts.map +0 -1
  420. package/dist/sdk/index.mjs +0 -8
  421. package/dist/sdk/index.mjs.map +0 -1
  422. package/dist/sdk/mocks/auth.cjs +0 -93
  423. package/dist/sdk/mocks/auth.cjs.map +0 -1
  424. package/dist/sdk/mocks/auth.d.cts.map +0 -1
  425. package/dist/sdk/mocks/auth.d.mts +0 -80
  426. package/dist/sdk/mocks/auth.d.mts.map +0 -1
  427. package/dist/sdk/mocks/auth.mjs.map +0 -1
  428. package/dist/sdk/mocks/userstorage.cjs +0 -43
  429. package/dist/sdk/mocks/userstorage.cjs.map +0 -1
  430. package/dist/sdk/mocks/userstorage.d.cts.map +0 -1
  431. package/dist/sdk/mocks/userstorage.d.mts +0 -10
  432. package/dist/sdk/mocks/userstorage.d.mts.map +0 -1
  433. package/dist/sdk/mocks/userstorage.mjs.map +0 -1
  434. package/dist/sdk/user-storage.cjs +0 -386
  435. package/dist/sdk/user-storage.cjs.map +0 -1
  436. package/dist/sdk/user-storage.d.cts +0 -47
  437. package/dist/sdk/user-storage.d.cts.map +0 -1
  438. package/dist/sdk/user-storage.d.mts.map +0 -1
  439. package/dist/sdk/user-storage.mjs +0 -358
  440. package/dist/sdk/user-storage.mjs.map +0 -1
  441. package/dist/sdk/utils/eip-6963-metamask-provider.cjs +0 -70
  442. package/dist/sdk/utils/eip-6963-metamask-provider.cjs.map +0 -1
  443. package/dist/sdk/utils/eip-6963-metamask-provider.d.cts.map +0 -1
  444. package/dist/sdk/utils/eip-6963-metamask-provider.d.mts +0 -25
  445. package/dist/sdk/utils/eip-6963-metamask-provider.d.mts.map +0 -1
  446. package/dist/sdk/utils/eip-6963-metamask-provider.mjs.map +0 -1
  447. package/dist/sdk/utils/messaging-signing-snap-requests.cjs +0 -96
  448. package/dist/sdk/utils/messaging-signing-snap-requests.cjs.map +0 -1
  449. package/dist/sdk/utils/messaging-signing-snap-requests.d.cts.map +0 -1
  450. package/dist/sdk/utils/messaging-signing-snap-requests.d.mts +0 -41
  451. package/dist/sdk/utils/messaging-signing-snap-requests.d.mts.map +0 -1
  452. package/dist/sdk/utils/messaging-signing-snap-requests.mjs.map +0 -1
  453. package/dist/sdk/utils/validate-login-response.cjs +0 -49
  454. package/dist/sdk/utils/validate-login-response.cjs.map +0 -1
  455. package/dist/sdk/utils/validate-login-response.d.cts +0 -14
  456. package/dist/sdk/utils/validate-login-response.d.cts.map +0 -1
  457. package/dist/sdk/utils/validate-login-response.d.mts.map +0 -1
  458. package/dist/sdk/utils/validate-login-response.mjs.map +0 -1
  459. package/dist/sdk/utils/validate-pair-response.cjs +0 -29
  460. package/dist/sdk/utils/validate-pair-response.cjs.map +0 -1
  461. package/dist/sdk/utils/validate-pair-response.d.cts.map +0 -1
  462. package/dist/sdk/utils/validate-pair-response.d.mts +0 -26
  463. package/dist/sdk/utils/validate-pair-response.d.mts.map +0 -1
  464. package/dist/sdk/utils/validate-pair-response.mjs.map +0 -1
  465. package/dist/shared/encryption/cache.cjs +0 -77
  466. package/dist/shared/encryption/cache.cjs.map +0 -1
  467. package/dist/shared/encryption/cache.d.cts.map +0 -1
  468. package/dist/shared/encryption/cache.d.mts +0 -32
  469. package/dist/shared/encryption/cache.d.mts.map +0 -1
  470. package/dist/shared/encryption/cache.mjs.map +0 -1
  471. package/dist/shared/encryption/constants.cjs +0 -17
  472. package/dist/shared/encryption/constants.cjs.map +0 -1
  473. package/dist/shared/encryption/constants.d.cts.map +0 -1
  474. package/dist/shared/encryption/constants.d.mts +0 -9
  475. package/dist/shared/encryption/constants.d.mts.map +0 -1
  476. package/dist/shared/encryption/constants.mjs.map +0 -1
  477. package/dist/shared/encryption/encryption.cjs +0 -209
  478. package/dist/shared/encryption/encryption.cjs.map +0 -1
  479. package/dist/shared/encryption/encryption.d.cts.map +0 -1
  480. package/dist/shared/encryption/encryption.d.mts +0 -30
  481. package/dist/shared/encryption/encryption.d.mts.map +0 -1
  482. package/dist/shared/encryption/encryption.mjs +0 -205
  483. package/dist/shared/encryption/encryption.mjs.map +0 -1
  484. package/dist/shared/encryption/index.cjs +0 -25
  485. package/dist/shared/encryption/index.cjs.map +0 -1
  486. package/dist/shared/encryption/index.d.cts +0 -5
  487. package/dist/shared/encryption/index.d.cts.map +0 -1
  488. package/dist/shared/encryption/index.d.mts +0 -5
  489. package/dist/shared/encryption/index.d.mts.map +0 -1
  490. package/dist/shared/encryption/index.mjs +0 -5
  491. package/dist/shared/encryption/index.mjs.map +0 -1
  492. package/dist/shared/encryption/utils.cjs +0 -21
  493. package/dist/shared/encryption/utils.cjs.map +0 -1
  494. package/dist/shared/encryption/utils.d.cts.map +0 -1
  495. package/dist/shared/encryption/utils.d.mts +0 -5
  496. package/dist/shared/encryption/utils.d.mts.map +0 -1
  497. package/dist/shared/encryption/utils.mjs.map +0 -1
  498. package/dist/shared/env.cjs +0 -85
  499. package/dist/shared/env.cjs.map +0 -1
  500. package/dist/shared/env.d.cts.map +0 -1
  501. package/dist/shared/env.d.mts +0 -34
  502. package/dist/shared/env.d.mts.map +0 -1
  503. package/dist/shared/env.mjs.map +0 -1
  504. package/dist/shared/storage-schema.cjs +0 -42
  505. package/dist/shared/storage-schema.cjs.map +0 -1
  506. package/dist/shared/storage-schema.d.cts +0 -34
  507. package/dist/shared/storage-schema.d.cts.map +0 -1
  508. package/dist/shared/storage-schema.d.mts.map +0 -1
  509. package/dist/shared/storage-schema.mjs.map +0 -1
  510. package/dist/shared/types/encryption.cjs +0 -3
  511. package/dist/shared/types/encryption.cjs.map +0 -1
  512. package/dist/shared/types/encryption.d.cts.map +0 -1
  513. package/dist/shared/types/encryption.d.mts +0 -2
  514. package/dist/shared/types/encryption.d.mts.map +0 -1
  515. package/dist/shared/types/encryption.mjs +0 -2
  516. package/dist/shared/types/encryption.mjs.map +0 -1
  517. package/dist/shared/types/services.cjs +0 -3
  518. package/dist/shared/types/services.cjs.map +0 -1
  519. package/dist/shared/types/services.d.cts.map +0 -1
  520. package/dist/shared/types/services.d.mts +0 -17
  521. package/dist/shared/types/services.d.mts.map +0 -1
  522. package/dist/shared/types/services.mjs +0 -2
  523. package/dist/shared/types/services.mjs.map +0 -1
  524. package/dist/shared/utils/entropy-source.cjs +0 -37
  525. package/dist/shared/utils/entropy-source.cjs.map +0 -1
  526. package/dist/shared/utils/entropy-source.d.cts.map +0 -1
  527. package/dist/shared/utils/entropy-source.d.mts +0 -22
  528. package/dist/shared/utils/entropy-source.d.mts.map +0 -1
  529. package/dist/shared/utils/entropy-source.mjs.map +0 -1
  530. package/dist/shared/utils/event-queue.cjs +0 -24
  531. package/dist/shared/utils/event-queue.cjs.map +0 -1
  532. package/dist/shared/utils/event-queue.d.cts.map +0 -1
  533. package/dist/shared/utils/event-queue.d.mts +0 -6
  534. package/dist/shared/utils/event-queue.d.mts.map +0 -1
  535. package/dist/shared/utils/event-queue.mjs.map +0 -1
  536. package/dist/shared/utils/hd-keyring-seed.cjs +0 -49
  537. package/dist/shared/utils/hd-keyring-seed.cjs.map +0 -1
  538. package/dist/shared/utils/hd-keyring-seed.d.cts +0 -27
  539. package/dist/shared/utils/hd-keyring-seed.d.cts.map +0 -1
  540. package/dist/shared/utils/hd-keyring-seed.d.mts.map +0 -1
  541. package/dist/shared/utils/hd-keyring-seed.mjs.map +0 -1
  542. package/dist/shared/utils/message-signing.cjs +0 -147
  543. package/dist/shared/utils/message-signing.cjs.map +0 -1
  544. package/dist/shared/utils/message-signing.d.cts +0 -73
  545. package/dist/shared/utils/message-signing.d.cts.map +0 -1
  546. package/dist/shared/utils/message-signing.d.mts.map +0 -1
  547. package/dist/shared/utils/message-signing.mjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"authentication.mjs","sourceRoot":"","sources":["../../src/sdk/authentication.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,OAAO,EAAE,iBAAiB,EAAE,kDAAiD;AAC7E,OAAO,EAAE,gBAAgB,EAAE,iDAAgD;AAC3E,OAAO,EACL,QAAQ,EACR,eAAe,EAChB,iDAAgD;AAQjD,OAAO,EAAE,QAAQ,EAAE,8CAA6C;AAChE,OAAO,EAAE,SAAS,EAAE,wBAAwB,EAAE,qBAAoB;AAYlE,MAAM,OAAO,aAAa;IAOxB,YAAY,GAAG,IAAyB;;QAN/B,sCAAgB;QAEhB,qCAAU;QAEV,qCAA2C;QAGlD,uBAAA,IAAI,uBAAS,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,MAAA,CAAC;QAC1B,uBAAA,IAAI,sBAAQ,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,MAAA,CAAC;QAExB,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,GAAG,EAAE,CAAC;YAClC,uBAAA,IAAI,sBAAQ,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,MAAA,CAAC;YACnD,OAAO;QACT,CAAC;QAED,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI,EAAE,CAAC;YACnC,uBAAA,IAAI,sBAAQ,IAAI,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC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AAO,EAAE,iBAAiB,EAAE,kDAAiD;AAC7E,OAAO,EAAE,gBAAgB,EAAE,iDAAgD;AAC3E,sDAAqD","sourcesContent":["import type { Eip1193Provider } from 'ethers';\n\nimport type { Env } from '../shared/env.js';\nimport { SIWEJwtBearerAuth } from './authentication-jwt-bearer/flow-siwe.js';\nimport { SRPJwtBearerAuth } from './authentication-jwt-bearer/flow-srp.js';\nimport {\n getNonce,\n pairIdentifiers,\n} from './authentication-jwt-bearer/services.js';\nimport type { PairProfilesResponse } from './authentication-jwt-bearer/services.js';\nimport type {\n UserProfile,\n Pair,\n PairSocialIdentifierParams,\n UserProfileLineage,\n} from './authentication-jwt-bearer/types.js';\nimport { AuthType } from './authentication-jwt-bearer/types.js';\nimport { PairError, UnsupportedAuthTypeError } from './errors.js';\n\n// Computing the Classes, so we only get back the public methods for the interface.\n\ntype Compute<T> = T extends infer U ? { [K in keyof U]: U[K] } : never;\ntype SIWEInterface = Compute<SIWEJwtBearerAuth>;\nexport type SRPInterface = Compute<SRPJwtBearerAuth>;\n\ntype SiweParams = ConstructorParameters<typeof SIWEJwtBearerAuth>;\ntype SRPParams = ConstructorParameters<typeof SRPJwtBearerAuth>;\ntype JwtBearerAuthParams = SiweParams | SRPParams;\n\nexport class JwtBearerAuth implements SIWEInterface, SRPInterface {\n readonly #type: AuthType;\n\n readonly #env: Env;\n\n readonly #sdk: SIWEJwtBearerAuth | SRPJwtBearerAuth;\n\n constructor(...args: JwtBearerAuthParams) {\n this.#type = args[0].type;\n this.#env = args[0].env;\n\n if (args[0].type === AuthType.SRP) {\n this.#sdk = new SRPJwtBearerAuth(args[0], args[1]);\n return;\n }\n\n if (args[0].type === AuthType.SiWE) {\n this.#sdk = new SIWEJwtBearerAuth(args[0], args[1]);\n return;\n }\n\n throw new UnsupportedAuthTypeError('unsupported auth type');\n }\n\n setCustomProvider(provider: Eip1193Provider) {\n this.#assertSRP(this.#type, this.#sdk);\n this.#sdk.setCustomProvider(provider);\n }\n\n async getAccessToken(entropySourceId?: string): Promise<string> {\n return await this.#sdk.getAccessToken(entropySourceId);\n }\n\n async connectSnap(): Promise<string> {\n this.#assertSRP(this.#type, this.#sdk);\n return this.#sdk.connectSnap();\n }\n\n async isSnapConnected(): Promise<boolean> {\n this.#assertSRP(this.#type, this.#sdk);\n return this.#sdk.isSnapConnected();\n }\n\n async getUserProfile(entropySourceId?: string): Promise<UserProfile> {\n return await this.#sdk.getUserProfile(entropySourceId);\n }\n\n async getIdentifier(entropySourceId?: string): Promise<string> {\n return await this.#sdk.getIdentifier(entropySourceId);\n }\n\n async getUserProfileLineage(\n entropySourceId?: string,\n ): Promise<UserProfileLineage> {\n return await this.#sdk.getUserProfileLineage(entropySourceId);\n }\n\n async getCustomerServiceToken(entropySourceId?: string): Promise<string> {\n return await this.#sdk.getCustomerServiceToken(entropySourceId);\n }\n\n async pairSrpProfiles(\n accessTokens: string[],\n authAccessToken: string,\n ): Promise<PairProfilesResponse> {\n this.#assertSRP(this.#type, this.#sdk);\n return await this.#sdk.pairSrpProfiles(accessTokens, authAccessToken);\n }\n\n async pairSocialIdentifier(\n params: PairSocialIdentifierParams,\n authAccessToken: string,\n ): Promise<void> {\n this.#assertSRP(this.#type, this.#sdk);\n await this.#sdk.pairSocialIdentifier(params, authAccessToken);\n }\n\n async signMessage(\n message: string,\n entropySourceId?: string,\n ): Promise<string> {\n return await this.#sdk.signMessage(message, entropySourceId);\n }\n\n async pairIdentifiers(pairing: Pair[]): Promise<void> {\n const profile = await this.getUserProfile();\n const n = await getNonce(profile.profileId, this.#env);\n\n const logins = await Promise.all(\n pairing.map(async (p) => {\n try {\n const raw = `metamask:${n.nonce}:${p.identifier}`;\n const sig = await p.signMessage(raw);\n return {\n signature: sig,\n raw_message: raw,\n encrypted_storage_key: p.encryptedStorageKey,\n identifier_type: p.identifierType,\n };\n } catch (e) {\n /* istanbul ignore next */\n const errorMessage =\n e instanceof Error ? e.message : JSON.stringify(e ?? '');\n throw new PairError(\n `failed to sign pairing message: ${errorMessage}`,\n );\n }\n }),\n );\n\n const accessToken = await this.getAccessToken();\n await pairIdentifiers(n.nonce, logins, accessToken, this.#env);\n }\n\n prepare(signer: {\n address: string;\n chainId: number;\n signMessage: (message: string) => Promise<string>;\n domain: string;\n }): void {\n this.#assertSIWE(this.#type, this.#sdk);\n this.#sdk.prepare(signer);\n }\n\n #assertSIWE(\n type: AuthType,\n _sdk: SIWEJwtBearerAuth | SRPJwtBearerAuth,\n ): asserts _sdk is SIWEJwtBearerAuth {\n if (type === AuthType.SiWE) {\n return;\n }\n\n throw new UnsupportedAuthTypeError(\n 'This method is only available via SIWE auth type',\n );\n }\n\n #assertSRP(\n type: AuthType,\n _sdk: SIWEJwtBearerAuth | SRPJwtBearerAuth,\n ): asserts _sdk is SRPJwtBearerAuth {\n if (type === AuthType.SRP) {\n return;\n }\n\n throw new UnsupportedAuthTypeError(\n 'This method is only available via SRP auth type',\n );\n }\n}\n\nexport { SIWEJwtBearerAuth } from './authentication-jwt-bearer/flow-siwe.js';\nexport { SRPJwtBearerAuth } from './authentication-jwt-bearer/flow-srp.js';\nexport * from './authentication-jwt-bearer/types.js';\n"]}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HTTP_STATUS_CODES = void 0;
4
- exports.HTTP_STATUS_CODES = {
5
- CONFLICT: 409,
6
- TOO_MANY_REQUESTS: 429,
7
- };
8
- //# sourceMappingURL=constants.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../../src/sdk/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG;IAC/B,QAAQ,EAAE,GAAG;IACb,iBAAiB,EAAE,GAAG;CACvB,CAAC","sourcesContent":["export const HTTP_STATUS_CODES = {\n CONFLICT: 409,\n TOO_MANY_REQUESTS: 429,\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.cts","sourceRoot":"","sources":["../../src/sdk/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB;;;CAG7B,CAAC"}
@@ -1,5 +0,0 @@
1
- export declare const HTTP_STATUS_CODES: {
2
- CONFLICT: number;
3
- TOO_MANY_REQUESTS: number;
4
- };
5
- //# sourceMappingURL=constants.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../../src/sdk/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB;;;CAG7B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../../src/sdk/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,QAAQ,EAAE,GAAG;IACb,iBAAiB,EAAE,GAAG;CACvB,CAAC","sourcesContent":["export const HTTP_STATUS_CODES = {\n CONFLICT: 409,\n TOO_MANY_REQUESTS: 429,\n};\n"]}
@@ -1,89 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RateLimitedError = exports.NotFoundError = exports.UnsupportedAuthTypeError = exports.ValidationError = exports.UserStorageError = exports.PairConflictError = exports.PairError = exports.SignInError = exports.NonceRetrievalError = void 0;
4
- const constants_js_1 = require("./constants.cjs");
5
- class NonceRetrievalError extends Error {
6
- constructor(message) {
7
- super(message);
8
- this.name = 'NonceRetrievalError';
9
- }
10
- }
11
- exports.NonceRetrievalError = NonceRetrievalError;
12
- class SignInError extends Error {
13
- constructor(message) {
14
- super(message);
15
- this.name = 'SignInError';
16
- }
17
- }
18
- exports.SignInError = SignInError;
19
- class PairError extends Error {
20
- constructor(message) {
21
- super(message);
22
- this.name = 'PairError';
23
- }
24
- }
25
- exports.PairError = PairError;
26
- /**
27
- * Thrown when `POST /api/v2/profile/pair/identifier` returns 409 Conflict:
28
- * the social identifier already belongs to another canonical profile.
29
- * Retrying the same request cannot succeed.
30
- */
31
- class PairConflictError extends PairError {
32
- constructor(message) {
33
- super(message);
34
- this.status = constants_js_1.HTTP_STATUS_CODES.CONFLICT;
35
- this.name = 'PairConflictError';
36
- }
37
- }
38
- exports.PairConflictError = PairConflictError;
39
- class UserStorageError extends Error {
40
- constructor(message) {
41
- super(message);
42
- this.name = 'UserStorageError';
43
- }
44
- }
45
- exports.UserStorageError = UserStorageError;
46
- class ValidationError extends Error {
47
- constructor(message) {
48
- super(message);
49
- this.name = 'ValidationError';
50
- }
51
- }
52
- exports.ValidationError = ValidationError;
53
- class UnsupportedAuthTypeError extends Error {
54
- constructor(message) {
55
- super(message);
56
- this.name = 'UnsupportedAuthTypeError';
57
- }
58
- }
59
- exports.UnsupportedAuthTypeError = UnsupportedAuthTypeError;
60
- class NotFoundError extends Error {
61
- constructor(message) {
62
- super(message);
63
- this.name = 'NotFoundError';
64
- }
65
- }
66
- exports.NotFoundError = NotFoundError;
67
- class RateLimitedError extends Error {
68
- constructor(message, retryAfterMs) {
69
- super(message);
70
- this.status = constants_js_1.HTTP_STATUS_CODES.TOO_MANY_REQUESTS;
71
- this.name = 'RateLimitedError';
72
- this.retryAfterMs = retryAfterMs;
73
- }
74
- /**
75
- * Check if an unknown error is a rate limit error (429 status).
76
- *
77
- * @param e - The error to check
78
- * @returns True if the error is a rate limit error
79
- */
80
- static isRateLimitError(e) {
81
- return (e instanceof RateLimitedError ||
82
- (typeof e === 'object' &&
83
- e !== null &&
84
- 'status' in e &&
85
- e.status === constants_js_1.HTTP_STATUS_CODES.TOO_MANY_REQUESTS));
86
- }
87
- }
88
- exports.RateLimitedError = RateLimitedError;
89
- //# sourceMappingURL=errors.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.cjs","sourceRoot":"","sources":["../../src/sdk/errors.ts"],"names":[],"mappings":";;;AAAA,kDAAmD;AAEnD,MAAa,mBAAoB,SAAQ,KAAK;IAC5C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,qBAA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AK;IAKzC,YAAY,OAAe,EAAE,YAAqB;QAChD,KAAK,CAAC,OAAO,CAAC,CAAC;QALR,WAAM,GAAG,gCAAiB,CAAC,iBAAiB,CAAC;QAMpD,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;QAC/B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,gBAAgB,CAAC,CAAU;QAChC,OAAO,CACL,CAAC,YAAY,gBAAgB;YAC7B,CAAC,OAAO,CAAC,KAAK,QAAQ;gBACpB,CAAC,KAAK,IAAI;gBACV,QAAQ,IAAI,CAAC;gBACb,CAAC,CAAC,MAAM,KAAK,gCAAiB,CAAC,iBAAiB,CAAC,CACpD,CAAC;IACJ,CAAC;CACF;AA1BD,4CA0BC","sourcesContent":["import { HTTP_STATUS_CODES } from './constants.js';\n\nexport class NonceRetrievalError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'NonceRetrievalError';\n }\n}\n\nexport class SignInError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'SignInError';\n }\n}\n\nexport class PairError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'PairError';\n }\n}\n\n/**\n * Thrown when `POST /api/v2/profile/pair/identifier` returns 409 Conflict:\n * the social identifier already belongs to another canonical profile.\n * Retrying the same request cannot succeed.\n */\nexport class PairConflictError extends PairError {\n readonly status = HTTP_STATUS_CODES.CONFLICT;\n\n constructor(message: string) {\n super(message);\n this.name = 'PairConflictError';\n }\n}\n\nexport class UserStorageError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'UserStorageError';\n }\n}\n\nexport class ValidationError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'ValidationError';\n }\n}\n\nexport class UnsupportedAuthTypeError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'UnsupportedAuthTypeError';\n }\n}\n\nexport class NotFoundError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'NotFoundError';\n }\n}\n\nexport class RateLimitedError extends Error {\n readonly status = HTTP_STATUS_CODES.TOO_MANY_REQUESTS;\n\n readonly retryAfterMs?: number;\n\n constructor(message: string, retryAfterMs?: number) {\n super(message);\n this.name = 'RateLimitedError';\n this.retryAfterMs = retryAfterMs;\n }\n\n /**\n * Check if an unknown error is a rate limit error (429 status).\n *\n * @param e - The error to check\n * @returns True if the error is a rate limit error\n */\n static isRateLimitError(e: unknown): e is RateLimitedError {\n return (\n e instanceof RateLimitedError ||\n (typeof e === 'object' &&\n e !== null &&\n 'status' in e &&\n e.status === HTTP_STATUS_CODES.TOO_MANY_REQUESTS)\n );\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.d.cts","sourceRoot":"","sources":["../../src/sdk/errors.ts"],"names":[],"mappings":"AAEA,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,WAAY,SAAQ,KAAK;gBACxB,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,SAAU,SAAQ,KAAK;gBACtB,OAAO,EAAE,MAAM;CAI5B;AAED;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,SAAS;IAC9C,QAAQ,CAAC,MAAM,SAA8B;gBAEjC,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,wBAAyB,SAAQ,KAAK;gBACrC,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,aAAc,SAAQ,KAAK;gBAC1B,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,QAAQ,CAAC,MAAM,SAAuC;IAEtD,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;gBAEnB,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;IAMlD;;;;;OAKG;IACH,MAAM,CAAC,gBAAgB,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,gBAAgB;CAS3D"}
@@ -1,43 +0,0 @@
1
- export declare class NonceRetrievalError extends Error {
2
- constructor(message: string);
3
- }
4
- export declare class SignInError extends Error {
5
- constructor(message: string);
6
- }
7
- export declare class PairError extends Error {
8
- constructor(message: string);
9
- }
10
- /**
11
- * Thrown when `POST /api/v2/profile/pair/identifier` returns 409 Conflict:
12
- * the social identifier already belongs to another canonical profile.
13
- * Retrying the same request cannot succeed.
14
- */
15
- export declare class PairConflictError extends PairError {
16
- readonly status: number;
17
- constructor(message: string);
18
- }
19
- export declare class UserStorageError extends Error {
20
- constructor(message: string);
21
- }
22
- export declare class ValidationError extends Error {
23
- constructor(message: string);
24
- }
25
- export declare class UnsupportedAuthTypeError extends Error {
26
- constructor(message: string);
27
- }
28
- export declare class NotFoundError extends Error {
29
- constructor(message: string);
30
- }
31
- export declare class RateLimitedError extends Error {
32
- readonly status: number;
33
- readonly retryAfterMs?: number;
34
- constructor(message: string, retryAfterMs?: number);
35
- /**
36
- * Check if an unknown error is a rate limit error (429 status).
37
- *
38
- * @param e - The error to check
39
- * @returns True if the error is a rate limit error
40
- */
41
- static isRateLimitError(e: unknown): e is RateLimitedError;
42
- }
43
- //# sourceMappingURL=errors.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.d.mts","sourceRoot":"","sources":["../../src/sdk/errors.ts"],"names":[],"mappings":"AAEA,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,WAAY,SAAQ,KAAK;gBACxB,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,SAAU,SAAQ,KAAK;gBACtB,OAAO,EAAE,MAAM;CAI5B;AAED;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,SAAS;IAC9C,QAAQ,CAAC,MAAM,SAA8B;gBAEjC,OAAO,EAAE,MAAM;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,CAAC;CACF","sourcesContent":["import { HTTP_STATUS_CODES } from './constants.js';\n\nexport class NonceRetrievalError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'NonceRetrievalError';\n }\n}\n\nexport class SignInError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'SignInError';\n }\n}\n\nexport class PairError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'PairError';\n }\n}\n\n/**\n * Thrown when `POST /api/v2/profile/pair/identifier` returns 409 Conflict:\n * the social identifier already belongs to another canonical profile.\n * Retrying the same request cannot succeed.\n */\nexport class PairConflictError extends PairError {\n readonly status = HTTP_STATUS_CODES.CONFLICT;\n\n constructor(message: string) {\n super(message);\n this.name = 'PairConflictError';\n }\n}\n\nexport class UserStorageError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'UserStorageError';\n }\n}\n\nexport class ValidationError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'ValidationError';\n }\n}\n\nexport class UnsupportedAuthTypeError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'UnsupportedAuthTypeError';\n }\n}\n\nexport class NotFoundError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'NotFoundError';\n }\n}\n\nexport class RateLimitedError extends Error {\n readonly status = HTTP_STATUS_CODES.TOO_MANY_REQUESTS;\n\n readonly retryAfterMs?: number;\n\n constructor(message: string, retryAfterMs?: number) {\n super(message);\n this.name = 'RateLimitedError';\n this.retryAfterMs = retryAfterMs;\n }\n\n /**\n * Check if an unknown error is a rate limit error (429 status).\n *\n * @param e - The error to check\n * @returns True if the error is a rate limit error\n */\n static isRateLimitError(e: unknown): e is RateLimitedError {\n return (\n e instanceof RateLimitedError ||\n (typeof e === 'object' &&\n e !== null &&\n 'status' in e &&\n e.status === HTTP_STATUS_CODES.TOO_MANY_REQUESTS)\n );\n }\n}\n"]}
@@ -1,24 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./authentication.cjs"), exports);
18
- __exportStar(require("./user-storage.cjs"), exports);
19
- __exportStar(require("./errors.cjs"), exports);
20
- __exportStar(require("./utils/messaging-signing-snap-requests.cjs"), exports);
21
- __exportStar(require("../shared/encryption/index.cjs"), exports);
22
- __exportStar(require("../shared/env.cjs"), exports);
23
- __exportStar(require("../shared/storage-schema.cjs"), exports);
24
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAoC;AACpC,qDAAkC;AAClC,+CAA4B;AAC5B,8EAA2D;AAC3D,iEAA8C;AAC9C,oDAAiC;AACjC,+DAA4C","sourcesContent":["export * from './authentication.js';\nexport * from './user-storage.js';\nexport * from './errors.js';\nexport * from './utils/messaging-signing-snap-requests.js';\nexport * from '../shared/encryption/index.js';\nexport * from '../shared/env.js';\nexport * from '../shared/storage-schema.js';\n"]}
@@ -1,8 +0,0 @@
1
- export * from "./authentication.cjs";
2
- export * from "./user-storage.cjs";
3
- export * from "./errors.cjs";
4
- export * from "./utils/messaging-signing-snap-requests.cjs";
5
- export * from "../shared/encryption/index.cjs";
6
- export * from "../shared/env.cjs";
7
- export * from "../shared/storage-schema.cjs";
8
- //# sourceMappingURL=index.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,qCAAoC;AACpC,mCAAkC;AAClC,6BAA4B;AAC5B,4DAA2D;AAC3D,+CAA8C;AAC9C,kCAAiC;AACjC,6CAA4C"}
@@ -1,8 +0,0 @@
1
- export * from "./authentication.mjs";
2
- export * from "./user-storage.mjs";
3
- export * from "./errors.mjs";
4
- export * from "./utils/messaging-signing-snap-requests.mjs";
5
- export * from "../shared/encryption/index.mjs";
6
- export * from "../shared/env.mjs";
7
- export * from "../shared/storage-schema.mjs";
8
- //# sourceMappingURL=index.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,qCAAoC;AACpC,mCAAkC;AAClC,6BAA4B;AAC5B,4DAA2D;AAC3D,+CAA8C;AAC9C,kCAAiC;AACjC,6CAA4C"}
@@ -1,8 +0,0 @@
1
- export * from "./authentication.mjs";
2
- export * from "./user-storage.mjs";
3
- export * from "./errors.mjs";
4
- export * from "./utils/messaging-signing-snap-requests.mjs";
5
- export * from "../shared/encryption/index.mjs";
6
- export * from "../shared/env.mjs";
7
- export * from "../shared/storage-schema.mjs";
8
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,qCAAoC;AACpC,mCAAkC;AAClC,6BAA4B;AAC5B,4DAA2D;AAC3D,+CAA8C;AAC9C,kCAAiC;AACjC,6CAA4C","sourcesContent":["export * from './authentication.js';\nexport * from './user-storage.js';\nexport * from './errors.js';\nexport * from './utils/messaging-signing-snap-requests.js';\nexport * from '../shared/encryption/index.js';\nexport * from '../shared/env.js';\nexport * from '../shared/storage-schema.js';\n"]}
@@ -1,93 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MOCK_USER_PROFILE_LINEAGE_RESPONSE = exports.MOCK_PAIR_SOCIAL_IDENTIFIER_RESPONSE = exports.MOCK_PAIR_PROFILES_RESPONSE = exports.MOCK_CUSTOMER_SERVICE_TOKEN_RESPONSE = exports.MOCK_OIDC_TOKEN_RESPONSE = exports.MOCK_SRP_LOGIN_RESPONSE = exports.MOCK_SIWE_LOGIN_RESPONSE = exports.MOCK_NONCE_RESPONSE = exports.MOCK_ACCESS_JWT = exports.MOCK_JWT = exports.MOCK_CUSTOMER_SERVICE_TOKEN_URL = exports.MOCK_PROFILE_LINEAGE_URL = exports.MOCK_PAIR_SOCIAL_IDENTIFIER_URL = exports.MOCK_PAIR_PROFILES_URL = exports.MOCK_PAIR_IDENTIFIERS_URL = exports.MOCK_SIWE_LOGIN_URL = exports.MOCK_OIDC_TOKEN_URL = exports.MOCK_SRP_LOGIN_URL = exports.MOCK_NONCE_URL = void 0;
4
- const env_js_1 = require("../../shared/env.cjs");
5
- const services_js_1 = require("../authentication-jwt-bearer/services.cjs");
6
- exports.MOCK_NONCE_URL = (0, services_js_1.NONCE_URL)(env_js_1.Env.PRD);
7
- exports.MOCK_SRP_LOGIN_URL = (0, services_js_1.SRP_LOGIN_URL)(env_js_1.Env.PRD);
8
- exports.MOCK_OIDC_TOKEN_URL = (0, services_js_1.OIDC_TOKEN_URL)(env_js_1.Env.PRD);
9
- exports.MOCK_SIWE_LOGIN_URL = (0, services_js_1.SIWE_LOGIN_URL)(env_js_1.Env.PRD);
10
- exports.MOCK_PAIR_IDENTIFIERS_URL = (0, services_js_1.PAIR_IDENTIFIERS)(env_js_1.Env.PRD);
11
- exports.MOCK_PAIR_PROFILES_URL = (0, services_js_1.PAIR_PROFILES_URL)(env_js_1.Env.PRD);
12
- exports.MOCK_PAIR_SOCIAL_IDENTIFIER_URL = (0, services_js_1.PAIR_SOCIAL_IDENTIFIER_URL)(env_js_1.Env.PRD);
13
- exports.MOCK_PROFILE_LINEAGE_URL = (0, services_js_1.PROFILE_LINEAGE_URL)(env_js_1.Env.PRD);
14
- exports.MOCK_CUSTOMER_SERVICE_TOKEN_URL = (0, services_js_1.CUSTOMER_SERVICE_TOKEN_URL)(env_js_1.Env.PRD);
15
- exports.MOCK_JWT = 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImIwNzE2N2U2LWJjNWUtNDgyZC1hNjRhLWU1MjQ0MjY2MGU3NyJ9.eyJzdWIiOiI1MzE0ODc5YWM2NDU1OGI3OTQ5ZmI4NWIzMjg2ZjZjNjUwODAzYmFiMTY0Y2QyOWNmMmM3YzdmMjMzMWMwZTRlIiwiaWF0IjoxNzA2MTEzMDYyLCJleHAiOjE3NjkxODUwNjMsImlzcyI6ImF1dGgubWV0YW1hc2suaW8iLCJhdWQiOiJwb3J0Zm9saW8ubWV0YW1hc2suaW8ifQ.E5UL6oABNweS8t5a6IBTqTf7NLOJbrhJSmEcsr7kwLp4bGvcENJzACwnsHDkA6PlzfDV09ZhAGU_F3hlS0j-erbY0k0AFR-GAtyS7E9N02D8RgUDz5oDR65CKmzM8JilgFA8UvruJ6OJGogroaOSOqzRES_s8MjHpP47RJ9lXrUesajsbOudXbuksXWg5QmWip6LLvjwr8UUzcJzNQilyIhiEpo4WdzWM4R3VtTwr4rHnWEvtYnYCov1jmI2w3YQ48y0M-3Y9IOO0ov_vlITRrOnR7Y7fRUGLUFmU5msD8mNWRywjQFLHfJJ1yNP5aJ8TkuCK3sC6kcUH335IVvukQ';
16
- exports.MOCK_ACCESS_JWT = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyLCJleHAiOjQxMDI0NDQ4MDB9.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c';
17
- exports.MOCK_NONCE_RESPONSE = {
18
- nonce: 'xGMm9SoihEKeAEfV',
19
- identifier: '0xd8641601Cb79a94FD872fE42d5b4a067A44a7e88',
20
- expires_in: 300,
21
- };
22
- exports.MOCK_SIWE_LOGIN_RESPONSE = {
23
- token: exports.MOCK_JWT,
24
- expires_in: 3600,
25
- profile: {
26
- profile_id: 'fa2bbf82-bd9a-4e6b-aabc-9ca0d0319b6e',
27
- metametrics_id: 'de742679-4960-4977-a415-4718b5f8e86c',
28
- identifier_id: 'ec9a4e9906836497efad2fd4d4290b34d2c6a2c0d93eb174aa3cd88a133adbaf',
29
- identifier_type: 'SIWE',
30
- encrypted_storage_key: '2c6a2c0d93eb174aa3cd88a133adbaf',
31
- },
32
- };
33
- exports.MOCK_SRP_LOGIN_RESPONSE = {
34
- token: exports.MOCK_JWT,
35
- expires_in: 3600,
36
- profile: {
37
- profile_id: 'f88227bd-b615-41a3-b0be-467dd781a4ad',
38
- metametrics_id: '561ec651-a844-4b36-a451-04d6eac35740',
39
- identifier_id: 'da9a9fc7b09edde9cc23cec9b7e11a71fb0ab4d2ddd8af8af905306f3e1456fb',
40
- identifier_type: 'SRP',
41
- encrypted_storage_key: 'd2ddd8af8af905306f3e1456fb',
42
- },
43
- profile_aliases: [],
44
- };
45
- exports.MOCK_OIDC_TOKEN_RESPONSE = {
46
- access_token: exports.MOCK_ACCESS_JWT,
47
- expires_in: 3600,
48
- };
49
- exports.MOCK_CUSTOMER_SERVICE_TOKEN_RESPONSE = {
50
- access_token: exports.MOCK_ACCESS_JWT,
51
- refresh_token: 'ory_rt_mock_refresh_token',
52
- expires_in: 3600,
53
- token_type: 'bearer',
54
- };
55
- exports.MOCK_PAIR_PROFILES_RESPONSE = {
56
- profile: {
57
- identifier_id: exports.MOCK_SRP_LOGIN_RESPONSE.profile.identifier_id,
58
- metametrics_id: exports.MOCK_SRP_LOGIN_RESPONSE.profile.metametrics_id,
59
- profile_id: exports.MOCK_SRP_LOGIN_RESPONSE.profile.profile_id,
60
- },
61
- profile_aliases: [],
62
- };
63
- exports.MOCK_PAIR_SOCIAL_IDENTIFIER_RESPONSE = {
64
- expires_in: 3600,
65
- profile: {
66
- created_at: '2024-01-15T10:30:00Z',
67
- identifier_id: exports.MOCK_SRP_LOGIN_RESPONSE.profile.identifier_id,
68
- identifier_type: 'GOOGLE',
69
- profile_id: exports.MOCK_SRP_LOGIN_RESPONSE.profile.profile_id,
70
- },
71
- token: exports.MOCK_JWT,
72
- };
73
- exports.MOCK_USER_PROFILE_LINEAGE_RESPONSE = {
74
- profile_id: 'f88227bd-b615-41a3-b0be-467dd781a4ad',
75
- created_at: '2025-10-01T12:00:00Z',
76
- lineage: [
77
- {
78
- metametrics_id: '561ec651-a844-4b36-a451-04d6eac35740',
79
- agent: env_js_1.Platform.MOBILE,
80
- created_at: '2025-10-01T12:00:00Z',
81
- updated_at: '2025-10-01T12:00:00Z',
82
- counter: 1,
83
- },
84
- {
85
- metametrics_id: 'de742679-4960-4977-a415-4718b5f8e86c',
86
- agent: env_js_1.Platform.EXTENSION,
87
- created_at: '2025-10-01T12:00:00Z',
88
- updated_at: '2025-10-01T12:00:00Z',
89
- counter: 2,
90
- },
91
- ],
92
- };
93
- //# sourceMappingURL=auth.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.cjs","sourceRoot":"","sources":["../../../src/sdk/mocks/auth.ts"],"names":[],"mappings":";;;AAAA,iDAAoD;AACpD,2EAUkD;AAErC,QAAA,cAAc,GAAG,IAAA,uBAAS,EAAC,YAAG,CAAC,GAAG,CAAC,CAAC;AACpC,QAAA,kBAAkB,GAAG,IAAA,2BAAa,EAAC,YAAG,CAAC,GAAG,CAAC,CAAC;AAC5C,QAAA,mBAAmB,GAAG,IAAA,4BAAc,EAAC,YAAG,CAAC,GAAG,CAAC,CAAC;AAC9C,QAAA,mBAAmB,GAAG,IAAA,4BAAc,EAAC,YAAG,CAAC,GAAG,CAAC,CAAC;AAC9C,QAAA,yBAAyB,GAAG,IAAA,8BAAgB,EAAC,YAAG,CAAC,GAAG,CAAC,CAAC;AACtD,QAAA,sBAAsB,GAAG,IAAA,+BAA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C,OAAO,EAAE;QACP,aAAa,EAAE,+BAAuB,CAAC,OAAO,CAAC,aAAa;QAC5D,cAAc,EAAE,+BAAuB,CAAC,OAAO,CAAC,cAAc;QAC9D,UAAU,EAAE,+BAAuB,CAAC,OAAO,CAAC,UAAU;KACvD;IACD,eAAe,EAAE,EAAE;CACpB,CAAC;AAEW,QAAA,oCAAoC,GAAG;IAClD,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE;QACP,UAAU,EAAE,sBAAsB;QAClC,aAAa,EAAE,+BAAuB,CAAC,OAAO,CAAC,aAAa;QAC5D,eAAe,EAAE,QAAQ;QACzB,UAAU,EAAE,+BAAuB,CAAC,OAAO,CAAC,UAAU;KACvD;IACD,KAAK,EAAE,gBAAQ;CAChB,CAAC;AAEW,QAAA,kCAAkC,GAAG;IAChD,UAAU,EAAE,sCAAsC;IAClD,UAAU,EAAE,sBAAsB;IAClC,OAAO,EAAE;QACP;YACE,cAAc,EAAE,sCAAsC;YACtD,KAAK,EAAE,iBAAQ,CAAC,MAAM;YACtB,UAAU,EAAE,sBAAsB;YAClC,UAAU,EAAE,sBAAsB;YAClC,OAAO,EAAE,CAAC;SACX;QACD;YACE,cAAc,EAAE,sCAAsC;YACtD,KAAK,EAAE,iBAAQ,CAAC,SAAS;YACzB,UAAU,EAAE,sBAAsB;YAClC,UAAU,EAAE,sBAAsB;YAClC,OAAO,EAAE,CAAC;SACX;KACF;CACF,CAAC","sourcesContent":["import { Env, Platform } from '../../shared/env.js';\nimport {\n NONCE_URL,\n SIWE_LOGIN_URL,\n SRP_LOGIN_URL,\n OIDC_TOKEN_URL,\n PAIR_IDENTIFIERS,\n PAIR_PROFILES_URL,\n PAIR_SOCIAL_IDENTIFIER_URL,\n PROFILE_LINEAGE_URL,\n CUSTOMER_SERVICE_TOKEN_URL,\n} from '../authentication-jwt-bearer/services.js';\n\nexport const MOCK_NONCE_URL = NONCE_URL(Env.PRD);\nexport const MOCK_SRP_LOGIN_URL = SRP_LOGIN_URL(Env.PRD);\nexport const MOCK_OIDC_TOKEN_URL = OIDC_TOKEN_URL(Env.PRD);\nexport const MOCK_SIWE_LOGIN_URL = SIWE_LOGIN_URL(Env.PRD);\nexport const MOCK_PAIR_IDENTIFIERS_URL = PAIR_IDENTIFIERS(Env.PRD);\nexport const MOCK_PAIR_PROFILES_URL = PAIR_PROFILES_URL(Env.PRD);\nexport const MOCK_PAIR_SOCIAL_IDENTIFIER_URL = PAIR_SOCIAL_IDENTIFIER_URL(\n Env.PRD,\n);\nexport const MOCK_PROFILE_LINEAGE_URL = PROFILE_LINEAGE_URL(Env.PRD);\nexport const MOCK_CUSTOMER_SERVICE_TOKEN_URL = CUSTOMER_SERVICE_TOKEN_URL(\n Env.PRD,\n);\n\nexport const MOCK_JWT =\n 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImIwNzE2N2U2LWJjNWUtNDgyZC1hNjRhLWU1MjQ0MjY2MGU3NyJ9.eyJzdWIiOiI1MzE0ODc5YWM2NDU1OGI3OTQ5ZmI4NWIzMjg2ZjZjNjUwODAzYmFiMTY0Y2QyOWNmMmM3YzdmMjMzMWMwZTRlIiwiaWF0IjoxNzA2MTEzMDYyLCJleHAiOjE3NjkxODUwNjMsImlzcyI6ImF1dGgubWV0YW1hc2suaW8iLCJhdWQiOiJwb3J0Zm9saW8ubWV0YW1hc2suaW8ifQ.E5UL6oABNweS8t5a6IBTqTf7NLOJbrhJSmEcsr7kwLp4bGvcENJzACwnsHDkA6PlzfDV09ZhAGU_F3hlS0j-erbY0k0AFR-GAtyS7E9N02D8RgUDz5oDR65CKmzM8JilgFA8UvruJ6OJGogroaOSOqzRES_s8MjHpP47RJ9lXrUesajsbOudXbuksXWg5QmWip6LLvjwr8UUzcJzNQilyIhiEpo4WdzWM4R3VtTwr4rHnWEvtYnYCov1jmI2w3YQ48y0M-3Y9IOO0ov_vlITRrOnR7Y7fRUGLUFmU5msD8mNWRywjQFLHfJJ1yNP5aJ8TkuCK3sC6kcUH335IVvukQ';\n\nexport const MOCK_ACCESS_JWT =\n 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyLCJleHAiOjQxMDI0NDQ4MDB9.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c';\n\nexport const MOCK_NONCE_RESPONSE = {\n nonce: 'xGMm9SoihEKeAEfV',\n identifier: '0xd8641601Cb79a94FD872fE42d5b4a067A44a7e88',\n expires_in: 300,\n};\n\nexport const MOCK_SIWE_LOGIN_RESPONSE = {\n token: MOCK_JWT,\n expires_in: 3600,\n profile: {\n profile_id: 'fa2bbf82-bd9a-4e6b-aabc-9ca0d0319b6e',\n metametrics_id: 'de742679-4960-4977-a415-4718b5f8e86c',\n identifier_id:\n 'ec9a4e9906836497efad2fd4d4290b34d2c6a2c0d93eb174aa3cd88a133adbaf',\n identifier_type: 'SIWE',\n encrypted_storage_key: '2c6a2c0d93eb174aa3cd88a133adbaf',\n },\n};\n\nexport const MOCK_SRP_LOGIN_RESPONSE = {\n token: MOCK_JWT,\n expires_in: 3600,\n profile: {\n profile_id: 'f88227bd-b615-41a3-b0be-467dd781a4ad',\n metametrics_id: '561ec651-a844-4b36-a451-04d6eac35740',\n identifier_id:\n 'da9a9fc7b09edde9cc23cec9b7e11a71fb0ab4d2ddd8af8af905306f3e1456fb',\n identifier_type: 'SRP',\n encrypted_storage_key: 'd2ddd8af8af905306f3e1456fb',\n },\n profile_aliases: [],\n};\n\nexport const MOCK_OIDC_TOKEN_RESPONSE = {\n access_token: MOCK_ACCESS_JWT,\n expires_in: 3600,\n};\n\nexport const MOCK_CUSTOMER_SERVICE_TOKEN_RESPONSE = {\n access_token: MOCK_ACCESS_JWT,\n refresh_token: 'ory_rt_mock_refresh_token',\n expires_in: 3600,\n token_type: 'bearer',\n};\n\nexport const MOCK_PAIR_PROFILES_RESPONSE = {\n profile: {\n identifier_id: MOCK_SRP_LOGIN_RESPONSE.profile.identifier_id,\n metametrics_id: MOCK_SRP_LOGIN_RESPONSE.profile.metametrics_id,\n profile_id: MOCK_SRP_LOGIN_RESPONSE.profile.profile_id,\n },\n profile_aliases: [],\n};\n\nexport const MOCK_PAIR_SOCIAL_IDENTIFIER_RESPONSE = {\n expires_in: 3600,\n profile: {\n created_at: '2024-01-15T10:30:00Z',\n identifier_id: MOCK_SRP_LOGIN_RESPONSE.profile.identifier_id,\n identifier_type: 'GOOGLE',\n profile_id: MOCK_SRP_LOGIN_RESPONSE.profile.profile_id,\n },\n token: MOCK_JWT,\n};\n\nexport const MOCK_USER_PROFILE_LINEAGE_RESPONSE = {\n profile_id: 'f88227bd-b615-41a3-b0be-467dd781a4ad',\n created_at: '2025-10-01T12:00:00Z',\n lineage: [\n {\n metametrics_id: '561ec651-a844-4b36-a451-04d6eac35740',\n agent: Platform.MOBILE,\n created_at: '2025-10-01T12:00:00Z',\n updated_at: '2025-10-01T12:00:00Z',\n counter: 1,\n },\n {\n metametrics_id: 'de742679-4960-4977-a415-4718b5f8e86c',\n agent: Platform.EXTENSION,\n created_at: '2025-10-01T12:00:00Z',\n updated_at: '2025-10-01T12:00:00Z',\n counter: 2,\n },\n ],\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.d.cts","sourceRoot":"","sources":["../../../src/sdk/mocks/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,QAAQ,EAAE,6BAA4B;AAapD,eAAO,MAAM,cAAc,QAAqB,CAAC;AACjD,eAAO,MAAM,kBAAkB,QAAyB,CAAC;AACzD,eAAO,MAAM,mBAAmB,QAA0B,CAAC;AAC3D,eAAO,MAAM,mBAAmB,QAA0B,CAAC;AAC3D,eAAO,MAAM,yBAAyB,QAA4B,CAAC;AACnE,eAAO,MAAM,sBAAsB,QAA6B,CAAC;AACjE,eAAO,MAAM,+BAA+B,QAE3C,CAAC;AACF,eAAO,MAAM,wBAAwB,QAA+B,CAAC;AACrE,eAAO,MAAM,+BAA+B,QAE3C,CAAC;AAEF,eAAO,MAAM,QAAQ,upBACioB,CAAC;AAEvpB,eAAO,MAAM,eAAe,sLACyJ,CAAC;AAEtL,eAAO,MAAM,mBAAmB;;;;CAI/B,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;CAWpC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;CAYnC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;CAGpC,CAAC;AAEF,eAAO,MAAM,oCAAoC;;;;;CAKhD,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;CAOvC,CAAC;AAEF,eAAO,MAAM,oCAAoC;;;;;;;;;CAShD,CAAC;AAEF,eAAO,MAAM,kCAAkC;;;;;;;;;;CAmB9C,CAAC"}
@@ -1,80 +0,0 @@
1
- import { Platform } from "../../shared/env.mjs";
2
- export declare const MOCK_NONCE_URL: string;
3
- export declare const MOCK_SRP_LOGIN_URL: string;
4
- export declare const MOCK_OIDC_TOKEN_URL: string;
5
- export declare const MOCK_SIWE_LOGIN_URL: string;
6
- export declare const MOCK_PAIR_IDENTIFIERS_URL: string;
7
- export declare const MOCK_PAIR_PROFILES_URL: string;
8
- export declare const MOCK_PAIR_SOCIAL_IDENTIFIER_URL: string;
9
- export declare const MOCK_PROFILE_LINEAGE_URL: string;
10
- export declare const MOCK_CUSTOMER_SERVICE_TOKEN_URL: string;
11
- export declare const MOCK_JWT = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImIwNzE2N2U2LWJjNWUtNDgyZC1hNjRhLWU1MjQ0MjY2MGU3NyJ9.eyJzdWIiOiI1MzE0ODc5YWM2NDU1OGI3OTQ5ZmI4NWIzMjg2ZjZjNjUwODAzYmFiMTY0Y2QyOWNmMmM3YzdmMjMzMWMwZTRlIiwiaWF0IjoxNzA2MTEzMDYyLCJleHAiOjE3NjkxODUwNjMsImlzcyI6ImF1dGgubWV0YW1hc2suaW8iLCJhdWQiOiJwb3J0Zm9saW8ubWV0YW1hc2suaW8ifQ.E5UL6oABNweS8t5a6IBTqTf7NLOJbrhJSmEcsr7kwLp4bGvcENJzACwnsHDkA6PlzfDV09ZhAGU_F3hlS0j-erbY0k0AFR-GAtyS7E9N02D8RgUDz5oDR65CKmzM8JilgFA8UvruJ6OJGogroaOSOqzRES_s8MjHpP47RJ9lXrUesajsbOudXbuksXWg5QmWip6LLvjwr8UUzcJzNQilyIhiEpo4WdzWM4R3VtTwr4rHnWEvtYnYCov1jmI2w3YQ48y0M-3Y9IOO0ov_vlITRrOnR7Y7fRUGLUFmU5msD8mNWRywjQFLHfJJ1yNP5aJ8TkuCK3sC6kcUH335IVvukQ";
12
- export declare const MOCK_ACCESS_JWT = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyLCJleHAiOjQxMDI0NDQ4MDB9.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c";
13
- export declare const MOCK_NONCE_RESPONSE: {
14
- nonce: string;
15
- identifier: string;
16
- expires_in: number;
17
- };
18
- export declare const MOCK_SIWE_LOGIN_RESPONSE: {
19
- token: string;
20
- expires_in: number;
21
- profile: {
22
- profile_id: string;
23
- metametrics_id: string;
24
- identifier_id: string;
25
- identifier_type: string;
26
- encrypted_storage_key: string;
27
- };
28
- };
29
- export declare const MOCK_SRP_LOGIN_RESPONSE: {
30
- token: string;
31
- expires_in: number;
32
- profile: {
33
- profile_id: string;
34
- metametrics_id: string;
35
- identifier_id: string;
36
- identifier_type: string;
37
- encrypted_storage_key: string;
38
- };
39
- profile_aliases: never[];
40
- };
41
- export declare const MOCK_OIDC_TOKEN_RESPONSE: {
42
- access_token: string;
43
- expires_in: number;
44
- };
45
- export declare const MOCK_CUSTOMER_SERVICE_TOKEN_RESPONSE: {
46
- access_token: string;
47
- refresh_token: string;
48
- expires_in: number;
49
- token_type: string;
50
- };
51
- export declare const MOCK_PAIR_PROFILES_RESPONSE: {
52
- profile: {
53
- identifier_id: string;
54
- metametrics_id: string;
55
- profile_id: string;
56
- };
57
- profile_aliases: never[];
58
- };
59
- export declare const MOCK_PAIR_SOCIAL_IDENTIFIER_RESPONSE: {
60
- expires_in: number;
61
- profile: {
62
- created_at: string;
63
- identifier_id: string;
64
- identifier_type: string;
65
- profile_id: string;
66
- };
67
- token: string;
68
- };
69
- export declare const MOCK_USER_PROFILE_LINEAGE_RESPONSE: {
70
- profile_id: string;
71
- created_at: string;
72
- lineage: {
73
- metametrics_id: string;
74
- agent: Platform;
75
- created_at: string;
76
- updated_at: string;
77
- counter: number;
78
- }[];
79
- };
80
- //# sourceMappingURL=auth.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.d.mts","sourceRoot":"","sources":["../../../src/sdk/mocks/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,QAAQ,EAAE,6BAA4B;AAapD,eAAO,MAAM,cAAc,QAAqB,CAAC;AACjD,eAAO,MAAM,kBAAkB,QAAyB,CAAC;AACzD,eAAO,MAAM,mBAAmB,QAA0B,CAAC;AAC3D,eAAO,MAAM,mBAAmB,QAA0B,CAAC;AAC3D,eAAO,MAAM,yBAAyB,QAA4B,CAAC;AACnE,eAAO,MAAM,sBAAsB,QAA6B,CAAC;AACjE,eAAO,MAAM,+BAA+B,QAE3C,CAAC;AACF,eAAO,MAAM,wBAAwB,QAA+B,CAAC;AACrE,eAAO,MAAM,+BAA+B,QAE3C,CAAC;AAEF,eAAO,MAAM,QAAQ,upBACioB,CAAC;AAEvpB,eAAO,MAAM,eAAe,sLACyJ,CAAC;AAEtL,eAAO,MAAM,mBAAmB;;;;CAI/B,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;CAWpC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;CAYnC,CAAC;AAEF,eAAO,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UAAU;KACvD;IACD,eAAe,EAAE,EAAE;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,oCAAoC,GAAG;IAClD,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE;QACP,UAAU,EAAE,sBAAsB;QAClC,aAAa,EAAE,uBAAuB,CAAC,OAAO,CAAC,aAAa;QAC5D,eAAe,EAAE,QAAQ;QACzB,UAAU,EAAE,uBAAuB,CAAC,OAAO,CAAC,UAAU;KACvD;IACD,KAAK,EAAE,QAAQ;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,UAAU,EAAE,sCAAsC;IAClD,UAAU,EAAE,sBAAsB;IAClC,OAAO,EAAE;QACP;YACE,cAAc,EAAE,sCAAsC;YACtD,KAAK,EAAE,QAAQ,CAAC,MAAM;YACtB,UAAU,EAAE,sBAAsB;YAClC,UAAU,EAAE,sBAAsB;YAClC,OAAO,EAAE,CAAC;SACX;QACD;YACE,cAAc,EAAE,sCAAsC;YACtD,KAAK,EAAE,QAAQ,CAAC,SAAS;YACzB,UAAU,EAAE,sBAAsB;YAClC,UAAU,EAAE,sBAAsB;YAClC,OAAO,EAAE,CAAC;SACX;KACF;CACF,CAAC","sourcesContent":["import { Env, Platform } from '../../shared/env.js';\nimport {\n NONCE_URL,\n SIWE_LOGIN_URL,\n SRP_LOGIN_URL,\n OIDC_TOKEN_URL,\n PAIR_IDENTIFIERS,\n PAIR_PROFILES_URL,\n PAIR_SOCIAL_IDENTIFIER_URL,\n PROFILE_LINEAGE_URL,\n CUSTOMER_SERVICE_TOKEN_URL,\n} from '../authentication-jwt-bearer/services.js';\n\nexport const MOCK_NONCE_URL = NONCE_URL(Env.PRD);\nexport const MOCK_SRP_LOGIN_URL = SRP_LOGIN_URL(Env.PRD);\nexport const MOCK_OIDC_TOKEN_URL = OIDC_TOKEN_URL(Env.PRD);\nexport const MOCK_SIWE_LOGIN_URL = SIWE_LOGIN_URL(Env.PRD);\nexport const MOCK_PAIR_IDENTIFIERS_URL = PAIR_IDENTIFIERS(Env.PRD);\nexport const MOCK_PAIR_PROFILES_URL = PAIR_PROFILES_URL(Env.PRD);\nexport const MOCK_PAIR_SOCIAL_IDENTIFIER_URL = PAIR_SOCIAL_IDENTIFIER_URL(\n Env.PRD,\n);\nexport const MOCK_PROFILE_LINEAGE_URL = PROFILE_LINEAGE_URL(Env.PRD);\nexport const MOCK_CUSTOMER_SERVICE_TOKEN_URL = CUSTOMER_SERVICE_TOKEN_URL(\n Env.PRD,\n);\n\nexport const MOCK_JWT =\n 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImIwNzE2N2U2LWJjNWUtNDgyZC1hNjRhLWU1MjQ0MjY2MGU3NyJ9.eyJzdWIiOiI1MzE0ODc5YWM2NDU1OGI3OTQ5ZmI4NWIzMjg2ZjZjNjUwODAzYmFiMTY0Y2QyOWNmMmM3YzdmMjMzMWMwZTRlIiwiaWF0IjoxNzA2MTEzMDYyLCJleHAiOjE3NjkxODUwNjMsImlzcyI6ImF1dGgubWV0YW1hc2suaW8iLCJhdWQiOiJwb3J0Zm9saW8ubWV0YW1hc2suaW8ifQ.E5UL6oABNweS8t5a6IBTqTf7NLOJbrhJSmEcsr7kwLp4bGvcENJzACwnsHDkA6PlzfDV09ZhAGU_F3hlS0j-erbY0k0AFR-GAtyS7E9N02D8RgUDz5oDR65CKmzM8JilgFA8UvruJ6OJGogroaOSOqzRES_s8MjHpP47RJ9lXrUesajsbOudXbuksXWg5QmWip6LLvjwr8UUzcJzNQilyIhiEpo4WdzWM4R3VtTwr4rHnWEvtYnYCov1jmI2w3YQ48y0M-3Y9IOO0ov_vlITRrOnR7Y7fRUGLUFmU5msD8mNWRywjQFLHfJJ1yNP5aJ8TkuCK3sC6kcUH335IVvukQ';\n\nexport const MOCK_ACCESS_JWT =\n 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyLCJleHAiOjQxMDI0NDQ4MDB9.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c';\n\nexport const MOCK_NONCE_RESPONSE = {\n nonce: 'xGMm9SoihEKeAEfV',\n identifier: '0xd8641601Cb79a94FD872fE42d5b4a067A44a7e88',\n expires_in: 300,\n};\n\nexport const MOCK_SIWE_LOGIN_RESPONSE = {\n token: MOCK_JWT,\n expires_in: 3600,\n profile: {\n profile_id: 'fa2bbf82-bd9a-4e6b-aabc-9ca0d0319b6e',\n metametrics_id: 'de742679-4960-4977-a415-4718b5f8e86c',\n identifier_id:\n 'ec9a4e9906836497efad2fd4d4290b34d2c6a2c0d93eb174aa3cd88a133adbaf',\n identifier_type: 'SIWE',\n encrypted_storage_key: '2c6a2c0d93eb174aa3cd88a133adbaf',\n },\n};\n\nexport const MOCK_SRP_LOGIN_RESPONSE = {\n token: MOCK_JWT,\n expires_in: 3600,\n profile: {\n profile_id: 'f88227bd-b615-41a3-b0be-467dd781a4ad',\n metametrics_id: '561ec651-a844-4b36-a451-04d6eac35740',\n identifier_id:\n 'da9a9fc7b09edde9cc23cec9b7e11a71fb0ab4d2ddd8af8af905306f3e1456fb',\n identifier_type: 'SRP',\n encrypted_storage_key: 'd2ddd8af8af905306f3e1456fb',\n },\n profile_aliases: [],\n};\n\nexport const MOCK_OIDC_TOKEN_RESPONSE = {\n access_token: MOCK_ACCESS_JWT,\n expires_in: 3600,\n};\n\nexport const MOCK_CUSTOMER_SERVICE_TOKEN_RESPONSE = {\n access_token: MOCK_ACCESS_JWT,\n refresh_token: 'ory_rt_mock_refresh_token',\n expires_in: 3600,\n token_type: 'bearer',\n};\n\nexport const MOCK_PAIR_PROFILES_RESPONSE = {\n profile: {\n identifier_id: MOCK_SRP_LOGIN_RESPONSE.profile.identifier_id,\n metametrics_id: MOCK_SRP_LOGIN_RESPONSE.profile.metametrics_id,\n profile_id: MOCK_SRP_LOGIN_RESPONSE.profile.profile_id,\n },\n profile_aliases: [],\n};\n\nexport const MOCK_PAIR_SOCIAL_IDENTIFIER_RESPONSE = {\n expires_in: 3600,\n profile: {\n created_at: '2024-01-15T10:30:00Z',\n identifier_id: MOCK_SRP_LOGIN_RESPONSE.profile.identifier_id,\n identifier_type: 'GOOGLE',\n profile_id: MOCK_SRP_LOGIN_RESPONSE.profile.profile_id,\n },\n token: MOCK_JWT,\n};\n\nexport const MOCK_USER_PROFILE_LINEAGE_RESPONSE = {\n profile_id: 'f88227bd-b615-41a3-b0be-467dd781a4ad',\n created_at: '2025-10-01T12:00:00Z',\n lineage: [\n {\n metametrics_id: '561ec651-a844-4b36-a451-04d6eac35740',\n agent: Platform.MOBILE,\n created_at: '2025-10-01T12:00:00Z',\n updated_at: '2025-10-01T12:00:00Z',\n counter: 1,\n },\n {\n metametrics_id: 'de742679-4960-4977-a415-4718b5f8e86c',\n agent: Platform.EXTENSION,\n created_at: '2025-10-01T12:00:00Z',\n updated_at: '2025-10-01T12:00:00Z',\n counter: 2,\n },\n ],\n};\n"]}
@@ -1,43 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.MOCK_STORAGE_RESPONSE = exports.MOCK_NOTIFICATIONS_DATA_ENCRYPTED = exports.MOCK_NOTIFICATIONS_DATA = exports.MOCK_STORAGE_KEY = exports.MOCK_STORAGE_URL_ALL_FEATURE_ENTRIES = exports.MOCK_STORAGE_URL = void 0;
27
- const index_js_1 = __importStar(require("../../shared/encryption/index.cjs"));
28
- const env_js_1 = require("../../shared/env.cjs");
29
- const storage_schema_js_1 = require("../../shared/storage-schema.cjs");
30
- const user_storage_js_1 = require("../user-storage.cjs");
31
- // Example mock notifications storage entry (wildcard)
32
- exports.MOCK_STORAGE_URL = (0, user_storage_js_1.STORAGE_URL)(env_js_1.Env.PRD, `${storage_schema_js_1.USER_STORAGE_FEATURE_NAMES.notifications}.notification_settings`);
33
- exports.MOCK_STORAGE_URL_ALL_FEATURE_ENTRIES = (0, user_storage_js_1.STORAGE_URL)(env_js_1.Env.PRD, storage_schema_js_1.USER_STORAGE_FEATURE_NAMES.notifications);
34
- exports.MOCK_STORAGE_KEY = (0, index_js_1.createSHA256Hash)('mockStorageKey');
35
- exports.MOCK_NOTIFICATIONS_DATA = '{ is_compact: false }';
36
- const MOCK_NOTIFICATIONS_DATA_ENCRYPTED = async (data) => await index_js_1.default.encryptString(data ?? exports.MOCK_NOTIFICATIONS_DATA, exports.MOCK_STORAGE_KEY);
37
- exports.MOCK_NOTIFICATIONS_DATA_ENCRYPTED = MOCK_NOTIFICATIONS_DATA_ENCRYPTED;
38
- const MOCK_STORAGE_RESPONSE = async (data) => ({
39
- HashedKey: '8485d2c14c333ebca415140a276adaf546619b0efc204586b73a5d400a18a5e2',
40
- Data: await (0, exports.MOCK_NOTIFICATIONS_DATA_ENCRYPTED)(data),
41
- });
42
- exports.MOCK_STORAGE_RESPONSE = MOCK_STORAGE_RESPONSE;
43
- //# sourceMappingURL=userstorage.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"userstorage.cjs","sourceRoot":"","sources":["../../../src/sdk/mocks/userstorage.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8EAAgF;AAChF,iDAA0C;AAC1C,uEAA4E;AAC5E,yDAAiD;AAEjD,sDAAsD;AACzC,QAAA,gBAAgB,GAAG,IAAA,6BAAW,EACzC,YAAG,CAAC,GAAG,EACP,GAAG,8CAA0B,CAAC,aAAa,wBAAwB,CACpE,CAAC;AACW,QAAA,oCAAoC,GAAG,IAAA,6BAAW,EAC7D,YAAG,CAAC,GAAG,EACP,8CAA0B,CAAC,aAAa,CACzC,CAAC;AAEW,QAAA,gBAAgB,GAAG,IAAA,2BAAgB,EAAC,gBAAgB,CAAC,CAAC;AACtD,QAAA,uBAAuB,GAAG,uBAAuB,CAAC;AACxD,MAAM,iCAAiC,GAAG,KAAK,EAAE,IAAa,EAAE,EAAE,CACvE,MAAM,kBAAU,CAAC,aAAa,CAC5B,IAAI,IAAI,+BAAuB,EAC/B,wBAAgB,CACjB,CAAC;AAJS,QAAA,iCAAiC,qCAI1C;AAEG,MAAM,qBAAqB,GAAG,KAAK,EAAE,IAAa,EAAE,EAAE,CAAC,CAAC;IAC7D,SAAS,EAAE,kEAAkE;IAC7E,IAAI,EAAE,MAAM,IAAA,yCAAiC,EAAC,IAAI,CAAC;CACpD,CAAC,CAAC;AAHU,QAAA,qBAAqB,yBAG/B","sourcesContent":["import encryption, { createSHA256Hash } from '../../shared/encryption/index.js';\nimport { Env } from '../../shared/env.js';\nimport { USER_STORAGE_FEATURE_NAMES } from '../../shared/storage-schema.js';\nimport { STORAGE_URL } from '../user-storage.js';\n\n// Example mock notifications storage entry (wildcard)\nexport const MOCK_STORAGE_URL = STORAGE_URL(\n Env.PRD,\n `${USER_STORAGE_FEATURE_NAMES.notifications}.notification_settings`,\n);\nexport const MOCK_STORAGE_URL_ALL_FEATURE_ENTRIES = STORAGE_URL(\n Env.PRD,\n USER_STORAGE_FEATURE_NAMES.notifications,\n);\n\nexport const MOCK_STORAGE_KEY = createSHA256Hash('mockStorageKey');\nexport const MOCK_NOTIFICATIONS_DATA = '{ is_compact: false }';\nexport const MOCK_NOTIFICATIONS_DATA_ENCRYPTED = async (data?: string) =>\n await encryption.encryptString(\n data ?? MOCK_NOTIFICATIONS_DATA,\n MOCK_STORAGE_KEY,\n );\n\nexport const MOCK_STORAGE_RESPONSE = async (data?: string) => ({\n HashedKey: '8485d2c14c333ebca415140a276adaf546619b0efc204586b73a5d400a18a5e2',\n Data: await MOCK_NOTIFICATIONS_DATA_ENCRYPTED(data),\n});\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"userstorage.d.cts","sourceRoot":"","sources":["../../../src/sdk/mocks/userstorage.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,QAG5B,CAAC;AACF,eAAO,MAAM,oCAAoC,QAGhD,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAqC,CAAC;AACnE,eAAO,MAAM,uBAAuB,0BAA0B,CAAC;AAC/D,eAAO,MAAM,iCAAiC,UAAiB,MAAM,oBAIlE,CAAC;AAEJ,eAAO,MAAM,qBAAqB,UAAiB,MAAM;;;EAGvD,CAAC"}
@@ -1,10 +0,0 @@
1
- export declare const MOCK_STORAGE_URL: string;
2
- export declare const MOCK_STORAGE_URL_ALL_FEATURE_ENTRIES: string;
3
- export declare const MOCK_STORAGE_KEY: string;
4
- export declare const MOCK_NOTIFICATIONS_DATA = "{ is_compact: false }";
5
- export declare const MOCK_NOTIFICATIONS_DATA_ENCRYPTED: (data?: string) => Promise<string>;
6
- export declare const MOCK_STORAGE_RESPONSE: (data?: string) => Promise<{
7
- HashedKey: string;
8
- Data: string;
9
- }>;
10
- //# sourceMappingURL=userstorage.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"userstorage.d.mts","sourceRoot":"","sources":["../../../src/sdk/mocks/userstorage.ts"],"names":[],"mappings":"AAMA,e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C,CAAC","sourcesContent":["import encryption, { createSHA256Hash } from '../../shared/encryption/index.js';\nimport { Env } from '../../shared/env.js';\nimport { USER_STORAGE_FEATURE_NAMES } from '../../shared/storage-schema.js';\nimport { STORAGE_URL } from '../user-storage.js';\n\n// Example mock notifications storage entry (wildcard)\nexport const MOCK_STORAGE_URL = STORAGE_URL(\n Env.PRD,\n `${USER_STORAGE_FEATURE_NAMES.notifications}.notification_settings`,\n);\nexport const MOCK_STORAGE_URL_ALL_FEATURE_ENTRIES = STORAGE_URL(\n Env.PRD,\n USER_STORAGE_FEATURE_NAMES.notifications,\n);\n\nexport const MOCK_STORAGE_KEY = createSHA256Hash('mockStorageKey');\nexport const MOCK_NOTIFICATIONS_DATA = '{ is_compact: false }';\nexport const MOCK_NOTIFICATIONS_DATA_ENCRYPTED = async (data?: string) =>\n await encryption.encryptString(\n data ?? MOCK_NOTIFICATIONS_DATA,\n MOCK_STORAGE_KEY,\n );\n\nexport const MOCK_STORAGE_RESPONSE = async (data?: string) => ({\n HashedKey: '8485d2c14c333ebca415140a276adaf546619b0efc204586b73a5d400a18a5e2',\n Data: await MOCK_NOTIFICATIONS_DATA_ENCRYPTED(data),\n});\n"]}