# TxEnvelopeEip8141.getSignPayload

Returns the canonical signing payload of an EIP-8141 envelope.

Elides signature bytes only for entries with an empty payload. Explicit-payload signatures remain committed. The envelope is not mutated.

## Imports

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

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

## Examples

### Signing

```ts twoslash
import {
  Address,
  FrameSignature,
  Secp256k1,
  TxEnvelopeEip8141
} from 'ox'

const privateKey = Secp256k1.randomPrivateKey()
const sender = Address.fromPublicKey(
  Secp256k1.getPublicKey({ privateKey })
)
const envelope = TxEnvelopeEip8141.from({
  chainId: 1,
  frames: [
    {
      flags: 'approveExecutionAndPayment',
      gas: 50_000n,
      mode: 'verify'
    }
  ],
  sender,
  signatures: [FrameSignature.from({ scheme: 'secp256k1' })]
})

const payload = TxEnvelopeEip8141.getSignPayload(envelope)
const signature = Secp256k1.sign({ payload, privateKey })
const signed = TxEnvelopeEip8141.from({
  ...envelope,
  signatures: [
    FrameSignature.from({ scheme: 'secp256k1', signature })
  ]
})
```

## Definition

```ts
function getSignPayload(
  envelope: PartialBy<TxEnvelopeEip8141, 'type'>,
): Hex.Hex
```

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

## Parameters

### envelope

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

The transaction envelope to sign.

## Return Type

The canonical signing digest.

`Hex.Hex`
