PolicyRegistry
Manages the mapping between commitments and their associated reveal policies.
Address: 0x54F039F586922e1affaF4B812871f365048396aB
Purpose
When a commitment is made with a policy, the CommitRevealVault stores the policy binding in the PolicyRegistry. During reveal, the vault queries the registry to determine which policy to validate.
Key functions
// Check if a commitment has a policy
function getPolicy(bytes32 commitment) external view returns (address policy);
// Check policy params hash
function getPolicyParamsHash(bytes32 commitment) external view returns (bytes32);
Usage
# Check if commitment has a policy
cast call 0x54F039F586922e1affaF4B812871f365048396aB \
"getPolicy(bytes32)(address)" $COMMITMENT \
--rpc-url https://testnet.specterchain.com
How it integrates
The policy binding is enforced both on-chain (via the registry) and in the ZK circuit (via policyId and policyParamsHash public inputs).