ol.trixnity.verification

Verification state snapshots and active verification flows.

Upstream Mapping

This namespace maps to Trixnity’s VerificationService.

The public wrappers here cover:

  • creating device and user verification requests

  • accepting requests, starting and accepting SAS, confirming or rejecting SAS, and cancelling active verifications

  • the current active device verification and its relieved flow

  • the current active user verifications and their relieved flow

  • self-verification method discovery

Use ol.trixnity.key for trust and key-management APIs that often accompany verification workflows.

current-active-device-verification

(current-active-device-verification client)

Returns the current active device verification, or nil when none is active.


active-device-verification

(active-device-verification client)

Returns a relieved Missionary flow of the current active device verification.


current-active-user-verifications

(current-active-user-verifications client)

Returns the current active user verifications as a vector.


active-verification-snapshots

(active-verification-snapshots client)

Returns active device and user verification snapshots as a vector.

Device verification, when present, appears first, followed by active user verifications in Trixnity order. Each snapshot contains a stable ::mx/verification-id suitable for ready!, start-sas!, accept-sas!, confirm!, no-match!, and cancel!.


status

(status client)

Returns active verification snapshots.


active-user-verifications

(active-user-verifications client)

Returns a relieved Missionary flow of the current active user verifications.


start-device-verification!

(start-device-verification! client user-id device-id)

Creates a device verification request and returns a Missionary task.

user-id is the target Matrix user id. device-id is the target Matrix device id. The task resolves to a normalized active-verification snapshot.

Maps to Trixnity VerificationService.createDeviceVerificationRequest.


start-user-verification!

(start-user-verification! client user-id)

Creates a user verification request and returns a Missionary task.

The task resolves to a normalized active-verification snapshot. Maps to Trixnity VerificationService.createUserVerificationRequest.


get-active-user-verification!

(get-active-user-verification! client room-id event-id)

Gets or creates an active user verification for a room request event.

room-id and event-id identify a Matrix verification request event. The task resolves to a normalized active-verification snapshot or nil. Maps to Trixnity VerificationService.getActiveUserVerification.


ready!

(ready! client verification-id)

Sends m.key.verification.ready for an incoming verification request.

verification-id must come from an active-verification snapshot. The task resolves to the updated snapshot. Maps to Trixnity ActiveVerificationState.TheirRequest.ready.


start-sas!

(start-sas! client verification-id)

Starts SAS verification for a ready verification request.

verification-id must come from an active-verification snapshot. The task resolves to the updated snapshot. Maps to Trixnity ActiveVerificationState.Ready.start(VerificationMethod.Sas).


accept-sas!

(accept-sas! client verification-id)

Accepts an incoming SAS start event.

verification-id must come from an active-verification snapshot. The task resolves to the updated snapshot. Maps to Trixnity ActiveSasVerificationState.TheirSasStart.accept.


accept!

(accept! client verification-id)

Accepts the current incoming verification step.

verification-id must come from an active-verification snapshot. This maps to Trixnity’s available incoming action for the current state: request ready or SAS accept. Prefer ready! or accept-sas! when the caller already knows the state.


confirm!

(confirm! client verification-id)

Confirms that the SAS comparison matches.

verification-id must come from an active-verification snapshot. The task resolves to the updated snapshot. Maps to Trixnity ActiveSasVerificationState.ComparisonByUser.match.


no-match!

(no-match! client verification-id)

Rejects the SAS comparison as a mismatch.

verification-id must come from an active-verification snapshot. The task resolves to the updated snapshot. Maps to Trixnity ActiveSasVerificationState.ComparisonByUser.noMatch.


cancel!

(cancel! client verification-id)
(cancel! client verification-id reason)

Cancels an active verification and returns a Missionary task.

verification-id must come from an active-verification snapshot. With reason, passes that Matrix cancellation reason through to Trixnity.


get-self-verification-methods

(get-self-verification-methods client)

Returns a Missionary flow of available self-verification methods.

Upstream models this as a state machine that distinguishes unmet preconditions, no-cross-signing-yet, already-cross-signed, and available self-verification methods.