Expand description
Matrix event layer, spike stage (F3.0).
What it does: builds room events of room version 11 the way a foreign Matrix server expects
them: no event_id on the wire, a content hash, an ed25519 signature over the redacted form,
and an event id that is COMPUTED ($ + url-safe unpadded base64 of the reference hash). It
checks every new event against the room’s auth rules before accepting it, and wraps
ruma-state-res for state resolution over forked state.
What it is not: no HTTP, no storage, no federation transport. Keys come in through a closure, so the crate does not care which ed25519 implementation the caller uses. All ruma types stay behind this crate’s own small surface.
Modules§
Structs§
- EventId
- A Matrix event ID.
- Owned
Event Id - Owned variant of
EventId. - Owned
Room Id - Owned variant of
RoomId. - Owned
User Id - Owned variant of
UserId. - Pdu
- A persistent data unit with the fields state resolution and the auth rules read.
- Room
Builder - Builds the timeline of one NEW room, event by event: fills
prev_events,depthand theauth_eventsthe spec selects from the current state, hashes and signs, computes the id, and refuses an event the auth rules would reject. - Room
Version Rules - The rules applied to a room version.
- Signed
Event - A finished event: its computed id and the signed wire JSON (no
event_idinside). - Signer
- An ed25519 signer: server name, key id (
ed25519:<version>) and a signing closure. The closure signs the exact bytes it is given and returns the 64-byte signature.
Enums§
- Build
Error - Canonical
Json Value - Represents a canonical JSON value as per the Matrix specification.
- IdError
- An error encountered when trying to parse an invalid ID string.
- Resolve
Error - Room
Version Id - A Matrix room version ID.
- State
Event Type - The type of
StateEventthis is.
Constants§
- ROOM_
VERSION - The room version this spike emits.
Functions§
- auth_
chain - The full recursive set of auth events of
ids(the ids themselves included). - auth_
chain_ with auth_chainover any event source.- key_
from_ b64 - A signing key as ruma wants it, from standard base64 (padded or not).
- key_
to_ b64 - Standard base64 of public key bytes.
- resolve_
state - Resolves forked room states (state resolution v2) over a set of known events.
- resolve_
state_ with resolve_stateover any event source (a store lookup).
Type Aliases§
- Canonical
Json Object - The inner type of
CanonicalJsonValue::Object. - Public
KeyMap - A map from entity names to sets of public keys for that entity.
- State
Map - A mapping of event type and state_key to some value
T, usually anEventId.