@textrp/briij-js-sdk 41.0.1 → 42.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 (375) hide show
  1. package/CHANGELOG.md +14 -1
  2. package/LICENSE +177 -177
  3. package/README.md +14 -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 +19 -1
  10. package/lib/@types/auth.d.ts.map +1 -1
  11. package/lib/@types/auth.js +55 -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 +27 -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 +3 -0
  58. package/lib/briij.d.ts.map +1 -1
  59. package/lib/briij.js +3 -0
  60. package/lib/briij.js.map +1 -1
  61. package/lib/client.d.ts +18 -1
  62. package/lib/client.d.ts.map +1 -1
  63. package/lib/client.js +166 -103
  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/webrtc/audioContext.js +24 -24
  202. package/lib/webrtc/audioContext.js.map +1 -1
  203. package/lib/webrtc/callEventTypes.js.map +1 -1
  204. package/lib/webrtc/stats/callFeedStatsReporter.js +14 -14
  205. package/lib/webrtc/stats/callFeedStatsReporter.js.map +1 -1
  206. package/lib/webrtc/stats/callStatsReportGatherer.js +14 -14
  207. package/lib/webrtc/stats/callStatsReportGatherer.js.map +1 -1
  208. package/lib/webrtc/stats/callStatsReportSummary.js.map +1 -1
  209. package/lib/webrtc/stats/connectionStats.js +14 -14
  210. package/lib/webrtc/stats/connectionStats.js.map +1 -1
  211. package/lib/webrtc/stats/connectionStatsBuilder.js +14 -14
  212. package/lib/webrtc/stats/connectionStatsBuilder.js.map +1 -1
  213. package/lib/webrtc/stats/connectionStatsReportBuilder.js +14 -14
  214. package/lib/webrtc/stats/connectionStatsReportBuilder.js.map +1 -1
  215. package/lib/webrtc/stats/groupCallStats.js +14 -14
  216. package/lib/webrtc/stats/groupCallStats.js.map +1 -1
  217. package/lib/webrtc/stats/media/mediaSsrcHandler.js +14 -14
  218. package/lib/webrtc/stats/media/mediaSsrcHandler.js.map +1 -1
  219. package/lib/webrtc/stats/media/mediaTrackHandler.js +14 -14
  220. package/lib/webrtc/stats/media/mediaTrackHandler.js.map +1 -1
  221. package/lib/webrtc/stats/media/mediaTrackStats.js +27 -27
  222. package/lib/webrtc/stats/media/mediaTrackStats.js.map +1 -1
  223. package/lib/webrtc/stats/media/mediaTrackStatsHandler.js +20 -20
  224. package/lib/webrtc/stats/media/mediaTrackStatsHandler.js.map +1 -1
  225. package/lib/webrtc/stats/statsReport.js +14 -14
  226. package/lib/webrtc/stats/statsReport.js.map +1 -1
  227. package/lib/webrtc/stats/statsReportEmitter.js +14 -14
  228. package/lib/webrtc/stats/statsReportEmitter.js.map +1 -1
  229. package/lib/webrtc/stats/trackStatsBuilder.js +4 -4
  230. package/lib/webrtc/stats/trackStatsBuilder.js.map +1 -1
  231. package/lib/webrtc/stats/transportStats.js.map +1 -1
  232. package/lib/webrtc/stats/transportStatsBuilder.js.map +1 -1
  233. package/lib/webrtc/stats/valueFormatter.js +11 -11
  234. package/lib/webrtc/stats/valueFormatter.js.map +1 -1
  235. package/lib/xrpl/identity.d.ts +28 -0
  236. package/lib/xrpl/identity.d.ts.map +1 -0
  237. package/lib/xrpl/identity.js +213 -0
  238. package/lib/xrpl/identity.js.map +1 -0
  239. package/lib/xrpl/trust.d.ts +8 -0
  240. package/lib/xrpl/trust.d.ts.map +1 -0
  241. package/lib/xrpl/trust.js +61 -0
  242. package/lib/xrpl/trust.js.map +1 -0
  243. package/lib/xrpl/verification.d.ts +26 -0
  244. package/lib/xrpl/verification.d.ts.map +1 -0
  245. package/lib/xrpl/verification.js +295 -0
  246. package/lib/xrpl/verification.js.map +1 -0
  247. package/package.json +128 -129
  248. package/src/@types/AESEncryptedSecretStoragePayload.ts +29 -29
  249. package/src/@types/IIdentityServerProvider.ts +24 -24
  250. package/src/@types/PushRules.ts +208 -208
  251. package/src/@types/another-json.d.ts +19 -19
  252. package/src/@types/auth.ts +280 -258
  253. package/src/@types/beacon.ts +140 -140
  254. package/src/@types/common.ts +24 -24
  255. package/src/@types/crypto.ts +71 -71
  256. package/src/@types/event.ts +476 -449
  257. package/src/@types/events.ts +119 -119
  258. package/src/@types/extensible_events.ts +147 -147
  259. package/src/@types/local_notifications.ts +19 -19
  260. package/src/@types/location.ts +92 -92
  261. package/src/@types/matrix-sdk-crypto-wasm.d.ts +39 -39
  262. package/src/@types/media.ts +245 -245
  263. package/src/@types/membership.ts +57 -57
  264. package/src/@types/partials.ts +103 -103
  265. package/src/@types/polls.ts +120 -120
  266. package/src/@types/read_receipts.ts +61 -61
  267. package/src/@types/registration.ts +102 -102
  268. package/src/@types/search.ts +119 -119
  269. package/src/@types/signed.ts +25 -25
  270. package/src/@types/spaces.ts +37 -37
  271. package/src/@types/state_events.ts +153 -153
  272. package/src/@types/synapse.ts +40 -40
  273. package/src/@types/sync.ts +27 -27
  274. package/src/@types/threepids.ts +29 -29
  275. package/src/@types/topic.ts +69 -69
  276. package/src/@types/uia.ts +24 -24
  277. package/src/NamespacedValue.ts +121 -121
  278. package/src/ReEmitter.ts +93 -93
  279. package/src/base64.ts +86 -86
  280. package/src/briij.ts +3 -0
  281. package/src/client.ts +90 -10
  282. package/src/common-crypto/README.md +4 -4
  283. package/src/common-crypto/key-passphrase.ts +43 -43
  284. package/src/content-helpers.ts +298 -298
  285. package/src/content-repo.ts +122 -122
  286. package/src/crypto/store/base.ts +388 -388
  287. package/src/crypto/store/indexeddb-crypto-store-backend.ts +655 -655
  288. package/src/crypto/store/indexeddb-crypto-store.ts +555 -555
  289. package/src/crypto/store/localStorage-crypto-store.ts +409 -409
  290. package/src/crypto/store/memory-crypto-store.ts +326 -326
  291. package/src/crypto-api/CryptoEventHandlerMap.ts +42 -42
  292. package/src/crypto-api/key-passphrase.ts +58 -58
  293. package/src/crypto-api/keybackup.ts +114 -114
  294. package/src/crypto-api/recovery-key.ts +69 -69
  295. package/src/digest.ts +34 -34
  296. package/src/extensible_events_v1/ExtensibleEvent.ts +58 -58
  297. package/src/extensible_events_v1/InvalidEventError.ts +24 -24
  298. package/src/extensible_events_v1/MessageEvent.ts +143 -143
  299. package/src/extensible_events_v1/PollEndEvent.ts +97 -97
  300. package/src/extensible_events_v1/PollResponseEvent.ts +148 -148
  301. package/src/extensible_events_v1/PollStartEvent.ts +207 -207
  302. package/src/extensible_events_v1/utilities.ts +35 -35
  303. package/src/feature.ts +88 -88
  304. package/src/http-api/method.ts +25 -25
  305. package/src/http-api/prefix.ts +48 -48
  306. package/src/indexeddb-helpers.ts +50 -50
  307. package/src/indexeddb-worker.ts +24 -24
  308. package/src/matrixrtc/IKeyTransport.ts +63 -63
  309. package/src/matrixrtc/IMembershipManager.ts +120 -120
  310. package/src/matrixrtc/LivekitTransport.ts +46 -46
  311. package/src/matrixrtc/index.ts +24 -24
  312. package/src/matrixrtc/utils.ts +71 -71
  313. package/src/models/ToDeviceMessage.ts +38 -38
  314. package/src/models/device.ts +85 -85
  315. package/src/models/event-status.ts +39 -39
  316. package/src/models/invites-ignorer-types.ts +58 -58
  317. package/src/models/profile-keys.ts +33 -33
  318. package/src/models/room-summary.ts +78 -78
  319. package/src/models/search-result.ts +57 -57
  320. package/src/models/typed-event-emitter.ts +246 -246
  321. package/src/oidc/authorize.ts +279 -279
  322. package/src/oidc/error.ts +33 -33
  323. package/src/oidc/index.ts +33 -33
  324. package/src/oidc/register.ts +163 -163
  325. package/src/oidc/tokenRefresher.ts +184 -184
  326. package/src/oidc/validate.ts +265 -265
  327. package/src/randomstring.ts +103 -103
  328. package/src/realtime-callbacks.ts +191 -191
  329. package/src/receipt-accumulator.ts +189 -189
  330. package/src/rendezvous/RendezvousChannel.ts +48 -48
  331. package/src/rendezvous/RendezvousCode.ts +25 -25
  332. package/src/rendezvous/RendezvousError.ts +26 -26
  333. package/src/rendezvous/RendezvousFailureReason.ts +49 -49
  334. package/src/rendezvous/RendezvousIntent.ts +20 -20
  335. package/src/rendezvous/RendezvousTransport.ts +58 -58
  336. package/src/rendezvous/channels/MSC4108SecureChannel.ts +270 -270
  337. package/src/rendezvous/channels/index.ts +17 -17
  338. package/src/rendezvous/index.ts +25 -25
  339. package/src/rendezvous/transports/index.ts +17 -17
  340. package/src/rust-crypto/CrossSigningIdentity.ts +195 -195
  341. package/src/rust-crypto/OutgoingRequestsManager.ts +170 -170
  342. package/src/rust-crypto/device-converter.ts +128 -128
  343. package/src/rust-crypto/secret-storage.ts +60 -60
  344. package/src/service-types.ts +20 -20
  345. package/src/store/local-storage-events-emitter.ts +46 -46
  346. package/src/sync-accumulator.ts +779 -779
  347. package/src/thread-utils.ts +31 -31
  348. package/src/types.ts +59 -59
  349. package/src/utils/decryptAESSecretStorageItem.ts +54 -54
  350. package/src/utils/encryptAESSecretStorageItem.ts +73 -73
  351. package/src/utils/internal/deriveKeys.ts +63 -63
  352. package/src/utils/roomVersion.ts +35 -35
  353. package/src/version-support.ts +50 -50
  354. package/src/webrtc/audioContext.ts +44 -44
  355. package/src/webrtc/callEventTypes.ts +101 -101
  356. package/src/webrtc/stats/callFeedStatsReporter.ts +91 -91
  357. package/src/webrtc/stats/callStatsReportGatherer.ts +219 -219
  358. package/src/webrtc/stats/callStatsReportSummary.ts +30 -30
  359. package/src/webrtc/stats/connectionStats.ts +47 -47
  360. package/src/webrtc/stats/connectionStatsBuilder.ts +28 -28
  361. package/src/webrtc/stats/connectionStatsReportBuilder.ts +140 -140
  362. package/src/webrtc/stats/groupCallStats.ts +93 -93
  363. package/src/webrtc/stats/media/mediaSsrcHandler.ts +57 -57
  364. package/src/webrtc/stats/media/mediaTrackHandler.ts +70 -70
  365. package/src/webrtc/stats/media/mediaTrackStats.ts +176 -176
  366. package/src/webrtc/stats/media/mediaTrackStatsHandler.ts +90 -90
  367. package/src/webrtc/stats/statsReport.ts +133 -133
  368. package/src/webrtc/stats/statsReportEmitter.ts +49 -49
  369. package/src/webrtc/stats/trackStatsBuilder.ts +207 -207
  370. package/src/webrtc/stats/transportStats.ts +26 -26
  371. package/src/webrtc/stats/transportStatsBuilder.ts +48 -48
  372. package/src/webrtc/stats/valueFormatter.ts +27 -27
  373. package/src/xrpl/identity.ts +245 -0
  374. package/src/xrpl/trust.ts +64 -0
  375. package/src/xrpl/verification.ts +284 -0
