@textrp/briij-js-sdk 41.0.0 → 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.
- package/CHANGELOG.md +14 -1
- package/LICENSE +177 -177
- package/README.md +47 -46
- package/lib/@types/AESEncryptedSecretStoragePayload.js.map +1 -1
- package/lib/@types/IIdentityServerProvider.js.map +1 -1
- package/lib/@types/PushRules.js +14 -14
- package/lib/@types/PushRules.js.map +1 -1
- package/lib/@types/another-json.d.js.map +1 -1
- package/lib/@types/auth.d.ts +19 -1
- package/lib/@types/auth.d.ts.map +1 -1
- package/lib/@types/auth.js +55 -54
- package/lib/@types/auth.js.map +1 -1
- package/lib/@types/beacon.js +100 -100
- package/lib/@types/beacon.js.map +1 -1
- package/lib/@types/common.js.map +1 -1
- package/lib/@types/crypto.js.map +1 -1
- package/lib/@types/event.d.ts +27 -0
- package/lib/@types/event.d.ts.map +1 -1
- package/lib/@types/event.js +105 -102
- package/lib/@types/event.js.map +1 -1
- package/lib/@types/events.js.map +1 -1
- package/lib/@types/extensible_events.js +53 -53
- package/lib/@types/extensible_events.js.map +1 -1
- package/lib/@types/local_notifications.js.map +1 -1
- package/lib/@types/location.js +41 -41
- package/lib/@types/location.js.map +1 -1
- package/lib/@types/matrix-sdk-crypto-wasm.d.js.map +1 -1
- package/lib/@types/media.js.map +1 -1
- package/lib/@types/membership.js +39 -39
- package/lib/@types/membership.js.map +1 -1
- package/lib/@types/partials.js +25 -25
- package/lib/@types/partials.js.map +1 -1
- package/lib/@types/polls.js +46 -46
- package/lib/@types/polls.js.map +1 -1
- package/lib/@types/read_receipts.js +14 -14
- package/lib/@types/read_receipts.js.map +1 -1
- package/lib/@types/registration.js.map +1 -1
- package/lib/@types/search.js +14 -14
- package/lib/@types/search.js.map +1 -1
- package/lib/@types/signed.js.map +1 -1
- package/lib/@types/spaces.js.map +1 -1
- package/lib/@types/state_events.js.map +1 -1
- package/lib/@types/synapse.js.map +1 -1
- package/lib/@types/sync.js +18 -18
- package/lib/@types/sync.js.map +1 -1
- package/lib/@types/threepids.js +14 -14
- package/lib/@types/threepids.js.map +1 -1
- package/lib/@types/topic.js +47 -47
- package/lib/@types/topic.js.map +1 -1
- package/lib/@types/uia.js.map +1 -1
- package/lib/NamespacedValue.js +20 -20
- package/lib/NamespacedValue.js.map +1 -1
- package/lib/ReEmitter.js +16 -16
- package/lib/ReEmitter.js.map +1 -1
- package/lib/base64.js +32 -32
- package/lib/base64.js.map +1 -1
- package/lib/briij.d.ts +3 -0
- package/lib/briij.d.ts.map +1 -1
- package/lib/briij.js +3 -0
- package/lib/briij.js.map +1 -1
- package/lib/client.d.ts +18 -1
- package/lib/client.d.ts.map +1 -1
- package/lib/client.js +166 -103
- package/lib/client.js.map +1 -1
- package/lib/common-crypto/key-passphrase.js +19 -19
- package/lib/common-crypto/key-passphrase.js.map +1 -1
- package/lib/content-helpers.js +57 -57
- package/lib/content-helpers.js.map +1 -1
- package/lib/content-repo.js +36 -36
- package/lib/content-repo.js.map +1 -1
- package/lib/crypto/store/base.js +69 -69
- package/lib/crypto/store/base.js.map +1 -1
- package/lib/crypto/store/indexeddb-crypto-store-backend.js +58 -58
- package/lib/crypto/store/indexeddb-crypto-store-backend.js.map +1 -1
- package/lib/crypto/store/indexeddb-crypto-store.js +193 -193
- package/lib/crypto/store/indexeddb-crypto-store.js.map +1 -1
- package/lib/crypto/store/localStorage-crypto-store.js +72 -72
- package/lib/crypto/store/localStorage-crypto-store.js.map +1 -1
- package/lib/crypto/store/memory-crypto-store.js +74 -74
- package/lib/crypto/store/memory-crypto-store.js.map +1 -1
- package/lib/crypto-api/CryptoEventHandlerMap.js.map +1 -1
- package/lib/crypto-api/key-passphrase.js +22 -22
- package/lib/crypto-api/key-passphrase.js.map +1 -1
- package/lib/crypto-api/keybackup.js.map +1 -1
- package/lib/crypto-api/recovery-key.js +20 -20
- package/lib/crypto-api/recovery-key.js.map +1 -1
- package/lib/digest.js +21 -21
- package/lib/digest.js.map +1 -1
- package/lib/extensible_events_v1/ExtensibleEvent.js +39 -39
- package/lib/extensible_events_v1/ExtensibleEvent.js.map +1 -1
- package/lib/extensible_events_v1/InvalidEventError.js +16 -16
- package/lib/extensible_events_v1/InvalidEventError.js.map +1 -1
- package/lib/extensible_events_v1/MessageEvent.js +39 -39
- package/lib/extensible_events_v1/MessageEvent.js.map +1 -1
- package/lib/extensible_events_v1/PollEndEvent.js +29 -29
- package/lib/extensible_events_v1/PollEndEvent.js.map +1 -1
- package/lib/extensible_events_v1/PollResponseEvent.js +39 -39
- package/lib/extensible_events_v1/PollResponseEvent.js.map +1 -1
- package/lib/extensible_events_v1/PollStartEvent.js +52 -52
- package/lib/extensible_events_v1/PollStartEvent.js.map +1 -1
- package/lib/extensible_events_v1/utilities.js +22 -22
- package/lib/extensible_events_v1/utilities.js.map +1 -1
- package/lib/feature.js +16 -16
- package/lib/feature.js.map +1 -1
- package/lib/http-api/method.js +14 -14
- package/lib/http-api/method.js.map +1 -1
- package/lib/http-api/prefix.js +26 -26
- package/lib/http-api/prefix.js.map +1 -1
- package/lib/indexeddb-helpers.js +21 -21
- package/lib/indexeddb-helpers.js.map +1 -1
- package/lib/indexeddb-worker.js +18 -18
- package/lib/indexeddb-worker.js.map +1 -1
- package/lib/matrixrtc/IKeyTransport.js +17 -17
- package/lib/matrixrtc/IKeyTransport.js.map +1 -1
- package/lib/matrixrtc/IMembershipManager.js +27 -27
- package/lib/matrixrtc/IMembershipManager.js.map +1 -1
- package/lib/matrixrtc/LivekitTransport.js +19 -19
- package/lib/matrixrtc/LivekitTransport.js.map +1 -1
- package/lib/matrixrtc/index.js +14 -14
- package/lib/matrixrtc/index.js.map +1 -1
- package/lib/matrixrtc/utils.js +27 -27
- package/lib/matrixrtc/utils.js.map +1 -1
- package/lib/models/ToDeviceMessage.js.map +1 -1
- package/lib/models/device.js +24 -24
- package/lib/models/device.js.map +1 -1
- package/lib/models/event-status.js +17 -17
- package/lib/models/event-status.js.map +1 -1
- package/lib/models/invites-ignorer-types.js +25 -25
- package/lib/models/invites-ignorer-types.js.map +1 -1
- package/lib/models/profile-keys.js +26 -26
- package/lib/models/profile-keys.js.map +1 -1
- package/lib/models/room-summary.js +26 -26
- package/lib/models/room-summary.js.map +1 -1
- package/lib/models/search-result.js +22 -22
- package/lib/models/search-result.js.map +1 -1
- package/lib/models/typed-event-emitter.js +122 -122
- package/lib/models/typed-event-emitter.js.map +1 -1
- package/lib/oidc/authorize.js +76 -76
- package/lib/oidc/authorize.js.map +1 -1
- package/lib/oidc/error.js +17 -17
- package/lib/oidc/error.js.map +1 -1
- package/lib/oidc/index.js +17 -17
- package/lib/oidc/index.js.map +1 -1
- package/lib/oidc/register.js +41 -41
- package/lib/oidc/register.js.map +1 -1
- package/lib/oidc/tokenRefresher.js +51 -51
- package/lib/oidc/tokenRefresher.js.map +1 -1
- package/lib/oidc/validate.js +59 -59
- package/lib/oidc/validate.js.map +1 -1
- package/lib/randomstring.js +35 -35
- package/lib/randomstring.js.map +1 -1
- package/lib/realtime-callbacks.js +39 -39
- package/lib/realtime-callbacks.js.map +1 -1
- package/lib/receipt-accumulator.js +44 -44
- package/lib/receipt-accumulator.js.map +1 -1
- package/lib/rendezvous/RendezvousChannel.js.map +1 -1
- package/lib/rendezvous/RendezvousCode.js.map +1 -1
- package/lib/rendezvous/RendezvousError.js +14 -14
- package/lib/rendezvous/RendezvousError.js.map +1 -1
- package/lib/rendezvous/RendezvousFailureReason.js +14 -14
- package/lib/rendezvous/RendezvousFailureReason.js.map +1 -1
- package/lib/rendezvous/RendezvousIntent.js +14 -14
- package/lib/rendezvous/RendezvousIntent.js.map +1 -1
- package/lib/rendezvous/RendezvousTransport.js.map +1 -1
- package/lib/rendezvous/channels/MSC4108SecureChannel.js +63 -63
- package/lib/rendezvous/channels/MSC4108SecureChannel.js.map +1 -1
- package/lib/rendezvous/channels/index.js +14 -14
- package/lib/rendezvous/channels/index.js.map +1 -1
- package/lib/rendezvous/index.js +14 -14
- package/lib/rendezvous/index.js.map +1 -1
- package/lib/rendezvous/transports/index.js +14 -14
- package/lib/rendezvous/transports/index.js.map +1 -1
- package/lib/rust-crypto/CrossSigningIdentity.js +29 -29
- package/lib/rust-crypto/CrossSigningIdentity.js.map +1 -1
- package/lib/rust-crypto/OutgoingRequestsManager.js +37 -37
- package/lib/rust-crypto/OutgoingRequestsManager.js.map +1 -1
- package/lib/rust-crypto/device-converter.js +30 -30
- package/lib/rust-crypto/device-converter.js.map +1 -1
- package/lib/rust-crypto/secret-storage.js +30 -30
- package/lib/rust-crypto/secret-storage.js.map +1 -1
- package/lib/service-types.js +14 -14
- package/lib/service-types.js.map +1 -1
- package/lib/store/local-storage-events-emitter.js +21 -21
- package/lib/store/local-storage-events-emitter.js.map +1 -1
- package/lib/sync-accumulator.js +50 -50
- package/lib/sync-accumulator.js.map +1 -1
- package/lib/thread-utils.js +20 -20
- package/lib/thread-utils.js.map +1 -1
- package/lib/types.js +34 -34
- package/lib/types.js.map +1 -1
- package/lib/utils/decryptAESSecretStorageItem.js +22 -22
- package/lib/utils/decryptAESSecretStorageItem.js.map +1 -1
- package/lib/utils/encryptAESSecretStorageItem.js +26 -26
- package/lib/utils/encryptAESSecretStorageItem.js.map +1 -1
- package/lib/utils/internal/deriveKeys.js +21 -21
- package/lib/utils/internal/deriveKeys.js.map +1 -1
- package/lib/utils/roomVersion.js +26 -26
- package/lib/utils/roomVersion.js.map +1 -1
- package/lib/version-support.js +26 -26
- package/lib/version-support.js.map +1 -1
- package/lib/webrtc/audioContext.js +24 -24
- package/lib/webrtc/audioContext.js.map +1 -1
- package/lib/webrtc/callEventTypes.js.map +1 -1
- package/lib/webrtc/stats/callFeedStatsReporter.js +14 -14
- package/lib/webrtc/stats/callFeedStatsReporter.js.map +1 -1
- package/lib/webrtc/stats/callStatsReportGatherer.js +14 -14
- package/lib/webrtc/stats/callStatsReportGatherer.js.map +1 -1
- package/lib/webrtc/stats/callStatsReportSummary.js.map +1 -1
- package/lib/webrtc/stats/connectionStats.js +14 -14
- package/lib/webrtc/stats/connectionStats.js.map +1 -1
- package/lib/webrtc/stats/connectionStatsBuilder.js +14 -14
- package/lib/webrtc/stats/connectionStatsBuilder.js.map +1 -1
- package/lib/webrtc/stats/connectionStatsReportBuilder.js +14 -14
- package/lib/webrtc/stats/connectionStatsReportBuilder.js.map +1 -1
- package/lib/webrtc/stats/groupCallStats.js +14 -14
- package/lib/webrtc/stats/groupCallStats.js.map +1 -1
- package/lib/webrtc/stats/media/mediaSsrcHandler.js +14 -14
- package/lib/webrtc/stats/media/mediaSsrcHandler.js.map +1 -1
- package/lib/webrtc/stats/media/mediaTrackHandler.js +14 -14
- package/lib/webrtc/stats/media/mediaTrackHandler.js.map +1 -1
- package/lib/webrtc/stats/media/mediaTrackStats.js +27 -27
- package/lib/webrtc/stats/media/mediaTrackStats.js.map +1 -1
- package/lib/webrtc/stats/media/mediaTrackStatsHandler.js +20 -20
- package/lib/webrtc/stats/media/mediaTrackStatsHandler.js.map +1 -1
- package/lib/webrtc/stats/statsReport.js +14 -14
- package/lib/webrtc/stats/statsReport.js.map +1 -1
- package/lib/webrtc/stats/statsReportEmitter.js +14 -14
- package/lib/webrtc/stats/statsReportEmitter.js.map +1 -1
- package/lib/webrtc/stats/trackStatsBuilder.js +4 -4
- package/lib/webrtc/stats/trackStatsBuilder.js.map +1 -1
- package/lib/webrtc/stats/transportStats.js.map +1 -1
- package/lib/webrtc/stats/transportStatsBuilder.js.map +1 -1
- package/lib/webrtc/stats/valueFormatter.js +11 -11
- package/lib/webrtc/stats/valueFormatter.js.map +1 -1
- package/lib/xrpl/identity.d.ts +28 -0
- package/lib/xrpl/identity.d.ts.map +1 -0
- package/lib/xrpl/identity.js +213 -0
- package/lib/xrpl/identity.js.map +1 -0
- package/lib/xrpl/trust.d.ts +8 -0
- package/lib/xrpl/trust.d.ts.map +1 -0
- package/lib/xrpl/trust.js +61 -0
- package/lib/xrpl/trust.js.map +1 -0
- package/lib/xrpl/verification.d.ts +26 -0
- package/lib/xrpl/verification.d.ts.map +1 -0
- package/lib/xrpl/verification.js +295 -0
- package/lib/xrpl/verification.js.map +1 -0
- package/package.json +128 -129
- package/src/@types/AESEncryptedSecretStoragePayload.ts +29 -29
- package/src/@types/IIdentityServerProvider.ts +24 -24
- package/src/@types/PushRules.ts +208 -208
- package/src/@types/another-json.d.ts +19 -19
- package/src/@types/auth.ts +280 -258
- package/src/@types/beacon.ts +140 -140
- package/src/@types/common.ts +24 -24
- package/src/@types/crypto.ts +71 -71
- package/src/@types/event.ts +476 -449
- package/src/@types/events.ts +119 -119
- package/src/@types/extensible_events.ts +147 -147
- package/src/@types/local_notifications.ts +19 -19
- package/src/@types/location.ts +92 -92
- package/src/@types/matrix-sdk-crypto-wasm.d.ts +39 -39
- package/src/@types/media.ts +245 -245
- package/src/@types/membership.ts +57 -57
- package/src/@types/partials.ts +103 -103
- package/src/@types/polls.ts +120 -120
- package/src/@types/read_receipts.ts +61 -61
- package/src/@types/registration.ts +102 -102
- package/src/@types/search.ts +119 -119
- package/src/@types/signed.ts +25 -25
- package/src/@types/spaces.ts +37 -37
- package/src/@types/state_events.ts +153 -153
- package/src/@types/synapse.ts +40 -40
- package/src/@types/sync.ts +27 -27
- package/src/@types/threepids.ts +29 -29
- package/src/@types/topic.ts +69 -69
- package/src/@types/uia.ts +24 -24
- package/src/NamespacedValue.ts +121 -121
- package/src/ReEmitter.ts +93 -93
- package/src/base64.ts +86 -86
- package/src/briij.ts +3 -0
- package/src/client.ts +90 -10
- package/src/common-crypto/README.md +4 -4
- package/src/common-crypto/key-passphrase.ts +43 -43
- package/src/content-helpers.ts +298 -298
- package/src/content-repo.ts +122 -122
- package/src/crypto/store/base.ts +388 -388
- package/src/crypto/store/indexeddb-crypto-store-backend.ts +655 -655
- package/src/crypto/store/indexeddb-crypto-store.ts +555 -555
- package/src/crypto/store/localStorage-crypto-store.ts +409 -409
- package/src/crypto/store/memory-crypto-store.ts +326 -326
- package/src/crypto-api/CryptoEventHandlerMap.ts +42 -42
- package/src/crypto-api/key-passphrase.ts +58 -58
- package/src/crypto-api/keybackup.ts +114 -114
- package/src/crypto-api/recovery-key.ts +69 -69
- package/src/digest.ts +34 -34
- package/src/extensible_events_v1/ExtensibleEvent.ts +58 -58
- package/src/extensible_events_v1/InvalidEventError.ts +24 -24
- package/src/extensible_events_v1/MessageEvent.ts +143 -143
- package/src/extensible_events_v1/PollEndEvent.ts +97 -97
- package/src/extensible_events_v1/PollResponseEvent.ts +148 -148
- package/src/extensible_events_v1/PollStartEvent.ts +207 -207
- package/src/extensible_events_v1/utilities.ts +35 -35
- package/src/feature.ts +88 -88
- package/src/http-api/method.ts +25 -25
- package/src/http-api/prefix.ts +48 -48
- package/src/indexeddb-helpers.ts +50 -50
- package/src/indexeddb-worker.ts +24 -24
- package/src/matrixrtc/IKeyTransport.ts +63 -63
- package/src/matrixrtc/IMembershipManager.ts +120 -120
- package/src/matrixrtc/LivekitTransport.ts +46 -46
- package/src/matrixrtc/index.ts +24 -24
- package/src/matrixrtc/utils.ts +71 -71
- package/src/models/ToDeviceMessage.ts +38 -38
- package/src/models/device.ts +85 -85
- package/src/models/event-status.ts +39 -39
- package/src/models/invites-ignorer-types.ts +58 -58
- package/src/models/profile-keys.ts +33 -33
- package/src/models/room-summary.ts +78 -78
- package/src/models/search-result.ts +57 -57
- package/src/models/typed-event-emitter.ts +246 -246
- package/src/oidc/authorize.ts +279 -279
- package/src/oidc/error.ts +33 -33
- package/src/oidc/index.ts +33 -33
- package/src/oidc/register.ts +163 -163
- package/src/oidc/tokenRefresher.ts +184 -184
- package/src/oidc/validate.ts +265 -265
- package/src/randomstring.ts +103 -103
- package/src/realtime-callbacks.ts +191 -191
- package/src/receipt-accumulator.ts +189 -189
- package/src/rendezvous/RendezvousChannel.ts +48 -48
- package/src/rendezvous/RendezvousCode.ts +25 -25
- package/src/rendezvous/RendezvousError.ts +26 -26
- package/src/rendezvous/RendezvousFailureReason.ts +49 -49
- package/src/rendezvous/RendezvousIntent.ts +20 -20
- package/src/rendezvous/RendezvousTransport.ts +58 -58
- package/src/rendezvous/channels/MSC4108SecureChannel.ts +270 -270
- package/src/rendezvous/channels/index.ts +17 -17
- package/src/rendezvous/index.ts +25 -25
- package/src/rendezvous/transports/index.ts +17 -17
- package/src/rust-crypto/CrossSigningIdentity.ts +195 -195
- package/src/rust-crypto/OutgoingRequestsManager.ts +170 -170
- package/src/rust-crypto/device-converter.ts +128 -128
- package/src/rust-crypto/secret-storage.ts +60 -60
- package/src/service-types.ts +20 -20
- package/src/store/local-storage-events-emitter.ts +46 -46
- package/src/sync-accumulator.ts +779 -779
- package/src/thread-utils.ts +31 -31
- package/src/types.ts +59 -59
- package/src/utils/decryptAESSecretStorageItem.ts +54 -54
- package/src/utils/encryptAESSecretStorageItem.ts +73 -73
- package/src/utils/internal/deriveKeys.ts +63 -63
- package/src/utils/roomVersion.ts +35 -35
- package/src/version-support.ts +50 -50
- package/src/webrtc/audioContext.ts +44 -44
- package/src/webrtc/callEventTypes.ts +101 -101
- package/src/webrtc/stats/callFeedStatsReporter.ts +91 -91
- package/src/webrtc/stats/callStatsReportGatherer.ts +219 -219
- package/src/webrtc/stats/callStatsReportSummary.ts +30 -30
- package/src/webrtc/stats/connectionStats.ts +47 -47
- package/src/webrtc/stats/connectionStatsBuilder.ts +28 -28
- package/src/webrtc/stats/connectionStatsReportBuilder.ts +140 -140
- package/src/webrtc/stats/groupCallStats.ts +93 -93
- package/src/webrtc/stats/media/mediaSsrcHandler.ts +57 -57
- package/src/webrtc/stats/media/mediaTrackHandler.ts +70 -70
- package/src/webrtc/stats/media/mediaTrackStats.ts +176 -176
- package/src/webrtc/stats/media/mediaTrackStatsHandler.ts +90 -90
- package/src/webrtc/stats/statsReport.ts +133 -133
- package/src/webrtc/stats/statsReportEmitter.ts +49 -49
- package/src/webrtc/stats/trackStatsBuilder.ts +207 -207
- package/src/webrtc/stats/transportStats.ts +26 -26
- package/src/webrtc/stats/transportStatsBuilder.ts +48 -48
- package/src/webrtc/stats/valueFormatter.ts +27 -27
- package/src/xrpl/identity.ts +245 -0
- package/src/xrpl/trust.ts +64 -0
- package/src/xrpl/verification.ts +284 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,20 @@
|
|
|
1
|
-
Changes in [
|
|
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
|
@@ -8,32 +8,22 @@
|
|
|
8
8
|
|
|
9
9
|
# Briij JavaScript SDK
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
<picture>
|
|
17
|
-
<source srcset="contrib/element-logo-light.png" media="(prefers-color-scheme: dark)">
|
|
18
|
-
<source srcset="contrib/element-logo-dark.png" media="(prefers-color-scheme: light)">
|
|
19
|
-
<img src="contrib/element-logo-fallback.png" alt="Element logo">
|
|
20
|
-
</picture>
|
|
11
|
+
<p align="center">
|
|
12
|
+
<img src="contrib/textrp-logo.png" alt="TextRP logo" width="280">
|
|
13
|
+
</p>
|
|
21
14
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
Development and maintenance is proudly sponsored by [Element](https://element.io). Element uses the SDK in their flagship [web](https://github.com/element-hq/element-web) and [desktop](https://github.com/element-hq/element-desktop) clients.
|
|
25
|
-
|
|
26
|
-
The SDK is also the basis for multiple Matrix projects and we welcome contributions from all.
|
|
15
|
+
This is the Briij Client-Server SDK for JavaScript and TypeScript. This SDK can be run in a
|
|
16
|
+
browser or in Node.js.
|
|
27
17
|
|
|
28
18
|
---
|
|
29
19
|
|
|
30
|
-
#### Minimum
|
|
20
|
+
#### Minimum server version: v1.1
|
|
31
21
|
|
|
32
|
-
The
|
|
22
|
+
The client-server specification is constantly evolving - while this SDK aims for maximum backwards compatibility, it only
|
|
33
23
|
guarantees that a feature will be supported for at least 4 spec releases. For example, if a feature the js-sdk supports
|
|
34
24
|
is removed in v1.4 then the feature is _eligible_ for removal from the SDK when v1.8 is released. This SDK has no
|
|
35
25
|
guarantee on implementing all features of any particular spec release, currently. This can mean that the SDK will call
|
|
36
|
-
endpoints from before
|
|
26
|
+
endpoints from before v1.1, for example.
|
|
37
27
|
|
|
38
28
|
# Quickstart
|
|
39
29
|
|
|
@@ -48,7 +38,7 @@ guide](https://pnpm.io/installation#using-corepack) if you do not have it alread
|
|
|
48
38
|
|
|
49
39
|
```javascript
|
|
50
40
|
import * as sdk from "@textrp/briij-js-sdk";
|
|
51
|
-
const client = sdk.createClient({ baseUrl: "https://
|
|
41
|
+
const client = sdk.createClient({ baseUrl: "https://your-server.example.org" });
|
|
52
42
|
client.publicRooms(function (err, data) {
|
|
53
43
|
console.log("Public Rooms: %s", JSON.stringify(data));
|
|
54
44
|
});
|
|
@@ -109,9 +99,20 @@ Object.keys(client.store.rooms).forEach((roomId) => {
|
|
|
109
99
|
});
|
|
110
100
|
```
|
|
111
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
|
+
|
|
112
113
|
## Authenticated media
|
|
113
114
|
|
|
114
|
-
Servers supporting [MSC3916](https://github.com/matrix-org/matrix-spec-proposals/pull/3916) (
|
|
115
|
+
Servers supporting [MSC3916](https://github.com/matrix-org/matrix-spec-proposals/pull/3916) (spec 1.11) will require clients, like
|
|
115
116
|
yours, to include an `Authorization` header when `/download`ing or `/thumbnail`ing media. For NodeJS environments this
|
|
116
117
|
may be as easy as the following code snippet, though web browsers may need to use [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API)
|
|
117
118
|
to append the header when using the endpoints in `<img />` elements and similar.
|
|
@@ -139,7 +140,7 @@ const img = await fetch(downloadUrl, {
|
|
|
139
140
|
|
|
140
141
|
## What does this SDK do?
|
|
141
142
|
|
|
142
|
-
This SDK provides a full object model around the
|
|
143
|
+
This SDK provides a full object model around the client-server API and emits
|
|
143
144
|
events for incoming data and state changes. Aside from wrapping the HTTP API, it:
|
|
144
145
|
|
|
145
146
|
- Handles syncing (via `/sync`)
|
|
@@ -201,11 +202,11 @@ client.startClient();
|
|
|
201
202
|
|
|
202
203
|
As well as the primary entry point (`@textrp/briij-js-sdk`), there are several other entry points which may be useful:
|
|
203
204
|
|
|
204
|
-
| Entry point
|
|
205
|
-
|
|
|
205
|
+
| Entry point | Description |
|
|
206
|
+
| ------------------------------------- | --------------------------------------------------------------------------------------------------- |
|
|
206
207
|
| `@textrp/briij-js-sdk` | Primary entry point. High-level functionality, and lots of historical clutter in need of a cleanup. |
|
|
207
208
|
| `@textrp/briij-js-sdk/lib/crypto-api` | Cryptography functionality. |
|
|
208
|
-
| `@textrp/briij-js-sdk/lib/types` | Low-level types, reflecting data structures defined in the
|
|
209
|
+
| `@textrp/briij-js-sdk/lib/types` | Low-level types, reflecting data structures defined in the client-server spec. |
|
|
209
210
|
| `@textrp/briij-js-sdk/lib/testing` | Test utilities, which may be useful in test code but should not be used in production code. |
|
|
210
211
|
| `@textrp/briij-js-sdk/lib/utils/*.js` | A set of modules exporting standalone functions (and their types). |
|
|
211
212
|
|
|
@@ -218,7 +219,7 @@ core functionality of the SDK. These examples assume the SDK is set up like this
|
|
|
218
219
|
import * as sdk from "@textrp/briij-js-sdk";
|
|
219
220
|
const myUserId = "@example:localhost";
|
|
220
221
|
const myAccessToken = "QGV4YW1wbGU6bG9jYWxob3N0.qPEvLuYfNBjxikiCjP";
|
|
221
|
-
const
|
|
222
|
+
const client = sdk.createClient({
|
|
222
223
|
baseUrl: "http://localhost:8008",
|
|
223
224
|
accessToken: myAccessToken,
|
|
224
225
|
userId: myUserId,
|
|
@@ -228,21 +229,21 @@ const matrixClient = sdk.createClient({
|
|
|
228
229
|
### Automatically join rooms when invited
|
|
229
230
|
|
|
230
231
|
```javascript
|
|
231
|
-
|
|
232
|
+
client.on(RoomEvent.MyMembership, function (room, membership, prevMembership) {
|
|
232
233
|
if (membership === KnownMembership.Invite) {
|
|
233
|
-
|
|
234
|
+
client.joinRoom(room.roomId).then(function () {
|
|
234
235
|
console.log("Auto-joined %s", room.roomId);
|
|
235
236
|
});
|
|
236
237
|
}
|
|
237
238
|
});
|
|
238
239
|
|
|
239
|
-
|
|
240
|
+
client.startClient();
|
|
240
241
|
```
|
|
241
242
|
|
|
242
243
|
### Print out messages for all rooms
|
|
243
244
|
|
|
244
245
|
```javascript
|
|
245
|
-
|
|
246
|
+
client.on(RoomEvent.Timeline, function (event, room, toStartOfTimeline) {
|
|
246
247
|
if (toStartOfTimeline) {
|
|
247
248
|
return; // don't print paginated results
|
|
248
249
|
}
|
|
@@ -258,7 +259,7 @@ matrixClient.on(RoomEvent.Timeline, function (event, room, toStartOfTimeline) {
|
|
|
258
259
|
);
|
|
259
260
|
});
|
|
260
261
|
|
|
261
|
-
|
|
262
|
+
client.startClient();
|
|
262
263
|
```
|
|
263
264
|
|
|
264
265
|
Output:
|
|
@@ -274,8 +275,8 @@ Output:
|
|
|
274
275
|
### Print out membership lists whenever they are changed
|
|
275
276
|
|
|
276
277
|
```javascript
|
|
277
|
-
|
|
278
|
-
const room =
|
|
278
|
+
client.on(RoomStateEvent.Members, function (event, state, member) {
|
|
279
|
+
const room = client.getRoom(state.roomId);
|
|
279
280
|
if (!room) {
|
|
280
281
|
return;
|
|
281
282
|
}
|
|
@@ -287,7 +288,7 @@ matrixClient.on(RoomStateEvent.Members, function (event, state, member) {
|
|
|
287
288
|
}
|
|
288
289
|
});
|
|
289
290
|
|
|
290
|
-
|
|
291
|
+
client.startClient();
|
|
291
292
|
```
|
|
292
293
|
|
|
293
294
|
Output:
|
|
@@ -323,18 +324,18 @@ Then visit `http://localhost:8005` to see the API docs.
|
|
|
323
324
|
|
|
324
325
|
## Initialization
|
|
325
326
|
|
|
326
|
-
To initialize the end-to-end encryption support in the
|
|
327
|
+
To initialize the end-to-end encryption support in the client:
|
|
327
328
|
|
|
328
329
|
```javascript
|
|
329
|
-
// Create a new
|
|
330
|
-
const
|
|
330
|
+
// Create a new client
|
|
331
|
+
const client = sdk.createClient({
|
|
331
332
|
baseUrl: "http://localhost:8008",
|
|
332
333
|
accessToken: myAccessToken,
|
|
333
334
|
userId: myUserId,
|
|
334
335
|
});
|
|
335
336
|
|
|
336
337
|
// Initialize to enable end-to-end encryption support.
|
|
337
|
-
await
|
|
338
|
+
await client.initRustCrypto();
|
|
338
339
|
```
|
|
339
340
|
|
|
340
341
|
Note that by default it will attempt to use the Indexed DB provided by the browser as a crypto store. If running outside the browser, you will need to pass [an options object](https://briij.github.io/@textrp/briij-js-sdk/classes/briij.BriijClient.html#initrustcrypto) which includes `useIndexedDB: false`, to use an ephemeral in-memory store instead. Note that without a persistent store, you'll need to create a new device on the server side (with [`BriijClient.loginRequest`](https://briij.github.io/@textrp/briij-js-sdk/classes/briij.BriijClient.html#loginrequest)) each time your application starts.
|
|
@@ -349,7 +350,7 @@ You should normally set up [secret storage](https://spec.matrix.org/v1.12/client
|
|
|
349
350
|
`bootstrapSecretStorage` can be called unconditionally: it will only set up the secret storage if it is not already set up (unless you use the `setupNewSecretStorage` parameter).
|
|
350
351
|
|
|
351
352
|
```javascript
|
|
352
|
-
const
|
|
353
|
+
const client = sdk.createClient({
|
|
353
354
|
...,
|
|
354
355
|
cryptoCallbacks: {
|
|
355
356
|
getSecretStorageKey: async (keys) => {
|
|
@@ -359,7 +360,7 @@ const matrixClient = sdk.createClient({
|
|
|
359
360
|
},
|
|
360
361
|
});
|
|
361
362
|
|
|
362
|
-
|
|
363
|
+
client.getCrypto().bootstrapSecretStorage({
|
|
363
364
|
// This function will be called if a new secret storage key (aka recovery key) is needed.
|
|
364
365
|
// You should prompt the user to save the key somewhere, because they will need it to unlock secret storage in future.
|
|
365
366
|
createSecretStorageKey: async () => {
|
|
@@ -379,7 +380,7 @@ To set up cross-signing to verify devices and other users, call
|
|
|
379
380
|
[`CryptoApi.bootstrapCrossSigning`](https://briij.github.io/@textrp/briij-js-sdk/interfaces/crypto_api.CryptoApi.html#bootstrapCrossSigning):
|
|
380
381
|
|
|
381
382
|
```javascript
|
|
382
|
-
|
|
383
|
+
client.getCrypto().bootstrapCrossSigning({
|
|
383
384
|
authUploadDeviceSigningKeys: async (makeRequest) => {
|
|
384
385
|
return makeRequest(authDict);
|
|
385
386
|
},
|
|
@@ -396,10 +397,10 @@ If the user doesn't already have a [key backup](https://spec.matrix.org/v1.12/cl
|
|
|
396
397
|
```javascript
|
|
397
398
|
// Check if we have a key backup.
|
|
398
399
|
// If checkKeyBackupAndEnable returns null, there is no key backup.
|
|
399
|
-
const hasKeyBackup = (await
|
|
400
|
+
const hasKeyBackup = (await client.getCrypto().checkKeyBackupAndEnable()) !== null;
|
|
400
401
|
|
|
401
402
|
// Create the key backup
|
|
402
|
-
await
|
|
403
|
+
await client.getCrypto().resetKeyBackup();
|
|
403
404
|
```
|
|
404
405
|
|
|
405
406
|
## Verify a new device
|
|
@@ -421,8 +422,8 @@ This migration happens automatically when you call `initRustCrypto()` instead of
|
|
|
421
422
|
but you need to provide the legacy [`cryptoStore`](https://briij.github.io/@textrp/briij-js-sdk/interfaces/briij.ICreateClientOpts.html#cryptoStore) and [`pickleKey`](https://briij.github.io/@textrp/briij-js-sdk/interfaces/briij.ICreateClientOpts.html#pickleKey) to [`createClient`](https://briij.github.io/@textrp/briij-js-sdk/functions/briij.createClient.html):
|
|
422
423
|
|
|
423
424
|
```javascript
|
|
424
|
-
// You should provide the legacy crypto store and the pickle key to the
|
|
425
|
-
const
|
|
425
|
+
// You should provide the legacy crypto store and the pickle key to the client in order to migrate the data.
|
|
426
|
+
const client = sdk.createClient({
|
|
426
427
|
cryptoStore: myCryptoStore,
|
|
427
428
|
pickleKey: myPickleKey,
|
|
428
429
|
baseUrl: "http://localhost:8008",
|
|
@@ -431,14 +432,14 @@ const matrixClient = sdk.createClient({
|
|
|
431
432
|
});
|
|
432
433
|
|
|
433
434
|
// The migration will be done automatically when you call `initRustCrypto`.
|
|
434
|
-
await
|
|
435
|
+
await client.initRustCrypto();
|
|
435
436
|
```
|
|
436
437
|
|
|
437
438
|
To follow the migration progress, you can listen to the [`CryptoEvent.LegacyCryptoStoreMigrationProgress`](https://briij.github.io/@textrp/briij-js-sdk/enums/crypto_api.CryptoEvent.html#LegacyCryptoStoreMigrationProgress) event:
|
|
438
439
|
|
|
439
440
|
```javascript
|
|
440
441
|
// When progress === total === -1, the migration is finished.
|
|
441
|
-
|
|
442
|
+
client.on(CryptoEvent.LegacyCryptoStoreMigrationProgress, (progress, total) => {
|
|
442
443
|
...
|
|
443
444
|
});
|
|
444
445
|
```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AESEncryptedSecretStoragePayload.js","names":[],"sources":["../../src/@types/AESEncryptedSecretStoragePayload.ts"],"sourcesContent":["/*\
|
|
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":["/*\
|
|
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":[]}
|