The pool builds the public-input array for each verifier. Index 0 (and index 1 for swaps) is supplied by the contract. The rest is copied in order straight from the call’s ABI-encoded params struct.
The input counts and byte lengths are hand-counted in the contract (46/1440, 38/1184, 52/1600). Changing a params struct without changing them makes every proof fail with a bare InvalidProof.

Private transfer: 46

Private withdrawal: 38

Private swap: 52

Encoding rules

  • Every input is a bytes32 and must be < the BN254 scalar modulus (PublicInputNotInField).
  • Addresses are left-padded to 32 bytes.
  • The swap selector is a field element. The contract uses its low 4 bytes.
  • Unused nullifier slots are 0.