ethereumjs-monorepo

@ethereumjs/util


@ethereumjs/util / bigIntToAddressBytes

Function: bigIntToAddressBytes()

bigIntToAddressBytes(value, strict?): Uint8Array

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

Encode a bigint as a 20-byte address.

Parameters

value

bigint

strict?

boolean = true

When true, reject values longer than 20 bytes instead of truncating

Returns

Uint8Array

Throws

If strict is true and the encoded value exceeds 20 bytes