PrivacyAdvisorAgent
SIP Protocol API Reference v0.7.4
SIP Protocol API Reference / PrivacyAdvisorAgent
Class: PrivacyAdvisorAgent
Section titled “Class: PrivacyAdvisorAgent”Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:22360
PrivacyAdvisorAgent - AI-powered privacy recommendations
Example
Section titled “Example”import { PrivacyAdvisorAgent, createSurveillanceAnalyzer } from '@sip-protocol/sdk'
const analyzer = createSurveillanceAnalyzer({ heliusApiKey: process.env.HELIUS_API_KEY!,})
const advisor = new PrivacyAdvisorAgent({ openaiApiKey: process.env.OPENAI_API_KEY!,})
const analysis = await analyzer.analyze('7xK9...')const response = await advisor.analyze({ analysisResult: analysis, userQuery: 'What should I do first to improve my privacy?',})
console.log(response.message)console.log(response.report?.recommendations)Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new PrivacyAdvisorAgent(
config):PrivacyAdvisorAgent
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:22364
Parameters
Section titled “Parameters”config
Section titled “config”Returns
Section titled “Returns”PrivacyAdvisorAgent
Methods
Section titled “Methods”analyze()
Section titled “analyze()”analyze(
context):Promise<AdvisorResponse>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:22371
Analyze wallet privacy and generate recommendations
Parameters
Section titled “Parameters”context
Section titled “context”Analysis context including surveillance results
Returns
Section titled “Returns”Promise<AdvisorResponse>
Advisor response with message and optional report
chat()
Section titled “chat()”chat(
message,context?):Promise<AdvisorResponse>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:22379
Chat with the advisor about privacy (follow-up questions)
Parameters
Section titled “Parameters”message
Section titled “message”string
User message
context?
Section titled “context?”Optional analysis context for new analysis
Returns
Section titled “Returns”Promise<AdvisorResponse>
Advisor response
stream()
Section titled “stream()”stream(
context,onChunk):Promise<AdvisorResponse>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:22387
Stream a response for real-time UI updates
Parameters
Section titled “Parameters”context
Section titled “context”Analysis context
onChunk
Section titled “onChunk”Callback for each streamed chunk
Returns
Section titled “Returns”Promise<AdvisorResponse>
Final advisor response
clearHistory()
Section titled “clearHistory()”clearHistory():
void
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:22391
Clear conversation history
Returns
Section titled “Returns”void
getHistory()
Section titled “getHistory()”getHistory():
AdvisorMessage[]
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:22395
Get conversation history