# parseUnits

> **parseUnits**(`value`, `decimals?`): `bigint`

Defined in: [packages/synapse-core/src/utils/format.ts:28](https://github.com/FilOzone/synapse-sdk/blob/7fdc04df4e3c52366a9f0cd55da4c05e20b2ed82/packages/synapse-core/src/utils/format.ts#L28)

Parse a value to a bigint.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `value` | `string` \| `number` \| `bigint` \| `Dnum` | The value to parse. It can be a string, a number, a bigint, or a dnum. |
| `decimals?` | `number` | The number of decimals to parse. If not provided, the default is 18. |

## Returns

`bigint`

The parsed value as a bigint.