decodeConstr
The homogenous field type case is used by the uplc ConstrData (undetermined number of UplcData items)
export function decodeConstr(
bytes: BytesLike,
fieldDecoder: unknown
): [number, unknown]
Arguments
Name | Type | Description |
---|---|---|
bytes | BytesLike | Note: the conditional tuple check loses the tupleness if we just check against array, hence first we check against a tuple, and then an array (needed for the empty case) |
fieldDecoder | unknown | array for heterogenous item types, single function for homogenous item types |
Return value
[number, unknown]