minca
ApiCoreInterfaces

Interface: SpaceHostClient

Defined in: packages/core/src/session/hosting.ts:689

A host's calls about a space's own subscription: open to anyone, as paying for a space is

Methods

hand()

hand(spaceId, pass): Promise<{
  receipt: SignedStatus;
  status: HostStatus;
}>;

Defined in: packages/core/src/session/hosting.ts:693

Hands the host the space's pass, to carry it with; 402 when nobody has paid

Parameters

ParameterType
spaceIdstring
passunknown

Returns

Promise<{ receipt: SignedStatus; status: HostStatus; }>


pay()

pay(spaceId, payment): Promise<PayAnswer>;

Defined in: packages/core/src/session/hosting.ts:698

Starts adding to the space's fund: anyone may

Parameters

ParameterType
spaceIdstring
paymentFundPayment

Returns

Promise<PayAnswer>


remind()

remind(spaceId, email): Promise<void>;

Defined in: packages/core/src/session/hosting.ts:700

Asks for reminders by email before the space's fund runs out; the host mails a link to confirm first

Parameters

ParameterType
spaceIdstring
emailstring

Returns

Promise<void>


startBot()

startBot(
   spaceId, 
   name, 
   invite
): Promise<{
  bot: string;
  receipt: SignedStatus;
  status: HostStatus;
}>;

Defined in: packages/core/src/session/hosting.ts:706

Asks the host to run a bot in a space it carries: it makes the bot's account and joins with the invite, whose role is what the bot may do. It runs from the space's fund. Answers the bot's DID and the space's status.

Parameters

ParameterType
spaceIdstring
namestring
invitestring

Returns

Promise<{ bot: string; receipt: SignedStatus; status: HostStatus; }>


status()

status(spaceId): Promise<{
  receipt: SignedStatus;
  status: HostStatus;
}>;

Defined in: packages/core/src/session/hosting.ts:691

How the space's subscription stands, checked as signed by the host

Parameters

ParameterType
spaceIdstring

Returns

Promise<{ receipt: SignedStatus; status: HostStatus; }>

On this page