# TxEnvelopeLegacy.validate

Validates a [`TxEnvelopeLegacy.TxEnvelopeLegacy`](/api/TxEnvelopeLegacy/types#txenvelopelegacy). Returns `true` if the envelope is valid, `false` otherwise.

## Imports

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

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

## Examples

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

const valid = TxEnvelopeLegacy.assert({
  gasPrice: 2n ** 256n - 1n + 1n,
  chainId: 1,
  to: '0x0000000000000000000000000000000000000000',
  value: Value.fromEther('1')
})
// @log: false
```

## Definition

```ts
function validate(
  envelope: PartialBy<TxEnvelopeLegacy, 'type'>,
): boolean
```

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

## Parameters

### envelope

* **Type:** `PartialBy<TxEnvelopeLegacy, 'type'>`

The transaction envelope to validate.

## Return Type

`boolean`
