IShieldedWithdrawVerifier
Title: IShieldedWithdrawVerifier
The verifier a shielded pool calls to check a withdrawal proof. A consumer deploys a Groth16
verifier for their audited withdraw circuit (whose 5 public signals are, in order,
[root, nullifierHash, recipient, relayer, fee]) and registers its address on the pool.
The implementation MUST pin its circuit's verifying key: whoever can choose the key can forge
a withdrawal and drain the pool. Compile the key in (see src/examples/privacy/). A key in
writable storage, or a Groth16 verifier whose code someone can replace, is only as trustworthy
as whoever controls it.
Functions
verifyProof
function verifyProof(
uint256[2] calldata a,
uint256[2][2] calldata b,
uint256[2] calldata c,
uint256[5] calldata input
) external view returns (bool);Parameters
| Name | Type | Description |
|---|---|---|
| a | uint256[2] | Groth16 proof point A. |
| b | uint256[2][2] | Groth16 proof point B. |
| c | uint256[2] | Groth16 proof point C. |
| input | uint256[5] | The public signals [root, nullifierHash, recipient, relayer, fee]. |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | bool | True iff the proof is valid. |