Converts a list of bytes into its hexadecimal string representation.

helios.bytesToHex(bytes: number[]): string


Converts utf-8 encoded text from its byte representation to its string representation.

helios.bytesToText(bytes: number[]): string


Deserializes a flat encoded UplcProgram.

helios.deserializeUplcBytes(bytes: number[]): helios.UplcProgram


Quickly extract the script purpose header of a script source, by parsing only the minimally necessary characters. Returns null if the script header is missing or syntactically incorrect.

The first string returned is the script purpose, the second value returned is the script name.

helios.extractScriptPurposeAndName(src: string): ?[string, string]


Converts a hexadecimal string into a list of bytes.

helios.hexToBytes(hex: string): number[]


Returns Uint8Array with the same length as the number of chars in the script. Each resulting byte respresents a different syntax category. This approach should faster than a regexp based a approach.

helios.highlight(src: string): Uint8Array


Template string tag function that doens't do anything and just returns the template string as a string. Can be used as a marker of Helios sources so that syntax highlighting can work inside js/ts files.

helios.hl`...`: string


Converts a string into its utf-8 encoded byte representation.

helios.textToBytes(text: string): number[]