ApiInboxInterfaces
Interface: MailboxClient
Defined in: packages/core/src/network/relays.ts:57
Methods
drop()
drop(
relay,
topic,
blob,
ttlSeconds?
): Promise<string>;Defined in: packages/core/src/network/relays.ts:64
Leaves a blob under a topic, kept for ttlSeconds or the relay's own
limit, whichever is shorter.
Parameters
| Parameter | Type |
|---|---|
relay | string |
topic | string |
blob | string |
ttlSeconds? | number |
Returns
Promise<string>
The blob's id
Throws
When the relay refuses it, or can't be reached
fetch()
fetch(
relay,
topic,
after?
): Promise<readonly MailItem[]>;Defined in: packages/core/src/network/relays.ts:66
Everything a relay holds under a topic, after a sequence number
Parameters
| Parameter | Type |
|---|---|
relay | string |
topic | string |
after? | number |
Returns
Promise<readonly MailItem[]>
purge()
purge(
relay,
topic,
sign,
ids,
signChallenge
): Promise<number>;Defined in: packages/core/src/network/relays.ts:72
Clears blobs from a topic — all of them, or those named — as the inbox's owner: shows the signing key and signs the relay's challenge with it.
Parameters
| Parameter | Type |
|---|---|
relay | string |
topic | string |
sign | string |
ids | readonly string[] | null |
signChallenge | (nonce) => Promise<string> |
Returns
Promise<number>
Throws
Where the relay's kind can't purge