🏠 Home

How to check if wallet is sanctioned in javascript?

Checking whether a crypto wallet address is sanctioned or not is simple. There is a npm package @smartpkg/sanctions. All you need is to specify the network in terms of chain id and the wallet address.

import { isSanctioned } from '@smartpkg/sanctions';

const walletAddress = '0x7F367cC41522cE07553e823bf3be79A889DEbe1B';
const chainId = 1;
const result = await isSanctioned(chainId, walletAddress);

console.log(result); // true

The package supports various networks:

  • Ethereum (Chain ID: 1)
  • Polygon (Chain ID: 137)
  • BNB Smart Chain (Chain ID: 56)
  • Avalanche (Chain ID: 43114)
  • Optimism (Chain ID: 10)
  • Arbitrum (Chain ID: 42161)
  • Fantom (Chain ID: 250)
  • Celo (Chain ID: 42220)