Private
_acceptingPrivate
_cancelledOptional
_cancellingPrivate
_chosenPrivate
_decliningPrivate
_observePrivate
_phasePrivate
_qrPrivate
Optional
_verifierReadonly
channelPrivate
Readonly
clientPrivate
commonPrivate
eventsPrivate
eventsPrivate
requestPrivate
timeoutPrivate
Readonly
verificationPrivate
verifierThe cancellation code e.g m.user which is responsible for cancelling this verification
returns whether the phase is PHASE_CANCELLED
The id of the user that cancelled the request, only defined when phase is PHASE_CANCELLED
the method picked in the .start event
returns whether the phase is PHASE_DONE
Whether this request was initiated by the syncing user. For InRoomChannel, this is who sent the .request event. For ToDeviceChannel, this is who sent the .start event
once the phase is PHASE_STARTED (and !initiatedByMe) or PHASE_READY: common methods supported by both sides
The user id of the other party in this request
whether this request has sent it's initial event and needs more events to complete
Only set after a .ready if the other party can scan a QR code
returns whether the phase is PHASE_READY
The id of the user that (will) receive(d) the request
The key verification request event.
The request event, or falsey if not found.
returns whether the phase is PHASE_REQUESTED
The id of the user that initiated the request
returns whether the phase is PHASE_STARTED
Gets which device the verification should be started with given the events sent so far in the verification. This is the same algorithm used to determine which device to send the verification to when no specific device is specified.
The device information
The current remaining amount of ms before the request should be automatically cancelled
The verifier to do the actual verification, once the method has been established. Only defined when the phase
is PHASE_STARTED.
Private
addPrivate
adjustPrivate
applyPrivate
calculateCancels the request, sending a cancellation to the other party
resolves when the event has been sent.
Private
cancelPrivate
cancelPrivate
createRest
...args: Parameters<EventHandlerMap[T]>Rest
...args: Parameters<EventHandlerMap[T]>Private
getPrivate
getChanges the state of the request and verifier in response to a key verification event.
a promise that resolves when any requests as an answer to the passed-in event are sent.
the "symbolic" event type, as returned by the getEventType
function on the channel.
the event to handle. Don't call getType() on it but use the type
parameter instead.
whether this is an even received through sync or not
whether this is the remote echo of an event sent by the same device
whether this event is sent by a party that can accept and/or observe the request like one of our peers. For InRoomChannel this means any device for the syncing user. For ToDeviceChannel, just the syncing device.
Private
isChecks whether the other party supports a given verification method.
This is useful when setting up the QR code UI, as it is somewhat asymmetrical:
if the other party supports SCAN_QR, we should show a QR code in the UI, and vice versa.
For methods that need to be supported by both ends, use the methods
property.
whether or not the other party said the supported the method
the method to check
to check even if the phase is not ready or started yet, internal usage
Optional
event: EventEmitterEvents | ChangePrivate
setPrivate
setupPrivate
transitionCan be used to listen for state changes until the callback returns true.
that resolves once the callback returns true
when the request is cancelled
callback to evaluate whether the request is in the desired state. Takes the request as an argument.
Private
wasOptional
event: MatrixEventPrivate
wasOptional
event: MatrixEventStatic
validateStateless validation logic not specific to the channel. Invoked by the same static method in either channel.
whether the event is valid and should be passed to handleEvent
the "symbolic" event type, as returned by the getEventType
function on the channel.
the event to validate. Don't call getType() on it but use the type
parameter instead.
the client to get the current user and device id from
Generated using TypeDoc
State machine for verification requests. Things that differ based on what channel is used to send and receive verification events are put in
InRoomChannel
orToDeviceChannel
. "change" whenever the state of the request object has changed.