ApiSessionFunctions
Function: offerToPhone()
function offerToPhone(params, onStage): Promise<PairingOffer>;Defined in: packages/core/src/session/pairing.ts:81
Starts offering an account to a phone; the first relay goes in the link.
One offer serves one phone: the first that commits is the only one answered.
The code stops working after ttlMs if no phone has used it, and as soon as
one has.
Parameters
| Parameter | Type | Description |
|---|---|---|
params | { invites: () => Promise<readonly string[]>; link: string; relays: readonly string[]; seed: Uint8Array; transport?: (did) => PeerTransport; ttlMs?: number; } | - |
params.invites | () => Promise<readonly string[]> | An invite to every space the account holds. Invites carry everything a peer needs to open a space, the key of a private one included. |
params.link | string | - |
params.relays | readonly string[] | - |
params.seed | Uint8Array | - |
params.transport? | (did) => PeerTransport | - |
params.ttlMs? | number | - |
onStage | (stage) => void | - |
Returns
Promise<PairingOffer>