Skip to main content

AML Wheel Generator

Ko-fi

Buy Me A Coffee

Generate custom AML (Anti-Money Laundering) pattern detector projects with one command. Create your own branded compliance scanner with selected detection patterns, ready to build as a wheel and publish.

Features

  • One-Command Generation: aml-wheel-gen init my-scanner --patterns mixer sanctions → full project
  • Modular Patterns: Choose from 6 detection modules (mixer, sanctions, structuring, layering, privacy coins, bridges)
  • Auto-Build: Generate wheel with aml-wheel-gen build
  • Offline-First: All analysis runs locally, no external dependencies at runtime
  • Extensible Templates: Jinja2-based templates for easy customization

Installation

pip install aml-wheel-gen

Quick Start

Generate a New Project

# Interactive mode (select patterns)
aml-wheel-gen init my-aml-scanner

# Specify patterns directly
aml-wheel-gen init my-aml-scanner --patterns mixer sanctions structuring --chain ethereum

# Include all patterns
aml-wheel-gen init my-aml-scanner --all-patterns

Build the Wheel

aml-wheel-gen build ./my-aml-scanner

Update Address Lists

aml-wheel-gen update-lists ./my-aml-scanner

Available Detection Patterns

Pattern Description Risk Severity
sanctions OFAC and sanctions list matching CRITICAL
mixer Tornado Cash, Wasabi, etc. HIGH
structuring Transaction splitting below thresholds MEDIUM
layering Rapid fund movement through addresses MEDIUM
privacy_coins Privacy protocol interactions MEDIUM
bridges Cross-chain bridge usage LOW

Commands

# Initialize new project
aml-wheel-gen init <name> [--patterns p1 p2] [--chain eth|btc|multi] [--all-patterns]

# Build wheel from project
aml-wheel-gen build <project-path> [--output dist/]

# Update address lists
aml-wheel-gen update-lists [project-path]

# List available patterns
aml-wheel-gen list-patterns

# List supported chains
aml-wheel-gen list-chains

Generated Project Structure

my-aml-scanner/
├── my_aml_scanner/
│   ├── __init__.py
│   ├── cli.py              # Click CLI
│   ├── scanner.py          # Main scanner class
│   ├── config.py           # Configuration
│   ├── models.py           # Data models
│   ├── detectors/          # Detection modules
│   │   ├── sanctions.py
│   │   ├── mixer.py
│   │   └── ...
│   ├── chains/             # Chain adapters
│   │   ├── ethereum.py
│   │   └── bitcoin.py
│   └── data/               # Address lists
│       ├── sanctions.json
│       ├── mixers.json
│       └── bridges.json
├── tests/
├── pyproject.toml
├── README.md
└── LICENSE

Using Generated Projects

After generating:

cd my-aml-scanner
pip install -e .

# Use CLI
my-aml-scanner scan 0x742d35Cc6634C0532925a3b844Bc9e7595f...
my-aml-scanner scan-file transactions.json

# Use as library
python -c "from my_aml_scanner import Scanner; print(Scanner().scan_address('0x...'))"

Customization

Generated projects are fully editable. Common customizations:

  1. Add addresses to data/*.json files
  2. Adjust thresholds in config.py
  3. Add new detectors by extending BaseDetector
  4. Modify risk weights in config.py

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Test generation
aml-wheel-gen init test-project --all-patterns
cd test-project && pip install -e . && pytest

Powered By

Detection patterns derived from chain-scanner.

License

MIT License

Metadata

Release files for aml-wheel-gen 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aml-wheel-gen 0.1.0
File Size Uploaded
aml_wheel_gen-0.1.0.tar.gz 27.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aml-wheel-gen 0.1.0
File Interpreter ABI Platform
aml_wheel_gen-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 62.8 kB

Release files / aml_wheel_gen-0.1.0.tar.gz

Download URL aml_wheel_gen-0.1.0.tar.gz
Size 27.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a40eddae954243aa76ce3757947ec5da3337b414b50d4478890322ec8693a19a
BLAKE2b-256 checksum
How to use checksums
56e2fe010d9e4addb3dd281b2748465c6e7afbc2f0057a1a6299c66c317ed84a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / aml_wheel_gen-0.1.0-py3-none-any.whl

Download URL aml_wheel_gen-0.1.0-py3-none-any.whl
Size 35.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b7c71ab369daff1f1b655c758f424e17358160506bdb89b06d7ec9b1b00e482d
BLAKE2b-256 checksum
How to use checksums
c70561be8313310e6fc567adcb70b0ed1eca210542dc8a40c5b2ca48af8a5843
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page