# TxEnvelopeLegacy.getSignPayload

Returns the payload to sign for a [`TxEnvelopeLegacy.TxEnvelopeLegacy`](/api/TxEnvelopeLegacy/types#txenvelopelegacy).

## Imports

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

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

## Examples

The example below demonstrates how to compute the sign payload which can be used with ECDSA signing utilities like [`Secp256k1.sign`](/api/Secp256k1/sign).

```ts twoslash
// @noErrors
import { Secp256k1, TxEnvelopeLegacy } from 'ox'

const envelope = TxEnvelopeLegacy.from({
  nonce: 0n,
  gasPrice: 1000000000n,
  gas: 21000n,
  to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
  value: 1000000000000000000n
})

const payload = TxEnvelopeLegacy.getSignPayload(envelope) // [!code focus]
// @log: '0x...'

const signature = Secp256k1.sign({
  payload,
  privateKey: '0x...'
})
```

## Definition

```ts
function getSignPayload(
  envelope: TxEnvelopeLegacy<false>,
): getSignPayload.ReturnType
```

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

## Parameters

### envelope

* **Type:** `TxEnvelopeLegacy<false>`

The transaction envelope to get the sign payload for.

#### envelope.gasPrice

* **Type:** `bigintType`
* **Optional**

Base fee per gas.

## Return Type

The sign payload.

`getSignPayload.ReturnType`
