cvToHex
Converts a Clarity value to a hex-encoded string with a 0x prefix.
Usage
import { cvToHex, Cl } from '@stacks/transactions';
const hex = cvToHex(Cl.uint(100));
// '0x0100000000000000000000000000000064'Signature
function cvToHex(cv: ClarityValue): string;Returns
string
A hex-encoded string with 0x prefix.
Parameters
cv (required)
Type:
ClarityValue
The Clarity value to convert.
Last updated
Was this helpful?