> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://v3.viem.sh/api/mcp` to find what you need.

# SignatureErc6492

:::info
`SignatureErc6492` is a re-export of ox's [`SignatureErc6492`](https://oxlib.sh/ercs/erc6492/SignatureErc6492). Refer to the ox documentation for the full reference.
:::

Utility functions for working with [ERC-6492 wrapped signatures](https://eips.ethereum.org/EIPS/eip-6492#specification).

## Examples

```ts twoslash
// @noErrors
import { PersonalMessage, Secp256k1, Signature } from 'viem/utils'
import { SignatureErc6492 } from 'viem/utils' // [!code focus]

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

const wrapped = SignatureErc6492.wrap({
  // [!code focus]
  data: '0xcafebabe', // [!code focus]
  signature: Signature.toHex(signature), // [!code focus]
  to: '0xcafebabecafebabecafebabecafebabecafebabe' // [!code focus]
}) // [!code focus]
// @log: '0x000000000000000000000000cafebabecafebabecafebabecafebabecafebabe000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000004deadbeef000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000041fa78c5905fb0b9d6066ef531f962a62bc6ef0d5eb59ecb134056d206f75aaed7780926ff2601a935c2c79707d9e1799948c9f19dcdde1e090e903b19a07923d01c000000000000000000000000000000000000000000000000000000000000006492649264926492649264926492649264926492649264926492649264926492'
```

## Functions

| Name                | Description                         |
| ------------------- | ----------------------------------- |
| [`SignatureErc6492.assert`](/docs/utilities/signatureerc6492/assert) | Asserts that the wrapped signature is valid. |
| [`SignatureErc6492.from`](/docs/utilities/signatureerc6492/from) | Parses an [ERC-6492 wrapped signature](https://eips.ethereum.org/EIPS/eip-6492#specification) into its constituent parts. |
| [`SignatureErc6492.unwrap`](/docs/utilities/signatureerc6492/unwrap) | Parses an [ERC-6492 wrapped signature](https://eips.ethereum.org/EIPS/eip-6492#specification) into its constituent parts. |
| [`SignatureErc6492.validate`](/docs/utilities/signatureerc6492/validate) | Validates a wrapped signature. Returns `true` if the wrapped signature is valid, `false` otherwise. |
| [`SignatureErc6492.wrap`](/docs/utilities/signatureerc6492/wrap) | Serializes an [ERC-6492 wrapped signature](https://eips.ethereum.org/EIPS/eip-6492#specification). |

## Errors

| Name                | Description                         |
| ------------------- | ----------------------------------- |
| [`SignatureErc6492.InvalidUnwrappedSignatureError`](/docs/utilities/signatureerc6492/errors#signatureerc6492invalidunwrappedsignatureerror) | Thrown when an ERC-6492 unwrapped signature object is malformed. |
| [`SignatureErc6492.InvalidWrappedSignatureError`](/docs/utilities/signatureerc6492/errors#signatureerc6492invalidwrappedsignatureerror) | Thrown when the ERC-6492 wrapped signature is invalid. |

## Types

| Name                | Description                         |
| ------------------- | ----------------------------------- |
| [`SignatureErc6492.Unwrapped`](/docs/utilities/signatureerc6492/types#signatureerc6492unwrapped) | Unwrapped ERC-6492 signature. |
| [`SignatureErc6492.Wrapped`](/docs/utilities/signatureerc6492/types#signatureerc6492wrapped) | Wrapped ERC-6492 signature. |
