Skip to content

Latest commit

 

History

History
74 lines (45 loc) · 2.63 KB

File metadata and controls

74 lines (45 loc) · 2.63 KB

Utils

API

convertBytesToHex(...)

convertBytesToHex(options: ConvertBytesToHexOptions) => { hex: string; }

Convert a byte array to a hex string.

Param Type
options ConvertBytesToHexOptions

Returns: { hex: string; }

Since: 6.0.0


convertHexToBytes(...)

convertHexToBytes(options: ConvertHexToBytesOptions) => { bytes: number[]; }

Convert a hex string to a byte array.

Param Type
options ConvertHexToBytesOptions

Returns: { bytes: number[]; }

Since: 6.0.0


Interfaces

ConvertBytesToHexOptions

Prop Type Description Default Since
bytes number[] The byte array to convert to a hex string. 6.0.0
start string The text to prepend to the hex string. '0x' 6.0.0
separator string The separator to use between each byte. '' 6.0.0

ConvertHexToBytesOptions

Prop Type Description Default Since
hex string The hex string to convert to a byte array. 6.0.0
start string The text to remove from the beginning of the hex string. '0x' 6.0.0
separator string The separator which is used between each byte. '' 6.0.0