Skip to content

Braga has been retired. The next public testnet is coming in September 2026. Read the announcement →

u256(value): U256Value

Defined in: src/attr/values.ts:126

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 first for counters, timestamps and block heights.

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

string | number | bigint

U256Value

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

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