# TypedData.getSignPayload

Gets the payload to use for signing typed data in [EIP-712 format](https://eips.ethereum.org/EIPS/eip-712).

## Imports

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

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

## Examples

```ts twoslash
import { Secp256k1, TypedData, Hash } from 'ox'

const payload = TypedData.getSignPayload({
  // [!code focus:99]
  domain: {
    name: 'Ether Mail',
    version: '1',
    chainId: 1,
    verifyingContract:
      '0x0000000000000000000000000000000000000000'
  },
  types: {
    Person: [
      { name: 'name', type: 'string' },
      { name: 'wallet', type: 'address' }
    ],
    Mail: [
      { name: 'from', type: 'Person' },
      { name: 'to', type: 'Person' },
      { name: 'contents', type: 'string' }
    ]
  },
  primaryType: 'Mail',
  message: {
    from: {
      name: 'Cow',
      wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826'
    },
    to: {
      name: 'Bob',
      wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB'
    },
    contents: 'Hello, Bob!'
  }
})

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

## Definition

```ts
function getSignPayload<typedData, primaryType>(
  value: encode.Value<typedData, primaryType>,
): Hex.Hex
```

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

## Parameters

### value

* **Type:** `encode.Value<typedData, primaryType>`

The typed data to get the sign payload for.

## Return Type

The payload to use for signing.

`Hex.Hex`
