toHex

Convert any value to HEX

📘

NOTE

This function does not convert VS addresses to Hex. If you wish to specifically convert VS addresses to HEX, please use visionWeb.address.toHex instead.

Usage

visionWeb.toHex(str);

Parameters

ParameterDescriptionTypeDefault
strThe value to be converted to HEXstring-

Returns

String

Example

visionWeb.toHex("vision");
> 0x766973696f6e