# matchesCommitment

> **matchesCommitment**(`kk`, `recorded`): `boolean`

Defined in: [derive.ts:190](https://github.com/FilOzone/synapse-sdk/blob/68e30a2a5457180e60a5579eb5ecff90b65894b3/packages/keysmith/src/derive.ts#L190)

Verifies that `kk` is the key you expect: the right root wallet and the right
keyspace. Check this before using any key received in a grant.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `kk` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) |
| `recorded` | `string` |

## Returns

`boolean`

## Throws

If the recorded value is not a commitment in this format.