Skip to main content

Generate custom AML pattern detector projects with one command

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aml_wheel_gen-0.1.0.tar.gz (27.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aml_wheel_gen-0.1.0-py3-none-any.whl (35.0 kB view details)

Uploaded Python 3

File details

Details for the file aml_wheel_gen-0.1.0.tar.gz.

File metadata

  • Download URL: aml_wheel_gen-0.1.0.tar.gz
  • Upload date:
  • Size: 27.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for aml_wheel_gen-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a40eddae954243aa76ce3757947ec5da3337b414b50d4478890322ec8693a19a
MD5 1aec940265d3d5272d6de1b396870942
BLAKE2b-256 56e2fe010d9e4addb3dd281b2748465c6e7afbc2f0057a1a6299c66c317ed84a

See more details on using hashes here.

File details

Details for the file aml_wheel_gen-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: aml_wheel_gen-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 35.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for aml_wheel_gen-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b7c71ab369daff1f1b655c758f424e17358160506bdb89b06d7ec9b1b00e482d
MD5 3c5c8f86d1863d62600251932a1a127d
BLAKE2b-256 c70561be8313310e6fc567adcb70b0ed1eca210542dc8a40c5b2ca48af8a5843

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page