ethereumjs-monorepo

@ethereumjs/util


@ethereumjs/util / bigIntToBytes

Function: bigIntToBytes()

bigIntToBytes(num, littleEndian?): Uint8Array

Defined in: packages/util/src/bytes.ts:110

Convert a bigint to minimal big-endian bytes (optionally little-endian).

Parameters

num

bigint

littleEndian?

boolean = false

When true, reverse the output byte order

Returns

Uint8Array