web3-utilsFunctionstoHextoHex CallabletoHex(value: string | number | bigint | boolean | object | Buffer | ArrayBuffer | Uint8Array, returnType?: boolean): stringAuto converts any given value into it’s hex representation.Parametersvalue: string | number | bigint | boolean | object | Buffer | ArrayBuffer | Uint8ArrayoptionalreturnType: booleanReturns string
Auto converts any given value into it’s hex representation.