# assertValidRecipientHeaders

> **assertValidRecipientHeaders**(`protectedBytes`, `unprotected`, `path`): `void`

Defined in: [packages/filecoin-encryption-envelope/src/cose/headers.ts:1001](https://github.com/FilOzone/synapse-sdk/blob/9ad84d812e1dd635b76420a7d9388555a04f31b6/packages/filecoin-encryption-envelope/src/cose/headers.ts#L1001)

Validate the protected and unprotected headers of a `COSE_recipient`
without unwrapping its key.

Unsupported recipient algorithms may be skipped only after the recipient
is structurally well formed. This validates its CBOR, header labels,
`crit`, bucket overlap, and known algorithm placement rules.

A protected recipient header is either `h''` or one serialized CBOR map.
A256KW specifically requires `h''`.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `protectedBytes` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) |
| `unprotected` | [`Map`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)\<[`CborValue`](/reference/filoz/filecoin-encryption-envelope/namespaces/cose/type-aliases/cborvalue/), [`CborValue`](/reference/filoz/filecoin-encryption-envelope/namespaces/cose/type-aliases/cborvalue/)\> |
| `path` | `string` |

## Returns

`void`