# Function: checkGrant()

```ts
function checkGrant(
   grant, 
   audience, 
   asked?
): Promise<void>;
```

Defined in: [packages/core/src/session/connect.ts:557](https://github.com/leifriksheim/minca/blob/main/core/src/session/connect.ts#L557)

Refuses a grant that is not a valid note from the account to this key, or,
when records only were asked for, one that grants more.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `grant` | [`Grant`](https://minca.dev/api/session/interfaces/Grant.md) |
| `audience` | `string` |
| `asked?` | \{ `recordsOnly?`: `boolean`; \} |
| `asked.recordsOnly?` | `boolean` |

## Returns

`Promise`\<`void`\>
