minca
ApiSessionInterfaces

Interface: ConnectRequest

Defined in: packages/core/src/session/connect.ts:43

What an app asks a home for

Properties

PropertyModifierTypeDescriptionDefined in
accessreadonly"read" | "carry" | "write"write to change the spaces it is given, read only to look. carry is for a carrier — a browser extension keeping the spaces online — which gets passes and no keys (connectCarrier).packages/core/src/session/connect.ts:61
audiencereadonlystringThe app's key — the note is made out to itpackages/core/src/session/connect.ts:46
chooseSpaces?readonlybooleanWhether to offer the person's existing spaces to pick from. Default true.packages/core/src/session/connect.ts:78
contacts?readonlybooleanThe account's contacts: the contacts space, and the contact key that opens contact requests sent to the account. Asking someone, or accepting, also needs account scope — both make or join a space for two.packages/core/src/session/connect.ts:76
create?readonlyreadonly NewSpace[]Spaces the home should make for the app, and give itpackages/core/src/session/connect.ts:70
days?readonlynumberHow many days the note should last, 1–365. The home decides; default 7.packages/core/src/session/connect.ts:94
name?readonlystringWhat the app calls itself. Shown, but never trusted: the home shows the origin too.packages/core/src/session/connect.ts:55
proofreadonlystringThat key's signature over what it agreed to (keyProof): its DID, how it reached the app (via) and whether it asked for records only. So a request can only name a key its sender holds, for what that key asked: disconnecting revokes the key, and must never revoke someone else's.packages/core/src/session/connect.ts:53
recordsOnly?readonlybooleanA note that grants writing records and nothing more (/record), so every peer refuses its key changing a space's collections or who may do what, or writing in the account's own spaces. No contact key, no spaces made for it, and no carrying.packages/core/src/session/connect.ts:85
scope?readonly"spaces" | "account"spaces (the default): only the spaces the person picks, and any made for the app. account: every space, the account's space list, and making and joining spaces itself — for an app that is a view onto the whole account. Either way the app never gets the seed.packages/core/src/session/connect.ts:68
vreadonly1-packages/core/src/session/connect.ts:44
via?readonly"code"code: the key is a program's, which reached the home itself over a connect code (connect-code.ts); the home makes such a request, an app never sends one. The home keeps its connection by its key. Absent: an app's own key.packages/core/src/session/connect.ts:92

On this page