SIP defines three privacy levels that users can select per-intent.
| Level | Privacy | Compliance | Use Case |
|---|
TRANSPARENT | None | Full | Maximum compatibility |
SHIELDED | Full | None | Maximum privacy |
COMPLIANT | Full + Disclosure | Selective | Institutional/regulatory |
Standard on-chain transaction with no privacy enhancements.
.input('near', 'NEAR', 100n)
.output('ethereum', 'ETH')
.privacy(PrivacyLevel.TRANSPARENT)
| Information | Visible To |
|---|
| Sender address | Everyone |
| Input amount | Everyone |
| Output amount | Everyone |
| Recipient address | Everyone |
None - standard transaction signing only.
- DEX integrations requiring transparency
- Public treasury operations
- Airdrops and distributions
- Testing and debugging
Full privacy with cryptographic hiding of sender, amounts, and recipient.
.input('ethereum', 'ETH', 1_000_000_000_000_000_000n)
.privacy(PrivacyLevel.SHIELDED)
| Information | Visible To | Hidden Via |
|---|
| Sender address | Nobody | Sender commitment |
| Input amount | Nobody | Pedersen commitment |
| Output amount | Solver only (range) | Commitment |
| Recipient address | Nobody | Stealth address |
| Min output required | Everyone | Plaintext (for quoting) |
| Proof | Purpose |
|---|
| Funding Proof | Prove balance ≥ input |
| Validity Proof | Prove authorization |
| Fulfillment Proof | Prove correct delivery |
├── "Someone wants to swap"
├── "Input: ??? amount of SOL (committed)"
├── "Output: at least 100 ZEC"
├── "Recipient: stealth address 0x..."
└── "Proof that sender has sufficient funds: ✓"
| Property | Guaranteed? | Mechanism |
|---|
| Sender privacy | Yes | Pedersen commitment |
| Amount privacy | Yes | Amount commitments |
| Recipient privacy | Yes | Stealth address |
| Unlinkability | Yes | Fresh blinding + stealth per tx |
Full privacy with selective disclosure for authorized auditors.
const viewingKey = sip.generateViewingKey('/audit')
.input('solana', 'SOL', 5_000_000_000n)
.privacy(PrivacyLevel.COMPLIANT)
| Information | Public | Auditor (with key) |
|---|
| Sender address | Hidden | Visible |
| Input amount | Hidden | Visible |
| Output amount | Hidden | Visible |
| Recipient address | Hidden | Visible |
| Audit trail | Hidden | Full history |
- User creates COMPLIANT intent
- User designates auditor (provides viewing key hash)
- Transaction data encrypted with auditor’s key
- Encrypted blob stored with intent
- Auditor decrypts when needed
- Auditor generates ViewingProof for reports
- Institutional trading
- Tax compliance
- Regulatory requirements
- DAO treasury operations
| Aspect | TRANSPARENT | SHIELDED | COMPLIANT |
|---|
| Sender hidden | No | Yes | Yes (public) / No (auditor) |
| Amount hidden | No | Yes | Yes (public) / No (auditor) |
| Recipient hidden | No | Yes | Yes (public) / No (auditor) |
| Audit possible | Trivial | No | Yes (with key) |
| Aspect | TRANSPARENT | SHIELDED | COMPLIANT |
|---|
| Proof generation | None | ~2-5s | ~2-5s + encryption |
| Verification | Fast | ~10ms | ~10ms |
| Data size | Small | Medium | Medium + encrypted blob |
| Use Case | Recommended Level |
|---|
| Public DEX swap | TRANSPARENT |
| Personal privacy | SHIELDED |
| Institutional trading | COMPLIANT |
| Tax reporting needed | COMPLIANT |
| Anonymous donation | SHIELDED |
| Regulated exchange | COMPLIANT |
TRANSPARENT → SHIELDED ✓ (add proofs and commitments)
TRANSPARENT → COMPLIANT ✓ (add proofs + viewing key)
SHIELDED → COMPLIANT ✓ (add viewing key encryption)
SHIELDED → TRANSPARENT ✗ (cannot reveal hidden data)
COMPLIANT → SHIELDED ✗ (auditor key already shared)
COMPLIANT → TRANSPARENT ✗ (cannot reveal hidden data)
Once data is committed/hidden, it cannot be revealed without user cooperation.
import { SIP, PrivacyLevel } from '@sip-protocol/sdk'
const sip = new SIP({ network: 'testnet' })
const transparent = await sip.createIntent({
privacyLevel: PrivacyLevel.TRANSPARENT,
// Shielded - SDK generates commitments, stealth, proofs
const shielded = await sip.createIntent({
privacyLevel: PrivacyLevel.SHIELDED,
// Compliant - SDK adds encrypted viewing data
const compliant = await sip.createIntent({
privacyLevel: PrivacyLevel.COMPLIANT,
| Consideration | Guidance |
|---|
| Default level | SHIELDED (privacy by default) |
| Downgrade requests | Reject - cannot downgrade |
| Level in metadata | Included in intent_hash |
All commitments are bound to privacy level:
commitment_hash = Poseidon(
This prevents commitment reuse across different privacy contexts.
For COMPLIANT mode:
- User chooses auditor (not protocol)
- Multiple auditors supported
- Revocation possible but doesn’t hide past disclosures