Skip to content

@lelantos-org/sdk / circuit / flatten

Function: flatten() โ€‹

ts
function flatten(input): bigint[];

Defined in: @lelantos-org/sdk/dist/circuit/compression.d.ts:26

Flatten the logical PIs into the PolyEval coefficient vector, in PubInputs.compress(Transact) order:

9 scalar slots + 3ยทN_IN (nullifier, in_cv) + 8ยทN_OUT (out_cm, out_cv, out_cv_dep, 3 clue slots) โ€” see coeffCount in core/shape.ts, which is 31 at 2ร—2 and 42 at 3ร—3.

The shape is read off the input arrays rather than hardcoded, so a witness for any Transact(DEPTH, N_IN, N_OUT) instance flattens correctly. Only the 2ร—2 circuit is deployed today; the 3ร—3 vectors exercise the rest.

Parameters โ€‹

ParameterType
inputFlattenInput

Returns โ€‹

bigint[]

Lelantosno cookies ๐Ÿช ยท no tracking ๐Ÿ‘๏ธ ยท no accounts ๐Ÿ‘คwalletexplorer4536080GitHub