package/CHANGELOG.md CHANGED
@@ -1,7 +1,20 @@
1
- Changes in [41.0.1] (Unreleased - Briij JavaScript SDK)
1
+ Changes in [42.0.0] (Unreleased - Briij JavaScript SDK)
2
2
  ==================================================================================================
3
3
  ## BREAKING CHANGES
4
4
 
5
+ ---
6
+ Changes in [42.0.0]
7
+ * **Xrpl/Xahau Auth**:
8
+ * Added initial support for Xrpl/Xahau authentication, including API entry points and data structures. Further enhancements and stability improvements are expected.
9
+ * Migrated all documentation, file structures, and references from `Matrix` to `Briij` throughout the codebase.
10
+ * Updated package metadata: package is now called `briij-js-sdk`, primary entry point and typings renamed accordingly.
11
+ * Updated all relevant public APIs, internal references, and tests to use the new `Briij` naming convention.
12
+ * Fixed inconsistencies in naming after rebrand.
13
+ * Cleaned up legacy references, deprecated documentation, and clarified guides for SDK consumers.
14
+ * No additional feature changes introduced post-rebrand except for initial Xrpl/Xahau Auth support.
15
+
16
+ ---
17
+ Changes in [41.0.1]
5
18
  * **Rebrand**: This package has been rebranded from Matrix JavaScript SDK to Briij JavaScript SDK. All public API types and symbols have been renamed from `Matrix*` to `Briij*` (e.g. `MatrixClient` -> `BriijClient`, `MatrixEvent` -> `BriijEvent`, `createNewMatrixCall` -> `createNewBriijCall`). The main entry module is now `briij.ts` (default export `briij`). Package name is `briij-js-sdk`. Existing code must update imports and type names accordingly.
