> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://v3.viem.sh/api/mcp` to find what you need.

# TxEnvelopeLegacy.deserialize

:::info
`TxEnvelopeLegacy.deserialize` is a re-export of ox's [`TxEnvelopeLegacy.deserialize`](https://oxlib.sh/api/TxEnvelopeLegacy/deserialize). Refer to the ox documentation for the full reference.
:::

Deserializes a [`TxEnvelopeLegacy.TxEnvelopeLegacy`](/docs/utilities/txenvelopelegacy/types#txenvelopelegacy) from its serialized form.

## Imports

```ts
import { TxEnvelopeLegacy } from 'viem/utils'
```

## Examples

```ts twoslash
// @noErrors
import { TxEnvelopeLegacy } from 'viem/utils'

const envelope = TxEnvelopeLegacy.deserialize(
  '0x01ef0182031184773594008477359400809470997970c51812dc3a010c7d01b50e0d17dc79c8880de0b6b3a764000080c0'
)
// @log: {
// @log:   type: 'legacy',
// @log:   nonce: 785n,
// @log:   gasPrice: 2000000000n,
// @log:   gas: 1000000n,
// @log:   to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
// @log:   value: 1000000000000000000n,
// @log: }
```

## Definition

```ts
function deserialize(
  serialized: Hex.Hex,
): Compute<TxEnvelopeLegacy>
```

## Parameters

### serialized

* **Type:** `Hex.Hex`

The serialized transaction.

## Return Type

Deserialized Transaction Envelope.

`Compute<TxEnvelopeLegacy>`
