cvToValue
Usage
import { cvToValue, Cl } from '@stacks/transactions';
cvToValue(Cl.uint(100));
// 100n (bigint)
cvToValue(Cl.bool(true));
// true
cvToValue(Cl.stringAscii('hello'));
// 'hello'
cvToValue(Cl.none());
// null
// With strict JSON compatibility (integers as strings)
cvToValue(Cl.uint(100), true);
// '100' (string)Signature
Returns
Clarity Type
JS Type
Parameters
val (required)
strictJsonCompat (optional)
Last updated
Was this helpful?