Type alias CryptoEventHandlerMap

CryptoEventHandlerMap: {
    crossSigning.keysChanged: ((data: {}) => void);
    crypto.devicesUpdated: ((users: string[], initialFetch: boolean) => void);
    crypto.keyBackupFailed: ((errcode: string) => void);
    crypto.keyBackupSessionsRemaining: ((remaining: number) => void);
    crypto.keyBackupStatus: ((enabled: boolean) => void);
    crypto.keySignatureUploadFailure: ((failures: IUploadKeySignaturesResponse["failures"], source: "checkOwnCrossSigningTrust" | "afterCrossSigningLocalKeyChange" | "setDeviceVerification", upload: ((opts: {
        shouldEmit: boolean;
    }) => Promise<void>)) => void);
    crypto.roomKeyRequest: ((request: IncomingRoomKeyRequest) => void);
    crypto.roomKeyRequestCancellation: ((request: IncomingRoomKeyRequestCancellation) => void);
    crypto.verification.request: ((request: VerificationRequest<any>) => void);
    crypto.warning: ((type: string) => void);
    crypto.willUpdateDevices: ((users: string[], initialFetch: boolean) => void);
    deviceVerificationChanged: ((userId: string, deviceId: string, device: DeviceInfo) => void);
    userCrossSigningUpdated: ((userId: string) => void);
    userTrustStatusChanged: ((userId: string, trustLevel: UserTrustLevel) => void);
}

Type declaration

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

        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.

        Parameters

        • data: {}

          Returns void

    • crypto.devicesUpdated: ((users: string[], initialFetch: boolean) => void)
        • (users: string[], initialFetch: boolean): void
        • Fires whenever the stored devices for a user have changed

          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.keyBackupFailed: ((errcode: string) => void)
        • (errcode: string): void
        • Parameters

          • errcode: string

          Returns void

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

          • remaining: number

          Returns void

    • crypto.keyBackupStatus: ((enabled: boolean) => void)
        • (enabled: boolean): void
        • Fires whenever the status of e2e key backup changes, as returned by getKeyBackupEnabled()

          Example

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

          Parameters

          • enabled: boolean

            true if key backup has been enabled, otherwise false

          Returns void

    • crypto.keySignatureUploadFailure: ((failures: IUploadKeySignaturesResponse["failures"], source: "checkOwnCrossSigningTrust" | "afterCrossSigningLocalKeyChange" | "setDeviceVerification", upload: ((opts: {
          shouldEmit: boolean;
      }) => Promise<void>)) => void)
        • (failures: IUploadKeySignaturesResponse["failures"], source: "checkOwnCrossSigningTrust" | "afterCrossSigningLocalKeyChange" | "setDeviceVerification", upload: ((opts: {
              shouldEmit: boolean;
          }) => Promise<void>)): void
        • Parameters

          • failures: IUploadKeySignaturesResponse["failures"]
          • source: "checkOwnCrossSigningTrust" | "afterCrossSigningLocalKeyChange" | "setDeviceVerification"
          • upload: ((opts: {
                shouldEmit: boolean;
            }) => Promise<void>)
              • (opts: {
                    shouldEmit: boolean;
                }): Promise<void>
              • Parameters

                • opts: {
                      shouldEmit: boolean;
                  }
                  • shouldEmit: boolean

                Returns Promise<void>

          Returns void

    • crypto.roomKeyRequest: ((request: IncomingRoomKeyRequest) => void)
    • crypto.roomKeyRequestCancellation: ((request: IncomingRoomKeyRequestCancellation) => void)
    • crypto.verification.request: ((request: VerificationRequest<any>) => void)
    • crypto.warning: ((type: string) => void)
        • (type: string): void
        • Fires when the app may wish to warn the user about something related the end-to-end crypto.

          Parameters

          • type: string

            One of the strings listed above

          Returns void

    • crypto.willUpdateDevices: ((users: string[], initialFetch: boolean) => void)
        • (users: string[], initialFetch: boolean): void
        • Fires whenever the stored devices for a user will be updated

          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: string, deviceId: string, device: DeviceInfo) => void)
        • (userId: string, deviceId: string, device: DeviceInfo): void
        • Fires when a device is marked as verified/unverified/blocked/unblocked by MatrixClient#setDeviceVerified|MatrixClient.setDeviceVerified or MatrixClient#setDeviceBlocked|MatrixClient.setDeviceBlocked.

          Parameters

          • userId: string

            the owner of the verified device

          • deviceId: string

            the id of the verified device

          • device: DeviceInfo

          Returns void

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

          • userId: string

          Returns void

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

          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.

          Parameters

          • userId: string

            the userId of the user in question

          • trustLevel: UserTrustLevel

            The new trust level of the user

          Returns void

    Generated using TypeDoc