ApiSessionFunctions
Function: receiveFromDesktop()
function receiveFromDesktop(
ticket,
onStage,
options?
): Promise<Handover>;Defined in: packages/core/src/session/pairing.ts:237
The phone's side: meets the desktop, shows the code (confirm), and
resolves with the account and its spaces once the person confirms on the
computer.
Parameters
| Parameter | Type | Description |
|---|---|---|
ticket | PairingTicket | - |
onStage | (stage) => void | - |
options? | { confirmTimeoutMs?: number; findTimeoutMs?: number; signal?: AbortSignal; transport?: (did) => PeerTransport; } | - |
options.confirmTimeoutMs? | number | How long the person has to compare the codes. Default 10 minutes. |
options.findTimeoutMs? | number | How long to wait for the computer to answer at all. Default 60 s. |
options.signal? | AbortSignal | Stops it: the phone leaves the room, and the promise rejects. |
options.transport? | (did) => PeerTransport | - |
Returns
Promise<Handover>
Throws
When the desktop does not answer, the person says the codes differ, or what arrives is not a handover