Skip to content

Conversation

kaylendog
Copy link

Adds support for MSC3414-esque encrypted state events.

  • Updates matrix-sdk-crypto-wasm to 15.3.0 which includes support for encrypting state events.
  • Adds an MatrixClient.enableEncryptedStateEvents flag to configure top-level behaviour.
  • Modifies MatrixClient.sendStateEvent to call into the WASM SDK if encryption is enabled.
  • Adds MatrixEvent.getWireStateKey, analagous to MatrixEvent.getWireContent.

This can be split into multiple PRs for ease of reviewing if required!

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • Sign-off given on the changes (see CONTRIBUTING.md).

Signed-off-by: Skye Elliot <actuallyori@gmail.com>
- Adds a unit test for `getStateKey` and `getWireStateKey`
- Adds an integration test for sending/receiving encrypted state events.

Signed-off-by: Skye Elliot <actuallyori@gmail.com>
@richvdh
Copy link
Member

richvdh commented Sep 12, 2025

Please don't put words like "feat" in titles of matrix-js-sdk PRs: such titles end up the changelog, and although implementing this has indeed been quite a feat, it doesn't do to brag about it ;)

(also https://richvdh.org/conventional-commits-considered-harmful.html but that's beside the point)

@kaylendog kaylendog changed the title feat: Implement experimental encrypted state events. Implement experimental encrypted state events. Sep 12, 2025
Copy link
Member

@andybalaam andybalaam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good - a few smallish points to work through together.

Copy link
Member

@andybalaam andybalaam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants