# u256

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

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

A 256-bit unsigned integer, indexed for equality and range queries. The type for token amounts
and anything else that can outgrow 2⁶⁴ — reach for [u64](https://stage.docs.arkiv.network/typescript-sdk/api-reference/main/functions/u64/) first for counters, timestamps
and block heights.

## Parameters

### value

A non-negative integer, as a `bigint`, a safe `number`, or a decimal or `0x` hex
string.

`string` | `number` | `bigint`

## Returns

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

## Throws

If the value is negative, non-integral, or wider than 256 bits.

## Example

```ts
u256(1_000_000n)
u256(Date.now())        // safe integers are accepted
u256("0xf4240")         // hex, as it comes back over JSON-RPC
```