# Interface: MailboxClient

Defined in: [packages/core/src/network/relays.ts:57](https://github.com/leifriksheim/minca/blob/main/core/src/network/relays.ts#L57)

## Methods

### drop()

```ts
drop(
   relay, 
   topic, 
   blob, 
   ttlSeconds?
): Promise<string>;
```

Defined in: [packages/core/src/network/relays.ts:64](https://github.com/leifriksheim/minca/blob/main/core/src/network/relays.ts#L64)

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()

```ts
fetch(
   relay, 
   topic, 
   after?
): Promise<readonly MailItem[]>;
```

Defined in: [packages/core/src/network/relays.ts:66](https://github.com/leifriksheim/minca/blob/main/core/src/network/relays.ts#L66)

Everything a relay holds under a topic, after a sequence number

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `relay` | `string` |
| `topic` | `string` |
| `after?` | `number` |

#### Returns

`Promise`\<readonly [`MailItem`](https://minca.dev/api/inbox/interfaces/MailItem.md)[]\>

***

### purge()

```ts
purge(
   relay, 
   topic, 
   sign, 
   ids, 
   signChallenge
): Promise<number>;
```

Defined in: [packages/core/src/network/relays.ts:72](https://github.com/leifriksheim/minca/blob/main/core/src/network/relays.ts#L72)

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
