@udene/react-native-sdk
Version:
Udene Fraud Detection SDK for React Native
42 lines (41 loc) • 1.58 kB
TypeScript
import React, { ReactNode } from 'react';
import { UdeneClient, InteractionData, TransactionData, EmailData } from './UdeneClient';
interface FraudContextType {
client: UdeneClient;
trackInteraction: (data: InteractionData) => Promise<any>;
getMetrics: () => Promise<any>;
getActivity: () => Promise<any>;
analyzeBEC: (emailData: EmailData) => Promise<any>;
analyzeTransaction: (transactionData: TransactionData) => Promise<any>;
getDeviceFingerprint: () => Promise<any>;
}
interface FraudProviderProps {
apiKey: string;
baseURL?: string;
maxRetries?: number;
disableLogging?: boolean;
logger?: (message: string, error?: any) => void;
children: ReactNode;
}
/**
* Provider component for Udene fraud detection services
*/
export declare const FraudProvider: React.FC<FraudProviderProps>;
/**
* Hook to use Udene fraud detection services
*
* @returns Fraud detection methods and client
*/
export declare const useFraud: () => FraudContextType;
export {};
/**
* Security best practices for using the SDK
*
* 1. Store API keys securely using environment variables or secure storage
* 2. Never expose API keys in client-side code that can be inspected
* 3. Implement proper error handling to avoid exposing sensitive information
* 4. Validate and sanitize all user inputs before sending to the API
* 5. Use the latest version of the SDK to benefit from security updates
* 6. Implement proper authentication and authorization in your application
* 7. Follow the principle of least privilege when configuring API access
*/