# TxEnvelopeLegacy.deserialize

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

## Imports

:::code-group
```ts [Named]
import { TxEnvelopeLegacy } from 'ox'
```

```ts [Entrypoint]
import * as TxEnvelopeLegacy from 'ox/TxEnvelopeLegacy'
```
:::

## Examples

```ts twoslash
import { TxEnvelopeLegacy } from 'ox'

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>
```

**Source:** [src/core/TxEnvelopeLegacy.ts](https://github.com/wevm/ox/blob/main/src/core/TxEnvelopeLegacy.ts#L671)

## Parameters

### serialized

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

The serialized transaction.

## Return Type

Deserialized Transaction Envelope.

`Compute<TxEnvelopeLegacy>`
