Skip to main content

toBigInt

Callable

  • toBigInt(value: unknown): bigint

  • Auto converts any given value into it's bigint representation

    @example
    console.log(web3.utils.toBigInt(1));
    > 1n

    Parameters

    • value: unknown

      The value to convert

    Returns bigint

    • Returns the value in bigint representation