API Reference
This section contains the complete API documentation for the SIP Protocol SDK.
Installation
Section titled “Installation”npm install @sip-protocol/sdkQuick Links
Section titled “Quick Links”Core Classes
Section titled “Core Classes”- SIP - Main entry point for the SDK
- IntentBuilder - Build shielded intents
Privacy Primitives
Section titled “Privacy Primitives”- generateStealthAddress - Generate stealth addresses
- createCommitment - Create Pedersen commitments
- deriveViewingKey - Derive viewing keys
Enums & Types
Section titled “Enums & Types”- PrivacyLevel - Privacy level options
- IntentStatus - Intent status states
Modules Overview
Section titled “Modules Overview”| Module | Description |
|---|---|
SIP | Main SIP client class |
IntentBuilder | Intent building and creation |
stealth | Stealth address generation (EIP-5564) |
crypto | Pedersen commitments, hashing |
privacy | Viewing keys, encryption |
proofs | ZK proof providers |
adapters | NEAR Intents, wallet adapters |
validation | Input validation utilities |
Usage Example
Section titled “Usage Example”import { SIP, IntentBuilder, PrivacyLevel } from '@sip-protocol/sdk'
// Initialize clientconst sip = new SIP({ nearNetwork: 'testnet', privacyLevel: PrivacyLevel.SHIELDED})
// Create shielded intentconst intent = await new IntentBuilder() .setPrivacyLevel(PrivacyLevel.SHIELDED) .setInput({ token: 'USDC', amount: '100', chain: 'ethereum' }) .setOutput({ token: 'SOL', chain: 'solana' }) .build()API docs auto-generated from @sip-protocol/sdk v0.1.9