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

# Signature.extract

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

Extracts a [`Signature.Signature`](/docs/utilities/signature/types#signature) from an arbitrary object that may include signature properties.

## Imports

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

## Examples

```ts twoslash
// @noErrors
import { Signature } from 'viem/utils'

Signature.extract({
  baz: 'barry',
  foo: 'bar',
  r: '0x6e100a352ec6ad1b70802290e18aeed190704973570f3b8ed42cb9808e2ea6bf',
  s: '0x4a90a229a244495b41890987806fcbd2d5d23fc0dbe5f5256c2613c039d76db8',
  yParity: 1,
  zebra: 'stripes'
})
// @log: {
// @log:   r: '0x6e100a352ec6ad1b70802290e18aeed190704973570f3b8ed42cb9808e2ea6bf',
// @log:   s: '0x4a90a229a244495b41890987806fcbd2d5d23fc0dbe5f5256c2613c039d76db8',
// @log:   yParity: 1
// @log: }
```

## Definition

```ts
function extract(
  value: extract.Value,
): Signature | undefined
```

## Parameters

### value

* **Type:** `extract.Value`

The arbitrary object to extract the signature from.

#### value.r

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

#### value.s

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

#### value.v

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

#### value.yParity

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

## Return Type

The extracted [`Signature.Signature`](/docs/utilities/signature/types#signature).

`Signature | undefined`
