minca
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

ParameterTypeDescription
ticketPairingTicket-
onStage(stage) => void-
options?{ confirmTimeoutMs?: number; findTimeoutMs?: number; signal?: AbortSignal; transport?: (did) => PeerTransport; }-
options.confirmTimeoutMs?numberHow long the person has to compare the codes. Default 10 minutes.
options.findTimeoutMs?numberHow long to wait for the computer to answer at all. Default 60 s.
options.signal?AbortSignalStops 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

On this page