import { ClarityValue } from '../clarityValue' ; import { ClarityType } from '../constants' ; import { isClarityName } from '../../utils' ; type TupleData < T extends ClarityValue = ClarityValue > = { [ key ] : T ; } ; interface TupleCV < T extends TupleData = TupleData > { type : ClarityType . Tuple ; data : T ; } function tupleCV < T extends ClarityValue = ClarityValue > ( data ) { for ( const key in data ) { if ( ! isClarityName ( key ) ) { throw new Error ( `"${ key }" is not a valid Clarity name` ) ; } } return { type : ClarityType . Tuple , data } ; } export { TupleCV , tupleCV } ;