Skip to content

@lelantos-org/sdk / primitives / hexToBytes

Function: hexToBytes() ​

ts
function hexToBytes(h): Uint8Array;

Defined in: @lelantos-org/sdk/dist/core/hex.d.ts:14

Decode an optionally-0x-prefixed even-length hex string.

Parameters ​

ParameterType
hstring

Returns ​

Uint8Array

Throws ​

on odd length or a non-hex character.