1.3.56 • Published 2 years ago

@binance/fingerprint v1.3.56

Weekly downloads
7
License
MIT
Repository
-
Last release
2 years ago

@binance/fingerprint

Binance fingerprint is a fingerprint collection SDK on the web, which is used to identify a unique user.

Install

yarn add @binance/fingerprint

Usage

import { getInfoPromise } from '@binance/fingerprint'

const deviceInfo = await getInfoPromise()

console.log(deviceInfo) // a base64 string

API

getInfoPromise(id?: string): Promise

Get device information, Will contain fingerprint information + device ID + associated old device ID

  • id: Used to identify users,eg: userId or email, default is ''

Returns Promise(base64 string)

saveCurrentDeviceId(id: string, deviceId: string)

This method is used to save the deviceId logged in by the current user, which is distributed by the backend as part of the next device information

  • id: Used to identify users,eg: userId or email
  • deviceId: This device id will be used as part of the second acquisition of device information.
import { saveCurrentDeviceId } from '@binance/fingerprint'

const mockDeviceId = new Date().getTime()

// When the user logs in, mockDeviceId should be distributed by the backend
saveCurrentDeviceId('email or userId', mockDeviceId)

getFpInfo()

Get fingerprint information

const fpInfo = await getFpInfo();

// console.log(fpInfo)
{
  "screen_resolution": "900,1440",
  "available_screen_resolution": "877,1405",
  "system_version": "Mac OS 10.14.5",
  "brand_model": "unknown",
  "system_lang": "en",
  "timezone": "GMT+8",
  "timezoneOffset": -480,
  "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36",
  "list_plugin": "Chrome PDF Plugin,Chrome PDF Viewer,Native Client",
  "canvas_code": "d98c8d8b",
  "webgl_vendor": "Intel Inc.",
  "webgl_renderer": "Intel(R) Iris(TM) Plus Graphics 655",
  "audio": "124.04345808873768",
  "platform": "MacIntel",
  "web_timezone": "Asia/Shanghai",
  "device_name": "Chrome V83.0.4103.116 (Mac OS)",
  "fingerprint": "421ec839eeda07b409a3c51d448bd0a5"
}

License

MIT

1.3.56

2 years ago

1.3.53

3 years ago

1.3.54

3 years ago

1.3.55

3 years ago

1.3.52

3 years ago

1.3.51

3 years ago

1.3.50

4 years ago

1.3.49

4 years ago

1.3.46

4 years ago

1.3.47

4 years ago

1.3.45

4 years ago

1.3.48

4 years ago

1.3.44

4 years ago

1.3.43

4 years ago

1.3.42

5 years ago

1.3.41

5 years ago

1.3.39

6 years ago

1.3.36

6 years ago

1.3.37

6 years ago

1.3.38

6 years ago

1.3.35

6 years ago

1.3.33

6 years ago

1.3.34

6 years ago

1.3.32

6 years ago

1.3.31

6 years ago

1.3.30

6 years ago

1.3.29

6 years ago

1.3.28

6 years ago

1.3.27

6 years ago

1.3.25

6 years ago

1.3.26

6 years ago

1.3.24

6 years ago

1.3.22

6 years ago

1.3.23

6 years ago

1.3.21

6 years ago

1.3.19

6 years ago

1.3.20

6 years ago

1.3.18

6 years ago

1.3.17

6 years ago

1.3.16

6 years ago