@textrp/briij-js-sdk 41.0.1 → 43.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 (380) hide show
  1. package/CHANGELOG.md +14 -1
  2. package/LICENSE +177 -177
  3. package/README.md +85 -3
  4. package/lib/@types/AESEncryptedSecretStoragePayload.js.map +1 -1
  5. package/lib/@types/IIdentityServerProvider.js.map +1 -1
  6. package/lib/@types/PushRules.js +14 -14
  7. package/lib/@types/PushRules.js.map +1 -1
  8. package/lib/@types/another-json.d.js.map +1 -1
  9. package/lib/@types/auth.d.ts +72 -1
  10. package/lib/@types/auth.d.ts.map +1 -1
  11. package/lib/@types/auth.js +57 -54
  12. package/lib/@types/auth.js.map +1 -1
  13. package/lib/@types/beacon.js +100 -100
  14. package/lib/@types/beacon.js.map +1 -1
  15. package/lib/@types/common.js.map +1 -1
  16. package/lib/@types/crypto.js.map +1 -1
  17. package/lib/@types/event.d.ts +59 -0
  18. package/lib/@types/event.d.ts.map +1 -1
  19. package/lib/@types/event.js +105 -102
  20. package/lib/@types/event.js.map +1 -1
  21. package/lib/@types/events.js.map +1 -1
  22. package/lib/@types/extensible_events.js +53 -53
  23. package/lib/@types/extensible_events.js.map +1 -1
  24. package/lib/@types/local_notifications.js.map +1 -1
  25. package/lib/@types/location.js +41 -41
  26. package/lib/@types/location.js.map +1 -1
  27. package/lib/@types/matrix-sdk-crypto-wasm.d.js.map +1 -1
  28. package/lib/@types/media.js.map +1 -1
  29. package/lib/@types/membership.js +39 -39
  30. package/lib/@types/membership.js.map +1 -1
  31. package/lib/@types/partials.js +25 -25
  32. package/lib/@types/partials.js.map +1 -1
  33. package/lib/@types/polls.js +46 -46
  34. package/lib/@types/polls.js.map +1 -1
  35. package/lib/@types/read_receipts.js +14 -14
  36. package/lib/@types/read_receipts.js.map +1 -1
  37. package/lib/@types/registration.js.map +1 -1
  38. package/lib/@types/search.js +14 -14
  39. package/lib/@types/search.js.map +1 -1
  40. package/lib/@types/signed.js.map +1 -1
  41. package/lib/@types/spaces.js.map +1 -1
  42. package/lib/@types/state_events.js.map +1 -1
  43. package/lib/@types/synapse.js.map +1 -1
  44. package/lib/@types/sync.js +18 -18
  45. package/lib/@types/sync.js.map +1 -1
  46. package/lib/@types/threepids.js +14 -14
  47. package/lib/@types/threepids.js.map +1 -1
  48. package/lib/@types/topic.js +47 -47
  49. package/lib/@types/topic.js.map +1 -1
  50. package/lib/@types/uia.js.map +1 -1
  51. package/lib/NamespacedValue.js +20 -20
  52. package/lib/NamespacedValue.js.map +1 -1
  53. package/lib/ReEmitter.js +16 -16
  54. package/lib/ReEmitter.js.map +1 -1
  55. package/lib/base64.js +32 -32
  56. package/lib/base64.js.map +1 -1
  57. package/lib/briij.d.ts +4 -0
  58. package/lib/briij.d.ts.map +1 -1
  59. package/lib/briij.js +4 -0
  60. package/lib/briij.js.map +1 -1
  61. package/lib/client.d.ts +48 -1
  62. package/lib/client.d.ts.map +1 -1
  63. package/lib/client.js +262 -108
  64. package/lib/client.js.map +1 -1
  65. package/lib/common-crypto/key-passphrase.js +19 -19
  66. package/lib/common-crypto/key-passphrase.js.map +1 -1
  67. package/lib/content-helpers.js +57 -57
  68. package/lib/content-helpers.js.map +1 -1
  69. package/lib/content-repo.js +36 -36
  70. package/lib/content-repo.js.map +1 -1
  71. package/lib/crypto/store/base.js +69 -69
  72. package/lib/crypto/store/base.js.map +1 -1
  73. package/lib/crypto/store/indexeddb-crypto-store-backend.js +58 -58
  74. package/lib/crypto/store/indexeddb-crypto-store-backend.js.map +1 -1
  75. package/lib/crypto/store/indexeddb-crypto-store.js +193 -193
  76. package/lib/crypto/store/indexeddb-crypto-store.js.map +1 -1
  77. package/lib/crypto/store/localStorage-crypto-store.js +72 -72
  78. package/lib/crypto/store/localStorage-crypto-store.js.map +1 -1
  79. package/lib/crypto/store/memory-crypto-store.js +74 -74
  80. package/lib/crypto/store/memory-crypto-store.js.map +1 -1
  81. package/lib/crypto-api/CryptoEventHandlerMap.js.map +1 -1
  82. package/lib/crypto-api/key-passphrase.js +22 -22
  83. package/lib/crypto-api/key-passphrase.js.map +1 -1
  84. package/lib/crypto-api/keybackup.js.map +1 -1
  85. package/lib/crypto-api/recovery-key.js +20 -20
  86. package/lib/crypto-api/recovery-key.js.map +1 -1
  87. package/lib/digest.js +21 -21
  88. package/lib/digest.js.map +1 -1
  89. package/lib/extensible_events_v1/ExtensibleEvent.js +39 -39
  90. package/lib/extensible_events_v1/ExtensibleEvent.js.map +1 -1
  91. package/lib/extensible_events_v1/InvalidEventError.js +16 -16
  92. package/lib/extensible_events_v1/InvalidEventError.js.map +1 -1
  93. package/lib/extensible_events_v1/MessageEvent.js +39 -39
  94. package/lib/extensible_events_v1/MessageEvent.js.map +1 -1
  95. package/lib/extensible_events_v1/PollEndEvent.js +29 -29
  96. package/lib/extensible_events_v1/PollEndEvent.js.map +1 -1
  97. package/lib/extensible_events_v1/PollResponseEvent.js +39 -39
  98. package/lib/extensible_events_v1/PollResponseEvent.js.map +1 -1
  99. package/lib/extensible_events_v1/PollStartEvent.js +52 -52
  100. package/lib/extensible_events_v1/PollStartEvent.js.map +1 -1
  101. package/lib/extensible_events_v1/utilities.js +22 -22
  102. package/lib/extensible_events_v1/utilities.js.map +1 -1
  103. package/lib/feature.js +16 -16
  104. package/lib/feature.js.map +1 -1
  105. package/lib/http-api/method.js +14 -14
  106. package/lib/http-api/method.js.map +1 -1
  107. package/lib/http-api/prefix.js +26 -26
  108. package/lib/http-api/prefix.js.map +1 -1
  109. package/lib/indexeddb-helpers.js +21 -21
  110. package/lib/indexeddb-helpers.js.map +1 -1
  111. package/lib/indexeddb-worker.js +18 -18
  112. package/lib/indexeddb-worker.js.map +1 -1
  113. package/lib/matrixrtc/IKeyTransport.js +17 -17
  114. package/lib/matrixrtc/IKeyTransport.js.map +1 -1
  115. package/lib/matrixrtc/IMembershipManager.js +27 -27
  116. package/lib/matrixrtc/IMembershipManager.js.map +1 -1
  117. package/lib/matrixrtc/LivekitTransport.js +19 -19
  118. package/lib/matrixrtc/LivekitTransport.js.map +1 -1
  119. package/lib/matrixrtc/index.js +14 -14
  120. package/lib/matrixrtc/index.js.map +1 -1
  121. package/lib/matrixrtc/utils.js +27 -27
  122. package/lib/matrixrtc/utils.js.map +1 -1
  123. package/lib/models/ToDeviceMessage.js.map +1 -1
  124. package/lib/models/device.js +24 -24
  125. package/lib/models/device.js.map +1 -1
  126. package/lib/models/event-status.js +17 -17
  127. package/lib/models/event-status.js.map +1 -1
  128. package/lib/models/invites-ignorer-types.js +25 -25
  129. package/lib/models/invites-ignorer-types.js.map +1 -1
  130. package/lib/models/profile-keys.js +26 -26
  131. package/lib/models/profile-keys.js.map +1 -1
  132. package/lib/models/room-summary.js +26 -26
  133. package/lib/models/room-summary.js.map +1 -1
  134. package/lib/models/search-result.js +22 -22
  135. package/lib/models/search-result.js.map +1 -1
  136. package/lib/models/typed-event-emitter.js +122 -122
  137. package/lib/models/typed-event-emitter.js.map +1 -1
  138. package/lib/oidc/authorize.js +76 -76
  139. package/lib/oidc/authorize.js.map +1 -1
  140. package/lib/oidc/error.js +17 -17
  141. package/lib/oidc/error.js.map +1 -1
  142. package/lib/oidc/index.js +17 -17
  143. package/lib/oidc/index.js.map +1 -1
  144. package/lib/oidc/register.js +41 -41
  145. package/lib/oidc/register.js.map +1 -1
  146. package/lib/oidc/tokenRefresher.js +51 -51
  147. package/lib/oidc/tokenRefresher.js.map +1 -1
  148. package/lib/oidc/validate.js +59 -59
  149. package/lib/oidc/validate.js.map +1 -1
  150. package/lib/randomstring.js +35 -35
  151. package/lib/randomstring.js.map +1 -1
  152. package/lib/realtime-callbacks.js +39 -39
  153. package/lib/realtime-callbacks.js.map +1 -1
  154. package/lib/receipt-accumulator.js +44 -44
  155. package/lib/receipt-accumulator.js.map +1 -1
  156. package/lib/rendezvous/RendezvousChannel.js.map +1 -1
  157. package/lib/rendezvous/RendezvousCode.js.map +1 -1
  158. package/lib/rendezvous/RendezvousError.js +14 -14
  159. package/lib/rendezvous/RendezvousError.js.map +1 -1
  160. package/lib/rendezvous/RendezvousFailureReason.js +14 -14
  161. package/lib/rendezvous/RendezvousFailureReason.js.map +1 -1
  162. package/lib/rendezvous/RendezvousIntent.js +14 -14
  163. package/lib/rendezvous/RendezvousIntent.js.map +1 -1
  164. package/lib/rendezvous/RendezvousTransport.js.map +1 -1
  165. package/lib/rendezvous/channels/MSC4108SecureChannel.js +63 -63
  166. package/lib/rendezvous/channels/MSC4108SecureChannel.js.map +1 -1
  167. package/lib/rendezvous/channels/index.js +14 -14
  168. package/lib/rendezvous/channels/index.js.map +1 -1
  169. package/lib/rendezvous/index.js +14 -14
  170. package/lib/rendezvous/index.js.map +1 -1
  171. package/lib/rendezvous/transports/index.js +14 -14
  172. package/lib/rendezvous/transports/index.js.map +1 -1
  173. package/lib/rust-crypto/CrossSigningIdentity.js +29 -29
  174. package/lib/rust-crypto/CrossSigningIdentity.js.map +1 -1
  175. package/lib/rust-crypto/OutgoingRequestsManager.js +37 -37
  176. package/lib/rust-crypto/OutgoingRequestsManager.js.map +1 -1
  177. package/lib/rust-crypto/device-converter.js +30 -30
  178. package/lib/rust-crypto/device-converter.js.map +1 -1
  179. package/lib/rust-crypto/secret-storage.js +30 -30
  180. package/lib/rust-crypto/secret-storage.js.map +1 -1
  181. package/lib/service-types.js +14 -14
  182. package/lib/service-types.js.map +1 -1
  183. package/lib/store/local-storage-events-emitter.js +21 -21
  184. package/lib/store/local-storage-events-emitter.js.map +1 -1
  185. package/lib/sync-accumulator.js +50 -50
  186. package/lib/sync-accumulator.js.map +1 -1
  187. package/lib/thread-utils.js +20 -20
  188. package/lib/thread-utils.js.map +1 -1
  189. package/lib/types.js +34 -34
  190. package/lib/types.js.map +1 -1
  191. package/lib/utils/decryptAESSecretStorageItem.js +22 -22
  192. package/lib/utils/decryptAESSecretStorageItem.js.map +1 -1
  193. package/lib/utils/encryptAESSecretStorageItem.js +26 -26
  194. package/lib/utils/encryptAESSecretStorageItem.js.map +1 -1
  195. package/lib/utils/internal/deriveKeys.js +21 -21
  196. package/lib/utils/internal/deriveKeys.js.map +1 -1
  197. package/lib/utils/roomVersion.js +26 -26
  198. package/lib/utils/roomVersion.js.map +1 -1
  199. package/lib/version-support.js +26 -26
  200. package/lib/version-support.js.map +1 -1
  201. package/lib/wallet-recovery.d.ts +24 -0
  202. package/lib/wallet-recovery.d.ts.map +1 -0
  203. package/lib/wallet-recovery.js +232 -0
  204. package/lib/wallet-recovery.js.map +1 -0
  205. package/lib/webrtc/audioContext.js +24 -24
  206. package/lib/webrtc/audioContext.js.map +1 -1
  207. package/lib/webrtc/callEventTypes.js.map +1 -1
  208. package/lib/webrtc/stats/callFeedStatsReporter.js +14 -14
  209. package/lib/webrtc/stats/callFeedStatsReporter.js.map +1 -1
  210. package/lib/webrtc/stats/callStatsReportGatherer.js +14 -14
  211. package/lib/webrtc/stats/callStatsReportGatherer.js.map +1 -1
  212. package/lib/webrtc/stats/callStatsReportSummary.js.map +1 -1
  213. package/lib/webrtc/stats/connectionStats.js +14 -14
  214. package/lib/webrtc/stats/connectionStats.js.map +1 -1
  215. package/lib/webrtc/stats/connectionStatsBuilder.js +14 -14
  216. package/lib/webrtc/stats/connectionStatsBuilder.js.map +1 -1
  217. package/lib/webrtc/stats/connectionStatsReportBuilder.js +14 -14
  218. package/lib/webrtc/stats/connectionStatsReportBuilder.js.map +1 -1
  219. package/lib/webrtc/stats/groupCallStats.js +14 -14
  220. package/lib/webrtc/stats/groupCallStats.js.map +1 -1
  221. package/lib/webrtc/stats/media/mediaSsrcHandler.js +14 -14
  222. package/lib/webrtc/stats/media/mediaSsrcHandler.js.map +1 -1
  223. package/lib/webrtc/stats/media/mediaTrackHandler.js +14 -14
  224. package/lib/webrtc/stats/media/mediaTrackHandler.js.map +1 -1
  225. package/lib/webrtc/stats/media/mediaTrackStats.js +27 -27
  226. package/lib/webrtc/stats/media/mediaTrackStats.js.map +1 -1
  227. package/lib/webrtc/stats/media/mediaTrackStatsHandler.js +20 -20
  228. package/lib/webrtc/stats/media/mediaTrackStatsHandler.js.map +1 -1
  229. package/lib/webrtc/stats/statsReport.js +14 -14
  230. package/lib/webrtc/stats/statsReport.js.map +1 -1
  231. package/lib/webrtc/stats/statsReportEmitter.js +14 -14
  232. package/lib/webrtc/stats/statsReportEmitter.js.map +1 -1
  233. package/lib/webrtc/stats/trackStatsBuilder.js +4 -4
  234. package/lib/webrtc/stats/trackStatsBuilder.js.map +1 -1
  235. package/lib/webrtc/stats/transportStats.js.map +1 -1
  236. package/lib/webrtc/stats/transportStatsBuilder.js.map +1 -1
  237. package/lib/webrtc/stats/valueFormatter.js +11 -11
  238. package/lib/webrtc/stats/valueFormatter.js.map +1 -1
  239. package/lib/xrpl/identity.d.ts +28 -0
  240. package/lib/xrpl/identity.d.ts.map +1 -0
  241. package/lib/xrpl/identity.js +213 -0
  242. package/lib/xrpl/identity.js.map +1 -0
  243. package/lib/xrpl/trust.d.ts +8 -0
  244. package/lib/xrpl/trust.d.ts.map +1 -0
  245. package/lib/xrpl/trust.js +61 -0
  246. package/lib/xrpl/trust.js.map +1 -0
  247. package/lib/xrpl/verification.d.ts +26 -0
  248. package/lib/xrpl/verification.d.ts.map +1 -0
  249. package/lib/xrpl/verification.js +295 -0
  250. package/lib/xrpl/verification.js.map +1 -0
  251. package/package.json +130 -129
  252. package/src/@types/AESEncryptedSecretStoragePayload.ts +29 -29
  253. package/src/@types/IIdentityServerProvider.ts +24 -24
  254. package/src/@types/PushRules.ts +208 -208
  255. package/src/@types/another-json.d.ts +19 -19
  256. package/src/@types/auth.ts +340 -258
  257. package/src/@types/beacon.ts +140 -140
  258. package/src/@types/common.ts +24 -24
  259. package/src/@types/crypto.ts +71 -71
  260. package/src/@types/event.ts +508 -449
  261. package/src/@types/events.ts +119 -119
  262. package/src/@types/extensible_events.ts +147 -147
  263. package/src/@types/local_notifications.ts +19 -19
  264. package/src/@types/location.ts +92 -92
  265. package/src/@types/matrix-sdk-crypto-wasm.d.ts +39 -39
  266. package/src/@types/media.ts +245 -245
  267. package/src/@types/membership.ts +57 -57
  268. package/src/@types/partials.ts +103 -103
  269. package/src/@types/polls.ts +120 -120
  270. package/src/@types/read_receipts.ts +61 -61
  271. package/src/@types/registration.ts +102 -102
  272. package/src/@types/search.ts +119 -119
  273. package/src/@types/signed.ts +25 -25
  274. package/src/@types/spaces.ts +37 -37
  275. package/src/@types/state_events.ts +153 -153
  276. package/src/@types/synapse.ts +40 -40
  277. package/src/@types/sync.ts +27 -27
  278. package/src/@types/threepids.ts +29 -29
  279. package/src/@types/topic.ts +69 -69
  280. package/src/@types/uia.ts +24 -24
  281. package/src/NamespacedValue.ts +121 -121
  282. package/src/ReEmitter.ts +93 -93
  283. package/src/base64.ts +86 -86
  284. package/src/briij.ts +4 -0
  285. package/src/client.ts +183 -10
  286. package/src/common-crypto/README.md +4 -4
  287. package/src/common-crypto/key-passphrase.ts +43 -43
  288. package/src/content-helpers.ts +298 -298
  289. package/src/content-repo.ts +122 -122
  290. package/src/crypto/store/base.ts +388 -388
  291. package/src/crypto/store/indexeddb-crypto-store-backend.ts +655 -655
  292. package/src/crypto/store/indexeddb-crypto-store.ts +555 -555
  293. package/src/crypto/store/localStorage-crypto-store.ts +409 -409
  294. package/src/crypto/store/memory-crypto-store.ts +326 -326
  295. package/src/crypto-api/CryptoEventHandlerMap.ts +42 -42
  296. package/src/crypto-api/key-passphrase.ts +58 -58
  297. package/src/crypto-api/keybackup.ts +114 -114
  298. package/src/crypto-api/recovery-key.ts +69 -69
  299. package/src/digest.ts +34 -34
  300. package/src/extensible_events_v1/ExtensibleEvent.ts +58 -58
  301. package/src/extensible_events_v1/InvalidEventError.ts +24 -24
  302. package/src/extensible_events_v1/MessageEvent.ts +143 -143
  303. package/src/extensible_events_v1/PollEndEvent.ts +97 -97
  304. package/src/extensible_events_v1/PollResponseEvent.ts +148 -148
  305. package/src/extensible_events_v1/PollStartEvent.ts +207 -207
  306. package/src/extensible_events_v1/utilities.ts +35 -35
  307. package/src/feature.ts +88 -88
  308. package/src/http-api/method.ts +25 -25
  309. package/src/http-api/prefix.ts +48 -48
  310. package/src/indexeddb-helpers.ts +50 -50
  311. package/src/indexeddb-worker.ts +24 -24
  312. package/src/matrixrtc/IKeyTransport.ts +63 -63
  313. package/src/matrixrtc/IMembershipManager.ts +120 -120
  314. package/src/matrixrtc/LivekitTransport.ts +46 -46
  315. package/src/matrixrtc/index.ts +24 -24
  316. package/src/matrixrtc/utils.ts +71 -71
  317. package/src/models/ToDeviceMessage.ts +38 -38
  318. package/src/models/device.ts +85 -85
  319. package/src/models/event-status.ts +39 -39
  320. package/src/models/invites-ignorer-types.ts +58 -58
  321. package/src/models/profile-keys.ts +33 -33
  322. package/src/models/room-summary.ts +78 -78
  323. package/src/models/search-result.ts +57 -57
  324. package/src/models/typed-event-emitter.ts +246 -246
  325. package/src/oidc/authorize.ts +279 -279
  326. package/src/oidc/error.ts +33 -33
  327. package/src/oidc/index.ts +33 -33
  328. package/src/oidc/register.ts +163 -163
  329. package/src/oidc/tokenRefresher.ts +184 -184
  330. package/src/oidc/validate.ts +265 -265
  331. package/src/randomstring.ts +103 -103
  332. package/src/realtime-callbacks.ts +191 -191
  333. package/src/receipt-accumulator.ts +189 -189
  334. package/src/rendezvous/RendezvousChannel.ts +48 -48
  335. package/src/rendezvous/RendezvousCode.ts +25 -25
  336. package/src/rendezvous/RendezvousError.ts +26 -26
  337. package/src/rendezvous/RendezvousFailureReason.ts +49 -49
  338. package/src/rendezvous/RendezvousIntent.ts +20 -20
  339. package/src/rendezvous/RendezvousTransport.ts +58 -58
  340. package/src/rendezvous/channels/MSC4108SecureChannel.ts +270 -270
  341. package/src/rendezvous/channels/index.ts +17 -17
  342. package/src/rendezvous/index.ts +25 -25
  343. package/src/rendezvous/transports/index.ts +17 -17
  344. package/src/rust-crypto/CrossSigningIdentity.ts +195 -195
  345. package/src/rust-crypto/OutgoingRequestsManager.ts +170 -170
  346. package/src/rust-crypto/device-converter.ts +128 -128
  347. package/src/rust-crypto/secret-storage.ts +60 -60
  348. package/src/service-types.ts +20 -20
  349. package/src/store/local-storage-events-emitter.ts +46 -46
  350. package/src/sync-accumulator.ts +779 -779
  351. package/src/thread-utils.ts +31 -31
  352. package/src/types.ts +59 -59
  353. package/src/utils/decryptAESSecretStorageItem.ts +54 -54
  354. package/src/utils/encryptAESSecretStorageItem.ts +73 -73
  355. package/src/utils/internal/deriveKeys.ts +63 -63
  356. package/src/utils/roomVersion.ts +35 -35
  357. package/src/version-support.ts +50 -50
  358. package/src/wallet-recovery.ts +252 -0
  359. package/src/webrtc/audioContext.ts +44 -44
  360. package/src/webrtc/callEventTypes.ts +101 -101
  361. package/src/webrtc/stats/callFeedStatsReporter.ts +91 -91
  362. package/src/webrtc/stats/callStatsReportGatherer.ts +219 -219
  363. package/src/webrtc/stats/callStatsReportSummary.ts +30 -30
  364. package/src/webrtc/stats/connectionStats.ts +47 -47
  365. package/src/webrtc/stats/connectionStatsBuilder.ts +28 -28
  366. package/src/webrtc/stats/connectionStatsReportBuilder.ts +140 -140
  367. package/src/webrtc/stats/groupCallStats.ts +93 -93
  368. package/src/webrtc/stats/media/mediaSsrcHandler.ts +57 -57
  369. package/src/webrtc/stats/media/mediaTrackHandler.ts +70 -70
  370. package/src/webrtc/stats/media/mediaTrackStats.ts +176 -176
  371. package/src/webrtc/stats/media/mediaTrackStatsHandler.ts +90 -90
  372. package/src/webrtc/stats/statsReport.ts +133 -133
  373. package/src/webrtc/stats/statsReportEmitter.ts +49 -49
  374. package/src/webrtc/stats/trackStatsBuilder.ts +207 -207
  375. package/src/webrtc/stats/transportStats.ts +26 -26
  376. package/src/webrtc/stats/transportStatsBuilder.ts +48 -48
  377. package/src/webrtc/stats/valueFormatter.ts +27 -27
  378. package/src/xrpl/identity.ts +245 -0
  379. package/src/xrpl/trust.ts +64 -0
  380. package/src/xrpl/verification.ts +284 -0
