Iframe Integration
Raze can be embedded as an iframe in your application, allowing you to control wallet whitelisting and receive real-time trading data programmatically.Basic Setup
TypeScript Setup
API Reference
Commands (Sent to Iframe)
- ADD_WALLETS
- CLEAR_WALLETS
- GET_WALLETS
Add wallets to the whitelist for tracking.Example:
Responses (Received from Iframe)
Sent when iframe is loaded and ready for communication.
Confirms wallets were added successfully.
Real-time trading statistics for whitelisted addresses.
Individual trade data from whitelisted addresses.
Real-time token price updates from all trading activity.
Complete Integration Example
TypeScript Class
React Hook
Security Considerations
Origin Validation
Always validate the origin of messages in production:Content Security Policy
Add CSP headers to allow iframe embedding:Input Validation
Validate wallet addresses before sending:Customization
Theme Customization
Create custom themes by editing CSS variables:Whitelabel Setup
- Update
brand.jsonwith your branding - Replace
src/logo.pngwith your logo - Create a custom CSS theme
- Run
npm run generate-html - Build and deploy
Full Customization Guide
See all customization options
Best Practices
1
Wait for Ready Signal
Always wait for
IFRAME_READY before sending commands2
Queue Messages
Queue messages if iframe isn’t ready yet
3
Validate Input
Validate wallet addresses before sending
4
Handle Timeouts
Implement timeouts for async operations
5
Error Handling
Always handle potential errors and edge cases
