# Address.assert

Asserts that the given value is a valid [`Address.Address`](/api/Address/types#address).

## Imports

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

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

## Examples

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

Address.assert('0xA0Cf798816D4b9b9866b5330EEa46a18382f251e')
```

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

Address.assert('0xdeadbeef')
// @error: InvalidAddressError: Address "0xdeadbeef" is invalid.
```

## Definition

```ts
function assert(
  value: string,
  options?: assert.Options,
): asserts value is Address
```

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

## Parameters

### value

* **Type:** `string`

Value to assert if it is a valid address.

### options

* **Type:** `assert.Options`
* **Optional**

Assertion options.

#### options.strict

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

Enables strict mode. Whether or not to compare the address against its checksum.
