# Function: assignKey()

```ts
function assignKey(did, role): Promise<string>;
```

Defined in: [packages/core/src/space/space-access.ts:91](https://github.com/leifriksheim/minca/blob/main/core/src/space/space-access.ts#L91)

The key of the record assigning a role to an account, or taking it away

## Parameters

| Parameter | Type |
| ------ | ------ |
| `did` | `string` |
| `role` | `string` |

## Returns

`Promise`\<`string`\>
