Type alias CryptoEventHandlerMap

CryptoEventHandlerMap: {
    crossSigning.keysChanged: ((data) => void);
    crypto.devicesUpdated: ((users, initialFetch) => void);
    crypto.keyBackupDecryptionKeyCached: ((version) => void);
    crypto.keyBackupFailed: ((errcode) => void);
    crypto.keyBackupSessionsRemaining: ((remaining) => void);
    crypto.keyBackupStatus: ((enabled) => void);
    crypto.keySignatureUploadFailure: ((failures, source, upload) => void);
    crypto.legacyCryptoStoreMigrationProgress: ((progress, total) => void);
    crypto.roomKeyRequest: ((request) => void);
    crypto.roomKeyRequestCancellation: ((request) => void);
    crypto.verification.request: ((request) => void);
    crypto.verificationRequestReceived: ((request) => void);
    crypto.warning: ((type) => void);
    crypto.willUpdateDevices: ((users, initialFetch) => void);
    deviceVerificationChanged: ((userId, deviceId, device) => void);
    userCrossSigningUpdated: ((userId) => void);
    userTrustStatusChanged: ((userId, trustLevel) => void);
}

Type declaration

  • Experimental crossSigning.keysChanged: ((data) => void)

    Fires when the user's cross-signing keys have changed or cross-signing has been enabled/disabled. The client can use getStoredCrossSigningForUser with the user ID of the logged in user to check if cross-signing is enabled on the account. If enabled, it can test whether the current key is trusted using with checkUserTrust with the user ID of the logged in user. The checkOwnCrossSigningTrust function may be used to reconcile the trust in the account key.

    The cross-signing API is currently UNSTABLE and may change without notice.

      • (data): void
      • Parameters

        • data: {}

          Returns void

    • crypto.devicesUpdated: ((users, initialFetch) => void)

      Fires whenever the stored devices for a user have changed

        • (users, initialFetch): void
        • Parameters

          • users: string[]

            A list of user IDs that were updated

          • initialFetch: boolean

            If true, the store was empty (apart from our own device) and has been seeded.

          Returns void

    • crypto.keyBackupDecryptionKeyCached: ((version) => void)

      Fires when the backup decryption key is received and cached.

        • (version): void
        • Parameters

          • version: string

            The version of the backup for which we have the key for.

          Returns void

    • crypto.keyBackupFailed: ((errcode) => void)
        • (errcode): void
        • Parameters

          • errcode: string

          Returns void

    • crypto.keyBackupSessionsRemaining: ((remaining) => void)
        • (remaining): void
        • Parameters

          • remaining: number

          Returns void

    • crypto.keyBackupStatus: ((enabled) => void)

      Fires whenever the status of e2e key backup changes, as returned by getKeyBackupEnabled()

      Example

      matrixClient.on("crypto.keyBackupStatus", function(enabled){
      if (enabled) {
      [...]
      }
      });
        • (enabled): void
        • Parameters

          • enabled: boolean

            true if key backup has been enabled, otherwise false

          Returns void

    • crypto.keySignatureUploadFailure: ((failures, source, upload) => void)
        • (failures, source, upload): void
        • Parameters

          Returns void

    • crypto.legacyCryptoStoreMigrationProgress: ((progress, total) => void)
        • (progress, total): void
        • Parameters

          • progress: number
          • total: number

          Returns void

    • crypto.roomKeyRequest: ((request) => void)

      Fires when we receive a room key request

    • crypto.roomKeyRequestCancellation: ((request) => void)

      Fires when we receive a room key request cancellation

    • crypto.verification.request: ((request) => void)

      Fires when a key verification is requested.

      Deprecated: use CryptoEvent.VerificationRequestReceived.

    • crypto.verificationRequestReceived: ((request) => void)

      Fires when a key verification request is received.

    • crypto.warning: ((type) => void)

      Fires when the app may wish to warn the user about something related the end-to-end crypto.

        • (type): void
        • Parameters

          • type: string

            One of the strings listed above

          Returns void

    • crypto.willUpdateDevices: ((users, initialFetch) => void)

      Fires whenever the stored devices for a user will be updated

        • (users, initialFetch): void
        • Parameters

          • users: string[]

            A list of user IDs that will be updated

          • initialFetch: boolean

            If true, the store is empty (apart from our own device) and is being seeded.

          Returns void

    • deviceVerificationChanged: ((userId, deviceId, device) => void)

      Fires when a device is marked as verified/unverified/blocked/unblocked by MatrixClient.setDeviceVerified or MatrixClient.setDeviceBlocked.

        • (userId, deviceId, device): void
        • Parameters

          • userId: string

            the owner of the verified device

          • deviceId: string

            the id of the verified device

          • device: DeviceInfo

          Returns void

    • userCrossSigningUpdated: ((userId) => void)
        • (userId): void
        • Parameters

          • userId: string

          Returns void

    • Experimental userTrustStatusChanged: ((userId, trustLevel) => void)

      Fires when the trust status of a user changes If userId is the userId of the logged-in user, this indicated a change in the trust status of the cross-signing data on the account.

      The cross-signing API is currently UNSTABLE and may change without notice.

        • (userId, trustLevel): void
        • Parameters

          • userId: string

            the userId of the user in question

          • trustLevel: UserVerificationStatus

            The new trust level of the user

          Returns void

    Generated using TypeDoc