# bytes

## Call Signature

> **bytes**(): `ColumnProperties`\<`"bytes"`, `false`, `false`, `false`\>

Defined in: [src/schema/values.ts:415](https://github.com/Arkiv-Network/arkiv-sdk-js/blob/d464c8dce16c3b8c472479ac5aae9d14344eb067/src/schema/values.ts#L415)

A `bytes` column — a blob. Bytes are stored but never indexed, so a bytes column has no
`.indexed()`: it can be selected, not filtered on. A schema may have several, within the
`MAX_ATTRIBUTES` cap on columns — but the `bytes` values of one create or patch share a single
`MAX_ENTITY_BYTES` budget.

### Returns

`ColumnProperties`\<`"bytes"`, `false`, `false`, `false`\>

## Call Signature

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

Defined in: [src/schema/values.ts:428](https://github.com/Arkiv-Network/arkiv-sdk-js/blob/d464c8dce16c3b8c472479ac5aae9d14344eb067/src/schema/values.ts#L428)

Opaque bytes of any length up to 128 KiB — a document, an image, a serialized object. This is the
default type for a bare `Uint8Array`, so `{ body: buf }` and `{ body: bytes(buf) }` are the same
value.

### Parameters

#### value

The bytes, raw or as `0x` hex. Hex is taken as the bytes it spells, never as text.

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

### Returns

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

### Throws

If the value is not bytes or hex, or exceeds 128 KiB.

### Example

```ts
bytes(new TextEncoder().encode("# Hello"))
bytes("0xdeadbeef")
```