# Interface: AccountStore

Defined in: [packages/core/src/identity/account-store.ts:51](https://github.com/leifriksheim/minca/blob/main/core/src/identity/account-store.ts#L51)

## Properties

| Property | Modifier | Type | Defined in |
| ------ | ------ | ------ | ------ |
| <a id="property-kind"></a> `kind` | `readonly` | `"folder"` \| `"browser"` | [packages/core/src/identity/account-store.ts:52](https://github.com/leifriksheim/minca/blob/main/core/src/identity/account-store.ts#L52) |

## Methods

### list()

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

Defined in: [packages/core/src/identity/account-store.ts:60](https://github.com/leifriksheim/minca/blob/main/core/src/identity/account-store.ts#L60)

Every account here, most recently used first.

At most one entry per identity. Two rows for one DID is always a mistake —
they would appear as separate accounts in a picker while being the same
person — so a duplicate is collapsed onto the most recently used.

#### Returns

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

***

### read()

```ts
read(id): Promise<AccountVault | null>;
```

Defined in: [packages/core/src/identity/account-store.ts:62](https://github.com/leifriksheim/minca/blob/main/core/src/identity/account-store.ts#L62)

One account's locked keys

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `id` | `string` |

#### Returns

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

***

### remove()

```ts
remove(id): Promise<void>;
```

Defined in: [packages/core/src/identity/account-store.ts:66](https://github.com/leifriksheim/minca/blob/main/core/src/identity/account-store.ts#L66)

Forgets an account, and everything it owns

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `id` | `string` |

#### Returns

`Promise`\<`void`\>

***

### write()

```ts
write(summary, vault): Promise<void>;
```

Defined in: [packages/core/src/identity/account-store.ts:64](https://github.com/leifriksheim/minca/blob/main/core/src/identity/account-store.ts#L64)

Adds or replaces an account

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `summary` | [`AccountSummary`](https://minca.dev/api/core/interfaces/AccountSummary.md) |
| `vault` | [`AccountVault`](https://minca.dev/api/core/interfaces/AccountVault.md) |

#### Returns

`Promise`\<`void`\>
