@cloudglides/veil 0.1.1 → 1.0.1

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.
Files changed (64) hide show
  1. package/dist/index.d.ts +103 -0
  2. package/dist/index.js +1000 -0
  3. package/dist/veil_core_bg.wasm +0 -0
  4. package/package.json +24 -10
  5. package/.envrc +0 -1
  6. package/.github/workflows/build-on-tag.yml +0 -82
  7. package/.github/workflows/deploy-pages.yml +0 -73
  8. package/example/index.html +0 -220
  9. package/example/veil_core.d.ts +0 -71
  10. package/example/veil_core_bg.wasm +0 -0
  11. package/example/veil_core_bg.wasm.d.ts +0 -20
  12. package/flake.nix +0 -68
  13. package/scripts/patch-wasm.js +0 -12
  14. package/src/cpu.ts +0 -67
  15. package/src/entropy/adblock.ts +0 -16
  16. package/src/entropy/approximate.ts +0 -9
  17. package/src/entropy/audio.ts +0 -17
  18. package/src/entropy/battery.ts +0 -10
  19. package/src/entropy/browser.ts +0 -7
  20. package/src/entropy/canvas.ts +0 -17
  21. package/src/entropy/complexity.ts +0 -14
  22. package/src/entropy/connection.ts +0 -14
  23. package/src/entropy/distribution.ts +0 -9
  24. package/src/entropy/fonts.ts +0 -4
  25. package/src/entropy/hardware.ts +0 -10
  26. package/src/entropy/language.ts +0 -14
  27. package/src/entropy/os.ts +0 -12
  28. package/src/entropy/osVersion.ts +0 -6
  29. package/src/entropy/performance.ts +0 -14
  30. package/src/entropy/permissions.ts +0 -15
  31. package/src/entropy/plugins.ts +0 -14
  32. package/src/entropy/preferences.ts +0 -12
  33. package/src/entropy/probabilistic.ts +0 -20
  34. package/src/entropy/screen.ts +0 -12
  35. package/src/entropy/screenInfo.ts +0 -8
  36. package/src/entropy/spectral.ts +0 -9
  37. package/src/entropy/statistical.ts +0 -15
  38. package/src/entropy/storage.ts +0 -22
  39. package/src/entropy/timezone.ts +0 -10
  40. package/src/entropy/userAgent.ts +0 -16
  41. package/src/entropy/webFeatures.ts +0 -21
  42. package/src/entropy/webgl.ts +0 -11
  43. package/src/gpu.ts +0 -132
  44. package/src/index.test.ts +0 -26
  45. package/src/index.ts +0 -248
  46. package/src/normalize/index.ts +0 -31
  47. package/src/probability.ts +0 -11
  48. package/src/scoring.ts +0 -106
  49. package/src/seeded-rng.ts +0 -14
  50. package/src/stability.ts +0 -405
  51. package/src/tamper.ts +0 -207
  52. package/src/types/index.ts +0 -11
  53. package/src/types.ts +0 -56
  54. package/src/veil_core.d.ts +0 -4
  55. package/src/wasm-loader.ts +0 -44
  56. package/tsconfig.json +0 -12
  57. package/tsup.config.ts +0 -41
  58. package/veil-core/Cargo.lock +0 -114
  59. package/veil-core/Cargo.toml +0 -12
  60. package/veil-core/src/entropy.rs +0 -132
  61. package/veil-core/src/lib.rs +0 -93
  62. package/veil-core/src/similarity.rs +0 -67
  63. package/vitest.config.ts +0 -15
  64. /package/{example → dist}/veil_core.js +0 -0
@@ -0,0 +1,103 @@
1
+ type AnomalySeverity = "low" | "medium" | "high" | "critical";
2
+ type AnomalyCategory = "entropy_distribution" | "missing_sources" | "value_spoofing" | "cross_source_inconsistency" | "data_quality";
3
+ interface Anomaly {
4
+ id: string;
5
+ category: AnomalyCategory;
6
+ severity: AnomalySeverity;
7
+ message: string;
8
+ explanation: string;
9
+ riskContribution: number;
10
+ }
11
+
12
+ interface EntropyWarning {
13
+ source: string;
14
+ severity: "info" | "warning" | "error";
15
+ message: string;
16
+ reason: string;
17
+ }
18
+ interface DeviceSignature {
19
+ os: string;
20
+ hardware_cores: number;
21
+ screen_resolution: string;
22
+ user_agent_hash: string;
23
+ }
24
+ interface PreferencesOffset {
25
+ theme: string | null;
26
+ language: string | null;
27
+ timezone: string | null;
28
+ font_size: string | null;
29
+ dark_mode: boolean | null;
30
+ accessibility: string | null;
31
+ }
32
+ interface DeviceIdentity {
33
+ core_hash: string;
34
+ device_signature: DeviceSignature;
35
+ entropy_quality: number;
36
+ preferences_offset: PreferencesOffset;
37
+ preferences_hash: string;
38
+ }
39
+
40
+ interface FingerprintOptions {
41
+ entropy: {
42
+ userAgent?: boolean;
43
+ canvas?: boolean;
44
+ webgl?: boolean;
45
+ fonts?: boolean;
46
+ storage?: boolean;
47
+ screen?: boolean;
48
+ };
49
+ hash?: "sha256" | "sha512";
50
+ detailed?: boolean;
51
+ }
52
+ interface SourceMetric {
53
+ source: string;
54
+ value: string;
55
+ entropy: number;
56
+ confidence: number;
57
+ stability?: number;
58
+ }
59
+
60
+ interface FingerprintResponse {
61
+ hash: string;
62
+ uniqueness: number;
63
+ confidence: number;
64
+ stability_score?: number;
65
+ usable: boolean;
66
+ warnings?: string[];
67
+ entropy_warnings?: EntropyWarning[];
68
+ tampering_risk: number;
69
+ anomalies: Anomaly[];
70
+ device_identity?: DeviceIdentity;
71
+ sources: SourceMetric[];
72
+ system: {
73
+ os: string;
74
+ language: string;
75
+ timezone: string;
76
+ hardware: {
77
+ cores: number;
78
+ memory: number;
79
+ };
80
+ };
81
+ display: {
82
+ resolution: string;
83
+ colorDepth: number;
84
+ devicePixelRatio: number;
85
+ };
86
+ browser: {
87
+ userAgent: string;
88
+ vendor: string;
89
+ cookieEnabled: boolean;
90
+ };
91
+ }
92
+
93
+ declare function getFingerprint(options?: FingerprintOptions): Promise<string | FingerprintResponse>;
94
+ declare function compareFingerpints(fp1: string | FingerprintResponse, fp2: string | FingerprintResponse): Promise<{
95
+ similarity: number;
96
+ match: boolean;
97
+ }>;
98
+ declare function matchProbability(storedFingerprints: (string | FingerprintResponse)[], currentFingerprint: string | FingerprintResponse): Promise<{
99
+ bestMatch: number;
100
+ confidence: number;
101
+ }>;
102
+
103
+ export { type FingerprintOptions, type FingerprintResponse, compareFingerpints, getFingerprint, matchProbability };