import { ContractIdString } from '../types'; import { ClarityValue } from './clarityValue'; import { ClarityType } from './constants'; export type BooleanCV = TrueCV | FalseCV; export interface TrueCV { type: ClarityType.BoolTrue; } export interface FalseCV { type: ClarityType.BoolFalse; } export interface BufferCV { readonly type: ClarityType.Buffer; readonly value: string; } export interface IntCV { readonly type: ClarityType.Int; readonly value: bigint | number | string; } export interface UIntCV { readonly type: ClarityType.UInt; readonly value: bigint | number | string; } export interface ListCV { type: ClarityType.List; value: T[]; } export type OptionalCV = NoneCV | SomeCV; export interface NoneCV { readonly type: ClarityType.OptionalNone; } export interface SomeCV { readonly type: ClarityType.OptionalSome; readonly value: T; } export type PrincipalCV = StandardPrincipalCV | ContractPrincipalCV; export interface StandardPrincipalCV { readonly type: ClarityType.PrincipalStandard; readonly value: string; } export interface ContractPrincipalCV { readonly type: ClarityType.PrincipalContract; readonly value: ContractIdString; } export type ResponseCV = ResponseErrorCV | ResponseOkCV; export interface ResponseErrorCV { readonly type: ClarityType.ResponseErr; readonly value: T; } export interface ResponseOkCV { readonly type: ClarityType.ResponseOk; readonly value: T; } export interface StringAsciiCV { readonly type: ClarityType.StringASCII; readonly value: string; } export interface StringUtf8CV { readonly type: ClarityType.StringUTF8; readonly value: string; } export type TupleData = { [key: string]: T; }; export interface TupleCV { type: ClarityType.Tuple; value: T; }