@keverdjs/fraud-sdk-react 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.d.mts +14 -59
- package/dist/index.d.ts +14 -59
- package/dist/index.js +327 -211
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +327 -211
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -85,7 +85,7 @@ interface KeverdProviderProps {
|
|
|
85
85
|
```typescript
|
|
86
86
|
interface KeverdLoadOptions {
|
|
87
87
|
apiKey: string; // Required: Your Keverd API key
|
|
88
|
-
endpoint?: string; // Optional: Custom API endpoint (default: https://
|
|
88
|
+
endpoint?: string; // Optional: Custom API endpoint (default: https://api.keverd.com)
|
|
89
89
|
debug?: boolean; // Optional: Enable debug logging (default: false)
|
|
90
90
|
}
|
|
91
91
|
```
|
package/dist/index.d.mts
CHANGED
|
@@ -28,11 +28,19 @@ interface KeverdSessionInfo {
|
|
|
28
28
|
firstSession?: string;
|
|
29
29
|
timestamp?: string;
|
|
30
30
|
}
|
|
31
|
+
interface KeverdBehavioralSequence {
|
|
32
|
+
featureNames: string[];
|
|
33
|
+
windowSize: number;
|
|
34
|
+
maskValue: number;
|
|
35
|
+
sequence: number[][];
|
|
36
|
+
}
|
|
31
37
|
interface KeverdBehavioralData {
|
|
32
38
|
typing_dwell_ms?: number[];
|
|
33
39
|
typing_flight_ms?: number[];
|
|
34
40
|
swipe_velocity?: number;
|
|
35
41
|
session_entropy?: number;
|
|
42
|
+
suspicious_swipe_velocity?: number;
|
|
43
|
+
behavioral_vectors?: KeverdBehavioralSequence;
|
|
36
44
|
}
|
|
37
45
|
interface KeverdFingerprintRequest {
|
|
38
46
|
userId?: string;
|
|
@@ -294,72 +302,19 @@ declare class KeverdDeviceCollector {
|
|
|
294
302
|
clearCache(): void;
|
|
295
303
|
}
|
|
296
304
|
|
|
297
|
-
/**
|
|
298
|
-
* Keverd Behavioral Data Collector
|
|
299
|
-
* Collects typing patterns, mouse movements, swipe gestures, and calculates session entropy
|
|
300
|
-
*/
|
|
301
|
-
|
|
302
305
|
declare class KeverdBehavioralCollector {
|
|
303
|
-
private keystrokes;
|
|
304
|
-
private mouseMovements;
|
|
305
|
-
private lastKeyDownTime;
|
|
306
|
-
private lastKeyUpTime;
|
|
307
306
|
private isActive;
|
|
308
|
-
private sessionStartTime;
|
|
309
|
-
private typingDwellTimes;
|
|
310
|
-
private typingFlightTimes;
|
|
311
|
-
private swipeVelocities;
|
|
312
307
|
private sessionEvents;
|
|
313
|
-
private
|
|
314
|
-
private
|
|
315
|
-
|
|
316
|
-
private mouseMoveHandler;
|
|
317
|
-
private touchStartHandler;
|
|
318
|
-
private touchEndHandler;
|
|
319
|
-
/**
|
|
320
|
-
* Start collecting behavioral data
|
|
321
|
-
*/
|
|
308
|
+
private kinematicEngine;
|
|
309
|
+
private keystrokeMonitor;
|
|
310
|
+
constructor();
|
|
322
311
|
start(): void;
|
|
323
|
-
/**
|
|
324
|
-
* Stop collecting behavioral data
|
|
325
|
-
*/
|
|
326
312
|
stop(): void;
|
|
327
|
-
/**
|
|
328
|
-
* Get collected behavioral data
|
|
329
|
-
*/
|
|
330
|
-
getData(): KeverdBehavioralData;
|
|
331
|
-
/**
|
|
332
|
-
* Reset collected data
|
|
333
|
-
*/
|
|
334
313
|
reset(): void;
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
private handleKeyDown;
|
|
339
|
-
/**
|
|
340
|
-
* Handle keyup event
|
|
341
|
-
*/
|
|
342
|
-
private handleKeyUp;
|
|
343
|
-
/**
|
|
344
|
-
* Handle mouse move event
|
|
345
|
-
*/
|
|
346
|
-
private handleMouseMove;
|
|
347
|
-
/**
|
|
348
|
-
* Handle touch start (for swipe detection)
|
|
349
|
-
*/
|
|
350
|
-
private handleTouchStart;
|
|
351
|
-
/**
|
|
352
|
-
* Handle touch end (calculate swipe velocity)
|
|
353
|
-
*/
|
|
354
|
-
private handleTouchEnd;
|
|
355
|
-
/**
|
|
356
|
-
* Calculate session entropy based on event diversity
|
|
357
|
-
*/
|
|
314
|
+
getData(): KeverdBehavioralData;
|
|
315
|
+
private buildSequence;
|
|
316
|
+
private trackEvent;
|
|
358
317
|
private calculateSessionEntropy;
|
|
359
|
-
/**
|
|
360
|
-
* Check if key should be ignored
|
|
361
|
-
*/
|
|
362
|
-
private shouldIgnoreKey;
|
|
363
318
|
}
|
|
364
319
|
|
|
365
320
|
export { KeverdBehavioralCollector, type KeverdBehavioralData, type KeverdConfig, KeverdDeviceCollector, type KeverdDeviceInfo, type KeverdError, type KeverdFingerprintRequest, type KeverdFingerprintResponse, type KeverdLoadOptions, KeverdProvider, KeverdSDK, type KeverdSessionInfo, type KeverdSimSwapEngine, type KeverdVisitorData, type KeverdVisitorDataHookOptions, type KeverdVisitorDataOptions, type KeverdVisitorDataResult$1 as KeverdVisitorDataResult, useKeverdContext, useKeverdVisitorData };
|
package/dist/index.d.ts
CHANGED
|
@@ -28,11 +28,19 @@ interface KeverdSessionInfo {
|
|
|
28
28
|
firstSession?: string;
|
|
29
29
|
timestamp?: string;
|
|
30
30
|
}
|
|
31
|
+
interface KeverdBehavioralSequence {
|
|
32
|
+
featureNames: string[];
|
|
33
|
+
windowSize: number;
|
|
34
|
+
maskValue: number;
|
|
35
|
+
sequence: number[][];
|
|
36
|
+
}
|
|
31
37
|
interface KeverdBehavioralData {
|
|
32
38
|
typing_dwell_ms?: number[];
|
|
33
39
|
typing_flight_ms?: number[];
|
|
34
40
|
swipe_velocity?: number;
|
|
35
41
|
session_entropy?: number;
|
|
42
|
+
suspicious_swipe_velocity?: number;
|
|
43
|
+
behavioral_vectors?: KeverdBehavioralSequence;
|
|
36
44
|
}
|
|
37
45
|
interface KeverdFingerprintRequest {
|
|
38
46
|
userId?: string;
|
|
@@ -294,72 +302,19 @@ declare class KeverdDeviceCollector {
|
|
|
294
302
|
clearCache(): void;
|
|
295
303
|
}
|
|
296
304
|
|
|
297
|
-
/**
|
|
298
|
-
* Keverd Behavioral Data Collector
|
|
299
|
-
* Collects typing patterns, mouse movements, swipe gestures, and calculates session entropy
|
|
300
|
-
*/
|
|
301
|
-
|
|
302
305
|
declare class KeverdBehavioralCollector {
|
|
303
|
-
private keystrokes;
|
|
304
|
-
private mouseMovements;
|
|
305
|
-
private lastKeyDownTime;
|
|
306
|
-
private lastKeyUpTime;
|
|
307
306
|
private isActive;
|
|
308
|
-
private sessionStartTime;
|
|
309
|
-
private typingDwellTimes;
|
|
310
|
-
private typingFlightTimes;
|
|
311
|
-
private swipeVelocities;
|
|
312
307
|
private sessionEvents;
|
|
313
|
-
private
|
|
314
|
-
private
|
|
315
|
-
|
|
316
|
-
private mouseMoveHandler;
|
|
317
|
-
private touchStartHandler;
|
|
318
|
-
private touchEndHandler;
|
|
319
|
-
/**
|
|
320
|
-
* Start collecting behavioral data
|
|
321
|
-
*/
|
|
308
|
+
private kinematicEngine;
|
|
309
|
+
private keystrokeMonitor;
|
|
310
|
+
constructor();
|
|
322
311
|
start(): void;
|
|
323
|
-
/**
|
|
324
|
-
* Stop collecting behavioral data
|
|
325
|
-
*/
|
|
326
312
|
stop(): void;
|
|
327
|
-
/**
|
|
328
|
-
* Get collected behavioral data
|
|
329
|
-
*/
|
|
330
|
-
getData(): KeverdBehavioralData;
|
|
331
|
-
/**
|
|
332
|
-
* Reset collected data
|
|
333
|
-
*/
|
|
334
313
|
reset(): void;
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
private handleKeyDown;
|
|
339
|
-
/**
|
|
340
|
-
* Handle keyup event
|
|
341
|
-
*/
|
|
342
|
-
private handleKeyUp;
|
|
343
|
-
/**
|
|
344
|
-
* Handle mouse move event
|
|
345
|
-
*/
|
|
346
|
-
private handleMouseMove;
|
|
347
|
-
/**
|
|
348
|
-
* Handle touch start (for swipe detection)
|
|
349
|
-
*/
|
|
350
|
-
private handleTouchStart;
|
|
351
|
-
/**
|
|
352
|
-
* Handle touch end (calculate swipe velocity)
|
|
353
|
-
*/
|
|
354
|
-
private handleTouchEnd;
|
|
355
|
-
/**
|
|
356
|
-
* Calculate session entropy based on event diversity
|
|
357
|
-
*/
|
|
314
|
+
getData(): KeverdBehavioralData;
|
|
315
|
+
private buildSequence;
|
|
316
|
+
private trackEvent;
|
|
358
317
|
private calculateSessionEntropy;
|
|
359
|
-
/**
|
|
360
|
-
* Check if key should be ignored
|
|
361
|
-
*/
|
|
362
|
-
private shouldIgnoreKey;
|
|
363
318
|
}
|
|
364
319
|
|
|
365
320
|
export { KeverdBehavioralCollector, type KeverdBehavioralData, type KeverdConfig, KeverdDeviceCollector, type KeverdDeviceInfo, type KeverdError, type KeverdFingerprintRequest, type KeverdFingerprintResponse, type KeverdLoadOptions, KeverdProvider, KeverdSDK, type KeverdSessionInfo, type KeverdSimSwapEngine, type KeverdVisitorData, type KeverdVisitorDataHookOptions, type KeverdVisitorDataOptions, type KeverdVisitorDataResult$1 as KeverdVisitorDataResult, useKeverdContext, useKeverdVisitorData };
|