compact-core:privacy-disclosure

Enforce explicit disclose() usage to prevent unintended witness-derived value disclosure in Compact circuits.

Updated Feb 5, 2026
One-click install
npx skills add https://github.com/aaronbassett/midnight-knowledgebase --skill compact-core-privacy-disclosure
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compact-core:privacy-disclosure
Source: https://github.com/aaronbassett/midnight-knowledgebase/tree/main/plugins/compact-core/skills/privacy-disclosure
Command: npx skills add https://github.com/aaronbassett/midnight-knowledgebase --skill compact-core-privacy-disclosure

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides guidance to prevent unintended disclosure of witness-derived values in Compact circuits, promoting proper use of disclose() and implementing commit-reveal privacy patterns to protect sensitive data.

Core Features & Use Cases

  • Enforces the Disclosure Rule to ensure witness-derived data never reaches public outputs without explicit disclosure.
  • Illustrates safe patterns such as persistentCommit/transientCommit and contrasts with unsafe persistentHash/transientHash.
  • Provides practical examples for common privacy scenarios like ledger storage, circuit returns, and cross-contract boundaries with strong guidance on taint tracking.

Quick Start

Identify a witness-derived value in your circuit and apply disclose() when exposing it, while using persistentCommit for commitments and avoiding unsafe hashes.

Frequently Asked Questions about compact-core:privacy-disclosure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent witness disclosure in Compact circuits?

To prevent witness disclosure in Compact circuits, enforce explicit disclose() usage and apply commit-reveal patterns to ensure witness-derived values never reach public outputs without authorization.

What is the difference between persistentCommit and persistentHash for privacy?

persistentCommit and transientCommit are safe patterns for privacy-focused circuit design, whereas persistentHash and transientHash are unsafe and can lead to unintended disclosure of witness-derived values.

How does taint tracking work for ledger writes in Compact circuits?

Taint tracking in Compact circuits monitors witness-derived data as it flows through ledger writes, circuit returns, and cross-contract boundaries, requiring explicit disclose() for any public exposure.

When do I need to use disclose() in Compact circuit design?

You need to use disclose() in Compact circuit design whenever a witness-derived value must be exposed to public outputs, ensuring the Disclosure Rule is satisfied and sensitive data remains protected.

Can I use commit-reveal patterns for cross-contract interactions in Compact?

Yes, commit-reveal patterns apply to cross-contract interactions in Compact circuits, using persistentCommit or transientCommit to protect witness data while safely managing external boundaries.