# Function: rolesOf()

```ts
function rolesOf(state, did): readonly string[];
```

Defined in: [packages/core/src/space/roles.ts:424](https://github.com/leifriksheim/minca/blob/main/core/src/space/roles.ts#L424)

The roles assigned to an account in a state, by name

## Parameters

| Parameter | Type |
| ------ | ------ |
| `state` | [`AccessState`](https://minca.dev/api/core/interfaces/AccessState.md) |
| `did` | `string` |

## Returns

readonly `string`[]
