# Interface: NodeDirect

Defined in: [packages/core/src/node/types.ts:933](https://github.com/leifriksheim/minca/blob/main/core/src/node/types.ts#L933)

Direct messages: text sealed to some members' member keys, in a private space (`docs/direct-messages.md`)

## Methods

### list()

```ts
list(spaceId): Promise<readonly DirectMessage[]>;
```

Defined in: [packages/core/src/node/types.ts:945](https://github.com/leifriksheim/minca/blob/main/core/src/node/types.ts#L945)

Every direct message in the space written by or to this account, oldest first

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `spaceId` | `string` |

#### Returns

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

***

### reachable()

```ts
reachable(spaceId): Promise<readonly string[]>;
```

Defined in: [packages/core/src/node/types.ts:935](https://github.com/leifriksheim/minca/blob/main/core/src/node/types.ts#L935)

Members who published a member key, besides you

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `spaceId` | `string` |

#### Returns

`Promise`\<readonly `string`[]\>

***

### send()

```ts
send(
   spaceId, 
   to, 
   text
): Promise<DirectMessage>;
```

Defined in: [packages/core/src/node/types.ts:943](https://github.com/leifriksheim/minca/blob/main/core/src/node/types.ts#L943)

Seals text for these members and you, and writes it, first defining
`std.direct` when the space lacks it and you may.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `spaceId` | `string` |
| `to` | readonly `string`[] |
| `text` | `string` |

#### Returns

`Promise`\<[`DirectMessage`](https://minca.dev/api/core/interfaces/DirectMessage.md)\>

#### Throws

When the text is empty, it is for no one or for more than
`MAX_DIRECT_TO` people, someone it is for has no member key here, or this
node wasn't given your member key for the space (an agent isn't)
