Interface: NodeInbox
Defined in: packages/core/src/node/types.ts:995
The inbox: how people you share no space with ask to become your contact (spec/07-inbox.md)
Methods
accept()
accept(id): Promise<ContactView>;Defined in: packages/core/src/node/types.ts:1030
Joins the space for two a knock invites you to, and puts whoever knocked on your list
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<ContactView>
claim()
claim(username): Promise<InboxView>;Defined in: packages/core/src/node/types.ts:1014
Claims a username (leif@minca.social) for your inbox on its domain's
name service, opening the inbox first if need be. The name follows the
inbox: replacing it, or changing its name or mailboxes, points the name at
the new code, and it is renewed before it lapses.
Parameters
| Parameter | Type |
|---|---|
username | string |
Returns
Promise<InboxView>
clear()
clear(): Promise<void>;Defined in: packages/core/src/node/types.ts:1007
Clears every knock waiting in your inbox, and keeps it open
Returns
Promise<void>
dismiss()
dismiss(id): Promise<void>;Defined in: packages/core/src/node/types.ts:1032
Lets a knock go without blocking whoever knocked
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<void>
get()
get(): Promise<InboxView | null>;Defined in: packages/core/src/node/types.ts:997
Your inbox, or null until it is opened
Returns
Promise<InboxView | null>
knock()
knock(code, options?): Promise<{
carried: boolean;
space: string;
}>;Defined in: packages/core/src/node/types.ts:1021
Knocks on someone's inbox, by its code, a link, or a username, with a
space for two; carried as for contacts.ask
Parameters
| Parameter | Type |
|---|---|
code | string |
options? | { note?: string; } |
options.note? | string |
Returns
Promise<{
carried: boolean;
space: string;
}>
knocks()
knocks(): Promise<readonly KnockView[]>;Defined in: packages/core/src/node/types.ts:1026
Knocks waiting in your inbox; also turns your knocks someone joined into contacts
Returns
Promise<readonly KnockView[]>
open()
open(options?): Promise<InboxView>;Defined in: packages/core/src/node/types.ts:1003
Opens your inbox, or changes its mailboxes (1–3) and the name its code gives. Keeps the current ones by default; a new inbox waits at up to 3 of this node's relays, under the account's name.
Parameters
| Parameter | Type |
|---|---|
options? | { name?: string; places?: readonly string[]; } |
options.name? | string |
options.places? | readonly string[] |
Returns
Promise<InboxView>
release()
release(): Promise<InboxView>;Defined in: packages/core/src/node/types.ts:1016
Gives your username up: it leads nowhere, and anyone may claim it
Returns
Promise<InboxView>
rotate()
rotate(): Promise<InboxView>;Defined in: packages/core/src/node/types.ts:1005
Replaces your inbox with the next generation, clearing it first: codes for the old one lead nowhere
Returns
Promise<InboxView>
sent()
sent(): Promise<readonly SentKnockView[]>;Defined in: packages/core/src/node/types.ts:1028
Knocks you left that nobody has joined yet
Returns
Promise<readonly SentKnockView[]>