cvToJSON
Usage
import { cvToJSON, Cl } from '@stacks/transactions';
cvToJSON(Cl.uint(100));
// { type: 'uint', value: '100' }
cvToJSON(Cl.ok(Cl.uint(100)));
// { type: '(response uint UnknownType)', value: { type: 'uint', value: '100' }, success: true }
cvToJSON(Cl.tuple({ name: Cl.stringAscii('hello'), id: Cl.uint(1) }));
// { type: '(tuple ...)', value: { name: { type: '...', value: 'hello' }, id: { type: 'uint', value: '1' } } }Notes
Signature
Returns
Parameters
val (required)
Last updated
Was this helpful?