getPrivacyConfig()
SIP Protocol API Reference v0.7.0
SIP Protocol API Reference / getPrivacyConfig
Function: getPrivacyConfig()
Section titled “Function: getPrivacyConfig()”getPrivacyConfig(
level,viewingKey?):PrivacyConfig
Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:3159
Get privacy configuration for a given privacy level
Returns a configuration object that determines which privacy features to enable for an intent. Used internally by the SDK to configure privacy behavior.
Privacy Levels:
'transparent': No privacy, fully public on-chain'shielded': Full privacy, hidden sender/amount/recipient'compliant': Privacy with viewing key for regulatory compliance
Parameters
Section titled “Parameters”Privacy level to configure
viewingKey?
Section titled “viewingKey?”Required for compliant mode, optional otherwise
Returns
Section titled “Returns”Configuration object specifying privacy features
Throws
Section titled “Throws”If compliant mode specified without viewing key
Example
Section titled “Example”// Transparent (no privacy)const config = getPrivacyConfig('transparent')// { level: 'transparent', useStealth: false, encryptData: false }
// Shielded (full privacy)const config = getPrivacyConfig('shielded')// { level: 'shielded', useStealth: true, encryptData: true }
// Compliant (privacy + audit)const viewingKey = generateViewingKey()const config = getPrivacyConfig('compliant', viewingKey)// { level: 'compliant', viewingKey, useStealth: true, encryptData: true }- PrivacyLevel for available privacy levels
- generateViewingKey to create viewing keys