# Interface: NodeAccount

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

## Methods

### picture()

```ts
picture(): Promise<
  | {
  bytes: Uint8Array;
  mime: string;
}
| null>;
```

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

The account's picture, read from its registry; null without one, or without an account key

#### Returns

`Promise`\<
  \| \{
  `bytes`: `Uint8Array`;
  `mime`: `string`;
\}
  \| `null`\>

***

### profile()

```ts
profile(): Promise<AccountProfileView | null>;
```

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

The account's profile; null without an account key, or before one is set

#### Returns

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

***

### revoke()

```ts
revoke(key, options?): Promise<boolean>;
```

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

Revokes one of this account's keys in the account registry. Needs an account key.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `key` | `string` |
| `options?` | `RevokeOptions` |

#### Returns

`Promise`\<`boolean`\>

***

### setAvatar()

```ts
setAvatar(image, options?): Promise<AccountProfileView>;
```

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

Sets the account's picture everywhere, already resized; `null` removes it.
`name` is kept with it when the registry has no name yet. Needs an account key.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `image` | \| \{ `bytes`: `Uint8Array`; `mime`: `string`; \} \| `null` |
| `options?` | \{ `name?`: `string`; \} |
| `options.name?` | `string` |

#### Returns

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

***

### setName()

```ts
setName(name): Promise<AccountProfileView>;
```

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

Renames the account everywhere. Needs an account key.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `name` | `string` |

#### Returns

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

***

### space()

```ts
space(): Promise<string | null>;
```

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

The account registry's space id, or null without an account key: where to keep what is the
person's own across their devices, like an app's settings, as records in a collection of yours

#### Returns

`Promise`\<`string` \| `null`\>
