I’m trying to understand the disclose() function and it’s impact on and privacy selective disclosure in a permissioned DApp context.
I’m looking at Midnight’s documentation and looking at this example:
import CompactStandardLibrary;
witness get_balance(): Bytes<32>;
export ledger balance: Bytes<32>;
export circuit record_balance(): [] {
balance = disclose(get_balance());
}
When disclose(get_balance()) is used to assign a value to the public ledger variable balance, does this mean the private witness data (get_balance()) becomes permanently readable by all users on the public ledger, or is the disclosed data only accessible to specific parties (e.g., the caller or permissioned users)? If it’s fully public, how does this align with the concept of selective disclosure?