• Converts any ClarityValue in to OptionalCV clarity type

    Type Parameters

    Parameters

    • value: T

      to be converted to OptionalCV clarity type

    Returns OptionalCV<T>

    returns instance of type OptionalCV

    Example

     import { someCV, trueCV } from '@stacks/transactions';

    const value = someCV(trueCV());
    // { type: 'some', value: { type: 'true' } }

    See

    clarity test cases for more examples

Generated using TypeDoc