> **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.

# SignatureErc8010.wrap

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

Wraps a signature into [ERC-8010 format](https://github.com/jxom/ERCs/blob/16f7e3891fff2e1e9c25dea0485497739db8a816/ERCS/erc-8010.md).

## Imports

```ts
import { SignatureErc8010 } from 'viem/utils'
```

## Examples

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

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

const wrapped = SignatureErc8010.wrap({ // [!code focus]
  authorization: { ... }, // [!code focus]
  data: '0xdeadbeef', // [!code focus]
  signature: Signature.toHex(signature), // [!code focus]
}) // [!code focus]
```

## Definition

```ts
function wrap(
  value: SignatureErc8010.Unwrapped,
): Wrapped
```

## Parameters

### value

* **Type:** [`SignatureErc8010.Unwrapped`](/docs/utilities/signatureerc8010/types#signatureerc8010unwrapped)

Values to wrap.

#### value.authorization

* **Type:** `{ address: abitype_Address; chainId: number; nonce: bigint; r: 0x${string}; s: 0x${string}; yParity: number; }`

Authorization signed by the delegatee.

#### value.data

* **Type:** `0x${string}`
* **Optional**

Data to initialize the delegation.

#### value.signature

* **Type:** `0x${string}`

The original signature.

#### value.to

* **Type:** `Address.Address | undefined`
* **Optional**

Address of the initializer.

## Return Type

Wrapped signature.

[`SignatureErc8010.Wrapped`](/docs/utilities/signatureerc8010/types#signatureerc8010wrapped)
