@bloume/id 0.0.0-stage → 1.0.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/LICENSE +0 -0
- package/README.md +50 -2
- package/dist/bloumeid.global.js +7 -0
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +47 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.mjs +8 -0
- package/dist/index.mjs.map +1 -0
- package/dist/server.cjs +2 -0
- package/dist/server.cjs.map +1 -0
- package/dist/server.d.cts +70 -0
- package/dist/server.d.ts +70 -0
- package/dist/server.mjs +2 -0
- package/dist/server.mjs.map +1 -0
- package/dist/types-oAJ8fW36.d.cts +328 -0
- package/dist/types-oAJ8fW36.d.ts +328 -0
- package/package.json +68 -4
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
type CollectorName = "canvas" | "webgl" | "webgpu" | "audio" | "hardware" | "screen" | "cssMedia" | "mediaCodecs" | "fonts" | "timezone" | "intl" | "languages" | "userAgentData" | "storage" | "speech" | "math" | "webrtc" | "connection" | "media" | "permissions" | "antiSpoof" | "privateMode";
|
|
2
|
+
interface BloumeIDOptions {
|
|
3
|
+
exclude?: CollectorName[];
|
|
4
|
+
timeout?: number;
|
|
5
|
+
cacheLifetimeMs?: number;
|
|
6
|
+
includeRawComponents?: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface BloumeIDInitConfig {
|
|
9
|
+
apiKey?: string;
|
|
10
|
+
endpoint?: string;
|
|
11
|
+
region?: "eu" | "us" | "ap" | "global";
|
|
12
|
+
options?: BloumeIDOptions;
|
|
13
|
+
}
|
|
14
|
+
interface FingerprintJSGetOptions {
|
|
15
|
+
extendedResult?: boolean;
|
|
16
|
+
linkedId?: string;
|
|
17
|
+
tag?: Record<string, unknown> | string;
|
|
18
|
+
timeout?: number;
|
|
19
|
+
}
|
|
20
|
+
interface CanvasComponent {
|
|
21
|
+
hash: string;
|
|
22
|
+
winding: boolean;
|
|
23
|
+
doubleRenderConsistent: boolean;
|
|
24
|
+
geometryHash: string;
|
|
25
|
+
textHash: string;
|
|
26
|
+
emojiSubpixelHash?: string;
|
|
27
|
+
emojiAscentSum?: number;
|
|
28
|
+
emojiDescentSum?: number;
|
|
29
|
+
}
|
|
30
|
+
interface WebGLComponent {
|
|
31
|
+
webgl1Available: boolean;
|
|
32
|
+
webgl2Available: boolean;
|
|
33
|
+
vendor: string;
|
|
34
|
+
renderer: string;
|
|
35
|
+
unmaskedVendor: string;
|
|
36
|
+
unmaskedRenderer: string;
|
|
37
|
+
version: string;
|
|
38
|
+
shadingLanguageVersion: string;
|
|
39
|
+
extensionsCount: number;
|
|
40
|
+
extensionsHash: string;
|
|
41
|
+
maxTextureSize: number;
|
|
42
|
+
maxViewportDims: [number, number];
|
|
43
|
+
maxAnisotropy: number;
|
|
44
|
+
shaderPrecisionHash: string;
|
|
45
|
+
maxVertexUniformVectors?: number;
|
|
46
|
+
aliasedLineWidthRange?: [number, number];
|
|
47
|
+
pixelRenderHash?: string;
|
|
48
|
+
}
|
|
49
|
+
interface WebGPUComponent {
|
|
50
|
+
available: boolean;
|
|
51
|
+
vendor: string;
|
|
52
|
+
architecture: string;
|
|
53
|
+
device: string;
|
|
54
|
+
description: string;
|
|
55
|
+
limitsHash: string;
|
|
56
|
+
features?: string[];
|
|
57
|
+
maxTextureDimension2D?: number;
|
|
58
|
+
maxBindGroups?: number;
|
|
59
|
+
}
|
|
60
|
+
interface AudioComponent {
|
|
61
|
+
available: boolean;
|
|
62
|
+
sampleHash: string;
|
|
63
|
+
sumValue: number;
|
|
64
|
+
sampleRate: number;
|
|
65
|
+
maxChannelCount: number;
|
|
66
|
+
doubleRenderConsistent: boolean;
|
|
67
|
+
}
|
|
68
|
+
interface HardwareComponent {
|
|
69
|
+
hardwareConcurrency: number;
|
|
70
|
+
deviceMemory: number;
|
|
71
|
+
maxTouchPoints: number;
|
|
72
|
+
platform: string;
|
|
73
|
+
vendor: string;
|
|
74
|
+
oscpu: string;
|
|
75
|
+
pdfViewerEnabled: boolean;
|
|
76
|
+
cookieEnabled: boolean;
|
|
77
|
+
doNotTrack: string | null;
|
|
78
|
+
architectureHint: string;
|
|
79
|
+
globalPrivacyControl?: boolean;
|
|
80
|
+
}
|
|
81
|
+
interface ScreenComponent {
|
|
82
|
+
width: number;
|
|
83
|
+
height: number;
|
|
84
|
+
availWidth: number;
|
|
85
|
+
availHeight: number;
|
|
86
|
+
colorDepth: number;
|
|
87
|
+
pixelDepth: number;
|
|
88
|
+
devicePixelRatio: number;
|
|
89
|
+
orientationType: string;
|
|
90
|
+
hdrSupported: boolean;
|
|
91
|
+
colorGamut: "rec2020" | "p3" | "srgb" | "unknown";
|
|
92
|
+
forcedColors: boolean;
|
|
93
|
+
prefersDarkScheme: boolean;
|
|
94
|
+
prefersReducedMotion: boolean;
|
|
95
|
+
touchSupport: boolean;
|
|
96
|
+
}
|
|
97
|
+
interface CssMediaMatrixComponent {
|
|
98
|
+
prefersColorScheme: "dark" | "light" | "no-preference";
|
|
99
|
+
prefersReducedMotion: boolean;
|
|
100
|
+
prefersContrast: "more" | "less" | "no-preference";
|
|
101
|
+
forcedColors: boolean;
|
|
102
|
+
dynamicRangeHigh: boolean;
|
|
103
|
+
colorGamut: "rec2020" | "p3" | "srgb" | "unknown";
|
|
104
|
+
anyPointer: "fine" | "coarse" | "none";
|
|
105
|
+
anyHover: boolean;
|
|
106
|
+
invertedColors: boolean;
|
|
107
|
+
monochrome: boolean;
|
|
108
|
+
}
|
|
109
|
+
interface MediaCodecsComponent {
|
|
110
|
+
audioInputCount: number;
|
|
111
|
+
videoInputCount: number;
|
|
112
|
+
audioOutputCount: number;
|
|
113
|
+
av1Supported: boolean;
|
|
114
|
+
hevcSupported: boolean;
|
|
115
|
+
vp9Supported: boolean;
|
|
116
|
+
opusSupported: boolean;
|
|
117
|
+
flacSupported: boolean;
|
|
118
|
+
keyboardLayoutHash: string;
|
|
119
|
+
keyboardKeysCount: number;
|
|
120
|
+
}
|
|
121
|
+
interface FontsComponent {
|
|
122
|
+
detected: string[];
|
|
123
|
+
count: number;
|
|
124
|
+
hash: string;
|
|
125
|
+
}
|
|
126
|
+
interface TimezoneIntlComponent {
|
|
127
|
+
timezone: string;
|
|
128
|
+
timezoneOffsetMinutes: number;
|
|
129
|
+
locale: string;
|
|
130
|
+
calendar: string;
|
|
131
|
+
numberingSystem: string;
|
|
132
|
+
dateTimeFormatHash: string;
|
|
133
|
+
numberFormatSymbol: string;
|
|
134
|
+
pluralCategories: string[];
|
|
135
|
+
dstConsistent?: boolean;
|
|
136
|
+
}
|
|
137
|
+
interface LanguagesComponent {
|
|
138
|
+
language: string;
|
|
139
|
+
languages: string[];
|
|
140
|
+
consistentMainLanguage: boolean;
|
|
141
|
+
}
|
|
142
|
+
interface UserAgentDataComponent {
|
|
143
|
+
userAgent: string;
|
|
144
|
+
brands: Array<{
|
|
145
|
+
brand: string;
|
|
146
|
+
version: string;
|
|
147
|
+
}>;
|
|
148
|
+
mobile: boolean;
|
|
149
|
+
platform: string;
|
|
150
|
+
architecture: string;
|
|
151
|
+
bitness: string;
|
|
152
|
+
model: string;
|
|
153
|
+
platformVersion: string;
|
|
154
|
+
fullVersionListHash: string;
|
|
155
|
+
}
|
|
156
|
+
interface StorageComponent {
|
|
157
|
+
localStorage: boolean;
|
|
158
|
+
sessionStorage: boolean;
|
|
159
|
+
indexedDB: boolean;
|
|
160
|
+
cachesApi: boolean;
|
|
161
|
+
serviceWorker: boolean;
|
|
162
|
+
quotaBytes: number;
|
|
163
|
+
usageBytes: number;
|
|
164
|
+
}
|
|
165
|
+
interface SpeechComponent {
|
|
166
|
+
available: boolean;
|
|
167
|
+
voiceCount: number;
|
|
168
|
+
defaultVoice: string;
|
|
169
|
+
voicesHash: string;
|
|
170
|
+
}
|
|
171
|
+
interface MathComponent {
|
|
172
|
+
engineHint: "V8" | "SpiderMonkey" | "JavaScriptCore" | "Unknown";
|
|
173
|
+
constantsHash: string;
|
|
174
|
+
acos: number;
|
|
175
|
+
acosh: number;
|
|
176
|
+
asinh: number;
|
|
177
|
+
atanh: number;
|
|
178
|
+
cbrt: number;
|
|
179
|
+
cosh: number;
|
|
180
|
+
expm1: number;
|
|
181
|
+
log1p: number;
|
|
182
|
+
sinh: number;
|
|
183
|
+
tanh: number;
|
|
184
|
+
powPi: number;
|
|
185
|
+
}
|
|
186
|
+
interface WebRTCComponent {
|
|
187
|
+
available: boolean;
|
|
188
|
+
candidateTypes: string[];
|
|
189
|
+
localIpPresent: boolean;
|
|
190
|
+
sdpFeedbackHash: string;
|
|
191
|
+
}
|
|
192
|
+
interface ConnectionComponent {
|
|
193
|
+
available: boolean;
|
|
194
|
+
effectiveType: string;
|
|
195
|
+
rtt: number;
|
|
196
|
+
downlink: number;
|
|
197
|
+
saveData: boolean;
|
|
198
|
+
}
|
|
199
|
+
interface AntiSpoofComponent {
|
|
200
|
+
isBot: boolean;
|
|
201
|
+
isSpoofed: boolean;
|
|
202
|
+
isIncognito: boolean;
|
|
203
|
+
isVirtualMachine?: boolean;
|
|
204
|
+
webdriver: boolean;
|
|
205
|
+
automationArtifacts: string[];
|
|
206
|
+
chromeObjectAnomaly: boolean;
|
|
207
|
+
permissionsInconsistent: boolean;
|
|
208
|
+
workerMismatch: boolean;
|
|
209
|
+
canvasNoiseDetected: boolean;
|
|
210
|
+
audioNoiseDetected: boolean;
|
|
211
|
+
prototypeTampered?: boolean;
|
|
212
|
+
tamperedFunctions?: string[];
|
|
213
|
+
zeroOuterDimensions?: boolean;
|
|
214
|
+
stackEngineMismatch?: boolean;
|
|
215
|
+
timezoneDstMismatch?: boolean;
|
|
216
|
+
reasons: string[];
|
|
217
|
+
}
|
|
218
|
+
interface FingerprintComponents {
|
|
219
|
+
canvas: CanvasComponent;
|
|
220
|
+
webgl: WebGLComponent;
|
|
221
|
+
webgpu: WebGPUComponent;
|
|
222
|
+
audio: AudioComponent;
|
|
223
|
+
hardware: HardwareComponent;
|
|
224
|
+
screen: ScreenComponent;
|
|
225
|
+
cssMedia?: CssMediaMatrixComponent;
|
|
226
|
+
mediaCodecs?: MediaCodecsComponent;
|
|
227
|
+
fonts: FontsComponent;
|
|
228
|
+
timezoneIntl: TimezoneIntlComponent;
|
|
229
|
+
languages: LanguagesComponent;
|
|
230
|
+
userAgentData: UserAgentDataComponent;
|
|
231
|
+
storage: StorageComponent;
|
|
232
|
+
speech: SpeechComponent;
|
|
233
|
+
math: MathComponent;
|
|
234
|
+
webrtc: WebRTCComponent;
|
|
235
|
+
connection: ConnectionComponent;
|
|
236
|
+
antiSpoof: AntiSpoofComponent;
|
|
237
|
+
}
|
|
238
|
+
type SecurityRuleAction = "allow" | "challenge" | "block" | "flag";
|
|
239
|
+
interface FingerprintThreatInfo {
|
|
240
|
+
dangerLevel: number;
|
|
241
|
+
action?: SecurityRuleAction;
|
|
242
|
+
matchedRuleId?: string | null;
|
|
243
|
+
isBot: boolean;
|
|
244
|
+
isSpoofed: boolean;
|
|
245
|
+
isIncognito: boolean;
|
|
246
|
+
isVpn: boolean;
|
|
247
|
+
isTor: boolean;
|
|
248
|
+
isDatacenter: boolean;
|
|
249
|
+
isProxy: boolean;
|
|
250
|
+
isVirtualMachine?: boolean;
|
|
251
|
+
crossBrowserMatched: boolean;
|
|
252
|
+
vpn?: boolean;
|
|
253
|
+
proxy?: boolean;
|
|
254
|
+
tor?: boolean;
|
|
255
|
+
datacenter?: boolean;
|
|
256
|
+
bot?: boolean;
|
|
257
|
+
spoofed?: boolean;
|
|
258
|
+
ipAddress?: string;
|
|
259
|
+
asnNumber?: number | null;
|
|
260
|
+
asnOrg?: string | null;
|
|
261
|
+
country?: string | null;
|
|
262
|
+
city?: string | null;
|
|
263
|
+
latitude?: number | null;
|
|
264
|
+
longitude?: number | null;
|
|
265
|
+
durationMs: number;
|
|
266
|
+
collectorCount: number;
|
|
267
|
+
}
|
|
268
|
+
interface FingerprintProIpLocation {
|
|
269
|
+
city?: {
|
|
270
|
+
name: string | null;
|
|
271
|
+
};
|
|
272
|
+
country?: {
|
|
273
|
+
code: string | null;
|
|
274
|
+
name: string | null;
|
|
275
|
+
};
|
|
276
|
+
latitude?: number | null;
|
|
277
|
+
longitude?: number | null;
|
|
278
|
+
asn?: {
|
|
279
|
+
asn: string | null;
|
|
280
|
+
name: string | null;
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
interface FingerprintProSeenTimestamp {
|
|
284
|
+
global: string | null;
|
|
285
|
+
subscription: string | null;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Unified Dual-API Result supporting 100% of ThumbmarkJS Pro and Fingerprint.com (FingerprintJS Pro) schemas.
|
|
289
|
+
*/
|
|
290
|
+
interface BloumeIDResult {
|
|
291
|
+
visitorId: string;
|
|
292
|
+
thumbmark: string;
|
|
293
|
+
hardwareHash: string;
|
|
294
|
+
requestId: string;
|
|
295
|
+
visitorFound: boolean;
|
|
296
|
+
confidence: {
|
|
297
|
+
score: number;
|
|
298
|
+
revision?: string;
|
|
299
|
+
comment?: string;
|
|
300
|
+
};
|
|
301
|
+
incognito: boolean;
|
|
302
|
+
browserName: string;
|
|
303
|
+
browserVersion: string;
|
|
304
|
+
os: string;
|
|
305
|
+
osVersion: string;
|
|
306
|
+
device: string;
|
|
307
|
+
ip: string;
|
|
308
|
+
ipLocation: FingerprintProIpLocation;
|
|
309
|
+
firstSeenAt: FingerprintProSeenTimestamp;
|
|
310
|
+
lastSeenAt: FingerprintProSeenTimestamp;
|
|
311
|
+
linkedId?: string | null;
|
|
312
|
+
tag?: Record<string, unknown> | string | null;
|
|
313
|
+
components: FingerprintComponents;
|
|
314
|
+
info: FingerprintThreatInfo;
|
|
315
|
+
}
|
|
316
|
+
interface AntiReplayEnvelope {
|
|
317
|
+
timestamp: number;
|
|
318
|
+
nonce: string;
|
|
319
|
+
signature: string;
|
|
320
|
+
fullHash: string;
|
|
321
|
+
hardwareHash: string;
|
|
322
|
+
durationMs: number;
|
|
323
|
+
linkedId?: string;
|
|
324
|
+
tag?: Record<string, unknown> | string;
|
|
325
|
+
components: FingerprintComponents;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export type { AntiReplayEnvelope as A, BloumeIDInitConfig as B, CanvasComponent as C, FingerprintComponents as F, HardwareComponent as H, LanguagesComponent as L, MathComponent as M, ScreenComponent as S, TimezoneIntlComponent as T, UserAgentDataComponent as U, WebGLComponent as W, BloumeIDOptions as a, FingerprintJSGetOptions as b, BloumeIDResult as c, AntiSpoofComponent as d, AudioComponent as e, CollectorName as f, ConnectionComponent as g, CssMediaMatrixComponent as h, FingerprintProIpLocation as i, FingerprintProSeenTimestamp as j, FingerprintThreatInfo as k, FontsComponent as l, MediaCodecsComponent as m, SecurityRuleAction as n, SpeechComponent as o, StorageComponent as p, WebGPUComponent as q, WebRTCComponent as r };
|
package/package.json
CHANGED
|
@@ -1,6 +1,70 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bloume/id",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Self-hosted browser fingerprinting, anti-spoofing and visitor identity SDK by Bloume SAS",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Bloume SAS",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public",
|
|
9
|
+
"registry": "https://registry.npmjs.org/"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/bloume-sas/bloumeid.git",
|
|
14
|
+
"directory": "packages/bloumeid"
|
|
15
|
+
},
|
|
16
|
+
"type": "module",
|
|
17
|
+
"main": "./dist/index.cjs",
|
|
18
|
+
"module": "./dist/index.mjs",
|
|
19
|
+
"unpkg": "./dist/bloumeid.global.js",
|
|
20
|
+
"jsdelivr": "./dist/bloumeid.global.js",
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"import": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"default": "./dist/index.mjs"
|
|
27
|
+
},
|
|
28
|
+
"require": {
|
|
29
|
+
"types": "./dist/index.d.cts",
|
|
30
|
+
"default": "./dist/index.cjs"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"./server": {
|
|
34
|
+
"import": {
|
|
35
|
+
"types": "./dist/server.d.ts",
|
|
36
|
+
"default": "./dist/server.mjs"
|
|
37
|
+
},
|
|
38
|
+
"require": {
|
|
39
|
+
"types": "./dist/server.d.cts",
|
|
40
|
+
"default": "./dist/server.cjs"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"files": [
|
|
45
|
+
"dist",
|
|
46
|
+
"README.md"
|
|
47
|
+
],
|
|
48
|
+
"sideEffects": false,
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "tsup",
|
|
51
|
+
"dev": "tsup --watch",
|
|
52
|
+
"typecheck": "tsc --noEmit",
|
|
53
|
+
"lint": "eslint \"src/**/*.ts\"",
|
|
54
|
+
"test": "vitest run",
|
|
55
|
+
"test:coverage": "vitest run --coverage"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@arethetypeswrong/cli": "^0.16.4",
|
|
59
|
+
"@types/node": "^22.9.0",
|
|
60
|
+
"@typescript-eslint/eslint-plugin": "^8.15.0",
|
|
61
|
+
"@typescript-eslint/parser": "^8.15.0",
|
|
62
|
+
"@vitest/coverage-v8": "^2.1.5",
|
|
63
|
+
"eslint": "^9.15.0",
|
|
64
|
+
"jsdom": "^25.0.1",
|
|
65
|
+
"publint": "^0.2.12",
|
|
66
|
+
"tsup": "^8.3.5",
|
|
67
|
+
"typescript": "^5.6.3",
|
|
68
|
+
"vitest": "^2.1.5"
|
|
69
|
+
}
|
|
70
|
+
}
|