@@ -14,13 +14,19 @@ export interface IRefreshTokenResponse {
14
14
  export interface ILoginFlowsResponse {
15
15
  flows: LoginFlow[];
16
16
  }
17
- export type LoginFlow = ISSOFlow | IPasswordFlow | ILoginFlow;
17
+ export declare const XRPL_WALLET_LOGIN_TYPE = "io.briij.login.xrpl";
18
+ export declare const WALLET_E2EE_RECOVERY_ACCOUNT_DATA_TYPE = "org.textrp.wallet.e2ee_recovery.v1";
19
+ export declare const WALLET_IDENTITY_ACCOUNT_DATA_TYPE = "org.textrp.wallet.identity";
20
+ export type LoginFlow = ISSOFlow | IPasswordFlow | IXrplWalletLoginFlow | ILoginFlow;
18
21
  export interface ILoginFlow {
19
22
  type: string;
20
23
  }
21
24
  export interface IPasswordFlow extends ILoginFlow {
22
25
  type: "m.login.password";
23
26
  }
27
+ export interface IXrplWalletLoginFlow extends ILoginFlow {
28
+ type: typeof XRPL_WALLET_LOGIN_TYPE;
29
+ }
24
30
  export declare const OAUTH_AWARE_PREFERRED_FLOW_FIELD: UnstableValue<"oauth_aware_preferred", "org.matrix.msc3824.delegated_oidc_compatibility">;
25
31
  /**
26
32
  * @alias
@@ -153,6 +159,71 @@ export interface LoginRequest {
153
159
  [key: string]: any;
154
160
  }
155
161
  export type ILoginParams = LoginRequest;
162
+ export interface XrplWalletChallengePayload {
163
+ session?: string;
164
+ nonce: string;
165
+ timestamp: number | string;
166
+ message: string;
167
+ public_key: string;
168
+ algorithm?: "secp256k1" | "ed25519" | string;
169
+ }
170
+ export interface XrplAuthChallengeRequest extends Omit<LoginRequest, "type"> {
171
+ type: typeof XRPL_WALLET_LOGIN_TYPE;
172
+ address: string;
173
+ network: string;
174
+ preferred_localpart?: string;
175
+ username?: string;
176
+ display_name?: string;
177
+ }
178
+ export interface XrplAuthChallengeResponse {
179
+ session: string;
180
+ challenge: string;
181
+ }
182
+ export interface XrplAuthCompleteRequest extends Omit<LoginRequest, "type"> {
183
+ type: typeof XRPL_WALLET_LOGIN_TYPE;
184
+ session: string;
185
+ address: string;
186
+ signature: string;
187
+ public_key?: string;
188
+ network?: string;
189
+ wallet_e2ee_recovery?: WalletE2eeRecoveryEnvelope;
190
+ }
191
+ export interface WalletRecoveryWrap {
192
+ alg: string;
193
+ kdf: string;
194
+ salt: string;
195
+ nonce: string;
196
+ ciphertext: string;
197
+ aad?: string;
198
+ params?: Record<string, unknown>;
199
+ }
200
+ export interface WalletRecoveryPasswordWrap extends WalletRecoveryWrap {
201
+ kdf: string;
202
+ params?: Record<string, unknown>;
203
+ }
204
+ export interface WalletE2eeRecoveryEnvelope {
205
+ envelope_version: number;
206
+ chain_id: string;
207
+ account_id: string;
208
+ created_at_ms: number;
209
+ key_id: string;
210
+ wallet_wrap: WalletRecoveryWrap;
211
+ password_wrap: WalletRecoveryPasswordWrap;
212
+ }
213
+ export interface WalletIdentityAccountData {
214
+ chain_id: string;
215
+ account_id: string;
216
+ public_key: string | null;
217
+ network?: string | null;
218
+ key_type?: string | null;
219
+ }
220
+ export interface XrplWalletLoginRequest extends Omit<LoginRequest, "type"> {
221
+ type: typeof XRPL_WALLET_LOGIN_TYPE;
222
+ wallet_address: string;
223
+ signature: string;
224
+ challenge: string | XrplWalletChallengePayload;
225
+ network?: string;
226
+ }
156
227
  /**
157
228
  * Response body for POST /login request
158
229
  * @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/@types/auth.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKrD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACzB;AAID;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,KAAK,EAAE,SAAS,EAAE,CAAC;CACtB;AAED,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,aAAa,GAAG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B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC;IACtE,IAAI,EAAE,OAAO,sBAAsB,CAAC;IACpC,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,0BAA0B,CAAC;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC1B;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACnC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACzB"}
@@ -1,17 +1,17 @@
1
- /*
2
- Copyright 2022 The Matrix.org Foundation C.I.C.
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
1
+ /*
2
+ Copyright 2022 The Matrix.org Foundation C.I.C.
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
15
  */
16
16
 
17
17
  import { UnstableValue } from "../NamespacedValue.js";
@@ -19,26 +19,29 @@ import { UnstableValue } from "../NamespacedValue.js";
19
19
  // disable lint because these are wire responses
20
20
  /* eslint-disable camelcase */
21
21
 
22
- /**
23
- * Represents a response to the CSAPI `/refresh` endpoint.
22
+ /**
23
+ * Represents a response to the CSAPI `/refresh` endpoint.
24
24
  */
25
25
 
26
26
  /* eslint-enable camelcase */
27
27
 
28
- /**
29
- * Response to GET login flows as per https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3login
28
+ /**
29
+ * Response to GET login flows as per https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3login
30
30
  */
31
31
 
32
+ export var XRPL_WALLET_LOGIN_TYPE = "io.briij.login.xrpl";
33
+ export var WALLET_E2EE_RECOVERY_ACCOUNT_DATA_TYPE = "org.textrp.wallet.e2ee_recovery.v1";
34
+ export var WALLET_IDENTITY_ACCOUNT_DATA_TYPE = "org.textrp.wallet.identity";
32
35
  export var OAUTH_AWARE_PREFERRED_FLOW_FIELD = new UnstableValue("oauth_aware_preferred", "org.matrix.msc3824.delegated_oidc_compatibility");
33
36
 
34
- /**
35
- * @alias
36
- * @deprecated use `OAUTH_AWARE_PREFERRED_FLOW_FIELD` instead.
37
+ /**
38
+ * @alias
39
+ * @deprecated use `OAUTH_AWARE_PREFERRED_FLOW_FIELD` instead.
37
40
  */
38
41
  export var DELEGATED_OIDC_COMPATIBILITY = OAUTH_AWARE_PREFERRED_FLOW_FIELD;
39
42
 
40
- /**
41
- * Representation of SSO flow as per https://spec.matrix.org/v1.3/client-server-api/#client-login-via-sso
43
+ /**
44
+ * Representation of SSO flow as per https://spec.matrix.org/v1.3/client-server-api/#client-login-via-sso
42
45
  */
43
46
 
44
47
  export var IdentityProviderBrand = /*#__PURE__*/function (IdentityProviderBrand) {
@@ -58,50 +61,50 @@ export var SSOAction = /*#__PURE__*/function (SSOAction) {
58
61
  return SSOAction;
59
62
  }({});
60
63
 
61
- /**
62
- * A client can identify a user using their Matrix ID.
63
- * This can either be the fully qualified Matrix user ID, or just the localpart of the user ID.
64
- * @see https://spec.matrix.org/v1.7/client-server-api/#matrix-user-id
64
+ /**
65
+ * A client can identify a user using their Matrix ID.
66
+ * This can either be the fully qualified Matrix user ID, or just the localpart of the user ID.
67
+ * @see https://spec.matrix.org/v1.7/client-server-api/#matrix-user-id
65
68
  */
66
69
 
67
- /**
68
- * A client can identify a user using a 3PID associated with the user’s account on the homeserver,
69
- * where the 3PID was previously associated using the /account/3pid API.
70
- * See the 3PID Types Appendix for a list of Third-party ID media.
71
- * @see https://spec.matrix.org/v1.7/client-server-api/#third-party-id
70
+ /**
71
+ * A client can identify a user using a 3PID associated with the user’s account on the homeserver,
72
+ * where the 3PID was previously associated using the /account/3pid API.
73
+ * See the 3PID Types Appendix for a list of Third-party ID media.
74
+ * @see https://spec.matrix.org/v1.7/client-server-api/#third-party-id
72
75
  */
73
76
 
74
- /**
75
- * A client can identify a user using a phone number associated with the user’s account,
76
- * where the phone number was previously associated using the /account/3pid API.
77
- * The phone number can be passed in as entered by the user; the homeserver will be responsible for canonicalising it.
78
- * If the client wishes to canonicalise the phone number,
79
- * then it can use the m.id.thirdparty identifier type with a medium of msisdn instead.
80
- *
81
- * The country is the two-letter uppercase ISO-3166-1 alpha-2 country code that the number in phone should be parsed as if it were dialled from.
82
- *
83
- * @see https://spec.matrix.org/v1.7/client-server-api/#phone-number
77
+ /**
78
+ * A client can identify a user using a phone number associated with the user’s account,
79
+ * where the phone number was previously associated using the /account/3pid API.
80
+ * The phone number can be passed in as entered by the user; the homeserver will be responsible for canonicalising it.
81
+ * If the client wishes to canonicalise the phone number,
82
+ * then it can use the m.id.thirdparty identifier type with a medium of msisdn instead.
83
+ *
84
+ * The country is the two-letter uppercase ISO-3166-1 alpha-2 country code that the number in phone should be parsed as if it were dialled from.
85
+ *
86
+ * @see https://spec.matrix.org/v1.7/client-server-api/#phone-number
84
87
  */
85
88
 
86
- /**
87
- * User Identifiers usable for login & user-interactive authentication.
88
- *
89
- * Extensibly allows more than Matrix specified identifiers.
89
+ /**
90
+ * User Identifiers usable for login & user-interactive authentication.
91
+ *
92
+ * Extensibly allows more than Matrix specified identifiers.
90
93
  */
91
94
 
92
- /**
93
- * Request body for POST /login request
94
- * @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login
95
+ /**
96
+ * Request body for POST /login request
97
+ * @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login
95
98
  */
96
99
 
97
100
  // Export for backwards compatibility
98
101
 
99
- /**
100
- * Response body for POST /login request
101
- * @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login
102
+ /**
103
+ * Response body for POST /login request
104
+ * @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login
102
105
  */
103
106
 
104
- /**
105
- * The result of a successful `m.login.token` issuance request as per https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv1loginget_token
107
+ /**
108
+ * The result of a successful `m.login.token` issuance request as per https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv1loginget_token
106
109
  */
107
110
  //# sourceMappingURL=auth.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth.js","names":["UnstableValue","OAUTH_AWARE_PREFERRED_FLOW_FIELD","DELEGATED_OIDC_COMPATIBILITY","IdentityProviderBrand","SSOAction"],"sources":["../../src/@types/auth.ts"],"sourcesContent":["/*\r\nCopyright 2022 The Matrix.org Foundation C.I.C.\r\n\r\nLicensed under the Apache License, Version 2.0 (the \"License\");\r\nyou may not use this file except in compliance with the License.\r\nYou may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing, software\r\ndistributed under the License is distributed on an \"AS IS\" BASIS,\r\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\nSee the License for the specific language governing permissions and\r\nlimitations under the License.\r\n*/\r\n\r\nimport { UnstableValue } from \"../NamespacedValue.ts\";\r\nimport { type IClientWellKnown } from \"../client.ts\";\r\n\r\n// disable lint because these are wire responses\r\n/* eslint-disable camelcase */\r\n\r\n/**\r\n * Represents a response to the CSAPI `/refresh` endpoint.\r\n */\r\nexport interface IRefreshTokenResponse {\r\n access_token: string;\r\n expires_in_ms: number;\r\n refresh_token: string;\r\n}\r\n\r\n/* eslint-enable camelcase */\r\n\r\n/**\r\n * Response to GET login flows as per https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3login\r\n */\r\nexport interface ILoginFlowsResponse {\r\n flows: LoginFlow[];\r\n}\r\n\r\nexport type LoginFlow = ISSOFlow | IPasswordFlow | ILoginFlow;\r\n\r\nexport interface ILoginFlow {\r\n type: string;\r\n}\r\n\r\nexport interface IPasswordFlow extends ILoginFlow {\r\n type: \"m.login.password\";\r\n}\r\n\r\nexport const OAUTH_AWARE_PREFERRED_FLOW_FIELD = new UnstableValue(\r\n \"oauth_aware_preferred\",\r\n \"org.matrix.msc3824.delegated_oidc_compatibility\",\r\n);\r\n\r\n/**\r\n * @alias\r\n * @deprecated use `OAUTH_AWARE_PREFERRED_FLOW_FIELD` instead.\r\n */\r\nexport const DELEGATED_OIDC_COMPATIBILITY = OAUTH_AWARE_PREFERRED_FLOW_FIELD;\r\n\r\n/**\r\n * Representation of SSO flow as per https://spec.matrix.org/v1.3/client-server-api/#client-login-via-sso\r\n */\r\nexport interface ISSOFlow extends ILoginFlow {\r\n type: \"m.login.sso\" | \"m.login.cas\";\r\n // eslint-disable-next-line camelcase\r\n identity_providers?: IIdentityProvider[];\r\n [OAUTH_AWARE_PREFERRED_FLOW_FIELD.name]?: boolean;\r\n [OAUTH_AWARE_PREFERRED_FLOW_FIELD.altName]?: boolean;\r\n}\r\n\r\nexport enum IdentityProviderBrand {\r\n Gitlab = \"gitlab\",\r\n Github = \"github\",\r\n Apple = \"apple\",\r\n Google = \"google\",\r\n Facebook = \"facebook\",\r\n Twitter = \"twitter\",\r\n}\r\n\r\nexport interface IIdentityProvider {\r\n id: string;\r\n name: string;\r\n icon?: string;\r\n brand?: IdentityProviderBrand | string;\r\n}\r\n\r\nexport enum SSOAction {\r\n /** The user intends to login to an existing account */\r\n LOGIN = \"login\",\r\n\r\n /** The user intends to register for a new account */\r\n REGISTER = \"register\",\r\n}\r\n\r\n/**\r\n * A client can identify a user using their Matrix ID.\r\n * This can either be the fully qualified Matrix user ID, or just the localpart of the user ID.\r\n * @see https://spec.matrix.org/v1.7/client-server-api/#matrix-user-id\r\n */\r\ntype UserLoginIdentifier = {\r\n type: \"m.id.user\";\r\n user: string;\r\n};\r\n\r\n/**\r\n * A client can identify a user using a 3PID associated with the user’s account on the homeserver,\r\n * where the 3PID was previously associated using the /account/3pid API.\r\n * See the 3PID Types Appendix for a list of Third-party ID media.\r\n * @see https://spec.matrix.org/v1.7/client-server-api/#third-party-id\r\n */\r\ntype ThirdPartyLoginIdentifier = {\r\n type: \"m.id.thirdparty\";\r\n medium: string;\r\n address: string;\r\n};\r\n\r\n/**\r\n * A client can identify a user using a phone number associated with the user’s account,\r\n * where the phone number was previously associated using the /account/3pid API.\r\n * The phone number can be passed in as entered by the user; the homeserver will be responsible for canonicalising it.\r\n * If the client wishes to canonicalise the phone number,\r\n * then it can use the m.id.thirdparty identifier type with a medium of msisdn instead.\r\n *\r\n * The country is the two-letter uppercase ISO-3166-1 alpha-2 country code that the number in phone should be parsed as if it were dialled from.\r\n *\r\n * @see https://spec.matrix.org/v1.7/client-server-api/#phone-number\r\n */\r\ntype PhoneLoginIdentifier = {\r\n type: \"m.id.phone\";\r\n country: string;\r\n phone: string;\r\n};\r\n\r\ntype SpecUserIdentifier = UserLoginIdentifier | ThirdPartyLoginIdentifier | PhoneLoginIdentifier;\r\n\r\n/**\r\n * User Identifiers usable for login & user-interactive authentication.\r\n *\r\n * Extensibly allows more than Matrix specified identifiers.\r\n */\r\nexport type UserIdentifier =\r\n | SpecUserIdentifier\r\n | { type: Exclude<string, SpecUserIdentifier[\"type\"]>; [key: string]: any };\r\n\r\n/**\r\n * Request body for POST /login request\r\n * @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login\r\n */\r\nexport interface LoginRequest {\r\n /**\r\n * The login type being used.\r\n */\r\n type: \"m.login.password\" | \"m.login.token\" | string;\r\n /**\r\n * ID of the client device.\r\n * If this does not correspond to a known client device, a new device will be created.\r\n * The given device ID must not be the same as a cross-signing key ID.\r\n * The server will auto-generate a device_id if this is not specified.\r\n */\r\n device_id?: string;\r\n /**\r\n * Identification information for a user\r\n */\r\n identifier?: UserIdentifier;\r\n /**\r\n * A display name to assign to the newly-created device.\r\n * Ignored if device_id corresponds to a known device.\r\n */\r\n initial_device_display_name?: string;\r\n /**\r\n * When logging in using a third-party identifier, the medium of the identifier.\r\n * Must be `email`.\r\n * @deprecated in favour of `identifier`.\r\n */\r\n medium?: \"email\";\r\n /**\r\n * Required when type is `m.login.password`. The user’s password.\r\n */\r\n password?: string;\r\n /**\r\n * If true, the client supports refresh tokens.\r\n */\r\n refresh_token?: boolean;\r\n /**\r\n * Required when type is `m.login.token`. Part of Token-based login.\r\n */\r\n token?: string;\r\n /**\r\n * The fully qualified user ID or just local part of the user ID, to log in.\r\n * @deprecated in favour of identifier.\r\n */\r\n user?: string;\r\n // Extensible\r\n [key: string]: any;\r\n}\r\n\r\n// Export for backwards compatibility\r\nexport type ILoginParams = LoginRequest;\r\n\r\n/**\r\n * Response body for POST /login request\r\n * @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login\r\n */\r\nexport interface LoginResponse {\r\n /**\r\n * An access token for the account.\r\n * This access token can then be used to authorize other requests.\r\n */\r\n access_token: string;\r\n /**\r\n * ID of the logged-in device.\r\n * Will be the same as the corresponding parameter in the request, if one was specified.\r\n */\r\n device_id: string;\r\n /**\r\n * The fully-qualified Matrix ID for the account.\r\n */\r\n user_id: string;\r\n /**\r\n * The lifetime of the access token, in milliseconds.\r\n * Once the access token has expired a new access token can be obtained by using the provided refresh token.\r\n * If no refresh token is provided, the client will need to re-log in to obtain a new access token.\r\n * If not given, the client can assume that the access token will not expire.\r\n */\r\n expires_in_ms?: number;\r\n /**\r\n * A refresh token for the account.\r\n * This token can be used to obtain a new access token when it expires by calling the /refresh endpoint.\r\n */\r\n refresh_token?: string;\r\n /**\r\n * Optional client configuration provided by the server.\r\n * If present, clients SHOULD use the provided object to reconfigure themselves, optionally validating the URLs within.\r\n * This object takes the same form as the one returned from .well-known autodiscovery.\r\n */\r\n well_known?: IClientWellKnown;\r\n /**\r\n * The server_name of the homeserver on which the account has been registered.\r\n * @deprecated Clients should extract the server_name from user_id (by splitting at the first colon) if they require it.\r\n */\r\n home_server?: string;\r\n}\r\n\r\n/**\r\n * The result of a successful `m.login.token` issuance request as per https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv1loginget_token\r\n */\r\nexport interface LoginTokenPostResponse {\r\n /**\r\n * The token to use with `m.login.token` to authenticate.\r\n */\r\n login_token: string;\r\n /**\r\n * Expiration in milliseconds.\r\n */\r\n expires_in_ms: number;\r\n}\r\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,QAAQ,uBAAuB;;AAGrD;AACA;;AAEA;AACA;AACA;;AAOA;;AAEA;AACA;AACA;;AAeA,OAAO,IAAMC,gCAAgC,GAAG,IAAID,aAAa,CAC7D,uBAAuB,EACvB,iDACJ,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,IAAME,4BAA4B,GAAGD,gCAAgC;;AAE5E;AACA;AACA;;AASA,WAAYE,qBAAqB,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA;AAgBjC,WAAYC,SAAS,0BAATA,SAAS;EACjB;EADQA,SAAS;EAIjB;EAJQA,SAAS;EAAA,OAATA,SAAS;AAAA;;AAQrB;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;;AAiDA;;AAGA;AACA;AACA;AACA;;AAyCA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"file":"auth.js","names":["UnstableValue","XRPL_WALLET_LOGIN_TYPE","WALLET_E2EE_RECOVERY_ACCOUNT_DATA_TYPE","WALLET_IDENTITY_ACCOUNT_DATA_TYPE","OAUTH_AWARE_PREFERRED_FLOW_FIELD","DELEGATED_OIDC_COMPATIBILITY","IdentityProviderBrand","SSOAction"],"sources":["../../src/@types/auth.ts"],"sourcesContent":["/*\nCopyright 2022 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { UnstableValue } from \"../NamespacedValue.ts\";\nimport { type IClientWellKnown } from \"../client.ts\";\n\n// disable lint because these are wire responses\n/* eslint-disable camelcase */\n\n/**\n * Represents a response to the CSAPI `/refresh` endpoint.\n */\nexport interface IRefreshTokenResponse {\n access_token: string;\n expires_in_ms: number;\n refresh_token: string;\n}\n\n/* eslint-enable camelcase */\n\n/**\n * Response to GET login flows as per https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3login\n */\nexport interface ILoginFlowsResponse {\n flows: LoginFlow[];\n}\n\nexport const XRPL_WALLET_LOGIN_TYPE = \"io.briij.login.xrpl\";\nexport const WALLET_E2EE_RECOVERY_ACCOUNT_DATA_TYPE = \"org.textrp.wallet.e2ee_recovery.v1\";\nexport const WALLET_IDENTITY_ACCOUNT_DATA_TYPE = \"org.textrp.wallet.identity\";\n\nexport type LoginFlow = ISSOFlow | IPasswordFlow | IXrplWalletLoginFlow | ILoginFlow;\n\nexport interface ILoginFlow {\n type: string;\n}\n\nexport interface IPasswordFlow extends ILoginFlow {\n type: \"m.login.password\";\n}\n\nexport interface IXrplWalletLoginFlow extends ILoginFlow {\n type: typeof XRPL_WALLET_LOGIN_TYPE;\n}\n\nexport const OAUTH_AWARE_PREFERRED_FLOW_FIELD = new UnstableValue(\n \"oauth_aware_preferred\",\n \"org.matrix.msc3824.delegated_oidc_compatibility\",\n);\n\n/**\n * @alias\n * @deprecated use `OAUTH_AWARE_PREFERRED_FLOW_FIELD` instead.\n */\nexport const DELEGATED_OIDC_COMPATIBILITY = OAUTH_AWARE_PREFERRED_FLOW_FIELD;\n\n/**\n * Representation of SSO flow as per https://spec.matrix.org/v1.3/client-server-api/#client-login-via-sso\n */\nexport interface ISSOFlow extends ILoginFlow {\n type: \"m.login.sso\" | \"m.login.cas\";\n // eslint-disable-next-line camelcase\n identity_providers?: IIdentityProvider[];\n [OAUTH_AWARE_PREFERRED_FLOW_FIELD.name]?: boolean;\n [OAUTH_AWARE_PREFERRED_FLOW_FIELD.altName]?: boolean;\n}\n\nexport enum IdentityProviderBrand {\n Gitlab = \"gitlab\",\n Github = \"github\",\n Apple = \"apple\",\n Google = \"google\",\n Facebook = \"facebook\",\n Twitter = \"twitter\",\n}\n\nexport interface IIdentityProvider {\n id: string;\n name: string;\n icon?: string;\n brand?: IdentityProviderBrand | string;\n}\n\nexport enum SSOAction {\n /** The user intends to login to an existing account */\n LOGIN = \"login\",\n\n /** The user intends to register for a new account */\n REGISTER = \"register\",\n}\n\n/**\n * A client can identify a user using their Matrix ID.\n * This can either be the fully qualified Matrix user ID, or just the localpart of the user ID.\n * @see https://spec.matrix.org/v1.7/client-server-api/#matrix-user-id\n */\ntype UserLoginIdentifier = {\n type: \"m.id.user\";\n user: string;\n};\n\n/**\n * A client can identify a user using a 3PID associated with the user’s account on the homeserver,\n * where the 3PID was previously associated using the /account/3pid API.\n * See the 3PID Types Appendix for a list of Third-party ID media.\n * @see https://spec.matrix.org/v1.7/client-server-api/#third-party-id\n */\ntype ThirdPartyLoginIdentifier = {\n type: \"m.id.thirdparty\";\n medium: string;\n address: string;\n};\n\n/**\n * A client can identify a user using a phone number associated with the user’s account,\n * where the phone number was previously associated using the /account/3pid API.\n * The phone number can be passed in as entered by the user; the homeserver will be responsible for canonicalising it.\n * If the client wishes to canonicalise the phone number,\n * then it can use the m.id.thirdparty identifier type with a medium of msisdn instead.\n *\n * The country is the two-letter uppercase ISO-3166-1 alpha-2 country code that the number in phone should be parsed as if it were dialled from.\n *\n * @see https://spec.matrix.org/v1.7/client-server-api/#phone-number\n */\ntype PhoneLoginIdentifier = {\n type: \"m.id.phone\";\n country: string;\n phone: string;\n};\n\ntype SpecUserIdentifier = UserLoginIdentifier | ThirdPartyLoginIdentifier | PhoneLoginIdentifier;\n\n/**\n * User Identifiers usable for login & user-interactive authentication.\n *\n * Extensibly allows more than Matrix specified identifiers.\n */\nexport type UserIdentifier =\n | SpecUserIdentifier\n | { type: Exclude<string, SpecUserIdentifier[\"type\"]>; [key: string]: any };\n\n/**\n * Request body for POST /login request\n * @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login\n */\nexport interface LoginRequest {\n /**\n * The login type being used.\n */\n type: \"m.login.password\" | \"m.login.token\" | string;\n /**\n * ID of the client device.\n * If this does not correspond to a known client device, a new device will be created.\n * The given device ID must not be the same as a cross-signing key ID.\n * The server will auto-generate a device_id if this is not specified.\n */\n device_id?: string;\n /**\n * Identification information for a user\n */\n identifier?: UserIdentifier;\n /**\n * A display name to assign to the newly-created device.\n * Ignored if device_id corresponds to a known device.\n */\n initial_device_display_name?: string;\n /**\n * When logging in using a third-party identifier, the medium of the identifier.\n * Must be `email`.\n * @deprecated in favour of `identifier`.\n */\n medium?: \"email\";\n /**\n * Required when type is `m.login.password`. The user’s password.\n */\n password?: string;\n /**\n * If true, the client supports refresh tokens.\n */\n refresh_token?: boolean;\n /**\n * Required when type is `m.login.token`. Part of Token-based login.\n */\n token?: string;\n /**\n * The fully qualified user ID or just local part of the user ID, to log in.\n * @deprecated in favour of identifier.\n */\n user?: string;\n // Extensible\n [key: string]: any;\n}\n\n// Export for backwards compatibility\nexport type ILoginParams = LoginRequest;\n\nexport interface XrplWalletChallengePayload {\n session?: string;\n nonce: string;\n timestamp: number | string;\n message: string;\n public_key: string;\n algorithm?: \"secp256k1\" | \"ed25519\" | string;\n}\n\nexport interface XrplAuthChallengeRequest extends Omit<LoginRequest, \"type\"> {\n type: typeof XRPL_WALLET_LOGIN_TYPE;\n address: string;\n network: string;\n preferred_localpart?: string;\n username?: string;\n display_name?: string;\n}\n\nexport interface XrplAuthChallengeResponse {\n session: string;\n challenge: string;\n}\n\nexport interface XrplAuthCompleteRequest extends Omit<LoginRequest, \"type\"> {\n type: typeof XRPL_WALLET_LOGIN_TYPE;\n session: string;\n address: string;\n signature: string;\n public_key?: string;\n network?: string;\n wallet_e2ee_recovery?: WalletE2eeRecoveryEnvelope;\n}\n\nexport interface WalletRecoveryWrap {\n alg: string;\n kdf: string;\n salt: string;\n nonce: string;\n ciphertext: string;\n aad?: string;\n params?: Record<string, unknown>;\n}\n\nexport interface WalletRecoveryPasswordWrap extends WalletRecoveryWrap {\n kdf: string;\n params?: Record<string, unknown>;\n}\n\nexport interface WalletE2eeRecoveryEnvelope {\n envelope_version: number;\n chain_id: string;\n account_id: string;\n created_at_ms: number;\n key_id: string;\n wallet_wrap: WalletRecoveryWrap;\n password_wrap: WalletRecoveryPasswordWrap;\n}\n\nexport interface WalletIdentityAccountData {\n chain_id: string;\n account_id: string;\n public_key: string | null;\n network?: string | null;\n key_type?: string | null;\n}\n\nexport interface XrplWalletLoginRequest extends Omit<LoginRequest, \"type\"> {\n type: typeof XRPL_WALLET_LOGIN_TYPE;\n wallet_address: string;\n signature: string;\n challenge: string | XrplWalletChallengePayload;\n network?: string;\n}\n\n/**\n * Response body for POST /login request\n * @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login\n */\nexport interface LoginResponse {\n /**\n * An access token for the account.\n * This access token can then be used to authorize other requests.\n */\n access_token: string;\n /**\n * ID of the logged-in device.\n * Will be the same as the corresponding parameter in the request, if one was specified.\n */\n device_id: string;\n /**\n * The fully-qualified Matrix ID for the account.\n */\n user_id: string;\n /**\n * The lifetime of the access token, in milliseconds.\n * Once the access token has expired a new access token can be obtained by using the provided refresh token.\n * If no refresh token is provided, the client will need to re-log in to obtain a new access token.\n * If not given, the client can assume that the access token will not expire.\n */\n expires_in_ms?: number;\n /**\n * A refresh token for the account.\n * This token can be used to obtain a new access token when it expires by calling the /refresh endpoint.\n */\n refresh_token?: string;\n /**\n * Optional client configuration provided by the server.\n * If present, clients SHOULD use the provided object to reconfigure themselves, optionally validating the URLs within.\n * This object takes the same form as the one returned from .well-known autodiscovery.\n */\n well_known?: IClientWellKnown;\n /**\n * The server_name of the homeserver on which the account has been registered.\n * @deprecated Clients should extract the server_name from user_id (by splitting at the first colon) if they require it.\n */\n home_server?: string;\n}\n\n/**\n * The result of a successful `m.login.token` issuance request as per https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv1loginget_token\n */\nexport interface LoginTokenPostResponse {\n /**\n * The token to use with `m.login.token` to authenticate.\n */\n login_token: string;\n /**\n * Expiration in milliseconds.\n */\n expires_in_ms: number;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,QAAQ,uBAAuB;;AAGrD;AACA;;AAEA;AACA;AACA;;AAOA;;AAEA;AACA;AACA;;AAKA,OAAO,IAAMC,sBAAsB,GAAG,qBAAqB;AAC3D,OAAO,IAAMC,sCAAsC,GAAG,oCAAoC;AAC1F,OAAO,IAAMC,iCAAiC,GAAG,4BAA4B;AAgB7E,OAAO,IAAMC,gCAAgC,GAAG,IAAIJ,aAAa,CAC7D,uBAAuB,EACvB,iDACJ,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,IAAMK,4BAA4B,GAAGD,gCAAgC;;AAE5E;AACA;AACA;;AASA,WAAYE,qBAAqB,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA;AAgBjC,WAAYC,SAAS,0BAATA,SAAS;EACjB;EADQA,SAAS;EAIjB;EAJQA,SAAS;EAAA,OAATA,SAAS;AAAA;;AAQrB;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;;AAiDA;;AA6EA;AACA;AACA;AACA;;AAyCA;AACA;AACA","ignoreList":[]}
@@ -1,119 +1,119 @@
1
- /*
2
- Copyright 2022 The Matrix.org Foundation C.I.C.
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
1
+ /*
2
+ Copyright 2022 The Matrix.org Foundation C.I.C.
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
15
  */
16
16
 
17
17
  import { UnstableValue } from "../NamespacedValue.js";
18
- /**
19
- * Beacon info and beacon event types as described in MSC3672
20
- * https://github.com/matrix-org/matrix-spec-proposals/pull/3672
18
+ /**
19
+ * Beacon info and beacon event types as described in MSC3672
20
+ * https://github.com/matrix-org/matrix-spec-proposals/pull/3672
21
21
  */
22
22
 
23
- /**
24
- * Beacon info events are state events.
25
- * We have two requirements for these events:
26
- * 1. they can only be written by their owner
27
- * 2. a user can have an arbitrary number of beacon_info events
28
- *
29
- * 1. is achieved by setting the state_key to the owners mxid.
30
- * Event keys in room state are a combination of `type` + `state_key`.
31
- * To achieve an arbitrary number of only owner-writable state events
32
- * we introduce a variable suffix to the event type
33
- *
34
- * @example
35
- * ```
36
- * {
37
- * "type": "m.beacon_info.@matthew:matrix.org.1",
38
- * "state_key": "@matthew:matrix.org",
39
- * "content": {
40
- * "m.beacon_info": {
41
- * "description": "The Matthew Tracker",
42
- * "timeout": 86400000,
43
- * },
44
- * // more content as described below
45
- * }
46
- * },
47
- * {
48
- * "type": "m.beacon_info.@matthew:matrix.org.2",
49
- * "state_key": "@matthew:matrix.org",
50
- * "content": {
51
- * "m.beacon_info": {
52
- * "description": "Another different Matthew tracker",
53
- * "timeout": 400000,
54
- * },
55
- * // more content as described below
56
- * }
57
- * }
58
- * ```
23
+ /**
24
+ * Beacon info events are state events.
25
+ * We have two requirements for these events:
26
+ * 1. they can only be written by their owner
27
+ * 2. a user can have an arbitrary number of beacon_info events
28
+ *
29
+ * 1. is achieved by setting the state_key to the owners mxid.
30
+ * Event keys in room state are a combination of `type` + `state_key`.
31
+ * To achieve an arbitrary number of only owner-writable state events
32
+ * we introduce a variable suffix to the event type
33
+ *
34
+ * @example
35
+ * ```
36
+ * {
37
+ * "type": "m.beacon_info.@matthew:matrix.org.1",
38
+ * "state_key": "@matthew:matrix.org",
39
+ * "content": {
40
+ * "m.beacon_info": {
41
+ * "description": "The Matthew Tracker",
42
+ * "timeout": 86400000,
43
+ * },
44
+ * // more content as described below
45
+ * }
46
+ * },
47
+ * {
48
+ * "type": "m.beacon_info.@matthew:matrix.org.2",
49
+ * "state_key": "@matthew:matrix.org",
50
+ * "content": {
51
+ * "m.beacon_info": {
52
+ * "description": "Another different Matthew tracker",
53
+ * "timeout": 400000,
54
+ * },
55
+ * // more content as described below
56
+ * }
57
+ * }
58
+ * ```
59
59
  */
60
60
 
61
- /**
62
- * Non-variable type for m.beacon_info event content
61
+ /**
62
+ * Non-variable type for m.beacon_info event content
63
63
  */
64
64
  export var M_BEACON_INFO = new UnstableValue("m.beacon_info", "org.matrix.msc3672.beacon_info");
65
65
  export var M_BEACON = new UnstableValue("m.beacon", "org.matrix.msc3672.beacon");
66
66
 
67
- /**
68
- * m.beacon_info Event example from the spec
69
- * https://github.com/matrix-org/matrix-spec-proposals/pull/3672
70
- * @example
71
- * ```
72
- * {
73
- * "type": "m.beacon_info",
74
- * "state_key": "@matthew:matrix.org",
75
- * "content": {
76
- * "m.beacon_info": {
77
- * "description": "The Matthew Tracker", // same as an `m.location` description
78
- * "timeout": 86400000, // how long from the last event until we consider the beacon inactive in milliseconds
79
- * },
80
- * "m.ts": 1436829458432, // creation timestamp of the beacon on the client
81
- * "m.asset": {
82
- * "type": "m.self" // the type of asset being tracked as per MSC3488
83
- * }
84
- * }
85
- * }
86
- * ```
67
+ /**
68
+ * m.beacon_info Event example from the spec
69
+ * https://github.com/matrix-org/matrix-spec-proposals/pull/3672
70
+ * @example
71
+ * ```
72
+ * {
73
+ * "type": "m.beacon_info",
74
+ * "state_key": "@matthew:matrix.org",
75
+ * "content": {
76
+ * "m.beacon_info": {
77
+ * "description": "The Matthew Tracker", // same as an `m.location` description
78
+ * "timeout": 86400000, // how long from the last event until we consider the beacon inactive in milliseconds
79
+ * },
80
+ * "m.ts": 1436829458432, // creation timestamp of the beacon on the client
81
+ * "m.asset": {
82
+ * "type": "m.self" // the type of asset being tracked as per MSC3488
83
+ * }
84
+ * }
85
+ * }
86
+ * ```
87
87
  */
88
88
 
89
- /**
90
- * m.beacon_info.* event content
89
+ /**
90
+ * m.beacon_info.* event content
91
91
  */
92
92
 
93
- /**
94
- * m.beacon event example
95
- * https://github.com/matrix-org/matrix-spec-proposals/pull/3672
96
- * @example
97
- * ```
98
- * {
99
- * "type": "m.beacon",
100
- * "sender": "@matthew:matrix.org",
101
- * "content": {
102
- * "m.relates_to": { // from MSC2674: https://github.com/matrix-org/matrix-doc/pull/2674
103
- * "rel_type": "m.reference", // from MSC3267: https://github.com/matrix-org/matrix-doc/pull/3267
104
- * "event_id": "$beacon_info"
105
- * },
106
- * "m.location": {
107
- * "uri": "geo:51.5008,0.1247;u=35",
108
- * "description": "Arbitrary beacon information"
109
- * },
110
- * "m.ts": 1636829458432,
111
- * }
112
- * }
113
- * ```
93
+ /**
94
+ * m.beacon event example
95
+ * https://github.com/matrix-org/matrix-spec-proposals/pull/3672
96
+ * @example
97
+ * ```
98
+ * {
99
+ * "type": "m.beacon",
100
+ * "sender": "@matthew:matrix.org",
101
+ * "content": {
102
+ * "m.relates_to": { // from MSC2674: https://github.com/matrix-org/matrix-doc/pull/2674
103
+ * "rel_type": "m.reference", // from MSC3267: https://github.com/matrix-org/matrix-doc/pull/3267
104
+ * "event_id": "$beacon_info"
105
+ * },
106
+ * "m.location": {
107
+ * "uri": "geo:51.5008,0.1247;u=35",
108
+ * "description": "Arbitrary beacon information"
109
+ * },
110
+ * "m.ts": 1636829458432,
111
+ * }
112
+ * }
113
+ * ```
114
114
  */
115
115
 
116
- /**
117
- * Content of an m.beacon event
116
+ /**
117
+ * Content of an m.beacon event
118
118
  */
119
119
  //# sourceMappingURL=beacon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"beacon.js","names":["UnstableValue","M_BEACON_INFO","M_BEACON"],"sources":["../../src/@types/beacon.ts"],"sourcesContent":["/*\r\nCopyright 2022 The Matrix.org Foundation C.I.C.\r\n\r\nLicensed under the Apache License, Version 2.0 (the \"License\");\r\nyou may not use this file except in compliance with the License.\r\nYou may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing, software\r\ndistributed under the License is distributed on an \"AS IS\" BASIS,\r\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\nSee the License for the specific language governing permissions and\r\nlimitations under the License.\r\n*/\r\n\r\nimport { type RelatesToRelationship, type REFERENCE_RELATION } from \"./extensible_events.ts\";\r\nimport { UnstableValue } from \"../NamespacedValue.ts\";\r\nimport { type MAssetEvent, type MLocationEvent, type MTimestampEvent } from \"./location.ts\";\r\n\r\n/**\r\n * Beacon info and beacon event types as described in MSC3672\r\n * https://github.com/matrix-org/matrix-spec-proposals/pull/3672\r\n */\r\n\r\n/**\r\n * Beacon info events are state events.\r\n * We have two requirements for these events:\r\n * 1. they can only be written by their owner\r\n * 2. a user can have an arbitrary number of beacon_info events\r\n *\r\n * 1. is achieved by setting the state_key to the owners mxid.\r\n * Event keys in room state are a combination of `type` + `state_key`.\r\n * To achieve an arbitrary number of only owner-writable state events\r\n * we introduce a variable suffix to the event type\r\n *\r\n * @example\r\n * ```\r\n * {\r\n * \"type\": \"m.beacon_info.@matthew:matrix.org.1\",\r\n * \"state_key\": \"@matthew:matrix.org\",\r\n * \"content\": {\r\n * \"m.beacon_info\": {\r\n * \"description\": \"The Matthew Tracker\",\r\n * \"timeout\": 86400000,\r\n * },\r\n * // more content as described below\r\n * }\r\n * },\r\n * {\r\n * \"type\": \"m.beacon_info.@matthew:matrix.org.2\",\r\n * \"state_key\": \"@matthew:matrix.org\",\r\n * \"content\": {\r\n * \"m.beacon_info\": {\r\n * \"description\": \"Another different Matthew tracker\",\r\n * \"timeout\": 400000,\r\n * },\r\n * // more content as described below\r\n * }\r\n * }\r\n * ```\r\n */\r\n\r\n/**\r\n * Non-variable type for m.beacon_info event content\r\n */\r\nexport const M_BEACON_INFO = new UnstableValue(\"m.beacon_info\", \"org.matrix.msc3672.beacon_info\");\r\nexport const M_BEACON = new UnstableValue(\"m.beacon\", \"org.matrix.msc3672.beacon\");\r\n\r\nexport type MBeaconInfoContent = {\r\n description?: string;\r\n // how long from the last event until we consider the beacon inactive in milliseconds\r\n timeout: number;\r\n // true when this is a live location beacon\r\n // https://github.com/matrix-org/matrix-spec-proposals/pull/3672\r\n live?: boolean;\r\n};\r\n\r\n/**\r\n * m.beacon_info Event example from the spec\r\n * https://github.com/matrix-org/matrix-spec-proposals/pull/3672\r\n * @example\r\n * ```\r\n * {\r\n * \"type\": \"m.beacon_info\",\r\n * \"state_key\": \"@matthew:matrix.org\",\r\n * \"content\": {\r\n * \"m.beacon_info\": {\r\n * \"description\": \"The Matthew Tracker\", // same as an `m.location` description\r\n * \"timeout\": 86400000, // how long from the last event until we consider the beacon inactive in milliseconds\r\n * },\r\n * \"m.ts\": 1436829458432, // creation timestamp of the beacon on the client\r\n * \"m.asset\": {\r\n * \"type\": \"m.self\" // the type of asset being tracked as per MSC3488\r\n * }\r\n * }\r\n * }\r\n * ```\r\n */\r\n\r\n/**\r\n * m.beacon_info.* event content\r\n */\r\nexport type MBeaconInfoEventContent = MBeaconInfoContent &\r\n // creation timestamp of the beacon on the client\r\n MTimestampEvent &\r\n // the type of asset being tracked as per MSC3488\r\n MAssetEvent;\r\n\r\n/**\r\n * m.beacon event example\r\n * https://github.com/matrix-org/matrix-spec-proposals/pull/3672\r\n * @example\r\n * ```\r\n * {\r\n * \"type\": \"m.beacon\",\r\n * \"sender\": \"@matthew:matrix.org\",\r\n * \"content\": {\r\n * \"m.relates_to\": { // from MSC2674: https://github.com/matrix-org/matrix-doc/pull/2674\r\n * \"rel_type\": \"m.reference\", // from MSC3267: https://github.com/matrix-org/matrix-doc/pull/3267\r\n * \"event_id\": \"$beacon_info\"\r\n * },\r\n * \"m.location\": {\r\n * \"uri\": \"geo:51.5008,0.1247;u=35\",\r\n * \"description\": \"Arbitrary beacon information\"\r\n * },\r\n * \"m.ts\": 1636829458432,\r\n * }\r\n * }\r\n * ```\r\n */\r\n\r\n/**\r\n * Content of an m.beacon event\r\n */\r\nexport type MBeaconEventContent = MLocationEvent &\r\n // timestamp when location was taken\r\n MTimestampEvent &\r\n // relates to a beacon_info event\r\n RelatesToRelationship<typeof REFERENCE_RELATION>;\r\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,aAAa,QAAQ,uBAAuB;AAGrD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO,IAAMC,aAAa,GAAG,IAAID,aAAa,CAAC,eAAe,EAAE,gCAAgC,CAAC;AACjG,OAAO,IAAME,QAAQ,GAAG,IAAIF,aAAa,CAAC,UAAU,EAAE,2BAA2B,CAAC;;AAWlF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"file":"beacon.js","names":["UnstableValue","M_BEACON_INFO","M_BEACON"],"sources":["../../src/@types/beacon.ts"],"sourcesContent":["/*\nCopyright 2022 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { type RelatesToRelationship, type REFERENCE_RELATION } from \"./extensible_events.ts\";\nimport { UnstableValue } from \"../NamespacedValue.ts\";\nimport { type MAssetEvent, type MLocationEvent, type MTimestampEvent } from \"./location.ts\";\n\n/**\n * Beacon info and beacon event types as described in MSC3672\n * https://github.com/matrix-org/matrix-spec-proposals/pull/3672\n */\n\n/**\n * Beacon info events are state events.\n * We have two requirements for these events:\n * 1. they can only be written by their owner\n * 2. a user can have an arbitrary number of beacon_info events\n *\n * 1. is achieved by setting the state_key to the owners mxid.\n * Event keys in room state are a combination of `type` + `state_key`.\n * To achieve an arbitrary number of only owner-writable state events\n * we introduce a variable suffix to the event type\n *\n * @example\n * ```\n * {\n * \"type\": \"m.beacon_info.@matthew:matrix.org.1\",\n * \"state_key\": \"@matthew:matrix.org\",\n * \"content\": {\n * \"m.beacon_info\": {\n * \"description\": \"The Matthew Tracker\",\n * \"timeout\": 86400000,\n * },\n * // more content as described below\n * }\n * },\n * {\n * \"type\": \"m.beacon_info.@matthew:matrix.org.2\",\n * \"state_key\": \"@matthew:matrix.org\",\n * \"content\": {\n * \"m.beacon_info\": {\n * \"description\": \"Another different Matthew tracker\",\n * \"timeout\": 400000,\n * },\n * // more content as described below\n * }\n * }\n * ```\n */\n\n/**\n * Non-variable type for m.beacon_info event content\n */\nexport const M_BEACON_INFO = new UnstableValue(\"m.beacon_info\", \"org.matrix.msc3672.beacon_info\");\nexport const M_BEACON = new UnstableValue(\"m.beacon\", \"org.matrix.msc3672.beacon\");\n\nexport type MBeaconInfoContent = {\n description?: string;\n // how long from the last event until we consider the beacon inactive in milliseconds\n timeout: number;\n // true when this is a live location beacon\n // https://github.com/matrix-org/matrix-spec-proposals/pull/3672\n live?: boolean;\n};\n\n/**\n * m.beacon_info Event example from the spec\n * https://github.com/matrix-org/matrix-spec-proposals/pull/3672\n * @example\n * ```\n * {\n * \"type\": \"m.beacon_info\",\n * \"state_key\": \"@matthew:matrix.org\",\n * \"content\": {\n * \"m.beacon_info\": {\n * \"description\": \"The Matthew Tracker\", // same as an `m.location` description\n * \"timeout\": 86400000, // how long from the last event until we consider the beacon inactive in milliseconds\n * },\n * \"m.ts\": 1436829458432, // creation timestamp of the beacon on the client\n * \"m.asset\": {\n * \"type\": \"m.self\" // the type of asset being tracked as per MSC3488\n * }\n * }\n * }\n * ```\n */\n\n/**\n * m.beacon_info.* event content\n */\nexport type MBeaconInfoEventContent = MBeaconInfoContent &\n // creation timestamp of the beacon on the client\n MTimestampEvent &\n // the type of asset being tracked as per MSC3488\n MAssetEvent;\n\n/**\n * m.beacon event example\n * https://github.com/matrix-org/matrix-spec-proposals/pull/3672\n * @example\n * ```\n * {\n * \"type\": \"m.beacon\",\n * \"sender\": \"@matthew:matrix.org\",\n * \"content\": {\n * \"m.relates_to\": { // from MSC2674: https://github.com/matrix-org/matrix-doc/pull/2674\n * \"rel_type\": \"m.reference\", // from MSC3267: https://github.com/matrix-org/matrix-doc/pull/3267\n * \"event_id\": \"$beacon_info\"\n * },\n * \"m.location\": {\n * \"uri\": \"geo:51.5008,0.1247;u=35\",\n * \"description\": \"Arbitrary beacon information\"\n * },\n * \"m.ts\": 1636829458432,\n * }\n * }\n * ```\n */\n\n/**\n * Content of an m.beacon event\n */\nexport type MBeaconEventContent = MLocationEvent &\n // timestamp when location was taken\n MTimestampEvent &\n // relates to a beacon_info event\n RelatesToRelationship<typeof REFERENCE_RELATION>;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,aAAa,QAAQ,uBAAuB;AAGrD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO,IAAMC,aAAa,GAAG,IAAID,aAAa,CAAC,eAAe,EAAE,gCAAgC,CAAC;AACjG,OAAO,IAAME,QAAQ,GAAG,IAAIF,aAAa,CAAC,UAAU,EAAE,2BAA2B,CAAC;;AAWlF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","names":[],"sources":["../../src/@types/common.ts"],"sourcesContent":["/*\r\nCopyright 2024 The Matrix.org Foundation C.I.C.\r\n\r\nLicensed under the Apache License, Version 2.0 (the \"License\");\r\nyou may not use this file except in compliance with the License.\r\nYou may obtain a copy of the License at\r\n\r\nhttp://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing, software\r\ndistributed under the License is distributed on an \"AS IS\" BASIS,\r\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\nSee the License for the specific language governing permissions and\r\nlimitations under the License.\r\n*/\r\n\r\nexport type NonEmptyArray<T> = [T, ...T[]];\r\n\r\n// Based on https://stackoverflow.com/a/53229857/3532235\r\nexport type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };\r\nexport type XOR<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;\r\nexport type Writeable<T> = { -readonly [P in keyof T]: T[P] };\r\n\r\nexport type EmptyObject = Record<PropertyKey, never>;\r\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"common.js","names":[],"sources":["../../src/@types/common.ts"],"sourcesContent":["/*\nCopyright 2024 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nexport type NonEmptyArray<T> = [T, ...T[]];\n\n// Based on https://stackoverflow.com/a/53229857/3532235\nexport type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };\nexport type XOR<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;\nexport type Writeable<T> = { -readonly [P in keyof T]: T[P] };\n\nexport type EmptyObject = Record<PropertyKey, never>;\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"crypto.js","names":[],"sources":["../../src/@types/crypto.ts"],"sourcesContent":["/*\r\nCopyright 2022-2023 The Matrix.org Foundation C.I.C.\r\n\r\nLicensed under the Apache License, Version 2.0 (the \"License\");\r\nyou may not use this file except in compliance with the License.\r\nYou may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing, software\r\ndistributed under the License is distributed on an \"AS IS\" BASIS,\r\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\nSee the License for the specific language governing permissions and\r\nlimitations under the License.\r\n*/\r\n\r\nimport type { ISignatures } from \"./signed.ts\";\r\nimport type { EventDecryptionResult } from \"../common-crypto/CryptoBackend.ts\";\r\n\r\n// Backwards compatible re-export\r\n/** @deprecated This is an internal type and should not be used. */\r\ntype IEventDecryptionResult = EventDecryptionResult;\r\nexport type { IEventDecryptionResult };\r\n\r\ninterface Extensible {\r\n [key: string]: any;\r\n}\r\n\r\n/* eslint-disable camelcase */\r\n\r\n/** The result of a call to {@link crypto-api!CryptoApi.exportRoomKeys} */\r\nexport interface IMegolmSessionData extends Extensible {\r\n /** Sender's Curve25519 device key */\r\n sender_key: string;\r\n /** Devices which forwarded this session to us (normally empty). */\r\n forwarding_curve25519_key_chain: string[];\r\n /** Other keys the sender claims. */\r\n sender_claimed_keys: Record<string, string>;\r\n /** Room this session is used in */\r\n room_id: string;\r\n /** Unique id for the session */\r\n session_id: string;\r\n /** Base64'ed key data */\r\n session_key: string;\r\n algorithm?: string;\r\n untrusted?: boolean;\r\n}\r\n\r\n/* eslint-enable camelcase */\r\n\r\n/** the type of the `device_keys` parameter on `/_matrix/client/v3/keys/upload`\r\n *\r\n * @see https://spec.matrix.org/v1.5/client-server-api/#post_matrixclientv3keysupload\r\n */\r\nexport interface IDeviceKeys {\r\n algorithms: Array<string>;\r\n device_id: string; // eslint-disable-line camelcase\r\n user_id: string; // eslint-disable-line camelcase\r\n keys: Record<string, string>;\r\n signatures?: ISignatures;\r\n}\r\n\r\n/** the type of the `one_time_keys` and `fallback_keys` parameters on `/_matrix/client/v3/keys/upload`\r\n *\r\n * @see https://spec.matrix.org/v1.5/client-server-api/#post_matrixclientv3keysupload\r\n */\r\nexport interface IOneTimeKey {\r\n key: string;\r\n fallback?: boolean;\r\n signatures?: ISignatures;\r\n}\r\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"crypto.js","names":[],"sources":["../../src/@types/crypto.ts"],"sourcesContent":["/*\nCopyright 2022-2023 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport type { ISignatures } from \"./signed.ts\";\nimport type { EventDecryptionResult } from \"../common-crypto/CryptoBackend.ts\";\n\n// Backwards compatible re-export\n/** @deprecated This is an internal type and should not be used. */\ntype IEventDecryptionResult = EventDecryptionResult;\nexport type { IEventDecryptionResult };\n\ninterface Extensible {\n [key: string]: any;\n}\n\n/* eslint-disable camelcase */\n\n/** The result of a call to {@link crypto-api!CryptoApi.exportRoomKeys} */\nexport interface IMegolmSessionData extends Extensible {\n /** Sender's Curve25519 device key */\n sender_key: string;\n /** Devices which forwarded this session to us (normally empty). */\n forwarding_curve25519_key_chain: string[];\n /** Other keys the sender claims. */\n sender_claimed_keys: Record<string, string>;\n /** Room this session is used in */\n room_id: string;\n /** Unique id for the session */\n session_id: string;\n /** Base64'ed key data */\n session_key: string;\n algorithm?: string;\n untrusted?: boolean;\n}\n\n/* eslint-enable camelcase */\n\n/** the type of the `device_keys` parameter on `/_matrix/client/v3/keys/upload`\n *\n * @see https://spec.matrix.org/v1.5/client-server-api/#post_matrixclientv3keysupload\n */\nexport interface IDeviceKeys {\n algorithms: Array<string>;\n device_id: string; // eslint-disable-line camelcase\n user_id: string; // eslint-disable-line camelcase\n keys: Record<string, string>;\n signatures?: ISignatures;\n}\n\n/** the type of the `one_time_keys` and `fallback_keys` parameters on `/_matrix/client/v3/keys/upload`\n *\n * @see https://spec.matrix.org/v1.5/client-server-api/#post_matrixclientv3keysupload\n */\nexport interface IOneTimeKey {\n key: string;\n fallback?: boolean;\n signatures?: ISignatures;\n}\n"],"mappings":"","ignoreList":[]}