> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# getUint

```ts theme={null}
function getUint(value, name?): bigint
```

Returns `value` as a bigint, validating it is valid as a bigint value and that it is positive.

## Parameters

| Parameter | Type                                                     | Description            |
| :-------- | :------------------------------------------------------- | :--------------------- |
| `value`   | [`BigNumberish`](/sdk/content/type-aliases/BigNumberish) | The value to convert.  |
| `name`?   | `string`                                                 | The name of the value. |

## Returns

`bigint`

The value.

## Throws

If the value is negative.

## Source

[utils/maths.ts:170](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/maths.ts#L170)
