OFAC Sanctioned Digital Currency Addresses Tool

repository·main·Indexed 41 days ago

https://github.com/0xb10c/ofac-sanctioned-digital-currency-addresses

A tool for extracting sanctioned digital currency addresses from the US Office of Foreign Asset Control (OFAC) Specially Designated Nationals (SDN) XML list. It processes sdn_advanced.xml to generate TXT or JSON lists for assets including XBT, ETH, XMR, LTC, ZEC, DASH, BTG, ETC, BSV, BCH, XVG, USDC, USDT, XRP, TRX, ARB, BSC, and SOL.

Tokens
810
Snippets
3
Records
4
Agent score
2%

What's inside OFAC Sanctioned Digital Currency Addresses

  1. Extract OFAC sanctioned digital currency addresses

    main

    This tool extracts sanctioned Bitcoin and other digital currency addresses from the US Office of Foreign Asset Control (OFAC) Specially Designated Nationals (SDN) list. It processes the sdn_advanced.xml file to identify addresses associated with various assets.

    Supported assets include:

    • XBT (Bitcoin), ETH (Ethereum), XMR (Monero), LTC (Litecoin), ZEC (ZCash), DASH (Dash), BTG (Bitcoin Gold), ETC (Ethereum Classic), BSV (Bitcoin Satoshi Vision), BCH (Bitcoin Cash), XVG (Verge), USDC (USD Coin), USDT (USD Tether), XRP (Ripple), TRX (Tron), ARB (Arbitrum), BSC (Binance Smart Chain), and SOL (Solana).

    To use the tool, you must first download the sdn_advanced.xml file from the OFAC website.

    $ wget https://www.treasury.gov/ofac/downloads/sanctions/1.0/sdn_advanced.xml
  2. Run generate-address-list.py to extract addresses

    main

    The generate-address-list.py script extracts sanctioned addresses from the sdn_advanced.xml file located in your current working directory.

    Basic Usage

    Running the script without arguments extracts XBT (Bitcoin) addresses into a .txt file by default.

    Selecting Specific Assets

    Pass asset tickers as positional arguments to extract specific currencies (e.g., ETH, ETC, DASH, LTC).

    Specifying Input File

    If your XML file is not in the current directory, use the -sdn flag to provide the path.

    Output Formats

    • TXT (Default): One address per line in a file named sanctioned_addresses_<TICKER>.txt.
    • JSON: A JSON list of addresses in a file named sanctioned_addresses_<TICKER>.json. Use the -f JSON flag to specify this format.
    # Extract Bitcoin (default)
    $ python3 generate-address-list.py
    
    # Extract multiple specific assets
    $ python3 generate-address-list.py ETH ETC DASH LTC
    
    # Extract Monero in JSON format
    $ python3 generate-address-list.py XMR -f JSON
    
    # Use a custom path for the SDN XML file
    $ python3 generate-address-list.py -sdn /path/to/sdn_advanced.xml
  3. Reference: generate-address-list.py CLI arguments

    main

    The following command-line arguments are used by generate-address-list.py to control extraction behavior and output format.

    -sdn <path>    Path to the sdn_advanced.xml file (defaults to current directory)
    -f <format>    Output file format (e.g., TXT, JSON)
    <tickers>      List of asset tickers to extract (e.g., XBT, ETH, LTC)