Skip to content

@lelantos-org/sdk / protocol / coeffCount

Function: coeffCount() ​

ts
function coeffCount(shape): number;

Defined in: @lelantos-org/sdk/dist/protocol/shape.d.ts:53

Coefficients the polynomial y = Σ c[k]·z^k is evaluated over, and the words the coefficient digest absorbs: coeffs' output length.

Merkle root, one nullifier per input, one commitment per output, publicAssetId and publicOut: 13 at 4×6, the leading words of the challenge preimage.

PolyEval is affine in each coefficient and the prover knows z before choosing a witness (the contract derives it from prover-written calldata), so the evaluation alone binds nothing. The circuit outputs a Poseidon digest of its coefficients as a public signal, and the contract hashes the calldata copy of that digest into z: the witness's coefficients are fixed before z, and two distinct coefficient vectors agree at z with probability at most (coeffCount - 1) / r.

The remaining challenge words are not circuit signals. They are hashed into z and never evaluated, which binds them against a tampering relayer.

Parameters ​

ParameterType
shapeCircuitShape

Returns ​

number