#dust #privacy #wallet #bitcoin #utxo

bin+lib dust_sweeper

A Rust tool to identify and remove dust UTXOs in a privacy-preserving way

2 releases

0.1.1 Feb 23, 2025
0.1.0 Feb 23, 2025

#5 in #dust

Download history 235/week @ 2025-02-19 50/week @ 2025-02-26

285 downloads per month

MIT/Apache

12KB
120 lines

๐Ÿงน dust_cleaner

Crates.io Docs.rs License: MIT

A Rust-based tool to identify and remove dust UTXOs from a Bitcoin wallet in a privacy-preserving way.
Supports sweeping dust to a burn address or consolidating dust safely.


๐Ÿ“ฆ Installation

From Crates.io

Install the CLI using cargo:

cargo install dust_cleaner

Usage

dust_sweeper_cli [OPTIONS] --rpc <RPC_URL> --user <USERNAME> --pass <PASSWORD>

Options:
    -r, --rpc <RPC_URL>         Bitcoin Core RPC URL (e.g., http://localhost:18443)
    -u, --user <USERNAME>       RPC username
    -p, --pass <PASSWORD>       RPC password
    -t, --threshold <AMOUNT>    Dust threshold in sats [default: 1000]
        --dry-run              Dry-run mode (only list dust UTXOs, no PSBT created)
        --burn-address <ADDR>  Burn address to send dust to [default: 1BitcoinEaterAddressDontSendf59kuE]
        --fee <AMOUNT>         Fixed fee in sats [default: 500]
    -h, --help                 Print help information

Example output:

๐Ÿ” Found 2 dust UTXOs:
๐Ÿ’ฐ UTXO: 800 sats
๐Ÿ’ฐ UTXO: 600 sats
Using fixed fee: 500 sats

๐Ÿ”ฅ PSBT #1 (Burning dust to 1BitcoinEaterAddressDontSendf59kuE):
cHNidP8BAH4CAAAAAr4S/3p+... [base64 PSBT data]

๐Ÿ”ง Features

  • Identify dust UTXOs below a configurable threshold
  • Privacy-preserving dust removal by:
    • Grouping UTXOs by address
    • Creating separate transactions for each address
  • Support for burning dust to a specified address

๐Ÿ› ๏ธ Building from Source

  1. Clone the repository:
git clone https://github.com/IgnacioPorte/dust_sweeper
cd dust_sweeper
  1. Build the project:
cargo build --release
  1. The binary will be available at target/release/dust_sweeper_cli

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

โš ๏ธ Disclaimer

This tool is provided as-is. Always verify transactions before signing and broadcasting. Test thoroughly on regtest/testnet before using on mainnet.

Dependencies

~11MB
~152K SLoC