# bytes32

> **bytes32**(`value`): [`Bytes32Value`](https://stage.docs.arkiv.network/typescript-sdk/api-reference/main/type-aliases/bytes32value/)

Defined in: [src/attr/values.ts:365](https://github.com/Arkiv-Network/arkiv-sdk-js/blob/488e08c3687cc5cfaf5dd8ab0fe0f7fed40930bb/src/attr/values.ts#L365)

32 opaque bytes — a hash, a digest, an identifier from another system — indexed for equality.

Use [key](https://stage.docs.arkiv.network/typescript-sdk/api-reference/main/functions/key/) instead when the bytes are an Arkiv entity key: same wire width, but the
distinct type makes the reference visible to readers and to the query language.

## Parameters

### value

32 bytes, as `0x` hex or raw bytes.

`` `0x${string}` `` | `Uint8Array`\<`ArrayBufferLike`\>

## Returns

[`Bytes32Value`](https://stage.docs.arkiv.network/typescript-sdk/api-reference/main/type-aliases/bytes32value/)

## Throws

If the value is not exactly 32 bytes.

## Example

```ts
bytes32(keccak256(toBytes("hello")))
```