GithubHelp home page GithubHelp logo

lw10583 / bitcoin-sweep-privkey Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bitcoin-extras/bitcoin-sweep-privkey

0.0 0.0 0.0 196 KB

python bitcoin sweeper

License: MIT License

Python 100.00%

bitcoin-sweep-privkey's Introduction

Python Private-Key Sweeper

This wonderful piece of software is a python based private key sweeper. It allows you to sweep any private key to a central wallet. This feature is useful, to for example collect funds from multiple, different wallets (e.g. depositing wallets at a bitcoin gambling site) into a central place.

Privacy

While blockchain.info allows you to sweep a private key, we wanted to introduce a complete autonomous solution. While it can be used with blockchain.info as a backend, you can as well use your own blockchain API server like the INSIGHT API so drive this software.

Transactions get pushed to the network through your local bitcoind node, so your transactions (if chosen so) never leave your own infrastructure prior to relaying.

Running

The funds can be swept easily by issuing this command with the private key as an argument. So for example to sweep all funds from 1LdgTMX2MEqdfT3VcDpX4GyD1mqCP8LkYe do:

python sweeper.py 5JZB4ewYsbJhej6Psb5gL1h5BL26EoA49EzwoLSSXB8rtEDX8su

Configuration

The configuration takes place in the file sweeper.py, more precisely in this piece of code. This should be self explaining. Make sure to put in the correct settings.

DESTINATION_ADDRESS="1SEX4FWWSxEHfRZ9Q8ugrC3rqEdW2tJVo"
FEE_PER_KB = 10000
BTCD_USER = "bitcoinrpc"
BTCD_PASS = "yourpassword"
BTCD_HOST = "localhost"
BTCD_PORT = "8332"

# this should point to your INSIGHT API Server
#UNSPENT_CHECKER = "http://localhost:3000/api/addr/%s/utxo?noCache=1"

MAX_BITCOIND_TRIES = 10
MAX_BLOCKCHAIN_API_URL_TRIES = 10

Also, the time configurations are telling the script, how often to try reaching a service before exiting.

Make sure your bitcoin client is configured as a server, e.g. edit (or create) a bitcoin.conf file with at least this content. The file usually lies in ~/.bitcoin/bitcoin.conf:

rpcuser=bitcoinrpc
rpcpassword=yourpassword
server=1

If you want to use your own Bitcoin API Server (for example insight) you need the txindex=1 flag as well.

rpcuser=bitcoinrpc
rpcpassword=yourpassword
server=1
txindex=1

bitcoin-sweep-privkey's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.