Function u256ToBytes

  • Converts an unsigned 256-bit integer (u256) BigInt into a Uint8Array.

    Parameters

    • val: bigint

      The BigInt to convert

    Returns Uint8Array

    A Uint8Array containing the serialized u256 BigInt value

    Throws

    Will throw an error if the input value is not within the valid u256 range (0 to 340282366920938463463374607431768211455)

Generated using TypeDoc