u64
u64(
value):U64Value
Defined in: src/attr/values.ts:146
A 64-bit unsigned integer, indexed for equality and range queries.
This is the width the protocol counts in: block heights, $expiresAt and the entity-nonce are
all u64, so it is the type to reach for when a value has to line up with one of them. Use
u256 for token amounts and anything else that can exceed 2⁶⁴.
Parameters
Section titled “Parameters”A non-negative integer, as a bigint, a safe number, or a decimal or 0x hex
string.
string | number | bigint
Returns
Section titled “Returns”Throws
Section titled “Throws”If the value is negative, non-integral, or wider than 64 bits.
Example
Section titled “Example”u64(1_200_000n) // a block heightu64(Date.now()) // safe integers are acceptedu64("0x124f80") // hex, as it comes back over JSON-RPC