Noir ZK Circuits for SIP Protocol
Zero-knowledge proof circuits for the SIP Protocol (Shielded Intents Protocol).
- Language: Noir 1.0.0-beta.15
- Backend: Barretenberg (UltraHonk)
- Tooling: Nargo CLI
| Circuit | Purpose | ACIR Opcodes | Tests |
|---|---|---|---|
| funding_proof | Prove balance >= minimum without revealing balance | 972 | 5 |
| validity_proof | Prove intent authorization without revealing sender | 1113 | 6 |
| fulfillment_proof | Prove fulfillment correctness | 1691 | 8 |
Total: 19 tests passing
circuits/
├── funding_proof/
│ ├── Nargo.toml
│ ├── src/main.nr
│ └── target/funding_proof.json
├── validity_proof/
│ ├── Nargo.toml
│ ├── src/main.nr
│ └── target/validity_proof.json
├── fulfillment_proof/
│ ├── Nargo.toml
│ ├── src/main.nr
│ └── target/fulfillment_proof.json
├── README.md
└── CLAUDE.md
# Install Nargo
curl -L https://raw.githubusercontent.com/noir-lang/noirup/main/install | bash
noirup
# Compile a circuit
cd funding_proof && nargo compile
# Run tests
nargo test
# Get circuit info
nargo info
# Generate proof (requires Prover.toml with inputs)
nargo prove
# Verify proof
nargo verify# From circuits directory
cd funding_proof && nargo test && cd ..
cd validity_proof && nargo test && cd ..
cd fulfillment_proof && nargo test && cd ..Proves that a user has sufficient balance without revealing the actual amount.
Public Inputs:
commitment_hash- Hash of Pedersen commitment to balanceminimum_required- Minimum balance requiredasset_id- Asset identifier
Private Inputs:
balance- Actual user balanceblinding- Commitment blinding factor
Proves intent authorization without revealing sender identity.
Public Inputs:
intent_hash- Hash of the intentsender_commitment_x/y- Commitment to sender identitynullifier- Prevents double-spendingtimestamp,expiry- Time bounds
Private Inputs:
sender_address- Actual sendersender_blinding- Commitment blindingsender_secret- For nullifier derivation- ECDSA signature data
Proves correct swap execution with oracle attestation.
Public Inputs:
intent_hash- Intent being fulfilledoutput_commitment_x/y- Commitment to output amountrecipient_stealth- Delivery addressmin_output_amount- Required minimumsolver_id- Solver identifierfulfillment_time,expiry- Time bounds
Private Inputs:
output_amount- Actual delivered amountoutput_blinding- Commitment blindingsolver_secret- Derives solver_id- Oracle attestation data and signature
See detailed specifications:
The compiled JSON artifacts are used by the SDK's NoirProofProvider:
import { NoirProofProvider } from '@sip-protocol/sdk'
const provider = new NoirProofProvider()
await provider.initialize()
const result = await provider.generateFundingProof({
balance: 100n,
minimumRequired: 50n,
blindingFactor: new Uint8Array(32),
assetId: '0xABCD',
// ...
})- sip-protocol - Core SDK
- Noir Documentation
Part of the SIP Protocol ecosystem