# SignatureEnvelope.extractAddress

Extracts the address of the signer from a [`SignatureEnvelope.SignatureEnvelope`](/tempo/reference/SignatureEnvelope/types#signatureenvelope).

* **secp256k1**: Recovers the address from the payload via `ecrecover`. - **p256** / **webAuthn**: Derives the address from the embedded public key. - **keychain**: Extracts from the inner signature (or returns `userAddress` if `user` is `true`).

## Imports

:::code-group
```ts [Named]
import { SignatureEnvelope } from 'ox/tempo'
```

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

## Examples

```ts twoslash
import { Secp256k1 } from 'ox'
import { SignatureEnvelope } from 'ox/tempo'

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

const address = SignatureEnvelope.extractAddress({
  // [!code focus]
  payload, // [!code focus]
  signature: envelope // [!code focus]
}) // [!code focus]
```

## Definition

```ts
function extractAddress(
  options: extractAddress.Options,
): extractAddress.ReturnType
```

**Source:** [src/tempo/SignatureEnvelope.ts](https://github.com/wevm/ox/blob/main/src/tempo/SignatureEnvelope.ts#L1794)

## Parameters

### options

* **Type:** `extractAddress.Options`

The extraction options.

#### options.payload

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

The sign payload that was signed (only required for secp256k1 signatures).

#### options.root

* **Type:** `boolean`
* **Optional**

Whether to return the root `userAddress` for keychain signatures instead of extracting from the inner signature.

#### options.signature

* **Type:** `SignatureEnvelope`

The signature envelope.

## Return Type

The signer address.

`extractAddress.ReturnType`
