Skip to content

Convert a value to bigint, handling string or bigint inputs

convertBigInt(value, defaultValue?): bigint

Defined in: packages/bitbadgesjs-sdk/src/transactions/precompile/helpers.ts:107

Convert a value to bigint, handling string or bigint inputs

Parameters

value

string | number | bigint | null | undefined

The value to convert

defaultValue?

bigint = 0n

Default value if value is null/undefined

Returns

bigint

The bigint value

Edit this page on GitHub