npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@fraud-intercept/sdk

v0.2.0

Published

Fraud Intercept SDK for real-time Digital Trust event scoring

Downloads

68

Readme

@fraud-intercept/sdk

Typed Node.js client for the Fraud Intercept Submit Event API (POST /api/v1/events).

Published on npm as @fraud-intercept/sdk. API reference: fraud-intercept.com/api-docs.

Requirements

  • Node.js 18+ (uses global fetch)
  • A Fraud Intercept API key from your brand dashboard (see authentication)

Install

npm install @fraud-intercept/sdk

Quick start

import FraudIntercept from '@fraud-intercept/sdk'

const client = new FraudIntercept({
  apiKey: process.env.FRAUD_INTERCEPT_API_KEY!,
  baseUrl: 'https://fraud-intercept.com',
})

const result = await client.checkRegistration({
  eventId: 'fingerprint-request-id-or-unique-id',
  email: '[email protected]',
  customerName: 'Jane Doe',
})

if (result.recommendation === 'block') {
  // Deny the action
}

Event types

Send the appropriate helper at each integration point:

| Helper | eventType | |--------|-------------| | checkRegistration() | register | | checkLogin() | login | | checkDeposit() | deposit | | checkWithdrawal() | withdrawal |

Or use submitEvent({ eventType, eventId, ... }) directly.

EVENT_TYPES in this package must stay in sync with lib/utils/event-type.ts in the main app.

Configuration

| Option | Required | Default | |--------|----------|---------| | apiKey | Yes | — | | baseUrl | No | https://fraud-intercept.com | | timeout | No | 10000 (ms) | | retries | No | 2 (network errors only) |

Idempotency

Pass a stable key per logical operation to avoid duplicate events on retries:

await client.submitEvent(
  { eventType: 'deposit', eventId: 'fp_abc', email: '[email protected]' },
  { idempotencyKey: 'deposit-user-123-2026-06-03' },
)

Response fields

The client returns the API data object, including:

  • recommendationallow | review | block
  • score, riskLevel, triggeredRules, flags
  • matchedThreat — Known Threat match (legacy alias: matchedFraudster)
  • device, multiAccount, coverage, notes

Errors

  • FraudInterceptError — validation and API errors (status, code)
  • AuthenticationError — invalid or missing API key (401)
  • RateLimitError — rate limit exceeded (429)

Client-side validation runs before any HTTP call (missing eventId, invalid eventType, no identifiers, invalid creditCardHash format).

Payment network matching

Cross-brand payment linking requires FI Payment Fingerprint v1 — the same 64-character hash for the same funding PAN across all brands on the network.

Algorithm

  1. Use the funding PAN (primary account number) only — not wallet DPANs or processor tokens.
  2. Strip all non-digit characters from the PAN string.
  3. Validate the result is 13–19 digits.
  4. Compute SHA-256 over the UTF-8 encoding of that digit string.
  5. Send the digest as lowercase hexadecimal, exactly 64 characters, in creditCardHash.

Do not include expiry, CVV, cardholder name, billing ZIP, or merchant-specific salts.

Reference vector

| Input PAN (digits only) | Fingerprint v1 | |-------------------------|----------------| | 4111111111111111 | 9bbef19476623ca56c17da75fd57734dbf82530686043a6e491c6d71befe8f6e |

Use the SDK helpers to compute or validate hashes:

import {
  hashCreditCardPan,
  FI_PAYMENT_FINGERPRINT_V1_REFERENCE_HASH,
  validateCreditCardHash,
} from '@fraud-intercept/sdk'

const fingerprint = hashCreditCardPan('4111 1111 1111 1111')
// → 9bbef19476623ca56c17da75fd57734dbf82530686043a6e491c6d71befe8f6e

Anti-patterns (will not network-match)

These identifiers will not correlate with other brands in the identity graph:

  • Payment processor tokens / network tokens
  • Apple Pay / Google Pay device account numbers (DPANs)
  • HMAC-SHA256(PAN, merchant_secret) or other per-merchant salted hashes
  • BIN + last4 only (ambiguous, not a PAN fingerprint)
  • Prefixed digests such as sha256:... (rejected by the API)

Full contract: Payment fingerprint — API docs.

Development

cd packages/sdk
npm install
npm run build
npm test

From the repo root:

npm run build:sdk
npm run test:sdk