Proper SDK configuration is essential for secure and efficient API integration.
Configuration Options
The Rise SDK provides flexible configuration options to adapt to your specific needs. You can configure authentication methods, network settings, and environment-specific behavior.Core Configuration Parameters
The SDK supports the following configuration options:Configuration Priority
The SDK follows a specific priority order for configuration:- Custom baseUrl (if provided, overrides environment)
- Environment setting (determines API endpoint)
- Authentication method (JWT token or SIWE credentials)
- Network settings (timeout, headers)
Authentication Configuration
The Rise SDK supports two authentication methods, each with different use cases and security implications.JWT Authentication
JWT (JSON Web Token) authentication is the simplest method for API access. Use this when you already have a valid JWT token from your authentication system. Best for: Quick integration, existing JWT tokens, read-only operationsSIWE Authentication
SIWE (Sign-In with Ethereum) authentication provides the most comprehensive access. The SDK automatically handles JWT token generation and renewal. Best for: Full API access, sensitive operations, automatic token managementNetwork Configuration
Network configuration allows you to customize how the SDK communicates with the Rise API, including timeout settings and custom headers.Request Timeout
The timeout setting controls how long the SDK waits for API responses before considering the request failed. This is crucial for handling slow network connections or API delays. Default: 30 seconds (30000ms)- Increase timeout: Slow network connections, large data transfers
- Decrease timeout: Real-time applications, fail-fast scenarios
Webhook Validator Configuration
The Rise SDK includes a built-in webhook validator that ensures the security and authenticity of incoming webhook events. This is essential for protecting your application from malicious requests.Basic Webhook Validator Setup
The webhook validator uses HMAC-SHA256 signatures to verify that webhooks are genuinely from Rise. This prevents replay attacks and ensures data integrity.- HMAC-SHA256 signatures for cryptographic verification
- Timestamp validation to prevent replay attacks
- Automatic signature parsing from Rise headers
Advanced Webhook Validator Configuration
For production applications, you may want more control over webhook validation behavior. The SDK provides advanced configuration options for custom tolerance settings and non-throwing validation.- Custom tolerance: Adjust time window for timestamp validation
- Safe validation: Non-throwing validation with detailed error information
- Event typing: TypeScript support for webhook events
Webhook Signature Generation
The SDK provides signature generation capabilities for testing and custom validation scenarios. This is useful for creating test webhooks or implementing custom validation logic.- Testing: Generate valid signatures for webhook testing
- Custom validation: Implement custom validation logic
- Debugging: Verify signature generation matches Rise’s format
Next Steps
Authentication Guide
Learn about JWT and SIWE authentication methods and how to implement them in your application.
Webhooks Guide
Set up webhook endpoints, implement validation, and handle real-time events from Rise.
API Reference
Explore all available API endpoints, request/response formats, and integration examples.
Error Handling
Learn how to handle errors, implement retry logic, and debug common integration issues.