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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@veria-protocol/sdk

v0.1.0

Published

Official JavaScript/TypeScript SDK for Veria Compliance API - wallet screening, sanctions checks, KYC/AML

Readme

Veria SDK for JavaScript/TypeScript

Official SDK for the Veria Compliance API - screen wallet addresses for sanctions, PEP, and AML compliance.

Installation

npm install veria
# or
yarn add veria
# or
pnpm add veria

Quick Start

import { VeriaClient } from 'veria';

const client = new VeriaClient({
  apiKey: 'veria_live_xxxxxxxxxxxx' // Get yours at https://protocol.veria.cc
});

// Screen an address
const result = await client.screen('0x742d35Cc6634C0532925a3b844Bc454e4438f44e');

console.log(`Risk: ${result.risk}, Score: ${result.score}`);

// Check if should block
if (client.shouldBlock(result)) {
  console.log('Transaction blocked for compliance');
}

Features

  • Full TypeScript support with complete type definitions
  • Supports Ethereum addresses, ENS names, Solana addresses, and IBANs
  • Configurable timeout and base URL
  • Proper error handling with typed errors
  • Works in Node.js, browsers, and edge runtimes

API

new VeriaClient(config)

Create a new Veria client.

const client = new VeriaClient({
  apiKey: 'veria_live_xxx',     // Required: Your API key
  baseUrl: 'https://api.veria.cc', // Optional: API base URL
  timeout: 30000,                  // Optional: Request timeout in ms
});

client.screen(input)

Screen an address for compliance risks.

const result = await client.screen('vitalik.eth');

Returns:

{
  score: 15,                    // Risk score 0-100
  risk: 'low',                  // low | medium | high | critical
  chain: 'ethereum',            // Detected blockchain
  resolved: '0x742d35...',      // Resolved address
  latency_ms: 45,               // Processing time
  details: {
    sanctions_hit: false,       // On sanctions list?
    pep_hit: false,             // Politically exposed person?
    watchlist_hit: false,       // On any watchlist?
    checked_lists: ['OFAC SDN', 'UN Consolidated', ...],
    address_type: 'wallet'      // wallet | contract | exchange | mixer
  }
}

client.shouldBlock(result)

Helper to determine if an address should be blocked.

const result = await client.screen(address);
if (client.shouldBlock(result)) {
  // Block the transaction
}

Returns true if:

  • sanctions_hit is true, OR
  • risk is 'high' or 'critical'

Risk Levels

| Level | Score | Recommended Action | |-------|-------|-------------------| | low | 0-29 | Proceed | | medium | 30-59 | Review | | high | 60-79 | Block recommended | | critical | 80-100 | Block required |

Error Handling

import { VeriaClient, VeriaError } from 'veria';

try {
  const result = await client.screen(address);
} catch (error) {
  if (error instanceof VeriaError) {
    console.error(`Error: ${error.code} - ${error.message}`);
    // Handle specific error codes
    switch (error.code) {
      case 'INVALID_API_KEY':
        // Re-authenticate
        break;
      case 'RATE_LIMIT_EXCEEDED':
        // Back off and retry
        break;
      case 'TIMEOUT':
        // Retry with longer timeout
        break;
    }
  }
}

Usage with Web3 Libraries

With wagmi/viem

import { useAccount } from 'wagmi';
import { VeriaClient } from 'veria';

const client = new VeriaClient({ apiKey: process.env.VERIA_API_KEY });

function useComplianceCheck() {
  const { address } = useAccount();
  const [isAllowed, setIsAllowed] = useState<boolean | null>(null);

  useEffect(() => {
    if (address) {
      client.screen(address).then(result => {
        setIsAllowed(!client.shouldBlock(result));
      });
    }
  }, [address]);

  return isAllowed;
}

With ethers.js

import { ethers } from 'ethers';
import { VeriaClient } from 'veria';

const client = new VeriaClient({ apiKey: process.env.VERIA_API_KEY });

async function safeTransfer(to: string, amount: bigint) {
  const result = await client.screen(to);

  if (client.shouldBlock(result)) {
    throw new Error(`Recipient blocked: ${result.risk} risk, sanctions: ${result.details.sanctions_hit}`);
  }

  // Proceed with transfer
  const tx = await contract.transfer(to, amount);
  return tx;
}

Resources

License

MIT