# MAX_APP_METADATA_DEPTH

> `const` **MAX\_APP\_METADATA\_DEPTH**: `256` = `256`

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

How deep the allowlist walk in `headers.ts` will descend into an
`app_metadata` value or a recipient's unprotected map, on encode and
decode alike.

A library resource limit, not a COSE or FIP rule: it turns a stack
overflow into a package error.