# Authorization.hash

Computes the hash for an [`Authorization.Authorization`](/api/Authorization/types#authorization) in [EIP-7702 format](https://eips.ethereum.org/EIPS/eip-7702): `keccak256('0x05' || rlp([chain_id, address, nonce]))`.

## Imports

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

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

## Examples

```ts twoslash
import { Authorization } from 'ox'

const authorization = Authorization.from({
  address: '0x1234567890abcdef1234567890abcdef12345678',
  chainId: 1,
  nonce: 69n
})

const hash = Authorization.hash(authorization) // [!code focus]
```

## Definition

```ts
function hash(
  authorization: Authorization,
  options?: hash.Options,
): Hex.Hex
```

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

## Parameters

### authorization

* **Type:** `Authorization`

The [`Authorization.Authorization`](/api/Authorization/types#authorization).

#### authorization.address

* **Type:** `abitype_Address`

Address of the contract to set as code for the Authority.

#### authorization.chainId

* **Type:** `numberType`

Chain ID to authorize.

#### authorization.nonce

* **Type:** `bigintType`

Nonce of the Authority to authorize.

### options

* **Type:** `hash.Options`
* **Optional**

#### options.presign

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

Whether to hash this authorization for signing.

## Return Type

The hash.

`Hex.Hex`
