# bigIntClamp | @aa-sdk/core

> Overview of the bigIntClamp function from @aa-sdk/core

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

{/* This file is auto-generated by TypeDoc. Do not edit manually. */}

```ts
function bigIntClamp(value, lower, upper): bigint;
```

Defined in: [aa-sdk/core/src/utils/bigint.ts:41](https://github.com/alchemyplatform/aa-sdk/blob/main/aa-sdk/core/src/utils/bigint.ts#L41)

Given a bigint and a min-max range, returns the min-max clamped bigint value

## Parameters

<table>
  <thead>
    <tr>
      <th align="left">Parameter</th>
      <th align="left">Type</th>
      <th align="left">Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `value`
      </td>

      <td>
        `BigNumberish`
      </td>

      <td>
        a bigint value to clamp
      </td>
    </tr>

    <tr>
      <td>
        `lower`
      </td>

      <td>
        `any`
      </td>

      <td>
        lower bound min max tuple value
      </td>
    </tr>

    <tr>
      <td>
        `upper`
      </td>

      <td>
        `any`
      </td>

      <td>
        upper bound min max tuple value
      </td>
    </tr>

  </tbody>
</table>

## Returns

`bigint`

the clamped bigint value per given range