6
19
 
7
20
  ---
package/LICENSE CHANGED
@@ -1,177 +1,177 @@
1
-
2
- Apache License
3
- Version 2.0, January 2004
4
- http://www.apache.org/licenses/
5
-
6
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
-
8
- 1. Definitions.
9
-
10
- "License" shall mean the terms and conditions for use, reproduction,
11
- and distribution as defined by Sections 1 through 9 of this document.
12
-
13
- "Licensor" shall mean the copyright owner or entity authorized by
14
- the copyright owner that is granting the License.
15
-
16
- "Legal Entity" shall mean the union of the acting entity and all
17
- other entities that control, are controlled by, or are under common
18
- control with that entity. For the purposes of this definition,
19
- "control" means (i) the power, direct or indirect, to cause the
20
- direction or management of such entity, whether by contract or
21
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
- outstanding shares, or (iii) beneficial ownership of such entity.
23
-
24
- "You" (or "Your") shall mean an individual or Legal Entity
25
- exercising permissions granted by this License.
26
-
27
- "Source" form shall mean the preferred form for making modifications,
28
- including but not limited to software source code, documentation
29
- source, and configuration files.
30
-
31
- "Object" form shall mean any form resulting from mechanical
32
- transformation or translation of a Source form, including but
33
- not limited to compiled object code, generated documentation,
34
- and conversions to other media types.
35
-
36
- "Work" shall mean the work of authorship, whether in Source or
37
- Object form, made available under the License, as indicated by a
38
- copyright notice that is included in or attached to the work
39
- (an example is provided in the Appendix below).
40
-
41
- "Derivative Works" shall mean any work, whether in Source or Object
42
- form, that is based on (or derived from) the Work and for which the
43
- editorial revisions, annotations, elaborations, or other modifications
44
- represent, as a whole, an original work of authorship. For the purposes
45
- of this License, Derivative Works shall not include works that remain
46
- separable from, or merely link (or bind by name) to the interfaces of,
47
- the Work and Derivative Works thereof.
48
-
49
- "Contribution" shall mean any work of authorship, including
50
- the original version of the Work and any modifications or additions
51
- to that Work or Derivative Works thereof, that is intentionally
52
- submitted to Licensor for inclusion in the Work by the copyright owner
53
- or by an individual or Legal Entity authorized to submit on behalf of
54
- the copyright owner. For the purposes of this definition, "submitted"
55
- means any form of electronic, verbal, or written communication sent
56
- to the Licensor or its representatives, including but not limited to
57
- communication on electronic mailing lists, source code control systems,
58
- and issue tracking systems that are managed by, or on behalf of, the
59
- Licensor for the purpose of discussing and improving the Work, but
60
- excluding communication that is conspicuously marked or otherwise
61
- designated in writing by the copyright owner as "Not a Contribution."
62
-
63
- "Contributor" shall mean Licensor and any individual or Legal Entity
64
- on behalf of whom a Contribution has been received by Licensor and
65
- subsequently incorporated within the Work.
66
-
67
- 2. Grant of Copyright License. Subject to the terms and conditions of
68
- this License, each Contributor hereby grants to You a perpetual,
69
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
- copyright license to reproduce, prepare Derivative Works of,
71
- publicly display, publicly perform, sublicense, and distribute the
72
- Work and such Derivative Works in Source or Object form.
73
-
74
- 3. Grant of Patent License. Subject to the terms and conditions of
75
- this License, each Contributor hereby grants to You a perpetual,
76
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
- (except as stated in this section) patent license to make, have made,
78
- use, offer to sell, sell, import, and otherwise transfer the Work,
79
- where such license applies only to those patent claims licensable
80
- by such Contributor that are necessarily infringed by their
81
- Contribution(s) alone or by combination of their Contribution(s)
82
- with the Work to which such Contribution(s) was submitted. If You
83
- institute patent litigation against any entity (including a
84
- cross-claim or counterclaim in a lawsuit) alleging that the Work
85
- or a Contribution incorporated within the Work constitutes direct
86
- or contributory patent infringement, then any patent licenses
87
- granted to You under this License for that Work shall terminate
88
- as of the date such litigation is filed.
89
-
90
- 4. Redistribution. You may reproduce and distribute copies of the
91
- Work or Derivative Works thereof in any medium, with or without
92
- modifications, and in Source or Object form, provided that You
93
- meet the following conditions:
94
-
95
- (a) You must give any other recipients of the Work or
96
- Derivative Works a copy of this License; and
97
-
98
- (b) You must cause any modified files to carry prominent notices
99
- stating that You changed the files; and
100
-
101
- (c) You must retain, in the Source form of any Derivative Works
102
- that You distribute, all copyright, patent, trademark, and
103
- attribution notices from the Source form of the Work,
104
- excluding those notices that do not pertain to any part of
105
- the Derivative Works; and
106
-
107
- (d) If the Work includes a "NOTICE" text file as part of its
108
- distribution, then any Derivative Works that You distribute must
109
- include a readable copy of the attribution notices contained
110
- within such NOTICE file, excluding those notices that do not
111
- pertain to any part of the Derivative Works, in at least one
112
- of the following places: within a NOTICE text file distributed
113
- as part of the Derivative Works; within the Source form or
114
- documentation, if provided along with the Derivative Works; or,
115
- within a display generated by the Derivative Works, if and
116
- wherever such third-party notices normally appear. The contents
117
- of the NOTICE file are for informational purposes only and
118
- do not modify the License. You may add Your own attribution
119
- notices within Derivative Works that You distribute, alongside
120
- or as an addendum to the NOTICE text from the Work, provided
121
- that such additional attribution notices cannot be construed
122
- as modifying the License.
123
-
124
- You may add Your own copyright statement to Your modifications and
125
- may provide additional or different license terms and conditions
126
- for use, reproduction, or distribution of Your modifications, or
127
- for any such Derivative Works as a whole, provided Your use,
128
- reproduction, and distribution of the Work otherwise complies with
129
- the conditions stated in this License.
130
-
131
- 5. Submission of Contributions. Unless You explicitly state otherwise,
132
- any Contribution intentionally submitted for inclusion in the Work
133
- by You to the Licensor shall be under the terms and conditions of
134
- this License, without any additional terms or conditions.
135
- Notwithstanding the above, nothing herein shall supersede or modify
136
- the terms of any separate license agreement you may have executed
137
- with Licensor regarding such Contributions.
138
-
139
- 6. Trademarks. This License does not grant permission to use the trade
140
- names, trademarks, service marks, or product names of the Licensor,
141
- except as required for reasonable and customary use in describing the
142
- origin of the Work and reproducing the content of the NOTICE file.
143
-
144
- 7. Disclaimer of Warranty. Unless required by applicable law or
145
- agreed to in writing, Licensor provides the Work (and each
146
- Contributor provides its Contributions) on an "AS IS" BASIS,
147
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
- implied, including, without limitation, any warranties or conditions
149
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
- PARTICULAR PURPOSE. You are solely responsible for determining the
151
- appropriateness of using or redistributing the Work and assume any
152
- risks associated with Your exercise of permissions under this License.
153
-
154
- 8. Limitation of Liability. In no event and under no legal theory,
155
- whether in tort (including negligence), contract, or otherwise,
156
- unless required by applicable law (such as deliberate and grossly
157
- negligent acts) or agreed to in writing, shall any Contributor be
158
- liable to You for damages, including any direct, indirect, special,
159
- incidental, or consequential damages of any character arising as a
160
- result of this License or out of the use or inability to use the
161
- Work (including but not limited to damages for loss of goodwill,
162
- work stoppage, computer failure or malfunction, or any and all
163
- other commercial damages or losses), even if such Contributor
164
- has been advised of the possibility of such damages.
165
-
166
- 9. Accepting Warranty or Additional Liability. While redistributing
167
- the Work or Derivative Works thereof, You may choose to offer,
168
- and charge a fee for, acceptance of support, warranty, indemnity,
169
- or other liability obligations and/or rights consistent with this
170
- License. However, in accepting such obligations, You may act only
171
- on Your own behalf and on Your sole responsibility, not on behalf
172
- of any other Contributor, and only if You agree to indemnify,
173
- defend, and hold each Contributor harmless for any liability
174
- incurred by, or claims asserted against, such Contributor by reason
175
- of your accepting any such warranty or additional liability.
176
-
177
- END OF TERMS AND CONDITIONS
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
package/README.md CHANGED
@@ -99,6 +99,17 @@ Object.keys(client.store.rooms).forEach((roomId) => {
99
99
  });
