# Bloom.containsHash

Checks if a precomputed `keccak256` hash is matched in a [`Bloom.Prepared`](/api/Bloom/types#prepared) bloom filter. Use when the caller already has the hash and wants to skip the keccak inside `containsPrepared`.

## Imports

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

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

## Examples

```ts twoslash
import { Bloom, Hash } from 'ox'

const prepared = Bloom.prepare(
  '0x00000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002020000000000000000000000000000000000000000000008000000001000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
)
const hash = Hash.keccak256(
  '0xef2d6d194084c2de36e0dabfce45d046b37d1106',
  { as: 'Bytes' }
)
Bloom.containsHash(prepared, hash)
// @log: true
```

## Definition

```ts
function containsHash(
  prepared: Prepared,
  hash: Bytes.Bytes,
): boolean
```

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

## Parameters

### prepared

* **Type:** [`Prepared`](/api/Bloom/types#bloomprepared)

Prepared bloom filter.

#### prepared.filter

* **Type:** `Uint8Array`

### hash

* **Type:** `Bytes.Bytes`

Precomputed `keccak256` hash of the input, as `Bytes`.

## Return Type

Whether the input is matched in the bloom filter.

`boolean`
