# inspectEnvelope

> **inspectEnvelope**(`bytes`): [`WireEnvelopeParts`](/reference/knotkit/wire/type-aliases/wireenvelopeparts/)

Defined in: [packages/wire/src/envelope.ts:286](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/wire/src/envelope.ts#L286)

Take a valid envelope apart into owned copies of every part, whichever module wrote it.

The inverse of [serializeEnvelope](/reference/knotkit/wire/functions/serializeenvelope/) for bytes already known to be an artifact: framing the parts again reproduces the input, and framing them with one part changed yields a valid envelope around the change. It expects no magic and maps no failure to a module’s parse error, so it is not a decoder for untrusted bytes; that is [deserializeEnvelope](/reference/knotkit/wire/functions/deserializeenvelope/).

## Parameters

### bytes

`Uint8Array`

## Returns

[`WireEnvelopeParts`](/reference/knotkit/wire/type-aliases/wireenvelopeparts/)

## Throws

With `INVALID_ARGUMENT` when `bytes` is not a valid envelope.