100
100
  ```
101
101
 
102
+ ## XRPL NFT trust verification
103
+
104
+ `requestVerification(targetXrplAddress)` and `acceptVerification(issuerXrplAddress)` keep the same signatures, but now use mutable identity-NFT metadata (URI JSON `verifiers`) instead of XRPL Credential objects.
105
+
106
+ For `acceptVerification()`, configure either:
107
+
108
+ - `pinJsonToIpfs(payload)` callback, or
109
+ - `pinataJwt` to use Pinata's `pinJSONToIPFS` API.
110
+
111
+ The SDK signs `NFTokenModify` via Xaman and emits Matrix verification events with the resulting transaction hash.
112
+
102
113
  ## Authenticated media
103
114
 
104
115
  Servers supporting [MSC3916](https://github.com/matrix-org/matrix-spec-proposals/pull/3916) (spec 1.11) will require clients, like
@@ -191,11 +202,11 @@ client.startClient();
191
202
 
192
203
  As well as the primary entry point (`@textrp/briij-js-sdk`), there are several other entry points which may be useful:
193
204
 
194
- | Entry point | Description |
195
- | ------------------------------ | --------------------------------------------------------------------------------------------------- |
205
+ | Entry point | Description |
206
+ | ------------------------------------- | --------------------------------------------------------------------------------------------------- |
196
207
  | `@textrp/briij-js-sdk` | Primary entry point. High-level functionality, and lots of historical clutter in need of a cleanup. |
197
208
  | `@textrp/briij-js-sdk/lib/crypto-api` | Cryptography functionality. |
198
- | `@textrp/briij-js-sdk/lib/types` | Low-level types, reflecting data structures defined in the client-server spec. |
209
+ | `@textrp/briij-js-sdk/lib/types` | Low-level types, reflecting data structures defined in the client-server spec. |
199
210
  | `@textrp/briij-js-sdk/lib/testing` | Test utilities, which may be useful in test code but should not be used in production code. |
200
211
  | `@textrp/briij-js-sdk/lib/utils/*.js` | A set of modules exporting standalone functions (and their types). |
201
212
 
@@ -1 +1 @@
1
- {"version":3,"file":"AESEncryptedSecretStoragePayload.js","names":[],"sources":["../../src/@types/AESEncryptedSecretStoragePayload.ts"],"sourcesContent":["/*\r\n * Copyright 2024 The Matrix.org Foundation C.I.C.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n/**\r\n * An AES-encrypted secret storage payload.\r\n * See https://spec.matrix.org/v1.11/client-server-api/#msecret_storagev1aes-hmac-sha2-1\r\n */\r\nexport interface AESEncryptedSecretStoragePayload {\r\n [key: string]: any; // extensible\r\n /** the initialization vector in base64 */\r\n iv: string;\r\n /** the ciphertext in base64 */\r\n ciphertext: string;\r\n /** the HMAC in base64 */\r\n mac: string;\r\n}\r\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"AESEncryptedSecretStoragePayload.js","names":[],"sources":["../../src/@types/AESEncryptedSecretStoragePayload.ts"],"sourcesContent":["/*\n * Copyright 2024 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * An AES-encrypted secret storage payload.\n * See https://spec.matrix.org/v1.11/client-server-api/#msecret_storagev1aes-hmac-sha2-1\n */\nexport interface AESEncryptedSecretStoragePayload {\n [key: string]: any; // extensible\n /** the initialization vector in base64 */\n iv: string;\n /** the ciphertext in base64 */\n ciphertext: string;\n /** the HMAC in base64 */\n mac: string;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"IIdentityServerProvider.js","names":[],"sources":["../../src/@types/IIdentityServerProvider.ts"],"sourcesContent":["/*\r\nCopyright 2021 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\nexport interface IIdentityServerProvider {\r\n /**\r\n * Gets an access token for use against the identity server,\r\n * for the associated client.\r\n * @returns Promise which resolves to the access token.\r\n */\r\n getAccessToken(): Promise<string | null>;\r\n}\r\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"IIdentityServerProvider.js","names":[],"sources":["../../src/@types/IIdentityServerProvider.ts"],"sourcesContent":["/*\nCopyright 2021 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\nexport interface IIdentityServerProvider {\n /**\n * Gets an access token for use against the identity server,\n * for the associated client.\n * @returns Promise which resolves to the access token.\n */\n getAccessToken(): Promise<string | null>;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1,17 +1,17 @@
1
- /*
2
- Copyright 2021 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 2021 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
  // allow camelcase as these are things that go onto the wire
@@ -1 +1 @@
1
- {"version":3,"file":"PushRules.js","names":["PushRuleActionName","TweakName","ConditionOperator","DMMemberCountCondition","isDmMemberCountCondition","condition","ConditionKind","PushRuleKind","RuleId"],"sources":["../../src/@types/PushRules.ts"],"sourcesContent":["/*\r\nCopyright 2021 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\n// allow camelcase as these are things that go onto the wire\r\n/* eslint-disable camelcase */\r\n\r\nexport enum PushRuleActionName {\r\n DontNotify = \"dont_notify\",\r\n Notify = \"notify\",\r\n Coalesce = \"coalesce\",\r\n}\r\n\r\nexport enum TweakName {\r\n Highlight = \"highlight\",\r\n Sound = \"sound\",\r\n}\r\n\r\nexport type Tweak<N extends TweakName, V> = {\r\n set_tweak: N;\r\n value?: V;\r\n};\r\n\r\nexport type TweakHighlight = Tweak<TweakName.Highlight, boolean>;\r\nexport type TweakSound = Tweak<TweakName.Sound, string>;\r\n\r\nexport type Tweaks = TweakHighlight | TweakSound;\r\n\r\nexport enum ConditionOperator {\r\n ExactEquals = \"==\",\r\n LessThan = \"<\",\r\n GreaterThan = \">\",\r\n GreaterThanOrEqual = \">=\",\r\n LessThanOrEqual = \"<=\",\r\n}\r\n\r\nexport type PushRuleAction = Tweaks | PushRuleActionName;\r\n\r\nexport type MemberCountCondition<N extends number, Op extends ConditionOperator = ConditionOperator.ExactEquals> =\r\n | `${Op}${N}`\r\n | (Op extends ConditionOperator.ExactEquals ? `${N}` : never);\r\n\r\nexport type AnyMemberCountCondition = MemberCountCondition<number, ConditionOperator>;\r\n\r\nexport const DMMemberCountCondition: MemberCountCondition<2> = \"2\";\r\n\r\nexport function isDmMemberCountCondition(condition: AnyMemberCountCondition): boolean {\r\n return condition === \"==2\" || condition === \"2\";\r\n}\r\n\r\nexport enum ConditionKind {\r\n EventMatch = \"event_match\",\r\n EventPropertyIs = \"event_property_is\",\r\n EventPropertyContains = \"event_property_contains\",\r\n ContainsDisplayName = \"contains_display_name\",\r\n RoomMemberCount = \"room_member_count\",\r\n SenderNotificationPermission = \"sender_notification_permission\",\r\n CallStarted = \"call_started\",\r\n CallStartedPrefix = \"org.matrix.msc3914.call_started\",\r\n}\r\n\r\nexport interface IPushRuleCondition<N extends ConditionKind | string> {\r\n [k: string]: any; // for custom conditions, there can be other fields here\r\n kind: N;\r\n}\r\n\r\nexport interface IEventMatchCondition extends IPushRuleCondition<ConditionKind.EventMatch> {\r\n key: string;\r\n pattern?: string;\r\n // Note that value property is an optimization for patterns which do not do\r\n // any globbing and when the key is not \"content.body\".\r\n value?: string;\r\n}\r\n\r\nexport interface IEventPropertyIsCondition extends IPushRuleCondition<ConditionKind.EventPropertyIs> {\r\n key: string;\r\n value: string | boolean | null | number;\r\n}\r\n\r\nexport interface IEventPropertyContainsCondition extends IPushRuleCondition<ConditionKind.EventPropertyContains> {\r\n key: string;\r\n value: string | boolean | null | number;\r\n}\r\n\r\nexport interface IContainsDisplayNameCondition extends IPushRuleCondition<ConditionKind.ContainsDisplayName> {\r\n // no additional fields\r\n}\r\n\r\nexport interface IRoomMemberCountCondition extends IPushRuleCondition<ConditionKind.RoomMemberCount> {\r\n is: AnyMemberCountCondition;\r\n}\r\n\r\nexport interface ISenderNotificationPermissionCondition extends IPushRuleCondition<ConditionKind.SenderNotificationPermission> {\r\n key: string;\r\n}\r\n\r\nexport interface ICallStartedCondition extends IPushRuleCondition<ConditionKind.CallStarted> {\r\n // no additional fields\r\n}\r\n\r\nexport interface ICallStartedPrefixCondition extends IPushRuleCondition<ConditionKind.CallStartedPrefix> {\r\n // no additional fields\r\n}\r\n\r\n// XXX: custom conditions are possible but always fail, and break the typescript discriminated union so ignore them here\r\n// IPushRuleCondition<Exclude<string, ConditionKind>> unfortunately does not resolve this at the time of writing.\r\nexport type PushRuleCondition =\r\n | IEventMatchCondition\r\n | IEventPropertyIsCondition\r\n | IEventPropertyContainsCondition\r\n | IContainsDisplayNameCondition\r\n | IRoomMemberCountCondition\r\n | ISenderNotificationPermissionCondition\r\n | ICallStartedCondition\r\n | ICallStartedPrefixCondition;\r\n\r\nexport enum PushRuleKind {\r\n Override = \"override\",\r\n ContentSpecific = \"content\",\r\n RoomSpecific = \"room\",\r\n SenderSpecific = \"sender\",\r\n Underride = \"underride\",\r\n}\r\n\r\nexport enum RuleId {\r\n Master = \".m.rule.master\",\r\n IsUserMention = \".m.rule.is_user_mention\",\r\n IsRoomMention = \".m.rule.is_room_mention\",\r\n ContainsDisplayName = \".m.rule.contains_display_name\",\r\n ContainsUserName = \".m.rule.contains_user_name\",\r\n AtRoomNotification = \".m.rule.roomnotif\",\r\n DM = \".m.rule.room_one_to_one\",\r\n EncryptedDM = \".m.rule.encrypted_room_one_to_one\",\r\n Message = \".m.rule.message\",\r\n EncryptedMessage = \".m.rule.encrypted\",\r\n InviteToSelf = \".m.rule.invite_for_me\",\r\n MemberEvent = \".m.rule.member_event\",\r\n IncomingCall = \".m.rule.call\",\r\n SuppressNotices = \".m.rule.suppress_notices\",\r\n Tombstone = \".m.rule.tombstone\",\r\n PollStart = \".m.rule.poll_start\",\r\n PollStartUnstable = \".org.matrix.msc3930.rule.poll_start\",\r\n PollEnd = \".m.rule.poll_end\",\r\n PollEndUnstable = \".org.matrix.msc3930.rule.poll_end\",\r\n PollStartOneToOne = \".m.rule.poll_start_one_to_one\",\r\n PollStartOneToOneUnstable = \".org.matrix.msc3930.rule.poll_start_one_to_one\",\r\n PollEndOneToOne = \".m.rule.poll_end_one_to_one\",\r\n PollEndOneToOneUnstable = \".org.matrix.msc3930.rule.poll_end_one_to_one\",\r\n}\r\n\r\nexport type PushRuleSet = {\r\n [k in PushRuleKind]?: IPushRule[];\r\n};\r\n\r\nexport interface IPushRule {\r\n actions: PushRuleAction[];\r\n conditions?: PushRuleCondition[];\r\n default: boolean;\r\n enabled: boolean;\r\n pattern?: string;\r\n rule_id: RuleId | string;\r\n}\r\n\r\nexport interface IAnnotatedPushRule extends IPushRule {\r\n kind: PushRuleKind;\r\n}\r\n\r\nexport interface IPushRules {\r\n global: PushRuleSet;\r\n device?: PushRuleSet;\r\n}\r\n\r\nexport interface IPusher {\r\n \"app_display_name\": string;\r\n \"app_id\": string;\r\n \"data\": {\r\n format?: string;\r\n url?: string; // TODO: Required if kind==http\r\n brand?: string; // TODO: For email notifications only? Unspecced field\r\n };\r\n \"device_display_name\": string;\r\n \"kind\": \"http\" | string;\r\n \"lang\": string;\r\n \"profile_tag\"?: string;\r\n \"pushkey\": string;\r\n \"enabled\"?: boolean | null;\r\n \"org.matrix.msc3881.enabled\"?: boolean | null;\r\n \"device_id\"?: string | null;\r\n \"org.matrix.msc3881.device_id\"?: string | null;\r\n}\r\n\r\nexport interface IPusherRequest extends Omit<IPusher, \"device_id\" | \"org.matrix.msc3881.device_id\"> {\r\n append?: boolean;\r\n}\r\n\r\n/* eslint-enable camelcase */\r\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,WAAYA,kBAAkB,0BAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AAM9B,WAAYC,SAAS,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA;AAerB,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAgB7B,OAAO,IAAMC,sBAA+C,GAAG,GAAG;AAElE,OAAO,SAASC,wBAAwBA,CAACC,SAAkC,EAAW;EAClF,OAAOA,SAAS,KAAK,KAAK,IAAIA,SAAS,KAAK,GAAG;AACnD;AAEA,WAAYC,aAAa,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;;AAsDzB;AACA;;AAWA,WAAYC,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAQxB,WAAYC,MAAM,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA;;AAuElB","ignoreList":[]}
1
+ {"version":3,"file":"PushRules.js","names":["PushRuleActionName","TweakName","ConditionOperator","DMMemberCountCondition","isDmMemberCountCondition","condition","ConditionKind","PushRuleKind","RuleId"],"sources":["../../src/@types/PushRules.ts"],"sourcesContent":["/*\nCopyright 2021 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\n// allow camelcase as these are things that go onto the wire\n/* eslint-disable camelcase */\n\nexport enum PushRuleActionName {\n DontNotify = \"dont_notify\",\n Notify = \"notify\",\n Coalesce = \"coalesce\",\n}\n\nexport enum TweakName {\n Highlight = \"highlight\",\n Sound = \"sound\",\n}\n\nexport type Tweak<N extends TweakName, V> = {\n set_tweak: N;\n value?: V;\n};\n\nexport type TweakHighlight = Tweak<TweakName.Highlight, boolean>;\nexport type TweakSound = Tweak<TweakName.Sound, string>;\n\nexport type Tweaks = TweakHighlight | TweakSound;\n\nexport enum ConditionOperator {\n ExactEquals = \"==\",\n LessThan = \"<\",\n GreaterThan = \">\",\n GreaterThanOrEqual = \">=\",\n LessThanOrEqual = \"<=\",\n}\n\nexport type PushRuleAction = Tweaks | PushRuleActionName;\n\nexport type MemberCountCondition<N extends number, Op extends ConditionOperator = ConditionOperator.ExactEquals> =\n | `${Op}${N}`\n | (Op extends ConditionOperator.ExactEquals ? `${N}` : never);\n\nexport type AnyMemberCountCondition = MemberCountCondition<number, ConditionOperator>;\n\nexport const DMMemberCountCondition: MemberCountCondition<2> = \"2\";\n\nexport function isDmMemberCountCondition(condition: AnyMemberCountCondition): boolean {\n return condition === \"==2\" || condition === \"2\";\n}\n\nexport enum ConditionKind {\n EventMatch = \"event_match\",\n EventPropertyIs = \"event_property_is\",\n EventPropertyContains = \"event_property_contains\",\n ContainsDisplayName = \"contains_display_name\",\n RoomMemberCount = \"room_member_count\",\n SenderNotificationPermission = \"sender_notification_permission\",\n CallStarted = \"call_started\",\n CallStartedPrefix = \"org.matrix.msc3914.call_started\",\n}\n\nexport interface IPushRuleCondition<N extends ConditionKind | string> {\n [k: string]: any; // for custom conditions, there can be other fields here\n kind: N;\n}\n\nexport interface IEventMatchCondition extends IPushRuleCondition<ConditionKind.EventMatch> {\n key: string;\n pattern?: string;\n // Note that value property is an optimization for patterns which do not do\n // any globbing and when the key is not \"content.body\".\n value?: string;\n}\n\nexport interface IEventPropertyIsCondition extends IPushRuleCondition<ConditionKind.EventPropertyIs> {\n key: string;\n value: string | boolean | null | number;\n}\n\nexport interface IEventPropertyContainsCondition extends IPushRuleCondition<ConditionKind.EventPropertyContains> {\n key: string;\n value: string | boolean | null | number;\n}\n\nexport interface IContainsDisplayNameCondition extends IPushRuleCondition<ConditionKind.ContainsDisplayName> {\n // no additional fields\n}\n\nexport interface IRoomMemberCountCondition extends IPushRuleCondition<ConditionKind.RoomMemberCount> {\n is: AnyMemberCountCondition;\n}\n\nexport interface ISenderNotificationPermissionCondition extends IPushRuleCondition<ConditionKind.SenderNotificationPermission> {\n key: string;\n}\n\nexport interface ICallStartedCondition extends IPushRuleCondition<ConditionKind.CallStarted> {\n // no additional fields\n}\n\nexport interface ICallStartedPrefixCondition extends IPushRuleCondition<ConditionKind.CallStartedPrefix> {\n // no additional fields\n}\n\n// XXX: custom conditions are possible but always fail, and break the typescript discriminated union so ignore them here\n// IPushRuleCondition<Exclude<string, ConditionKind>> unfortunately does not resolve this at the time of writing.\nexport type PushRuleCondition =\n | IEventMatchCondition\n | IEventPropertyIsCondition\n | IEventPropertyContainsCondition\n | IContainsDisplayNameCondition\n | IRoomMemberCountCondition\n | ISenderNotificationPermissionCondition\n | ICallStartedCondition\n | ICallStartedPrefixCondition;\n\nexport enum PushRuleKind {\n Override = \"override\",\n ContentSpecific = \"content\",\n RoomSpecific = \"room\",\n SenderSpecific = \"sender\",\n Underride = \"underride\",\n}\n\nexport enum RuleId {\n Master = \".m.rule.master\",\n IsUserMention = \".m.rule.is_user_mention\",\n IsRoomMention = \".m.rule.is_room_mention\",\n ContainsDisplayName = \".m.rule.contains_display_name\",\n ContainsUserName = \".m.rule.contains_user_name\",\n AtRoomNotification = \".m.rule.roomnotif\",\n DM = \".m.rule.room_one_to_one\",\n EncryptedDM = \".m.rule.encrypted_room_one_to_one\",\n Message = \".m.rule.message\",\n EncryptedMessage = \".m.rule.encrypted\",\n InviteToSelf = \".m.rule.invite_for_me\",\n MemberEvent = \".m.rule.member_event\",\n IncomingCall = \".m.rule.call\",\n SuppressNotices = \".m.rule.suppress_notices\",\n Tombstone = \".m.rule.tombstone\",\n PollStart = \".m.rule.poll_start\",\n PollStartUnstable = \".org.matrix.msc3930.rule.poll_start\",\n PollEnd = \".m.rule.poll_end\",\n PollEndUnstable = \".org.matrix.msc3930.rule.poll_end\",\n PollStartOneToOne = \".m.rule.poll_start_one_to_one\",\n PollStartOneToOneUnstable = \".org.matrix.msc3930.rule.poll_start_one_to_one\",\n PollEndOneToOne = \".m.rule.poll_end_one_to_one\",\n PollEndOneToOneUnstable = \".org.matrix.msc3930.rule.poll_end_one_to_one\",\n}\n\nexport type PushRuleSet = {\n [k in PushRuleKind]?: IPushRule[];\n};\n\nexport interface IPushRule {\n actions: PushRuleAction[];\n conditions?: PushRuleCondition[];\n default: boolean;\n enabled: boolean;\n pattern?: string;\n rule_id: RuleId | string;\n}\n\nexport interface IAnnotatedPushRule extends IPushRule {\n kind: PushRuleKind;\n}\n\nexport interface IPushRules {\n global: PushRuleSet;\n device?: PushRuleSet;\n}\n\nexport interface IPusher {\n \"app_display_name\": string;\n \"app_id\": string;\n \"data\": {\n format?: string;\n url?: string; // TODO: Required if kind==http\n brand?: string; // TODO: For email notifications only? Unspecced field\n };\n \"device_display_name\": string;\n \"kind\": \"http\" | string;\n \"lang\": string;\n \"profile_tag\"?: string;\n \"pushkey\": string;\n \"enabled\"?: boolean | null;\n \"org.matrix.msc3881.enabled\"?: boolean | null;\n \"device_id\"?: string | null;\n \"org.matrix.msc3881.device_id\"?: string | null;\n}\n\nexport interface IPusherRequest extends Omit<IPusher, \"device_id\" | \"org.matrix.msc3881.device_id\"> {\n append?: boolean;\n}\n\n/* eslint-enable camelcase */\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,WAAYA,kBAAkB,0BAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AAM9B,WAAYC,SAAS,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA;AAerB,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAgB7B,OAAO,IAAMC,sBAA+C,GAAG,GAAG;AAElE,OAAO,SAASC,wBAAwBA,CAACC,SAAkC,EAAW;EAClF,OAAOA,SAAS,KAAK,KAAK,IAAIA,SAAS,KAAK,GAAG;AACnD;AAEA,WAAYC,aAAa,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;;AAsDzB;AACA;;AAWA,WAAYC,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAQxB,WAAYC,MAAM,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA;;AAuElB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"another-json.d.js","names":[],"sources":["../../src/@types/another-json.d.ts"],"sourcesContent":["/*\r\nCopyright 2021 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\ndeclare module \"another-json\" {\r\n export function stringify(o: object): string;\r\n}\r\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"another-json.d.js","names":[],"sources":["../../src/@types/another-json.d.ts"],"sourcesContent":["/*\nCopyright 2021 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\ndeclare module \"another-json\" {\n export function stringify(o: object): string;\n}\n"],"mappings":"","ignoreList":[]}
@@ -14,13 +14,17 @@ 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 type LoginFlow = ISSOFlow | IPasswordFlow | IXrplWalletLoginFlow | ILoginFlow;
18
19
  export interface ILoginFlow {
19
20
  type: string;
20
21
  }
21
22
  export interface IPasswordFlow extends ILoginFlow {
22
23
  type: "m.login.password";
23
24
  }
25
+ export interface IXrplWalletLoginFlow extends ILoginFlow {
26
+ type: typeof XRPL_WALLET_LOGIN_TYPE;
27
+ }
24
28
  export declare const OAUTH_AWARE_PREFERRED_FLOW_FIELD: UnstableValue<"oauth_aware_preferred", "org.matrix.msc3824.delegated_oidc_compatibility">;
25
29
  /**
26
30
  * @alias
@@ -153,6 +157,20 @@ export interface LoginRequest {
153
157
  [key: string]: any;
154
158
  }
155
159
  export type ILoginParams = LoginRequest;
160
+ export interface XrplWalletChallengePayload {
161
+ nonce: string;
162
+ timestamp: number | string;
163
+ message: string;
164
+ public_key: string;
165
+ algorithm?: "secp256k1" | "ed25519" | string;
166
+ }
167
+ export interface XrplWalletLoginRequest extends Omit<LoginRequest, "type"> {
168
+ type: typeof XRPL_WALLET_LOGIN_TYPE;
169
+ wallet_address: string;
170
+ signature: string;
171
+ challenge: string | XrplWalletChallengePayload;
172
+ network?: string;
173
+ }
156
174
  /**
157
175
  * Response body for POST /login request
158
176
  * @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,UAAU,CAAC;AAE9D,MAAM,WAAW,UAAU;IACvB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC7C,IAAI,EAAE,kBAAkB,CAAC;CAC5B;AAED,eAAO,MAAM,gCAAgC,2FAG5C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,2FAA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