ComplianceProofProvider
SIP Protocol API Reference v0.7.4
SIP Protocol API Reference / ComplianceProofProvider
Class: ComplianceProofProvider
Section titled “Class: ComplianceProofProvider”Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:1119
Compliance Proof Provider
Generates ZK proofs for regulatory compliance without revealing sensitive data.
Example
Section titled “Example”const provider = new ComplianceProofProvider()await provider.initialize()
// Prove viewing key access to auditorconst result = await provider.generateViewingKeyAccessProof({ viewingKey: myViewingKey, transactionHash: '0x...', encryptedData: encryptedTxData, auditorPublicKey: '0x...', timestamp: Date.now(),})
// Share proof with auditor (they can verify without seeing data)await sendToAuditor(result.proof)Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ComplianceProofProvider(
config?):ComplianceProofProvider
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:1122
Parameters
Section titled “Parameters”config?
Section titled “config?”Returns
Section titled “Returns”ComplianceProofProvider
Accessors
Section titled “Accessors”isReady
Section titled “isReady”Get Signature
Section titled “Get Signature”get isReady():
boolean
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:1126
Check if provider is initialized
Returns
Section titled “Returns”boolean
Methods
Section titled “Methods”initialize()
Section titled “initialize()”initialize():
Promise<void>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:1130
Initialize the compliance proof provider
Returns
Section titled “Returns”Promise<void>
generateViewingKeyAccessProof()
Section titled “generateViewingKeyAccessProof()”generateViewingKeyAccessProof(
params):Promise<ComplianceProofResult>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:1140
Generate a viewing key access proof
Proves to an auditor that the holder of a viewing key can decrypt a specific transaction without revealing the decrypted contents.
Parameters
Section titled “Parameters”params
Section titled “params”Viewing key access parameters
Returns
Section titled “Returns”Promise<ComplianceProofResult>
Compliance proof result
generateSanctionsClearProof()
Section titled “generateSanctionsClearProof()”generateSanctionsClearProof(
params):Promise<ComplianceProofResult>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:1150
Generate a sanctions clearance proof
Proves that sender and recipient are not on any sanctions lists without revealing their actual addresses.
Parameters
Section titled “Parameters”params
Section titled “params”Sanctions clearance parameters
Returns
Section titled “Returns”Promise<ComplianceProofResult>
Compliance proof result
generateBalanceAttestationProof()
Section titled “generateBalanceAttestationProof()”generateBalanceAttestationProof(
params):Promise<ComplianceProofResult>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:1160
Generate a balance attestation proof
Proves that an account has at least a certain balance without revealing the exact balance.
Parameters
Section titled “Parameters”params
Section titled “params”Balance attestation parameters
Returns
Section titled “Returns”Promise<ComplianceProofResult>
Compliance proof result
generateHistoryCompletenessProof()
Section titled “generateHistoryCompletenessProof()”generateHistoryCompletenessProof(
params):Promise<ComplianceProofResult>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:1170
Generate a history completeness proof
Proves that all transactions in a time range have been disclosed without revealing individual transaction amounts.
Parameters
Section titled “Parameters”params
Section titled “params”History completeness parameters
Returns
Section titled “Returns”Promise<ComplianceProofResult>
Compliance proof result
verifyComplianceProof()
Section titled “verifyComplianceProof()”verifyComplianceProof(
result):Promise<boolean>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:1200
Verify a compliance proof
Parameters
Section titled “Parameters”result
Section titled “result”Compliance proof result to verify
Returns
Section titled “Returns”Promise<boolean>
true if valid, false otherwise
Remarks
Section titled “Remarks”IMPORTANT: Mock Implementation
This verification performs structural validation only:
- Checks proof expiry
- Validates proof format and size
- Verifies public inputs exist
- Checks proof type matches compliance type
It does NOT perform cryptographic verification of the ZK proof.
For production use, integrate with SolanaNoirVerifier.verifyOffChain()
or deploy a dedicated compliance circuit verifier.
Example
Section titled “Example”// For production cryptographic verification:const solanaVerifier = new SolanaNoirVerifier()await solanaVerifier.initialize()const cryptoValid = await solanaVerifier.verifyOffChain(result.proof)const formatValid = await complianceProvider.verifyComplianceProof(result)const isValid = cryptoValid && formatValiddestroy()
Section titled “destroy()”destroy():
Promise<void>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:1204
Destroy the provider and free resources
Returns
Section titled “Returns”Promise<void>