@echoscan/browser-verifier

中文文档
3.0.5发布于 2026/11/07MITTypeScriptES Module零依赖近 30 天下载 2071

Browser-side verifier for EchoScan pre-login device trust and browser fingerprinting.

原始使用文档
文档目录6 节
  1. Device identity compatibility
  2. SDK 3.0 diagnostic boundary
  3. Install
  4. Generate an imprint
  5. ESM, UMD, and CDN
  6. Documentation

EchoScan Browser Verifier

EchoScan Browser Verifier runs in the browser to support pre-login device trust and browser fingerprinting. It uses a publishable Browser Environment ID to return a server-issued imprint; your trusted backend then queries EchoScan Report API v1 and applies your business policy.

Device identity compatibility

Versions 2.x and 3.x use the same device identity namespace and require a compatible service supporting the v4 submission API. Existing history remains available; devices from releases before 2.0 are not automatically recognized or merged into this namespace.

If device identification is unavailable, the run fails without submitting an imprint. This technical failure does not establish risk.

SDK 3.0 diagnostic boundary

Version 3.0 removes the getLastRunTrace() method exposed by published 2.x, along with the previous detailed diagnostic and error exports. run() returns imprint and an optional minimal diagnostic receipt; SDK_VERSION identifies the installed SDK. Failures use EchoScanError.category: cancelled, timeout, disposed, run_in_progress, detection_failed, configuration or submission_failed. Failures also include SDK version and a minimal diagnostic receipt: not_sent (no correlated API request), unconfirmed (sent without receipt), or received (durable server receipt observed), with its API operation. An ID never grants diagnostic access. Original errors, response bodies, causes, precise deadlines and internal identity failure reasons are not public contracts. Remove trace exports and old error-class checks before migrating. The matching backend must deploy first. For support, provide the SDK version, public error category and minimal diagnostic receipt. These support details do not replace the formal Report or determine risk.

Install

npm install @echoscan/[email protected]

Create a Browser Environment in EchoScan, register the exact Allowed Origin where the verifier will run, and copy its publishable environmentId. The Environment ID is not a Secret API Key or Workspace ID.

Generate an imprint

import { createEchoScan } from '@echoscan/browser-verifier'

const verifier = createEchoScan({
  environmentId: 'env_0123456789abcdef0123456789abcdef',
})

const { imprint } = await verifier.run()

A successful run returns imprint and may include a minimal diagnostic receipt. New imprints use the imp_<32 lowercase hex> format. Send the imprint to your trusted backend with the protected sign-in, registration, payment, or other business request.

Your backend uses its server-only Secret API Key to query Report API v1:

GET https://api.echoscan.org/api/v1/fingerprint/report/{imprint}
X-API-Key: <server-secret-api-key>
Accept: application/json

Never place a Secret API Key or Workspace ID in browser code. Keep the full Report and final allow, challenge, review, or deny decision on your backend.

ESM, UMD, and CDN

The npm package provides ESM, TypeScript declarations, and a single-file UMD build exposed as window.EchoScan. When self-hosting the ESM build, publish its matching chunks/ directory too. EchoScan also serves the current supported CDN builds at:

  • ESM: https://cdn.echoscan.org/v1/echoscan.esm.js
  • UMD: https://cdn.echoscan.org/v1/echoscan.umd.js

Documentation

版本与发布记录

@echoscan/browser-verifier 共发布 25 个版本,首次发布于 2026/03/14;过去 12 个月发布了 25 个版本。

版本发布日期距今
3.0.5latest2026/11/077 天前
3.0.42026/11/068 天前
3.0.32026/11/049 天前
3.0.22026/10/2619 天前
3.0.12026/10/2619 天前
3.0.02026/10/2519 天前

关于 @echoscan/browser-verifier 的常见问题

@echoscan/browser-verifier 是什么?

Browser-side verifier for EchoScan pre-login device trust and browser fingerprinting.

如何安装 @echoscan/browser-verifier?

在项目目录运行 npm install @echoscan/browser-verifier,或使用 pnpm add / yarn add / bun add。

@echoscan/browser-verifier 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@echoscan/browser-verifier 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@echoscan/browser-verifier 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.12.0 <23。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@echoscan/browser-verifier 可以商用吗?

@echoscan/browser-verifier 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@echoscan/browser-verifier 的下载量有多少?

根据 npm 官方下载统计,@echoscan/browser-verifier 在 2026/10/13 – 2026/11/11 这 30 天内被下载 2,071 次,日均约 69 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@echoscan/browser-verifier 还在维护吗?

最新版本 3.0.5 发布于 2026/11/07(7 天前);至今共发布 25 个版本,其中过去 12 个月发布了 25 个;首次发布于 2026/03/14。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。