Interface: NodeHosting
Defined in: packages/core/src/node/types.ts:726
Hosts: carriers the account pays for (spec/06-nodes-and-sessions.md, Hosts)
Methods
list()
list(): Promise<readonly HostingView[]>;Defined in: packages/core/src/node/types.ts:728
The hosts the account uses, each asked how it stands; a host paid since gets the spaces, handed over at most once a minute
Returns
Promise<readonly HostingView[]>
over()
over(spaceId): Promise<readonly object[]>;Defined in: packages/core/src/node/types.ts:743
The account's hosts that last said a space is over their free line (spec 08 §1.1). Asks no host.
Parameters
| Parameter | Type |
|---|---|
spaceId | string |
Returns
Promise<readonly object[]>
pay()
pay(url, payment): Promise<PayAnswer>;Defined in: packages/core/src/node/types.ts:735
Adds to the account's balance at a host: a checkout page to open, or a request for a wallet
Parameters
| Parameter | Type |
|---|---|
url | string |
payment | FundPayment |
Returns
Promise<PayAnswer>
payForSpace()
payForSpace(
spaceId,
url,
payment
): Promise<PayAnswer>;Defined in: packages/core/src/node/types.ts:751
Adds to a space's fund at a host it names, once or monthly. Anyone in it may.
Parameters
| Parameter | Type |
|---|---|
spaceId | string |
url | string |
payment | FundPayment |
Returns
Promise<PayAnswer>
remind()
remind(url, email): Promise<void>;Defined in: packages/core/src/node/types.ts:737
Asks a host for reminders by email before paid time runs out
Parameters
| Parameter | Type |
|---|---|
url | string |
email | string |
Returns
Promise<void>
remindForSpace()
remindForSpace(
spaceId,
url,
email
): Promise<void>;Defined in: packages/core/src/node/types.ts:753
Asks a host a space names for reminders by email before the space's paid time runs out
Parameters
| Parameter | Type |
|---|---|
spaceId | string |
url | string |
email | string |
Returns
Promise<void>
space()
space(spaceId): Promise<readonly SpaceHostingView[]>;Defined in: packages/core/src/node/types.ts:741
The hosts a space pays (std.host), each asked how it stands; one paid gets the pass
Parameters
| Parameter | Type |
|---|---|
spaceId | string |
Returns
Promise<readonly SpaceHostingView[]>
startBot()
startBot(
spaceId,
url,
bot
): Promise<{
bot: string;
status: HostStatus;
}>;Defined in: packages/core/src/node/types.ts:765
Asks a host the space names to run a bot there with role; removing the bot stops it
Parameters
| Parameter | Type |
|---|---|
spaceId | string |
url | string |
bot | { name: string; role?: string; } |
bot.name | string |
bot.role? | string |
Returns
Promise<{
bot: string;
status: HostStatus;
}>
stop()
stop(url): Promise<void>;Defined in: packages/core/src/node/types.ts:739
Stops using a host: it forgets the spaces. Cancel a renewing card first (manage).
Parameters
| Parameter | Type |
|---|---|
url | string |
Returns
Promise<void>
stopForSpace()
stopForSpace(spaceId, url): Promise<{
bots: readonly string[];
newKey: boolean;
}>;Defined in: packages/core/src/node/types.ts:755
Stops a space using a host: its std.host record goes, and with manage its bots and key
Parameters
| Parameter | Type |
|---|---|
spaceId | string |
url | string |
Returns
Promise<{
bots: readonly string[];
newKey: boolean;
}>
use()
use(url): Promise<HostingView>;Defined in: packages/core/src/node/types.ts:733
Starts using a host: reads its description and writes a sys.hosting record, with a
subscription key every device signs as. The spaces follow once it is paid.
Parameters
| Parameter | Type |
|---|---|
url | string |
Returns
Promise<HostingView>